I decided to start with something dirt-simple, just so I could actually see this thing work. It just flashes 4 LED's in a binary count, then repeats. It was fun to see how simple this is once you get the feel for it.
My first "gotcha" was forgetting to move the jumper over to the "serial in" position.
Now . . . on to bigger and better projects.
My first "gotcha" was forgetting to move the jumper over to the "serial in" position.
Code:
setup:
dirs=%00010111
setint %00001000,%00001000
main:
for b0 = 0 to 31' Count to 31 and
if b0 = 8 then' jump from 8 to 24
b0=24' since we aren't using pin 3.
endif
pins=b0
pause 300
next b0
pause 2000
for b1=1 to 10' Flash all four
pins=%00000000' LED's ten times
pause 100' for no particular
pins=%00010111' reason.
pause 100
next b1
goto main
Interrupt:' Clear all LED's
b0=0' start over if button
pins=%00000000' 3 is pressed.
pause 3000
check:' Hold if button 3 held down.
if pin3=1 then goto check
setint %00001000,%00001000
return