Timing issue
Hi everyone;
I'm facing a problem with the code below. IT works everything fine, except the timing. It takes always the double of the time in the "pause" instructuion. For instance, if i put PAUSE 5000, it takes 10s to execute.
The micro is 12F683 and is powered by a CR2032 battery.
Can some one help me? Thanks!!!
Code:
@ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_OFF & _MCLRE_OFF & _BOD_OFF & _CPD_OFF & _CP_OFF & _FCMEN_OFF & _IESO_OFF
DEFINE OSC 4
'76543210
OSCCON = %01100111
'===================SRF AND PINOUT CONFIGURATION - 1-In / 0-Out=================
'76543210
TRISIO = %00000001
GPIO = %00000000
IOC = %00000001
WPU = %00000001
INTCON = %00001000
CMCON0 = 7
VRCON = 0
ANSEL = %00000000
OPTION_REG.7=0
'==================================ALIAS========================================
BOTAO VAR GPIO.0
VAZIO1 VAR GPIO.1
VAZIO2 VAR GPIO.2
VAZIO3 VAR GPIO.3
VAZIO4 VAR GPIO.4
LED vAR GPIO.5
'================================MAIN LOOP======================================
Main:
@ SLEEP
INTCON.0 = 0
High led
Pause 5000
low led
GOTO Main
END
Thanks and Regards;
Gadelhas
Bookmarks