PDA

View Full Version : Power Up problem



Tobias
- 30th October 2009, 00:56
Using a 16F877A with a New Haven serial display. Once in a while, like one time out of 30 times, when I give this board power the display goes all black. At first I was thinking something was wrong with the board or PIC until I built another one. Then I thought maybe it was a problem with the serial display. So I put some code in the PIC that turns on and off a couple outputs 50 times a second. Then I hooked up the scope to the output and powered up the board until I got the display to black out. The outputs from my PIC didn't do anything. So that is telling me its a problem with my PIC and some deal with the initial power up .

I have built a board with a normal 5v regulator and then another board with a Dc/DC converter. I am doing the converter for other reasons yet it does the same thing with either. I have the MCLR pin tied to VDD with a 4.7k resistor and diode like on the ICSP diagram found on MELABS website.

Do I need a cap on the MCLR line? Would that help? I am traveling now and thought I would put this up on the forum. I thought maybe I need to activate the power up timer. Will that fix the problem or do I need to add hardware?

comwarrior
- 30th October 2009, 01:14
Power up timer might help...
Also, have you got a capacitor on the power lines between regulator and PIC?

Macgman2000
- 30th October 2009, 03:18
On your MCLR pin, you need a pullup resistor 4.7k and a cap to ground. Try 1uF~4.7uF. You want voltage to come up quickly and not linger below threshold for too long on the pin. At the same time you want to filter out voltage hiccups.

Nick

Archangel
- 30th October 2009, 03:26
Hi Tobias,
Power up timer enable and insert a short pause in the start up code of your PIC to allow the serial LCD time to stabilize, .01 µF at the PIC power pins and make sure the serial out line has the proper pull up / pull down resistors as required. Pull up for data TRUE, pull down for data INVERTED. This allows the port to idle in the correct state. Be sure to provide a pull up resistor on the MCLR if you have enabled it in your config statement.
HTH
JS

Tobias
- 30th October 2009, 03:38
Thanks guys I appreciate the input I will give it a go with the suggested changes when I get home on saturday.