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.

MCLR configuration

Status
Not open for further replies.

Asjad

New Member
Dear All,

Can anyone please tell me the configuration for the MCLR pin,
if I want to use it for:

Manual reset (switch)
programming via an MPLAB ICD 2

I know that the ICD provides +13v programming voltage, if the pin is already sitting at +5v, will there be a clash??


Does anyone have any ideas???

Thanks
 
You normally connect the MCLR pin to VCC (+5V) thru a high value resistor (about 10K). If 13V is applied directly to the MCLR pin during programming, a small amount of current will of course leak back to the 5V rail but that should be no problem.
 
motion said:
You normally connect the MCLR pin to VCC (+5V) thru a high value resistor (about 10K). If 13V is applied directly to the MCLR pin during programming, a small amount of current will of course leak back to the 5V rail but that should be no problem.

It's usual to have a diode in series with the resistor to prevent any reverse current flow. There's an application note at MicroChip about in-circuit programming.
 
I haven't seen a diode used. For ESD reasons, it looks very foolish frankly. The +5V rail can only pull the pin up, it can't pull it down, so anything which induces voltages on the pin is totally unlimited and can put it into programming mode and corrupt the program memory. Unlike all other PIC pins, there is not even an input protection diode on MCLR.

I saw one story about a guy who designed this, programmed the chips, and sprayed the PCBs with a protective laquer. The static from the spray took out the program space. This is bad!

I also have to note that the +5V rail can theoretically drop to 0V and back up without ever pulling down MCLR, which leaves the registers corrupted.

The only reason I saw to do it would be if your programming circuit had a very weak current driving ability, in which case you could increase the resistance of the resistor, unless somehow it exceeds reasonable bounds, in which case maybe a better programming driver is in order.

In short, just use a resistor.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top