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

ICSP and PIN/PORT Status

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



Joined: 21 Mar 2020
Posts: 44

View user's profile Send private message

ICSP and PIN/PORT Status
PostPosted: Thu Feb 11, 2021 12:53 pm     Reply with quote

PIC24F16KA301
CCS version 5.080

Hey,
i would like to know what the pin status is during programming.
I think all pins are input, but can't find any comments in the data sheet.

How do the pull down (CN PINS) behave during programming? I will use they to pull down gates from fets.
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Feb 11, 2021 3:33 pm     Reply with quote

Any chance you can dedicate the ICSP pins to just ICSP usage ??
If not you'll have to redesign the PCB,add parts, jumpers, etc. to ISOLATE the ICSP pins from everything but the programmer.

After having 'fun' trying to get 'double duty' from ICSP pins , I gave up. It was easier and far more reliable to just dedicate ICSP pins to ICSP. While it may cost a few pennies more to use 40 pin PICs instead of 28 pin PICs, it's made my life simpler....

Microchip do have several apnotes/articles about how to isolate the pins. I've seen some 'development ' boards use a 4PDT switch for 'PGM/RUN'. Hmm, the switch is bigger then the PIC and costs more too !
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Thu Feb 11, 2021 3:39 pm     Reply with quote

During programming pins default to their power up state, which is input. This is the safest course of action for any processor because if they drove their pins instead, you could have fatal accidents depending on what the processor controls.

If you require some pins to default high or low, then you're going to need to add pullup or pulldown resistors.
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Feb 11, 2021 3:46 pm     Reply with quote

hmm.. I will use they to pull down gates from fets.
I'm assuming the ICSP pins, typically B6,B7, are used to turn on FETs?
If so, the programmer will toggle them and FETS will come on/off which could be a BIG problem depending what the FETs are connected to !
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 11, 2021 3:49 pm     Reply with quote

temtronic wrote:
Any chance you can dedicate the ICSP pins to just ICSP usage ??

He's not talking about dual-purposing the ICSP pins. He wants to know the
state of all normal I/O pins during programming.

From the PIC24F programming spec:
Quote:
3.3.2 HIGH-VOLTAGE ICSP ENTRY
Upon a successful entry, the program memory can be
accessed and programmed in serial fashion. While in
ICSP mode, all unused I/Os are placed in a
high-impedance state
.

PIC24FXXKAXXX Programming Specification:
https://ww1.microchip.com/downloads/en/DeviceDoc/DS-39919c.pdf
Ttelmah



Joined: 11 Mar 2010
Posts: 19536

View user's profile Send private message

PostPosted: Sat Feb 13, 2021 7:52 am     Reply with quote

Yes, the standard on most of the chips is that the pins go to the 'reset'
state. During reset, all of the I/O pins are normally set as inputs, so
high impedance. This agrees with what PCM has found in the documentation.
Anything driving a FET, always needs to have a basic resistive circuit to
ensure that the 'float' during the few mSec at boot is not a problem, and
ICSP, raises this requirement to be able to deal with several seconds,
rather than just a few mSec....
Quite a few of the FET gate driver chips, are designed so that they
automatically bias the FET gates to a safe state, when not driven, for
exactly this reason.
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Feb 13, 2021 8:14 am     Reply with quote

hmm reread the Op....
One potential problem is not having a 'strong' pulldown . It's possible that since the pin is Hi-Z, it'll act like an antenna and some EMI could be enough to turn on the FET.... rare but it can happen.
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