Am using a 20M2 and only pins C.1---> C.5 can be interrupted on this processor.
I have 2 pins ( C.2 and C.3 ) and want to know which one goes low and causes an interrupt.
I wish to identify which by flashing a red ( C.2 ) or green ( C.3 ) led.
Code to interrupt "ONE" pin could be:
I have 2 pins ( C.2 and C.3 ) and want to know which one goes low and causes an interrupt.
I wish to identify which by flashing a red ( C.2 ) or green ( C.3 ) led.
Code to interrupt "ONE" pin could be:
Code:
Symbol InputA = PINC.2
main:
setint %00000000, %00000100
pause 500
high 5 'Yellow LED
pause 1000
low 5
pause 1000
goto main
interrupt:
If pin 2 = 0 then interrupt
If InputA = 0 then Flashred
Goto Interdone
interdone:
setint %00000000, %00000100
return
Flashred:
low 5
high 4
pause 2000
low 4
pause 200
goto interdone
I need help programming with identifying if PINC.3 ( and not C.2 after checking it for interrupt ) is interrupted with the conditions/constraints of "interrupt coding"?.
How could I also check PINC.3 after checking PINC.2?
I cannot use: "setint %00000000, %00001100" because this means BOTH
pins must go low to cause an interrupt. (Manual "Getting Started", bottom page 68 ).
Thanks in Advance
