Hi! I have a small project done in PIC16F628A.But I’m having a resetting problem sometimes.
It means when power up the PIC it is not resetting immediately. Sometimes it takes about 10 mins to reset, so I have to wait until that time to see the circuit working.
Can somebody tell me a way to reset the PIC smoothly when power up?
Here is my fuse settings.
I didn’t use a pull-up resistor for RA5 (MCLR).I kept that pin free. (Earlier I placed that resistor but no progress.) Also I never use a decoupling capacitor 1uF near the PIC.
Here is my initialization code.
Do I need to add a DELAY before the main program starts to solve this problem?
It means when power up the PIC it is not resetting immediately. Sometimes it takes about 10 mins to reset, so I have to wait until that time to see the circuit working.
Can somebody tell me a way to reset the PIC smoothly when power up?
Here is my fuse settings.
Code:
Oscillator = XT
WDT =off
PWRT =off
MCLR =off
BODEN =off
LVP =off
CPD =off
CP =off
I didn’t use a pull-up resistor for RA5 (MCLR).I kept that pin free. (Earlier I placed that resistor but no progress.) Also I never use a decoupling capacitor 1uF near the PIC.
Here is my initialization code.
Code:
movlw 0x07 ;turn off comparators
movwf CMCON
bsf STATUS,RP0
clrf TRISB ;make all PORB pins output
movlw b'11000' ;RA3,RA4 inputs
movwf TRISA
bcf STATUS,RP0
goto MAIN
Do I need to add a DELAY before the main program starts to solve this problem?