Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC18F 44PIN Dedicated ICSP port

Status
Not open for further replies.

HerbertMunch

New Member
Hi,

has anyone used the dedicated ICSP port of a pic18F 44 pin device?

Do you need to program the chip first, and set the configuration bits before you can use the dedicated port? Or does it work 'out of the box'

Many thanks.
 
my interpretation of the datasheet leads me to believe you have to use the normal rb6 rb7 data lines first, and burn a configuration fuse "ICPRT" to enable the dedicated lines.

Under specific circumstances, the No Connect (NC) pins of PIC18F4455/4550 devices in 44-pin TQFP packages can provide additional functionality. These features are controlled by device configuration bits and are available only in this package type and pin count.

...

When implemented, the dedicated port activates three NC pins to provide an alternate device Reset, data and clock ports. None of these ports overlap with standard I/O pins, making the I/O pins available to the user’s application.

The dedicated ICSP/ICD port is enabled by setting the ICPRT configuration bit.
 
You have to set ICPRT in order to enable the dedicated pins. Don't all fuse start off set and so the dedicated port will be enabled by default?

Mike.
 
default (factory) setting is 0, which is "set" as defined by the datasheet ... icprt needs to be "unprogrammed" which is defined as "1" by the datasheet... confusing logic there if you ask me!

The configuration bits can be programmed (read as ‘0’) or left unprogrammed (read as ‘1’) to select various device configurations.
 
no, that's the confusing logic I was talking about ... the fuse has to equal 1 ... factory setting for the fuse is 0. the secondary programming ports will not work by default. of course, this is just my educated guess. I have some of these chips, but currently lack the nerve to try hand soldering them to a pcb.

page 286 preliminary datasheet for PIC18F4550
 
I thought that when a pic is erased that all bits get set to one including the config bits. It also makes no sense to have them turned off by default - how would you program pre assembled circuit boards?

Edit, Just noticed your quote "or left unprogrammed (read as ‘1’)". I read this as the unprogrammed state is 1.

Mike.
 
What I see on the datasheet:

CONFIG4L Default/Unprogrammed Value as 100- -1-1

ICPRT is bit 5 which is zero

bit 5 ICPRT: Dedicated In-Circuit Debug/Programming Port (ICPORT) Enable bit(1)
1 = ICPORT enabled
0 = ICPORT disabled

This means that never programmed chips have the dedicated pins disabled ?

I am confused by

The configuration bits can be programmed (read as ‘0’) or left unprogrammed (read as ‘1’) to select various device configurations.

EDIT:
It may mean that bits which read zero are said to be programmed and ones which read 1 are said to be unprogrammed. Gibberish.

EDIT2: Which makes sense if you view the config bits as fuse bits which read as a 1 unless you blow/program them..
 
Last edited:
Having now had a look at a data sheet I am also confused. What is the point of having dedicated pins if you have to use the freed up pins for the initial program run!

Mike.
 
3v0 said:
bit 5 ICPRT: Dedicated In-Circuit Debug/Programming Port (ICPORT) Enable bit(1)
1 = ICPORT enabled
0 = ICPORT disabled
This means that never programmed chips have the dedicated pins disabled ?
That's how I read it. I would assume the only reason you would need the ICPORT enabled would be if you wanted to use In Circuit Debugging on a chip that needed all the IOs available on ports B & E. It is silly that it's not enabled by default, but maybe it's for compatibility with legacy programmers. It does state that the legacy programming pins will override the ICPORT if a valid programming voltage is on MCLR. This quote from the datasheet is telling:
2: The ICPORT configuration bit must be
maintained clear for all 28-pin and 40-pin
devices; otherwise, unexpected operation
may occur.
and leads me to believe that if you enable the ICPORT configuration bit then the ICPORT pins must not be left floating.
 
Last edited:
justDIY said:
I have some of these chips, but currently lack the nerve to try hand soldering them to a pcb.

Thats how i felt for a long time, its actually quite easy!

I just cover all the pads in solder, wick it off using braid, then position the chip with tweezers.

Then all you need to do is heat up one pad (no more solder required) now heat up a pad that is on a side perpendicular to the one you just did, repeat the process until you have heated a single pad on each side of the square chip.

Now the chip is stuck down, you may add more solder where required, or just keep heating the small deposits of solder that you put on the pads if there is enough left.

imo it makes board layout so much easier than the dual in line packages, and much smaller.


Anyway back to the ICSP.

the way i read it, also leads me to believe that it doesnt work out of the box. How stupid are they?

That would mean that you would have to include two icsp headers on a board using a tqfp device.
If these pins are nc normally, why wouldnt they allways just work in ICSP mode?
 
As you rightly put it in another post, practice makes a person perfect. Thereafter, you find handling SMD is easier than hell of drilling for through hole PCB, but for the 'vias' of double sided boards.
 
HerbertMunch said:
Thats how i felt for a long time, its actually quite easy!

I have been playing with smaller SMDs but have not yet tried processors.

How much has the hole count gone down using SMDs?
Could be because the pins are too close to allow traces between pads. that SMD PICs boards require more vias.

HerbertMunch said:
Anyway back to the ICSP.

the way i read it, also leads me to believe that it doesn't work out of the box. How stupid are they?

That would mean that you would have to include two icsp headers on a board using a tqfp device.
If these pins are nc normally, why wouldnt they allways just work in ICSP mode?

It stinks from our viewpoint.

In a large run one might program the chips prior to soldering.
 
3v0 said:
In a large run one might program the chips prior to soldering.
If you get boards pre assembled then this isn't an option. I guess that you can order them from Microchip with the fuse already set.

Mike.
 
Many times I have observed that very small Micros like Cygnal8051(SMD) type and SMD type EEproms are not retaining the data after soldering on to the board. Particularly my observation is on Satellite TV Decoders used by cable Operators. In such cases the data is being dumped after they are mounted. The design provides for on board pins (like ICSP) for loading.
 
Last edited:
mvs sarma said:
As you rightly put it in another post, practice makes a person perfect. Thereafter, you find handling SMD is easier than hell of drilling for through hole PCB, but for the 'vias' of double sided boards.

I hate double sided boards! don't get me wrong, if someone wanted to make my d.s. boards for me, I wouldn't turn my nose up. It just seems like an awful lot of effort to me. I would only bother if it was a complex board, or if i was getting them made professionally.

3v0 said:
Could be because the pins are too close to allow traces between pads. that SMD PICs boards require more vias.
....It stinks from our viewpoint.

you can squeeze a trace (or maybe 2?) between the corners of the 44pin tqfp package;)

and your right, it seems too stupid to be true, that nc pins that aren't doing anything else should need to be 'turned on'. It was obviously a late night at microchip when they thought that one up.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top