Author Topic: ICSP with several PIC mcu on the same board ?  (Read 4240 times)

0 Members and 1 Guest are viewing this topic.

Online JaunedeauTopic starter

  • Regular Contributor
  • *
  • Posts: 100
ICSP with several PIC mcu on the same board ?
« on: March 24, 2015, 05:27:29 pm »
Hi,

  I am currently working on a board which will have 3 small Pic mcus. The MCU will drive leds, and I guess that if I plug an ICSP on the board, I will power the three MCU, and two will start blinking leds while I programme the third, and that may draw too much current from the programmer.

  Another issue is that I am very short on space and having three separate 5 pins header is nor possible.

  Is there a known solution to this problem ?

Thank you,
John.
 

Offline 6thimage

  • Regular Contributor
  • *
  • Posts: 181
  • Country: gb
Re: ICSP with several PIC mcu on the same board ?
« Reply #1 on: March 24, 2015, 06:01:56 pm »
You could use jumpers for each of the pic power connectors - this would allow you to only have one pic powered at a time and would also allow them to share the same ICSP header. Alternatively, if you are using through hole pics, you could use sockets and program them on a different board.
« Last Edit: March 24, 2015, 07:38:38 pm by 6thimage »
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26912
  • Country: nl
    • NCT Developments
Re: ICSP with several PIC mcu on the same board ?
« Reply #2 on: March 24, 2015, 06:21:10 pm »
I have seen designs where 10 PICs where programmed in parallel. Just one PIC reports back to the programmer. However for your own sanity I strongly suggest to move to a different controller which is big enough to do the task of the 3 PICs. It may seem more work for now but getting several microcontrollers to work together reliably is much harder (and more work)!
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online JaunedeauTopic starter

  • Regular Contributor
  • *
  • Posts: 100
Re: ICSP with several PIC mcu on the same board ?
« Reply #3 on: March 24, 2015, 07:05:53 pm »
The PCB will be apparent and its aesthetic is very important :

-Having jumpers for each mcu will not look nice.
-The pcb is only 8mm wide, and I could not find an mcu with a shape that fit the constraints. I spent hours looking at datasheet of leds drivers, but I could only find one that may suit (using 2 of them plus some IO on the PIC to drive the 24 leds), but in the end it is not really more handy (+more expensive components which are harder to source) than using 3 pics.
-Of course, the MCU are QFN and can not be programmed on sockets.

The only problem with the 3 mcu solution is that I don't find a way to have ICSP.

Of course, I could proto with DIP PICs, and use some UQFN20 socket (I could not find where to buy them, I guess you have to DIY one ?), but I'd like the device to be hackable (it will be open soft / hard).

Another possibility I have is to power the device with the normal PSU, and have 3x3 small apparent pad for mclr/icspdat/icspclk. I could then make a icsp to pogo pins adapter. But I'm still open to any idea :)
 

Offline 6thimage

  • Regular Contributor
  • *
  • Posts: 181
  • Country: gb
Re: ICSP with several PIC mcu on the same board ?
« Reply #4 on: March 24, 2015, 07:59:45 pm »
That makes things a little more difficult - you could always use a CMOS switch for the power line, but it will limit the maximum current - Analog's ADG849 comes in an SC70 package and has a maximum current of 400 mA. In a similar way, you could always use a mosfet.

I'm surprised you couldn't find any other microcontrollers that fit the size constraints - which pic are you using? I've had a quick look on Farnell - Freescale have a Cortex M0 in a 24 pin QFN that's 4 x 4 mm (it was the MKL04Z8VFK4) and ST also have a Cortex M0 (STM32F030F4P6TR), but in a 20 pin TSSOP, which at 6.6 mm might be a bit more of a squeeze, but not impossible on an 8 mm wide board.
 

Offline 22swg

  • Frequent Contributor
  • **
  • Posts: 274
  • Country: gb
Re: ICSP with several PIC mcu on the same board ?
« Reply #5 on: March 24, 2015, 08:39:19 pm »
Could you just switch the mclr/reset pin with a smd switch
http://uk.farnell.com/c-k-components/rte0300g04/switch-sp3t-0-1a-30vdc-smd/dp/2320092
Check your tongue, your belly and your lust. Better to enjoy someone else’s madness.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13750
  • Country: gb
    • Mike's Electric Stuff
Re: ICSP with several PIC mcu on the same board ?
« Reply #6 on: March 24, 2015, 09:09:36 pm »
Why are you powering from the programmer?
And why can't you just increase the current available?
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: ICSP with several PIC mcu on the same board ?
« Reply #7 on: March 24, 2015, 09:20:33 pm »
I made myself a short 6 pin male-female ICSP cable with a DC socket spliced into the Vdd and Vss lines.

Great for powering the board temporarily from the ICSP header but not putting any strain on the programmer's supply rail.
 

Online JaunedeauTopic starter

  • Regular Contributor
  • *
  • Posts: 100
Re: ICSP with several PIC mcu on the same board ?
« Reply #8 on: March 24, 2015, 10:16:34 pm »
Why are you powering from the programmer?
And why can't you just increase the current available?

I tryed to find the information in the datasheet (but apparently it is in the programming document and not in the datasheet), but I was not sure if it is possible to continuously power the pic and jsut use the GND, ICSDAT, ICSPCLK and MCLR pin from the programmer. If it is possible, that would make the pogo pin solution simpler.

Quote
I'm surprised you couldn't find any other microcontrollers that fit the size constraints

What I could not found are dedicated led driver that use no or few external component and are available in 4x4mm or 5x5mm package.

There are plenty of Pic mcu that can be used as a led driver. Pics are interesting because of the internal current limiting diode which means I do not have to add 24 resistors on my tiny PCB. The only problem is that it make me want to add to more ICSP header and that waste space.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13750
  • Country: gb
    • Mike's Electric Stuff
Re: ICSP with several PIC mcu on the same board ?
« Reply #9 on: March 25, 2015, 12:15:53 am »
Why are you powering from the programmer?
And why can't you just increase the current available?

I tryed to find the information in the datasheet (but apparently it is in the programming document and not in the datasheet), but I was not sure if it is possible to continuously power the pic and jsut use the GND, ICSDAT, ICSPCLK and MCLR pin from the programmer. If it is possible, that would make the pogo pin solution simpler.

Most, if not all, PICs have no requirements for power sequencing during programming (I have a feeling that there were one or two very old ones that did), so yes, you can usually just have everything powered normally to program.
If the programmer is not outputting power it will usually need to be fed power so it can sense the voltage - e.g. pickit 3 and ICD3 use this to detect when the programmer is connected, and attempt to connect and ID the chip.
I don't think I've ever done it any other way with various 8,16 and 32 bit devices. If I'm programming a board that isn't powered, I just stuff 5 or 3.3V as appropriate on the power pin of the programming connector/pogo pins
« Last Edit: March 25, 2015, 12:17:54 am by mikeselectricstuff »
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Online JaunedeauTopic starter

  • Regular Contributor
  • *
  • Posts: 100
Re: ICSP with several PIC mcu on the same board ?
« Reply #10 on: March 25, 2015, 08:40:39 am »
Ok, thank you !

I'll start the 6th version of the board, with pads for pogo pins and external power supply for programming.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf