Author Topic: [Solved] Strange ZIF Adapter for PIC  (Read 5905 times)

0 Members and 1 Guest are viewing this topic.

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
[Solved] Strange ZIF Adapter for PIC
« on: September 26, 2017, 10:44:56 pm »
I seem to have purchased one of these, or actually something slightly different since mine has a small pot as well, in the dim and distant past...



and now I am thinking about using it to program a 16F1936 device.  The 16F1936 is 28-pin so a few of the pins seem to line up... PGC, PGD, VPP and VSS and VDD on the right hand side... on the left hand side VSS and VDD seem to be applied to pins that would make sense for a 40-pin device... possibly harmless but they would be applied to the external crystal pins which might not be ideal.

Has anyone seen one of these?  Is it universal?  universal enought for a 28-pin PIC?

Maybe  should bin it ad get out a breadboard?

« Last Edit: September 29, 2017, 05:46:49 pm by NivagSwerdna »
 

Offline funkathustra

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Strange ZIF Adapter for PIC
« Reply #1 on: September 26, 2017, 11:24:53 pm »
Has anyone seen one of these?  Is it universal?  universal enought for a 28-pin PIC?

I don't know? Why don't you just look at it and see how it's wired?

Circuit boards — especially single-sided ones with all thru-hole packages — aren't magical black boxes. If it puts PGC and PGD and MCLR and power in the right spots, what more do you need for programming?

For what it's worth, Microchip, for years, went to great lengths to make sure their devices had common pinouts. But I don't think we can say "28-pin PIC" anymore, as I'm pretty sure the 28-pin PIC24s and 28-pin PIC32s have different pinouts than the PIC16 and PIC18 did back in the day.
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #2 on: September 27, 2017, 01:20:13 am »
the rj45 jack is for a very old programmer - maybe a picstart.
the pinstrip on the top edge is hopefully compatable with a pk2/3
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #3 on: September 27, 2017, 09:59:57 am »
Why don't you just look at it and see how it's wired?
I did... that's why I mentioned that the pins on the left seem compatible with only 40-pin devices... I can't see an obvious way of changing this and wondered is anyone else had a similar gadget.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12863
Re: Strange ZIF Adapter for PIC
« Reply #4 on: September 27, 2017, 10:26:10 am »
If its got jumper wires to patch the socket pin mapping you can use it for nearly any DIP package PIC.  Some extra parts may be needed to let you connect Vcore or Vusb decoupling caps close enough to the PIC, and some Y jumper wires may be needed to let you hook up *ALL* the power and ground pins.   If it has banks of conventional jumpers to configure the pinout its more problematic - you'll have to map them out and check for conflicts as the supplied instructions are usually totally shite.   IIRC there are at least three possible 28 pin PIC pinouts, (ignoring variations in PGM pin location or required decoupling caps): one legacy PIC16F5x one, one for 8 bit PICS and one for 16 or 32 bit PICs
« Last Edit: September 27, 2017, 10:28:24 am by Ian.M »
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #5 on: September 27, 2017, 12:56:52 pm »
Thanks.

I think the intention was to make it flexible but it seems actually rather inflexible...

I'll have to map it out and possibly cut some tracks... e.g. currently VDD is wired to Pin 11, VSS to Pin 12. (regardless of jumpers)

That works for PIC16F1934 and PIC16F1937 (40 pin) but not for PIC16F1936

I'm just surprised since I assume this was intended to be universal.

Might be quicker to put it in the bin and breadboard my part.
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #6 on: September 27, 2017, 06:23:04 pm »
you know it's not a programming adapter right?

it will do that, but it's a simple dev board.
like a predecessor to arduino.

that's why it has an onboard crystal, and all those pin headers.
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #7 on: September 28, 2017, 09:40:07 am »
you know it's not a programming adapter right?
Nope. I don't know that.

https://www.aliexpress.com/item/New-ICSP-Adapter-ZIF-40-pin-socket-PIC-Board-For-PICkit-2-kit3/32338794487.html

I think it is bodge-able.  for 40pin devices e.g. PIC16F1939 the only thing that stops it working is a 10k pull-up... I need to try that later.

For the PIC16F1936 it might be bodge-able by moving the 28-pin package down to four pins above the bottom of the zif socket and then patching /MCLR, PGC, PGD down.

It does have an LED to RA0, in that sense it is a dev board for blink.


 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12863
Re: Strange ZIF Adapter for PIC
« Reply #8 on: September 28, 2017, 11:29:07 am »
Post a good closeup of the track side and we can tell you if there are any better ways to bodge it.
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #9 on: September 28, 2017, 12:29:09 pm »
Post a good closeup of the track side and we can tell you if there are any better ways to bodge it.
Will do.
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #10 on: September 28, 2017, 09:02:41 pm »
Looking a bit closer I think it should work... but it doesn't quite...

With a PIC16LF1939 in situ and powering Target from ICD3 I cannot read device ID.

