Author Topic: ICSP with multiple PICs  (Read 5464 times)

0 Members and 1 Guest are viewing this topic.

Offline NiHaoMikeTopic starter

  • Super Contributor
  • ***
  • Posts: 8951
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
ICSP with multiple PICs
« on: January 26, 2013, 04:18:07 am »
When there are multiple PICs on the same board, what is the accepted way to handle the ICSP?
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: ICSP with multiple PICs
« Reply #1 on: January 26, 2013, 07:20:56 am »
Are they all the same type of PIC?
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26682
  • Country: nl
    • NCT Developments
Re: ICSP with multiple PICs
« Reply #2 on: January 26, 2013, 12:42:21 pm »
When there are multiple PICs on the same board, what is the accepted way to handle the ICSP?
Unless there is a good reason to have multiple microcontrollers (identical but electrically isolated channels) I strongly suggest you use a bigger microcontroller or hire someone who can. I have re-designed a lot of circuits with multiple (up to 13!) PICs because the designers couldn't get them to work reliably. The problem is that each microcontroller will each run at their own speed (asynchronous). If you need communication between them then the asynchronous nature of the processes can become a big pain in the ass real quick.

Anyway, if you want to take the road towards doom: you can connect identical PICs in parallel but connect the wire that talks back to the programmer to only one. This makes it a bit of a gamble whether to others are programmed correctly but it seems they usually are.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: ICSP with multiple PICs
« Reply #3 on: January 26, 2013, 07:13:54 pm »
In my latest, I've got 9 PICs of various types (2x 18F27J53, 4x 12F1822, 2x 16F688, 2x 18F26K20).  Some of them are the newer types that require a specific 32 bit sequence to be shifted in to begin the programming sequence, others are the older type that only require the normal MCLR/PGC/PGD/etc.  The ones that requires the differing 32 bit sequence are all wired in parallel...don't have a problem with those.  The rest of them, I've got MCLR on an 8 position DIP switch.  Hook up the PICKIT to one 'master' 5 pin port, select the PIC I want to program with the DIP switch, and do the programming.
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline JVR

  • Regular Contributor
  • *
  • Posts: 201
  • Country: be
Re: ICSP with multiple PICs
« Reply #4 on: January 30, 2013, 11:31:06 am »
In my latest, I've got 9 PICs of various types (2x 18F27J53, 4x 12F1822, 2x 16F688, 2x 18F26K20).  Some of them are the newer types that require a specific 32 bit sequence to be shifted in to begin the programming sequence, others are the older type that only require the normal MCLR/PGC/PGD/etc.  The ones that requires the differing 32 bit sequence are all wired in parallel...don't have a problem with those.  The rest of them, I've got MCLR on an 8 position DIP switch.  Hook up the PICKIT to one 'master' 5 pin port, select the PIC I want to program with the DIP switch, and do the programming.
:o
What the hell are you building?
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: us
Re: ICSP with multiple PICs
« Reply #5 on: January 30, 2013, 12:48:56 pm »
When there are multiple PICs on the same board, what is the accepted way to handle the ICSP?
Unless there is a good reason to have multiple microcontrollers (identical but electrically isolated channels) I strongly suggest you use a bigger microcontroller or hire someone who can. I have re-designed a lot of circuits with multiple (up to 13!) PICs because the designers couldn't get them to work reliably. The problem is that each microcontroller will each run at their own speed (asynchronous). If you need communication between them then the asynchronous nature of the processes can become a big pain in the ass real quick.

Reliability isn't an issue with multiple chips, in fact it can be more stable.  I designed a product recently where I used 3 pic chips, sure I could have used 1 processor but 3 chips was easier, cheaper and more reliable. 1st pic was used to control the display device, 2nd pic handled all the inputs and outputs from sensors, 3rd pic controlled all the power functions. The reason it was easier and more reliable is because I didn't have to use a single chip that would have to use multiple interrupts to perform all the functions complicating the code quite a bit and requiring a much faster processor. 

If you need to keep the processors in sync you use a clock line, all of the pic models in the last 10 years can sync clocks.
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: ICSP with multiple PICs
« Reply #6 on: January 30, 2013, 05:00:18 pm »
:o
What the hell are you building?
Utter craziness...   |O
Analog Signature Analyzer with a bunch of digital stuff going on at the same time.  Using all these PICs because they're what I have one hand and the requirements keep changing...or is it feature creep?...LCDs, thermal printer, sd card, USB, etc.etc.etc.
If I had a single chip that had 2 ADCs that were capable of simultaneous sampling, AND 2 individual DAC modules both capable of individual DMA transfer, and it had enough pins to handle what I need, I'd be down to one chip.....But that animal doesn't exist.
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: ICSP with multiple PICs
« Reply #7 on: February 04, 2013, 08:45:53 am »
What that? 2 dac, 2 adc, dma channels galore and plenty of gpio you say? stm32f407. problem solved. :P And I'm sure there are many others that fit the bill, it's just that this one springs to mind. And it's cheap too ... < $15 dev board.

Step 1: *boot microchippie*
Step 2: *embrace ARM*
Step 3: Enjoy life that suddenly became a lot simpler. ;-)
 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
Re: ICSP with multiple PICs
« Reply #8 on: February 04, 2013, 08:57:07 am »
What that? 2 dac, 2 adc, dma channels galore and plenty of gpio you say? stm32f407. problem solved. :P And I'm sure there are many others that fit the bill, it's just that this one springs to mind. And it's cheap too ... < $15 dev board.

Step 1: *boot microchippie*
Step 2: *embrace ARM*
Step 3: Enjoy life that suddenly became a lot simpler. ;-)
Step 4:  Profit???   :-DD
Ya, again, I'd normally agree.  I've been stuck in the PIC world for so long, I forgot how to learn anything else.  I've been playing with the Stellaris Launchpad (LM4F120H5QR) for a few days now using T.I.'s Code Composer Studio (CCS haters...don't tell me CCS is crap or the best thing out there.  I don't know the difference.  It's free and it's working for me so far).  Steep learning curve, trying, failing, learning, wash, lather, rinse, repeat.  The Stellaris doesn't have a DAC on it, but I'm thinking if I can learn that dev board/chip, then any other ARM chip with the hardware I actually need should be cake to transition to.
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: ICSP with multiple PICs
« Reply #9 on: February 08, 2013, 06:09:26 am »
Reliability isn't an issue with multiple chips, in fact it can be more stable.
I can see multiple chips being cheaper, but the reliability claim seems like a stretch. If you've got multiple mcus all chugging away asynchronously, generating test cases to exercise all the possible combinations is going to be really difficult. Everything is reliable before you start testing. >:D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf