'Program to send 3 pulses on ignition being turned on
'then waiting for ignition off to send another set of 3 pulses
' using 12F629 with MCLR off, BODEN off, PWRTE on, WDT off, INT OSC No Clockout
'Power to GPIO.0 from ignition through voltage divider
program tripleflash3
dim t as byte
main:
TRISIO = %00000001
CMCON = 7
if Button(GPIO,0,1,0) then
goto main
end if
if Button(GPIO,0,1,1) then
For t = 1 to 3
GPIO.1 = 1
Delay_ms(100)
GPIO.1 = 0
Delay_ms(100)
next t
end if
waiter:
if Button(GPIO,0,1,1) then
goto waiter
end if
For t = 1 to 3
GPIO.1 = 1
Delay_ms(100)
GPIO.1 = 0
Delay_ms(100)
next t
goto main
end.