This is a bit unexplained as I can see PGC and PGD connected.  VPP, VDD and GND connected. LVP connected for luck.

All these see to go to the correct pins.  There is also a 10k pullup from /MCLR to VDD which is good.

There is POWer LED (which glows) with a 1k2 series resistor between VDD and VSS ...  (too much current for ICD3?)

There is no C between VDD and VSS on this board.

Photo of board attached.

« Last Edit: September 28, 2017, 09:10:49 pm by NivagSwerdna »
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #11 on: September 28, 2017, 09:05:41 pm »
FWIW... the way it seems to work is the ZIF pins are connected 1:1 to the pins on the far outside of the board.  The inner lines of pins are mostly unconnected with a few exceptions... when no jumpers are in place they have no function.
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #12 on: September 28, 2017, 09:37:18 pm »
Applying external 3v3 via the power jack makes the LED glow a bit brighter but no effect otherwise... still..

Connecting to MPLAB ICD 3...

Currently loaded firmware on ICD 3
Firmware Suite Version.....01.48.18
Firmware type..............Enhanced Midrange

Target voltage detected
Target Device ID (0x0) is an Invalid Device ID. Please check your connections to the Target Device.
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #13 on: September 28, 2017, 09:44:18 pm »
try 5v for programming.
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #14 on: September 28, 2017, 09:54:37 pm »
I disconnected my ICD3 and swapped for a PicKit3...

Firstly I did not have the PicKit3 plugged into the PC... and the RA0 LED started flashing!!! No idea how that happens

Anyway... then connected PicKit3 to PC and get...

Currently loaded firmware on PICkit 3
Firmware Suite Version.....01.48.18
Firmware type..............Enhanced Midrange

Target voltage detected
Target device PIC16LF1939 found.
Device ID Revision = 1

So that works. 

No idea why my ICD3 doesn't work (and the ICD3 does pass the self-test when connected to ICD Test Module)

Very confused now

« Last Edit: September 28, 2017, 10:14:35 pm by NivagSwerdna »
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #15 on: September 28, 2017, 09:56:04 pm »
try 5v for programming.
Currently I'm tinkering with PIC16LF1939; which I'm pretty sure won't tolerate 5V (officially). Thanks for the interest though.
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #16 on: September 28, 2017, 11:36:34 pm »
i am corrected!
datasheet says 3.6v
 :-+
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #17 on: September 29, 2017, 08:10:25 am »
I started to doubt my ICD3 so I got out another custom project (which has a direct ICD connector I trust)...

Connecting to MPLAB ICD 3...

Currently loaded firmware on ICD 3
Firmware Suite Version.....01.41.06
Firmware type..............dsPIC33F/24F/24H

Programmer to target power is enabled - VDD = 3.500000 volts.
Target device PIC24FJ128GC006 found.
Device ID Revision = 4

The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x5ff
configuration memory

Device Erased...

Programming...
Programming/Verify complete

Works just fine and I can debug etc.

I came across... http://ww1.microchip.com/downloads/en/DeviceDoc/ETN35_MPLAB%20ICD%203%20VDD_SLEW_RATE.pdf  But maybe that is a red herring.  I will go hunting for another 40-pin PIC other than a PIC16F1939 in the junk box... not sure if I have one though.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12863
Re: Strange ZIF Adapter for PIC
« Reply #18 on: September 29, 2017, 08:21:05 am »
Personally, I'd desolder the ZIF socket from that board, and solder in a turned pin socket solely to use it as a demo board.  Its obviously *NOT* a universal programmer board and isn't worth having a ZIF socket on.

