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.

PIC i/o state during programming.

Status
Not open for further replies.

kybert

New Member
Hi,

With Microchip PICs, what is the state of the I/O lines when the device is being programmed, e.g. once MCLR is taken to VPP.

I know ICSP CLK and DAT will toggle, and MCLR will be 0v, 5v or 12v.

I would have thought the other pins would go hi-z but cant see anything in the datasheet for the devices or in the programming spec.

The devices im interested in is the 12F683/629/675 and the 16F690

This is so i can protect attached circuits when programming, e.g. pull low FETs etc. that will switch with noise if hi-z output.


Thanks
 
Hi,

With Microchip PICs, what is the state of the I/O lines when the device is being programmed, e.g. once MCLR is taken to VPP.

I know ICSP CLK and DAT will toggle, and MCLR will be 0v, 5v or 12v.

I would have thought the other pins would go hi-z but cant see anything in the datasheet for the devices or in the programming spec.

The devices im interested in is the 12F683/629/675 and the 16F690

This is so i can protect attached circuits when programming, e.g. pull low FETs etc. that will switch with noise if hi-z output.


Thanks

hi,
Extract:
During programming the other port pins stay in input mode, e.g., they have a very high impedance.
The application circuit should handle this state in the most inactive way possible. To avoid undesired 'side effects' you may consider pull-down or pull-up resistors.
 
Have you looked at the Programming Specification? That's a different doc than the datasheet.
 
When programming 12F683/629/675 the output lines (pins) can do all sorts of things like producing a signal equal to the frequency of programming, beeping and simply letting you know what is happeing during the programming process. Put piezo diaphragms on the lines and you will hear exactly what I mean.
 
When programming 12F683/629/675 the output lines (pins) can do all sorts of things like producing a signal equal to the frequency of programming, beeping and simply letting you know what is happeing during the programming process. Put piezo diaphragms on the lines and you will hear exactly what I mean.

That's not right, they are high impedance otherwise ICSP wouldn't work. The piezos are just picking up noise due to the pins being high impedance. As stated by Microchip, if the external circuit may function incorrectly with HiZ pins then use pullup/down resistors.

Mike.
 
Yes. You are right. Only those lines associated with programming are active during programming. The LEDs and piezos were connected to these lines.
 
Last edited:
The only way I can see that happening is if your programmer powers your chip and sets MCLR to Vdd before it applies Vpp and your program starts to run. If pins were somehow driven high/low during programming then there would be an errata sheet and there isn't one. Imagine, reprogramming a machine and the motors start running without warning!!!

Edit, as colin55 changed his post my reply doesn't make any sense. His original post stated I was wrong.

Mike.
 
Last edited:
On these 8 pin chips, some of the output devices are connected to the programming pins. This works perfectly if the devices are high impedance.
That's why they become active when programming.
 
That was stated by the OP and is obvious.
"I know ICSP CLK and DAT will toggle, and MCLR will be 0v, 5v or 12v."

The question was about the other pins.

Mike.
 
:D
It's stated in the programming appnotes that the PIC is held in "reset" mode during programming. So the pins do what they do in reset mode, apart from MCLR, SDA and SCL of course.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top