I have searched the forum and not found any mention of using Pin C.5 on an 08M2 for an interrupt, it's probably a rather dubious practice but possibly handy when all else fails. It occurred to me that providing pin C.5 on the 08M2 is kept low during power up the pin may be useable for an interrupt IF, and I mean IF the editor can be conned into accepting. Set int %00100000,%00100000 will cause a syntax error as to be expected however setint %00100000,Var does not the code below illustrates my point.
Code:
#no_data
Setfreq m4
#terminal 4800
Disconnect'........................!!! USE HARD RESET!!! normal download disabled
Sertxd ("STARTING PROGRAM",cr,lf)'.This should only execute once
B0=32'.............................Use pin C.5 as an interrupt
setint %00100000,B0'...............Interupt on pin C.5 IF pin 5 held highB0
pause 3000'........................Keep things a readable speed
Start:
Do
'Youre program goes here
Sertxd ("Looping waiting for interrupt",cr,lf)
pause 500
Loop
Interrupt:
Do
Sertxd ("Interrupt detected",cr,lf)
Pause 500
B1=PinsC AND %00100000'....Read pin 5 is it still high
If B1 =0 then Rdo_int'.....B0=0 interrupt cleared jump out of loop
Loop
Rdo_int: Sertxd ("Interrupt reset",cr,lf)
setint %00100000,B0
Return