Program/debug PIC16F18346

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,619
I want to use the /MCLR pin of a PIC16F18346 as a digital input (asynchronous serial). This signal will come from another PIC so this second PIC will need to be protected against the 12V programming voltage. BUT what does the PICKIT3 do with the /MCLR pin during debugging?
 

nsaspook

Joined Aug 27, 2009
16,250
I want to use the /MCLR pin of a PIC16F18346 as a digital input (asynchronous serial). This signal will come from another PIC so this second PIC will need to be protected against the 12V programming voltage. BUT what does the PICKIT3 do with the /MCLR pin during debugging?
Don't you need to use LVP for /MCLR to be a input pin?

bit 13 LVP: Low-Voltage Programming Enable bit(1)
1 = ON Low-Voltage Programming is enabled. MCLR/VPP pin function is MCLR. MCLRE
Configuration bit is ignored.
0 = OFF HV on MCLR/VPP must be used for programming
 

geekoftheweek

Joined Oct 6, 2013
1,429
I did some digging out of curiosity and found there is not really much information out there on how the debugger actually works. What I could find seems to suggest the MCLR is only used by the debugger as a reset and everything else is done through the normal clock and data lines used for programming.

Since the debugger is enabled by a config bit I'm going to assume it will have to reprogram that bit every time to enable / disable it, but after that there shouldn't be any need for the PICKIT to do anything as far as I can tell with MCLR. Hopefully it releases the pin altogether and switches it's own pin to an input.

Maybe smart to put a resistor between the two PICs along with the diode just in case the PICKIT tries to drive the MCLR one way or the other??? I know it might not be the best for serial speed, but better than replacing puffs of magic smoke.
 

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,619
I did some digging out of curiosity and found there is not really much information out there on how the debugger actually works. What I could find seems to suggest the MCLR is only used by the debugger as a reset and everything else is done through the normal clock and data lines used for programming.

Since the debugger is enabled by a config bit I'm going to assume it will have to reprogram that bit every time to enable / disable it, but after that there shouldn't be any need for the PICKIT to do anything as far as I can tell with MCLR. Hopefully it releases the pin altogether and switches it's own pin to an input.

Maybe smart to put a resistor between the two PICs along with the diode just in case the PICKIT tries to drive the MCLR one way or the other??? I know it might not be the best for serial speed, but better than replacing puffs of magic smoke.
Excellent - thank you for your efforts. It sounds definitely worth trying the experiment. Low speed serial would be perfectly functional.
 

geekoftheweek

Joined Oct 6, 2013
1,429
Excellent - thank you for your efforts. It sounds definitely worth trying the experiment. Low speed serial would be perfectly functional.
No problem. I have always been curious about the debugger, but never bothered to look in to it. Unfortunately I have a bad habit of connecting PicKits wrong and had to come up with a different way of doing things before I burned up another one.
 
Top