Author Topic: PIC Programmer (Issue Resolved)  (Read 1187 times)

0 Members and 1 Guest are viewing this topic.

Offline ko4nrbsTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: us
PIC Programmer (Issue Resolved)
« on: April 21, 2025, 01:46:13 am »
All I want to do is read PIC chips and save the firmware HEX file on my computer in case the chip’s firmware gets corrupted.  The PCBs are used in my Game Cameras.  I don’t experiment or develop circuits so my requirements are pretty simple.

I have been using a Pickit 3 clone with Mplab IPE version 6.20 successfully until tonight.  The software recognizes the programmer and will connect with it.  The problem is it won’t recognize the 16F688 chip.  Worked ok yesterday but went south on me.  All connections have been verified and I have tried several different voltages for the chip with no luck.

Isn’t there an easier way to do what I need?  Don’t want to spend a bunch more money and it still won’t work.

Thank you,
Bill
« Last Edit: April 24, 2025, 02:03:09 pm by ko4nrbs »
 

Offline Andy Chee

  • Super Contributor
  • ***
  • Posts: 1534
  • Country: au
Re: PIC Programmer
« Reply #1 on: April 21, 2025, 05:40:31 am »
I have been using a Pickit 3 clone with Mplab IPE version 6.20 successfully until tonight. 
I'm guessing a recent Windows update may have bricked the serial port driver.  Other than that, I don't really know.
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 7373
  • Country: ca
Re: PIC Programmer
« Reply #2 on: April 21, 2025, 05:52:21 am »
you need to search here, there is a stand alone software outside mplab

does cost an arm ... for the registred version

is your pic kit 3 genuine or clone ...
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 10405
  • Country: gb
Re: PIC Programmer
« Reply #3 on: April 21, 2025, 08:28:21 am »
PICKitminus is a free alternative to PICKitPlus (both standalone). I have used it both on a genuine PicKit2 and a PicKit3 clone, it auto detects. Unfortunately it seems to have been falsely reported as malware in the last couple of weeks and all files removed but it is worth keeping an eye on for status... http://kair.us/projects/pickitminus/index.html?s=09
Best Regards, Chris
 

Offline forrestc

  • Supporter
  • ****
  • Posts: 740
  • Country: us
Re: PIC Programmer
« Reply #4 on: April 21, 2025, 10:52:01 am »
I have been using a Pickit 3 clone with Mplab IPE version 6.20 successfully until tonight.  The software recognizes the programmer and will connect with it.  The problem is it won’t recognize the 16F688 chip.  Worked ok yesterday but went south on me.  All connections have been verified and I have tried several different voltages for the chip with no luck.

Have you tried another 16f688 or even just any other PIC?

I've had programmers go haywire, and I've blown the programming circuitry in chips.  Both have the symptoms you described.  Well, that and all of the normal issues (no power, etc.).

One note:  The MPLAB Snap is a $15.00 programmer - if you're ok with providing the power to the MCU (and not have the programmer do it), that might work for your use case.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13412
Re: PIC Programmer
« Reply #5 on: April 21, 2025, 11:13:11 am »
The PIC16F688 requires HV programming which MPLAB Snap does't support.   
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2855
  • Country: us
Re: PIC Programmer
« Reply #6 on: April 21, 2025, 11:35:24 am »
You can get the stand-alone PicKit3 software "PICkit 3 Programmer App and Scripting Tool v3.10" from the Microchip archive.

   https://www.microchip.com/en-us/tools-resources/archives/mplab-ecosystem

Scroll down almost to the bottom.
The tool also lets you reset the PicKit3 to work with MPLAB X
 
The following users thanked this post: Gyro

Offline ko4nrbsTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: us
Re: PIC Programmer
« Reply #7 on: April 21, 2025, 11:52:02 am »
you need to search here, there is a stand alone software outside mplab

does cost an arm ... for the registred version

is your pic kit 3 genuine or clone ...
It is a clone.
Bill
 

Offline fchk

  • Frequent Contributor
  • **
  • Posts: 323
  • Country: de
Re: PIC Programmer
« Reply #8 on: April 21, 2025, 04:47:14 pm »
I have been using a Pickit 3 clone with Mplab IPE version 6.20 successfully until tonight. 
I'm guessing a recent Windows update may have bricked the serial port driver.  Other than that, I don't really know.

There is no serial port on a PICKIT3. So even with bricked serial port drivers the PICKIT3 should work.

Your problem is:
1. PICKIT clones often leave out protection circuits for cost reduction. You may end up with bad level shifters (74LVC1T45) or with a bad DCDC for Vpp.
2. Genuine PICKIT3's aren't made any more for nearly 10 years.
3. MPLAB SNAP and MPLAB BASIC don't support High Voltage programming, which is essential for 8 bit PICs, especially the very old ones you are using.
4. PICKIT4 isn't sold any more.

This leaves you with PICKIT5 as your ONLY option. There are no clones of PICKIT4 and 5, so you will get a genuine one with proper protection devices installed.

