[Solved] Strange ZIF Adapter for PIC - Page 1
Forum section: electronics / general

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 26, 2017, 10:44:56 pm
content: 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?

author: funkathustra
author_rank: Regular Contributor
timestamp: September 26, 2017, 11:24:53 pm
content: Quote from: NivagSwerdna on September 26, 2017, 10:44:56 pmI 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.

author: stj
author_rank: Super Contributor
timestamp: September 27, 2017, 01:20:13 am
content: 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

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 27, 2017, 09:59:57 am
content: Quote from: funkathustra on September 26, 2017, 11:24:53 pmI 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.

author: Ian.M
author_rank: Super Contributor
timestamp: September 27, 2017, 10:26:10 am
content: 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

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 27, 2017, 12:56:52 pm
content: 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 PIC16F1936I'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.

author: stj
author_rank: Super Contributor
timestamp: September 27, 2017, 06:23:04 pm
content: 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.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 28, 2017, 09:40:07 am
content: Quote from: stj on September 27, 2017, 06:23:04 pmNope. I don't know that.https://www.aliexpress.com/item/New-ICSP-Adapter-ZIF-40-pin-socket-PIC-Board-For-PICkit-2-kit3/32338794487.htmlI 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.

author: Ian.M
author_rank: Super Contributor
timestamp: September 28, 2017, 11:29:07 am
content: Post a good closeup of the track side and we can tell you if there are any better ways to bodge it.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 28, 2017, 12:29:09 pm
content: Quote from: Ian.M on September 28, 2017, 11:29:07 amWill do.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 28, 2017, 09:02:41 pm
content: 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.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 28, 2017, 09:05:41 pm
content: 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.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 28, 2017, 09:37:18 pm
content: 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 3Firmware Suite Version.....01.48.18Firmware type..............Enhanced MidrangeTarget voltage detectedTarget Device ID (0x0) is an Invalid Device ID. Please check your connections to the Target Device.

author: stj
author_rank: Super Contributor
timestamp: September 28, 2017, 09:44:18 pm
content: try 5v for programming.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 28, 2017, 09:54:37 pm
content: 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 happensAnyway... then connected PicKit3 to PC and get...Currently loaded firmware on PICkit 3Firmware Suite Version.....01.48.18Firmware type..............Enhanced MidrangeTarget voltage detectedTarget device PIC16LF1939 found.Device ID Revision = 1So 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

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 28, 2017, 09:56:04 pm
content: Quote from: stj on September 28, 2017, 09:44:18 pmCurrently I'm tinkering with PIC16LF1939; which I'm pretty sure won't tolerate 5V (officially). Thanks for the interest though.

author: stj
author_rank: Super Contributor
timestamp: September 28, 2017, 11:36:34 pm
content: i am corrected!datasheet says 3.6v

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 29, 2017, 08:10:25 am
content: 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 3Firmware Suite Version.....01.41.06Firmware type..............dsPIC33F/24F/24HProgrammer to target power is enabled - VDD = 3.500000 volts.Target device PIC24FJ128GC006 found.Device ID Revision = 4The following memory area(s) will be programmed:program memory: start address = 0x0, end address = 0x5ffconfiguration memoryDevice Erased...Programming...Programming/Verify completeWorks just fine and I can debug etc.I came across...http://ww1.microchip.com/downloads/en/DeviceDoc/ETN35_MPLAB%20ICD%203%20VDD_SLEW_RATE.pdfBut 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.

author: Ian.M
author_rank: Super Contributor
timestamp: September 29, 2017, 08:21:05 am
content: 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.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 29, 2017, 10:28:54 am
content: 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.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 29, 2017, 12:20:49 pm
content: 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 3Firmware Suite Version.....01.48.18Firmware type..............Enhanced MidrangeTarget voltage detectedTarget device PIC16LF1939 found.Device ID Revision = 1OMG. 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......6p6c/modular connector whatever... if you prefer

author: Ian.M
author_rank: Super Contributor
timestamp: September 29, 2017, 01:11:13 pm
content: Ah, the joys of Microchip ICSP/ICD cabling, especially the 6P6C 'RJ12' ICD 2/3 varietyMicrochip 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..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:QuoteAs its wired in parallel with the ICD 2/3 connector, I suspect the designer was far past their Ballmer peak!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.

author: stj
author_rank: Super Contributor
timestamp: September 29, 2017, 01:47:16 pm
content: btw,this is what a universal programming adapter looks like.i have one.http://www.ebay.co.uk/itm/142521523925

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 29, 2017, 01:51:50 pm
content: Quote from: stj on September 29, 2017, 01:47:16 pmThat's rubbish. It doesn't have an RJ12 connector for my ICD3.

author: Ian.M
author_rank: Super Contributor
timestamp: September 29, 2017, 01:56:29 pm
content: ... and according to the EBAY listing it only supports 8 bit PIC devices with several exclusions. That's *FAR* from universal

author: stj
author_rank: Super Contributor
timestamp: September 29, 2017, 04:09:51 pm
content: well if the pinouts fit the jumpers, it's as universal as the programmer you plug onto it.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: September 29, 2017, 04:44:59 pm
content: 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 doneThe 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

author: KL27x
author_rank: Super Contributor
timestamp: September 30, 2017, 08:11:53 am
content: Quote+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).QuoteBleh. 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.