Author Topic: Interface for programming 4 same PICs at once with PICKit 3  (Read 1628 times)

0 Members and 1 Guest are viewing this topic.

Offline microviaTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: fr
Interface for programming 4 same PICs at once with PICKit 3
« on: September 15, 2025, 01:22:07 pm »
Hi,
I would like to find a way to easily program my pcb panels (4 pcbs each) using a single ICSP port on the breakaway edges of the panel to program.
I understand that direct parallel programming isn't possible due to the cumulative current draw, but is there a simple interface or adaptor to allow this ?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 14132
Re: Interface for programming 4 same PICs at once with PICKit 3
« Reply #1 on: September 15, 2025, 02:50:55 pm »
PGC/ICSPCLK and PGD/ICSPDAT can each be wired in parallel across all devices provided external nMCLR is enabled for all devices and remains enabled after programming.  You then need to provide all devices with Vdd power and switch Vpp to each device in turn, run a programming cycle keeping all the other nMCLR pins grounded to keep the other devices inactive and tri-stated, then switch to the next device.

For older PICs requiring  high-voltage programming, you may have to handle up to 13V on Vpp and some mA of current so relay switching is advisable.  Modern PICs use code entry to programming mode and Vpp never exceeds Vdd, and the nMCLR/Vpp pin is a unidirectional logic input so a simple logic level '1-hot' demux will do to drive them e.g. 74HC238, with the programmer's Vpp going to EN. You will need some scriptable IO pins attached to your programming station's control PC to select the PIC to program. You will probably require an external source of Vdd as the programmer is unlikely to be able to supply sufficient for three idle boards + the active one.  This could be controlled by programmer Vdd or by one of the scriptable IO pins.

Alternatively, for a manual programming station, simply use a four pole four way switch to route Vpp to one PIC while grounding all the others.

This approach, albeit with manual selection of the active Vpp by jumper, has been used by Microchip themselves, on demo and development boards that come with a default MCU soldered in place, but allow you to plug in a different MCU on a PIM over it.

Note that the programmer itself may need to have a high output drive capability usually only found on pro grade tools, and you need to keep all the commoned ICSP connections and lead back to the programmer as short as possible to minimise capacitive loading.
« Last Edit: September 15, 2025, 02:55:59 pm by Ian.M »
 
The following users thanked this post: microvia

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 3890
  • Country: us
  • Not An Expert
Re: Interface for programming 4 same PICs at once with PICKit 3
« Reply #2 on: September 15, 2025, 08:02:18 pm »
For my in-panel programming of ARM stuff I designed a SWD multiplexer board.  It doesn't do them in parallel, but it does do them one at a time and handles all the switching between boards.  Also handles power switching and monitoring so I can see if there is a short or something before it starts programming. 
 
The following users thanked this post: microvia

Offline microviaTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: fr
Re: Interface for programming 4 same PICs at once with PICKit 3
« Reply #3 on: September 17, 2025, 05:58:49 pm »
Ok so basically the panels need ICSP tracks through the tabs and a custom PICKit interface to program the PICs individually, which involves sniffing the firmware coming out of the PICKit and apply it to each chip. Quite complicated and not sure how feasible this is. It would be better to design a multi-programming interface from scratch which takes the HEX from MPLAB (or a HEX on a USB) and manages everything. Not really worth the effort in my case unless this already exists as a DIY project. I'll just program each pcb individually using the Programm-To-Go option and a Pogo clip on the ICSP header.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 14132
Re: Interface for programming 4 same PICs at once with PICKit 3
« Reply #4 on: September 17, 2025, 06:35:44 pm »
No, there's no 'sniffing firmware'.  The PICkit 3 sends a command to the selected PIC and checks the response.  This happens multiple times in a programming session.  It is *NOT* a gang programmer so it can only handle a single target per session.  My description above is how to switch the target so the PICkit 3 can do sequential programming of multiple  devices without moving its ICSP connector to a different header.
 

Offline microviaTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: fr
Re: Interface for programming 4 same PICs at once with PICKit 3
« Reply #5 on: September 17, 2025, 08:19:53 pm »
What would be interesting is a dedicated circuit able to program serveral PICs (or other MCUs) simultaneously with parallel programmation processes, and a header with common PGC/PGD and individual MCLR/VPP. Else, you'd spend almost as much time programming your PICs as with one PICKit in Program-To-Go mode (in which case your best option is N PICKits running at the same time).
« Last Edit: September 17, 2025, 08:22:26 pm by microvia »
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30326
  • Country: nl
    • NCT Developments
Re: Interface for programming 4 same PICs at once with PICKit 3
« Reply #6 on: September 17, 2025, 09:13:11 pm »
I have seen a product in which 10+ PICs where programmed in parallel. The pin carrying the response from the PIC to the programmer was connected to the first PIC. The rest was supposed to become programmed just like the first one.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 9865
  • Country: ca
  • Non-expert
Re: Interface for programming 4 same PICs at once with PICKit 3
« Reply #7 on: September 17, 2025, 11:51:58 pm »
mike always suggests this one: https://www.microchip.com/en-us/microchipdirect/programming-services

If you can either program a bootloader, or have finalized stable code already.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline microviaTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: fr
Re: Interface for programming 4 same PICs at once with PICKit 3
« Reply #8 on: September 21, 2025, 06:35:58 am »
I know Microchip's programming service. I was looking for a way to program a whole panel to update the firmware, like as a PIC or other MCU which can handle what the PICKit does, but in parallel.
 

Offline fchk

  • Frequent Contributor
  • **
  • Posts: 413
  • Country: de
Re: Interface for programming 4 same PICs at once with PICKit 3
« Reply #9 on: September 21, 2025, 10:39:20 am »
A MPLAB SNAP is only 10$. Nothing prevents you from using four of them in parallel. They should have unique serials so you know which one is which.

Most modern 8-bit PICs and all 16 and 32 bit PICs should do LVP.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->