I have an AXE090 experinmentor's board with a PICAXE 28X1 chip installed.
So far, I've not been able to get the IRIN command to operate at all. Whenever I call it, the chip seems to just hang up.
I've tried a simple little program, trying to see where or why it hangs, but I'm at a loss at what I'm doing wrong.
Here's my test program:
low 7
low 6
low 5
main:
irin [1000,oops],3,b0 'wait for new signal
toggle 6
if b0 = 1 then swon7 'switch on 7
if b0 = 4 then swoff7 'switch off 7
debug
swon7:
high 7
goto main
swoff7:
low 7
goto main
oops:
toggle 5
goto main
Output 7, 6, and 5 are connected to LEDs so that I can follow what's going on. If I REM the IRIN line, LED 7 will turn on, and stay on. I understand that. LED 6 will toggle on and off repeatedly. I understand that.
But, if I try to run it without the IRIN line REM'd out, it never makes it past that line. None of the LEDs ever turn on.
I'm confused here. It passes the syntax check O.K. I thought that when the IRIN timed out, it would go to oops. But it never does.
Does anyone understand what I don't see here?
Thanks,
Duane S
Wilson, NC USA
So far, I've not been able to get the IRIN command to operate at all. Whenever I call it, the chip seems to just hang up.
I've tried a simple little program, trying to see where or why it hangs, but I'm at a loss at what I'm doing wrong.
Here's my test program:
low 7
low 6
low 5
main:
irin [1000,oops],3,b0 'wait for new signal
toggle 6
if b0 = 1 then swon7 'switch on 7
if b0 = 4 then swoff7 'switch off 7
debug
swon7:
high 7
goto main
swoff7:
low 7
goto main
oops:
toggle 5
goto main
Output 7, 6, and 5 are connected to LEDs so that I can follow what's going on. If I REM the IRIN line, LED 7 will turn on, and stay on. I understand that. LED 6 will toggle on and off repeatedly. I understand that.
But, if I try to run it without the IRIN line REM'd out, it never makes it past that line. None of the LEDs ever turn on.
I'm confused here. It passes the syntax check O.K. I thought that when the IRIN timed out, it would go to oops. But it never does.
Does anyone understand what I don't see here?
Thanks,
Duane S
Wilson, NC USA