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

Sharing of Programming and Normal Operation Pins

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
iso9001



Joined: 02 Dec 2003
Posts: 262

View user's profile Send private message

Sharing of Programming and Normal Operation Pins
PostPosted: Fri May 06, 2005 2:57 pm     Reply with quote

I have a bit of a tricky design that is space limited and connector space is finite.

I was wondering if I have a singal going to A0, in normal operation this is 0-5V being read by the adc. Now, in programming mode I need B6, is it possible to share that line on the connector. Connect A0 and B6 ?

Ie: Connector pin 9 is hooked up to B6 and A0. During normal operation a xV signal going in and is read by the adc/A0. During programming mode the ICD sends signals in to be read by B6.

Is it going to be a problem that in normal mode my adc will also be connected to the floating B6? Likewise is going to be a problem that during programming B6 signals will also be on A0 ??? My adc signal is already pretty weak (~15k imp). I don't know if connecting a floating pin will change its value at all. Or maybe this is bad for another reason.

Obviously this would not work with MCLR.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri May 06, 2005 6:01 pm     Reply with quote

The programming specifications for PICs say that during programming
mode, all i/o pins become high-impedance inputs. So Pin A0 won't
affect the programming. It might add 8 pf of capacitance, but that
won't affect anything.

What might affect programming is your A/D input circuit. You didn't
really say what that circuit is. You implied it has a 15K resistor.
You didn't say what voltage will be applied to the other side of that
15K resistor during programming. In fact, you didn't say what
programmer you're using. I'll assume it's an ICD2.

The ICD2 has 4.7K pull-down resistors on the PGC and PGD signals
(RB6 and RB7). So if your A/D circuit applied Ground to the 15K
resistor, this would change the effective pull-down on PGC to about 3.6K.
This probably wouldn't hurt anything.

If you have a positive voltage, let's say +5v, on the 15K resistor then
you have a voltage divider formed with the 4.7K pulldown inside the ICD2.
You will have about 1.2v at the junction when the ICD2 is not
actively driving the PGC pin. This could be a problem. You didn't
say what PIC you have, so I'll use the 16F877. The PGC pin is a
Schmitt trigger input and its Vil is .2 x Vdd, which is 1.0v for a PIC
running at 5v. So if the idle state of PGC is now 1.2v due your A/D
circuit applying 5v on the other side of the 15 resistor, then the PGC
pin on the PIC is not going to see a true Logic Low level.

So somehow you've got to ensure that your A/D circuit does not
have a large voltage on it during ICSP programming. If you could
limit the voltage to 3v then you'd be safe. The junction voltage would
then be about 0.7v when PGC is in the idle state (during programming).
iso9001



Joined: 02 Dec 2003
Posts: 262

View user's profile Send private message

PostPosted: Fri May 06, 2005 8:23 pm     Reply with quote

You're right, I didn't really convey that correctly. I'm using ccs's icd40u.

I cant / dont want to program while its plugged in or on.

I'm just wandering if tying my adc pin to another pin (b6) will effect anything while in normal mode (on and running in the field). AND if doing that will effect anyhting in programming mode (off and on my desk).

"The programming specifications for PICs say that during programming
mode, all i/o pins become high-impedance inputs. " Okay, that solves that B6 will not be effected by a link to A0 during programming.

As for my ADC pin being tied to B6, it looks like I just need to make certin its in high imp / float mode (default?) while the unit is on and running.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion 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