CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Programming connections for two devices, one RJ

 
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go
View previous topic :: View next topic  
Author Message
bwhiten



Joined: 26 Nov 2003
Posts: 151
Location: Grayson, GA

View user's profile Send private message

Programming connections for two devices, one RJ
PostPosted: Thu Jan 03, 2008 8:13 am     Reply with quote

I couldn't find a related topic doing a search but it's hard to believe this isn't being done.
I have two PIC devices on the same board and I would like to use only one RJ connection to program both. Does one device need to be held in reset or some other state while the other is being programmed or are they connected in series some way device-to-device?
By the way, I'm using the ICD-U40.
Thanks.
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Thu Jan 03, 2008 9:07 am     Reply with quote

Will you be doing high voltage programming?
bwhiten



Joined: 26 Nov 2003
Posts: 151
Location: Grayson, GA

View user's profile Send private message

Possibly not
PostPosted: Thu Jan 03, 2008 9:12 am     Reply with quote

I believe the ICD-U40 will allow you to do low voltage programming? If so and it allows me to eliminate the second RJ connector that's what I'm looking for.
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Thu Jan 03, 2008 9:17 am     Reply with quote

Is it just the physical RJ connector you don't like??
ie: "wires are wires", you could use a 6 pin header on .1" centers.(i do)
[[you could even use less than 6 pins]]
bwhiten



Joined: 26 Nov 2003
Posts: 151
Location: Grayson, GA

View user's profile Send private message

PostPosted: Thu Jan 03, 2008 9:22 am     Reply with quote

No. I just don't want to populate two connectors for two PICs. Trying to save miniscule amounts of money wherever possible.
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Thu Jan 03, 2008 9:45 am     Reply with quote

High voltage programming is by far the most common. Use it.
For 5 pin this is simply done with two lines for clock and data, and three
other lines for power, ground and the programming voltage.
If you want debugging then I'd use 6 pins (MCLR,+5,gnd,RB7,RB6,RB3)
RB3 is optional and what CCS uses for debug serial info.
So i would use two 6pin headers. one for each then run the the lines to the PICs for programming/debug.

You can't run them in parallel because PIC1 may drive a line low while the other PIC2 tries to drive it high.((it might be possible if a PIC is held in reset, but it doesn't seem cost justified)) ((what if you want to debug both at the same time))

Is this for a production part?
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Thu Jan 03, 2008 1:54 pm     Reply with quote

You might get away with one programming header, but I think you'll need at least 4 additional headers to disconnect one PIC or the other's Vcc & MCLR pins. If the PICs you're using have multiple Vcc pins, then you'll either have to install more disconnect headers or the layout on the board gets a bit more difficult.

The 'disconnect' I'm thinking of is a 2 pin header on the board with a shorting jumper. I don't know if this would actually work either. You'd need to breadboard it to see if you can actually program either one or the other while keeping the program data & clock lines in common.
bwhiten



Joined: 26 Nov 2003
Posts: 151
Location: Grayson, GA

View user's profile Send private message

PostPosted: Thu Jan 03, 2008 3:26 pm     Reply with quote

Yeah, I already have a schematic with a 3 x 4 header (read "jumper block") on it that I could use but it is almost as expensive and takes as much real estate as the RJ connector and I don't like jumpers for ruggedness in the field.
I may just use my RJ-12 to 6 pin header adapter cable and place the smallest header I can find on the pcb.
I've also seen the threads on programming one PIC with another and that's an option I might try.
I'm a little suprised there is no standard method of daisy-chaining PIC programs like JTAG.
adrian



Joined: 08 Sep 2003
Posts: 92
Location: Glasgow, UK

View user's profile Send private message

PostPosted: Fri Jan 04, 2008 7:55 am     Reply with quote

I can think of a way using a 6 pin header and a DPDT switch - but I have not tried it.
It also depends upon what your MCLR pins are connected to.

The pinout for ICSP is as follows:
1 Vpp
2 Vcc
3 Gnd
4 Data
5 Clock
6 Debug

If on your PCB,
pin 1 is tracked to MCLR of chip 1.
Pins 2 through 5 are wired as normal to both chips.
pin 6 is tracked to MCLR of chip 2.

You can then wire your programming adapter as follows.
Pin 1 goes to common1 of the switch.
Pins 2 through 5 are connected as normal to the programmer
Pin 6 goes to common2 of the switch.
Do not connect pin 6 of the programmer.

In switch position 1:
Pin 1 is routed to Vpp of the programmer to programme chip 1.
Pin 6 is grounded holding chip 2 in reset.

In switch position 2:
Pin 1 is grounded holding chip 1 in reset.
Pin 6 is routed to Vpp of the programmer to programme chip 2.

I tried to do some ASCII artwork - which was fine when typing in the message, but it got screwed up when viewed in the preview window.

This arrangement has two problems:
One chip is always held in reset, you would need to unplug the programming link to get both chips to run.
And like treitmey said, you would not be able to use this for debugging.
ratgod



Joined: 27 Jan 2006
Posts: 69
Location: Manchester, England

View user's profile Send private message

PostPosted: Tue Jan 08, 2008 5:20 pm     Reply with quote

I did a method on a board where I had a single programming header and 3 sets of jumpers to switch PGD, PGC and MCLR pins between the 2 chips.

Works fine for me
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group