You can also get another PICKIT3 clone and be more careful next time, with ESD mat etc at your workplace. Does also cost money.

Or try to swap all level shifters and try again. You will need good soldering skills and suitable equipment for SMD PCB rework.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13412
Re: PIC Programmer
« Reply #9 on: April 21, 2025, 04:58:47 pm »
See https://www.eevblog.com/forum/microcontrollers/pickit3-not-working/ which has a few hints for diagnosing what part of your PICkit 3 has failed.

 

Offline Sacodepatatas

  • Regular Contributor
  • *
  • Posts: 128
  • Country: es
Re: PIC Programmer
« Reply #10 on: April 21, 2025, 06:03:15 pm »
In my experience, the Pickit 3 is picky about the USB voltage. If your computer suplies the bare minimum Vusb voltage, the Pickit fails yielding some weird error mensajes, such as "excess current" or so. Powering the IC from an external 5V PSU, turned to be a solution for me.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2855
  • Country: us
Re: PIC Programmer
« Reply #11 on: April 21, 2025, 06:19:14 pm »
In my experience, the Pickit 3 is picky about the USB voltage. If your computer suplies the bare minimum Vusb voltage, the Pickit fails yielding some weird error mensajes, such as "excess current" or so. Powering the IC from an external 5V PSU, turned to be a solution for me.

I have had the same experience.  The PicKit3 can barely power the PIC chip to be programmed.  Forget it if the PIC is in circuit.  The majority of the time, I power the PIC from an external source.
 

Offline ko4nrbsTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: us
Re: PIC Programmer
« Reply #12 on: April 21, 2025, 06:29:43 pm »
Well I deleted all the MPLAB software and reloaded Version 6.20 which worked before.  I still can't connect to the 16F688 but no problem connecting to the 18F4550 PICs I have.  Can external power be connected through the adapter?


I tried several different 16F688 PICs and get the same results.  All connections were verified.

Bill

 

Offline ko4nrbsTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: us
Re: PIC Programmer
« Reply #13 on: April 21, 2025, 06:58:54 pm »
Something changed.  Can't program the 18F4550 now.
Target Device ID (0x1200) is an Invalid Device ID. Please check your connections to the Target Device.

pain in the ass!!

May just bite the bullet and buy a Pickit 5.

Bill
 

Offline fchk

  • Frequent Contributor
  • **
  • Posts: 323
  • Country: de
Re: PIC Programmer
« Reply #14 on: April 21, 2025, 07:10:59 pm »
Well I deleted all the MPLAB software and reloaded Version 6.20 which worked before.  I still can't connect to the 16F688 but no problem connecting to the 18F4550 PICs I have.  Can external power be connected through the adapter?

This programming adapters are not very good from an electrical point of view.
1. Possibly long traces
2. No capacitors next to the power supply pins. EACH pair needs 100n ceramic X7R within a few mm of the pin pair. No bulk capacitance either.
3. Pullup on MCLR?
4. No means of powering the chip. It's NOT recommended to power the chip through the programmer. Use a separate, switchable bench power supply with proper current limiting.
5. Building a proper programming board on a perfboard is not difficult. I'd add TVS protection diodes to the programming pins in order to protect the programmer.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2855
  • Country: us
Re: PIC Programmer
« Reply #15 on: April 21, 2025, 10:13:32 pm »
Something changed.  Can't program the 18F4550 now.
Target Device ID (0x1200) is an Invalid Device ID. Please check your connections to the Target Device.

pain in the ass!!

May just bite the bullet and buy a Pickit 5.

Bill

You are aware that the PicKit3's firmware is modified every time you change to a different PIC to program?  Code is written into the PicKit to handle the chip being programmed or read.  Then, the PicKit reads or writes to you PIC of interest.  As long as you stay with the same PIC family, this is only done the first time.  Try the standalone program I pointed to earlier and RESET your PicKit3.

The standalone program ALSO sets the mode of the PicKit3 to work with it or to work with MPLAB.  You need to change this from the pull-down menu to go back to MPLAB.  I've had to go through this process now and then when my PicKit3 got lost.

You can use the standalone program to do your reading and not need MPLABX at all (your choice).

As far as external power, you would need to connect power to the 5V and GND on your breakout board and set the PicKIt  NOT to power it but just monitor the voltage.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2855
  • Country: us
Re: PIC Programmer
« Reply #16 on: April 21, 2025, 10:18:56 pm »
Oh,You don't need a pullup on the master clear (MCLR) line.
The PicKit drives it directly and when programming it drives the MCLR to 12V if I remember correct.
You would need to prevent the high voltage getting back onto the 5V line through the pull-up if you have one.
You're better off without a pullup unless you're wanting to actually execute the code you're programming.
 

Offline fchk

  • Frequent Contributor
  • **
  • Posts: 323
  • Country: de
Re: PIC Programmer
« Reply #17 on: April 22, 2025, 11:01:24 am »
Oh,You don't need a pullup on the master clear (MCLR) line.
The PicKit drives it directly and when programming it drives the MCLR to 12V if I remember correct.
You would need to prevent the high voltage getting back onto the 5V line through the pull-up if you have one.
You're better off without a pullup unless you're wanting to actually execute the code you're programming.

... and as long as the PICKIT is powered. When the Pickit goes passive MCLR gets undefined, and that is not good.
The 10k pullup doesn't do any harm - when the PICKIT drives 12V on MCLR less then a mA will flow throgh the pullup to 5V, which has never been a problem in my projects. Or include a diode in series if this is a problem.
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 4279
  • Country: us
Re: PIC Programmer
« Reply #18 on: April 22, 2025, 11:58:32 am »
I agree on a pull-up with 10k or so on MCLR.

If you go back to ancient history (e.g., 2003) Microchip (MCC) had a advisory on its site.  The link still seems to work, but the information is not the same.  The original version is preserved as a pdf here: https://www.elnec.com/sw/30277d.pdf

This is what MCC recommended at the time for 16F8x MCU's:


MCC has always been vague about "isolation" circuitry, but its PIC forums suggest just resistors , e.g., 4.7k, will suffice.  There have been many changes to what's recommended on MCLR.  Some datasheets advise strongly against any capacitor.  The diode seems to have been quietly omitted.  Today, I just use a 10k resistor to VCC for the 12F5xx, 12F6xx, 12F1xxx, and 16F1xxx chips seemingly without problems.  Of course, you need adequate decoupling of VCC to ground.  I don't put any resistor on VDD as shown and almost always power the circuit separately.  Almost always, my programmer is an ICD3.
« Last Edit: April 22, 2025, 12:01:50 pm by jpanhalt »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13412
Re: PIC Programmer
« Reply #19 on: April 22, 2025, 01:25:33 pm »
IIRC, most of the discrepancies in recommended nMCLR/Vpp  'isolation' circuits were due to Microchip's transition from EPROM (OTP unless in windowed  CERDIP) to FLASH program memory in their MCUs.   Their EPROM technology did not use an on-chip charge pump for the programming voltage, so programmers of that era had to supply significant current to the Vpp pin during programming (e.g. for PIC18C452, max. 50mA), which meant it had a robust pin driver circuit, capable of charging/discharging a moderate value external reset timing capacitor quickly.   The diode was  problematic because it effectively floated the /MCLR pin during the reset pulse.  It worked if there was enough diode junction capacitance to keep the pin low long enough.  This was before the introduction of an internal weak pullup for /MCLR.

With FLASH PICs, came the introduction of low cost programmers and debuggers, Microchip's PICkit and ICD.  Neither had  strong /MCLR pin drivers as the new technology used an on-chip charge pump to get the required bias voltages for programming the FLASH memory array, relegating the 'Vpp' supply to only being a control input.   They were much less tolerant of reset pin capacitance, which compounded a design error* in the earliest FLASH PCs which used the same program counter for programming as they did when running, so slowly rising /MCLR with a clock source present could  result in the program counter incrementing between the chip exiting /MCLR RESET and reaching the Vpp threshold to enter programming mode, resulting in the program being written to the memory at an incorrect address, off by one (or more) locations.    To get fast enough nMCLR/Vpp edges, diodes were no longer acceptable so the recommendation shifted to using a nominally 5K isolation resistor between /MCLR and any RC reset circuit as all ICSP capable programmers of that era were specced to be able to drive a 5K load on /MCLR.  4K7 was the generally 'close enough' value actually used. 

The recommendation for a simple 10K pullup to Vdd, *NO* RC reset circuit or isolation circuit came with the introduction of internal reset timers, and was permissible as all programmers had target buffers or other circuits that would draw at least 1mA from Vdd_target, so the  max. Vpp programming voltage of 13V couldn't drive enough current through the  pullup to cause Vdd to rise out of spec.

* To resolve this bug in later devices, programming mode entry was made  to perform a hardware reset.
« Last Edit: April 22, 2025, 01:30:37 pm by Ian.M »
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2855
  • Country: us
Re: PIC Programmer
« Reply #20 on: April 22, 2025, 04:07:58 pm »
I don't see the need to discuss in-circuit pull-up requirements for a PIC.

We only have a PIC in a ZIF socket on a programming header. 
We ARE NOT trying the execute any code.
Refer to the OP's photo:
   

If the PicKit is 'Off', the job is done.  The PIC is not connected to anything.
He is ONLY trying to read the hex code from a number of PICs!!!    |O

Have we lost sight of the task-at-hand?
« Last Edit: April 22, 2025, 04:10:24 pm by MarkF »
 

Offline ko4nrbsTopic starter

  • Regular Contributor
  • *
  • Posts: 69
  • Country: us
Re: PIC Programmer (Resolved Issue)
« Reply #21 on: April 24, 2025, 02:02:46 pm »
Got it working.  I had the jumpers on the adapter set for 18F4550 Pics instead of the 14 pin PICs like the 16F688. 
Bill
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf