Gary,
Can you add the following lines to your code and compile it with the PM assembler like this
C:\PBP\PBPW.EXE -apm -p12F675 "C:\MAC\PIC PROGS\TEST\12f675.bas
Code:
@ device INTRC_OSC_NOCLKOUT, WDT_OFF
@ device MCLR_OFF, PWRT_ON
@ device CPD_ON, PROTECT_ON
This will embed the configuration into the HEX file. The way you have it now, I have simulated the code and find it is incrementing and repeating after 300. If you want the code to block per trigger of Chubb, you need to add the following to your trigger code
Code:
if Chubb = 0 then
high trig
if X < 11 then
X = 12
gosub cola
while Chubb : wend ' wait while Chubb is 1
endif
else
low trig
endif
Good luck
Bookmarks