activate code when circut is brokin. Like alarm system?
Printable View
activate code when circut is brokin. Like alarm system?
I think you would need to have some code running all the time, examining the port every now-and-then with a timer. Have the electronics of the alarm put say a 1 on one of the pins that the port uses for status, like the PaperOut pin, for normal circumstances. Then if the alarm is triggered have that change to 0 and then when your code sees a 0 on the pin it branches to another part of the program.
Two useful sites for this sort of thing are Boondog and Lakeview Research:
http://www.boondog.com
http://www.lvr.com
and attached is a short note I wrote about examining and setting pins.