erratic serout behaviour when PICkit2 disconnected

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
I have had three different circuits with three different PICs connected to my serial LCD. In two out of the three cases, the LCD behaved erratically when the PICkit2 was disconnected. In all cases the power was coming from the same 5V adapter. I have installed bypass caps, but to no avail.

What could there be about having the PICkit2 connected that stops the erratic behavior of the PIC serout to the LCD?

Thanks
 

takao21203

Joined Apr 28, 2012
3,702
I have had three different circuits with three different PICs connected to my serial LCD. In two out of the three cases, the LCD behaved erratically when the PICkit2 was disconnected. In all cases the power was coming from the same 5V adapter. I have installed bypass caps, but to no avail.

What could there be about having the PICkit2 connected that stops the erratic behavior of the PIC serout to the LCD?

Thanks
Have not often experienced bypass caps as game changers.

Your problem might come from slowly rising Vcc. Wait a little, power the LCD via digital I/O with sharp rise, or transistor.

What are the PIC model numbers?
 

tshuck

Joined Oct 18, 2012
3,534
Do you have a pull up resistor on MCLR? Not having one will cause your PIC to reset. I know the pickit will bring MCLR/Vpp high, removing the pickit without that resistor would cause what I think you are experiencing...
 

ErnieM

Joined Apr 24, 2011
8,377
Do you have a pull up resistor on MCLR? Not having one will cause your PIC to reset. I know the pickit will bring MCLR/Vpp high, removing the pickit without that resistor would cause what I think you are experiencing...
QFT... I've been there myself.
 

spinnaker

Joined Oct 29, 2009
7,830
can you be more clear please? Does the erratic behavior occur only immedialy after disconnect? Or does it continue to occur after the circuit has been disconnected?

I have never put a pullup resistor on MCLR and have never had a problem. I was not even aware they were recommended. The demo board that I have from microchip does not seem to show one in the schematic.

I would suggest that tracecomm poat a schematic, including the schematic of the power supply being used if any (ie not a battery).
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
Do you have a pull up resistor on MCLR? Not having one will cause your PIC to reset. I know the pickit will bring MCLR/Vpp high, removing the pickit without that resistor would cause what I think you are experiencing...
QFT... I've been there myself.
Ding! Ding! Ding! We have a winner. :D

Seriously, I put a 10k to Vcc and the problem is apparently resolved.

Thanks.
 

tshuck

Joined Oct 18, 2012
3,534
can you be more clear please? Does the erratic behavior occur only immedialy after disconnect? Or does it continue to occur after the circuit has been disconnected?

I have never put a pullup resistor on MCLR and have never had a problem. I was not even aware they were recommended. The demo board that I have from microchip does not seem to show one in the schematic.

I would suggest that tracecomm poat a schematic, including the schematic of the power supply being used if any (ie not a battery).
You've probably been disabling MCLR in you configuration bits, since tracecomm just started with PICs, he probably didn't do it. I know I didn't like messing with those configuration bits when I first started, one bit can brick your device! :eek:
 

spinnaker

Joined Oct 29, 2009
7,830
You've probably been disabling MCLR in you configuration bits, since tracecomm just started with PICs, he probably didn't do it. I know I didn't like messing with those configuration bits when I first started, one bit can brick your device! :eek:
Ah yes! That is what I do since I rarely use MCLR. If I do I have a switch and a pull up.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
Or you could just disable MCLR in your config bits. It is not hard to do.
At this point, everything is hard for me. All kidding aside, I did look at the config word in the code and MCLR is on, but I know how to turn it off.

The schematic is attached, but it's not much. (R2 was just added.) I had the serial LCD on pin 2. I didn't have any trouble with the 12F509, but I had also used a 12F675 in this same setup; I had problems with it, with a 16F84A in a different breadboard. Now, I realize the problem was following the code, not the hardware.

Thanks to everyone.
 

Attachments

ErnieM

Joined Apr 24, 2011
8,377
Or you could just disable MCLR in your config bits. It is not hard to do.
And if you do manage to disable MCLR you've also managed to disable in circuit debugging.

When you disable in circuit debugging you've made in circuit debugging impossible to do.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
Both mplabs have a wizard to help with the config settings.
I was so confused by MPLAB 8 that I switched to Microcode Studio, which is much friendlier to the user and to PBP3. However, I may need to take another look at MPLAB for its added features. Thanks.
 
Top