This is the segment of code at the beginning on of my program. On startup Power (pin 2) is suposed to go High to activate powering up an external item. Does anyone see anything that would prevent this? It just sits in a Low condition.
@ DEVICE pic12F629, INTRC_OSC_NOCLKOUT ; System Clock Options
@ DEVICE pic12F629, WDT_ON ; Watchdog Timer
@ DEVICE pic12F629, PWRT_ON ; Power-On Timer
@ DEVICE pic12F629, MCLR_OFF ; Master Clear Options (Internal)
@ DEVICE pic12F629, BOD_OFF ; Brown-Out Detect
@ DEVICE pic12F629, CPD_ON ; Data Memory Code Protect
@ DEVICE pic12F629, PROTECT_OFF
' I/O definition
TRISIO = %00011000
;
'WEAK PULLUPS
WPU = %00100111
;
' Variable Definition
POWER VAR GPIO.5
DNITE VAR GPIO.4
TRIGGER VAR GPIO.0
INPUT dnite
BO VAR word
;
'SET BO COUNTER TO 0 INITIALLY
BO = 0
;
; Set External interrupt (GPIO.2) with falling edge trigger...
OPTION_REG = %00001000 ; Falling edge trigger on GP.2
CMCON = 7
INTCON = %10000000 ; Set GIE - clear interrupt enable bit and flags.
;
'BODY OF CODE BEGINS
high power
pause 15000
low power
GOTO BASE ; Skip past interrupt handler
Bookmarks