sayfollah
Newbie level 6
PIC power on problem
I am using PIC 12F675 .
My project is a simple count down that flashes an LED after several minutes .
I got a problem that the IC , sometimes, flashes the LED on power up before executing the program .
The LED is supposed not to flash until the "DELAY" subroutine is finished .
This is a part of my program :
You can guess that I am a beginner .
How can I overcome this problem ?
I am using PIC 12F675 .
My project is a simple count down that flashes an LED after several minutes .
I got a problem that the IC , sometimes, flashes the LED on power up before executing the program .
The LED is supposed not to flash until the "DELAY" subroutine is finished .
This is a part of my program :
org 0x00
clrf GPIO
GOTO MAIN
FIRST bcf STATUS, RP0
clrf INTCON
bsf STATUS, RP0
call 3FFh
movwf OSCCAL
movlw B'00111000'
movwf TRISIO
movlw B'00000100'
movwf OPTION_REG
bcf STATUS, RP0
retlw 00h
MAIN CALL FIRST
CALL DELAYmin
bsf GPIO, 2
You can guess that I am a beginner .
How can I overcome this problem ?