To use the ZIF socket, solder it onto a turned pin header to get a little more clearance and long enough pins and stick it in a breadboard.  Add all required decoupling caps,  connect up all Vdd/AVdd pins and all Vss/AVss pins then use a short (4" max) breakout cable between the programmer and the breadboard.    You are now ready to program a batch of whatever DIP chip you've set up for.
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #19 on: September 29, 2017, 10:28:54 am »
I tried a PIC16F914 (the only other 40-pin DIL I have) and got the same effect... so I think it is the connection to the ICD3 that is the issue... I re-squashed the ends of my double ended RJ12 link cable (two of them) and checked they are straight through.

I have trouble understanding all the mirroring/orientation of the RJ12 connection but comparing to the ICD3 user guide... is it possible the RJ12 socket on the ZIF board is actually backwards?  Looking into the open hole of the socket I see LVP on left and VPP on right... not sure about that.

(The PICKit3 was connected via the pins at the bottom not via the RJ12)

I see your point though... in reality it's just junk.  :)
« Last Edit: September 29, 2017, 12:24:47 pm by NivagSwerdna »
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #20 on: September 29, 2017, 12:20:49 pm »
Got a bit of six wire flat cable... put an RJ12 on one end...  *turned* the cable over and put another RJ12 at the other.

Connecting to MPLAB ICD 3...

Currently loaded firmware on ICD 3
Firmware Suite Version.....01.48.18
Firmware type..............Enhanced Midrange

Target voltage detected
Target device PIC16LF1939 found.
Device ID Revision = 1

OMG. What did I do to deserve that?  I'm 99.99999% sure that the ZIF board interpretation is WRONG in the defacto PIC standard sense but maybe my interpretation is wrong...  |O

...6p6c/modular connector whatever... if you prefer
« Last Edit: September 29, 2017, 12:32:10 pm by NivagSwerdna »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12863
Re: Strange ZIF Adapter for PIC
« Reply #21 on: September 29, 2017, 01:11:13 pm »
Ah, the joys of Microchip ICSP/ICD cabling, especially the 6P6C 'RJ12' ICD 2/3 variety  :popcorn:
Microchip don't have the best track record here. 

  • For quite a while their supplied short 6P6C modular cables were improperly crimped and not only didn't provide a reliable connection, but damaged the 6P6C sockets by depressing the spring contacts too far, bending them so that a properly crimped cable wouldn't connect reliably.  |O
    .
  • While their 6P6C target board pinout foulups generally get caught before the board in question is released, its notable they got the  PICkit 2 connector J1 on the Explorer 16 backwards.  In the PICkit 2 manual it states:
    Quote
    To use the Explorer 16 board, be aware that the connector labeled ?PICKIT2?
    incorrectly shows the location of PICkit 2 pin 1 on the silkscreen. That is, pin 1 is
    actually pin 6.
    As its wired in parallel with the ICD 2/3 connector, I suspect the designer was far past their Ballmer peak!  :palm:


Generally, with Microchip and compatible ICSP cabling its worth checking continuity from the PIC Vss pin right back to the USB cable ground before powering up a board + programmer/debugger hookup for the first time to be certain nothing in the ICSP/ICD cabling has been flipped.
« Last Edit: September 29, 2017, 01:17:12 pm by Ian.M »
 
The following users thanked this post: NivagSwerdna

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #22 on: September 29, 2017, 01:47:16 pm »
btw,
this is what a universal programming adapter looks like.
i have one.
http://www.ebay.co.uk/itm/142521523925


 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #23 on: September 29, 2017, 01:51:50 pm »
btw,
this is what a universal programming adapter looks like.
i have one.
http://www.ebay.co.uk/itm/142521523925
That's rubbish.  It doesn't have an RJ12 connector for my ICD3.  ;)
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12863
Re: Strange ZIF Adapter for PIC
« Reply #24 on: September 29, 2017, 01:56:29 pm »
... and according to the EBAY listing it only supports 8 bit PIC devices with several exclusions.   That's *FAR* from universal
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #25 on: September 29, 2017, 04:09:51 pm »
well if the pinouts fit the jumpers, it's as universal as the programmer you plug onto it.
 

Offline NivagSwerdnaTopic starter

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Strange ZIF Adapter for PIC
« Reply #26 on: September 29, 2017, 04:44:59 pm »
So after all that.... with a RJ12 mirrored/twisted cable RJ12 and a simple jumper between pin 8 and pin 12 (to get VSS to the correct pin for a 28 pin package)...

... all is done

The ZIF socket is now stored deep in the tool box and I can move on again to better things! 

Phew what an adventure!  Time for a  :popcorn:
 

Online KL27x

  • Super Contributor
  • ***
  • Posts: 4103
  • Country: us
Re: [Solved] Strange ZIF Adapter for PIC
« Reply #27 on: September 30, 2017, 08:11:53 am »
Quote
Personally, I'd desolder the ZIF socket from that board, and solder in a turned pin socket solely to use it as a demo board.  Its obviously *NOT* a universal programmer board and isn't worth having a ZIF socket on.
+1. Except I would solder it to a bit of veroboard and solder (square) pin header to it, kinda like what it looks like, already. And put a 6 pin header on it for the ICSP cable, in continuity with another 6 pin header for wirewrapping to the appropriate ZIF pins.

BTW, regular square header pins are more than long enough to bottom out in a breadboard, and you can use extra long pins if you want to put it on stilts. :) Turned pins are more prone to breaking at the point where they get thinner. (Female sockets for turned pins are also kinda sketchy. I don't trust them for more than a few insertions).

Quote
That's rubbish.  It doesn't have an RJ12 connector for my ICD3.  ;)
Bleh. My ICD3 has a regular female pin header on it, in addition to the RJ12 rubbish. I kept the wires short as possible and inserted some grounded copper clad shielding, IIRC. It also has an alternate mini USB port.

* I just looked at it. Haha, I also put the header offset from the RJ12, so it's actually on opposite side from the USB ports rather than the original 120ish degree (why?) offset, lol. I forgot how anal retentive I can be.
« Last Edit: September 30, 2017, 08:17:21 am by KL27x »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf