I am still fiddling with my LED driver program..... I've moved on to trying to get the ability to select the display from the PC. The code below, used with the terminal in the programming editor, *should* display "12345" if 1 is sent from the terminal, "67890" if 2 is sent. Well, nothing at all happens. It looks like the PICAXE is never getting the serin at all. When I type 1 in the output buffer and press send, I get a string of blocks appear in the input buffer, but no response from the PICAXE board.
What I've checked.... Yes, I am switching the input from the serial download pin to input pin 1 (physical pin 18) after downloading the program. Yes, the protocol in the editor is 2400,N,8,1.
Here's the code... (without the serin parts, if the 'ledhigh' and 'ledlow' subs are just looped, the display flops back and forth betwen "12345" and "67890" just like it should)
main:
serin 1,n2400,b1
b0 = b1
if b0=1 then ledlow
if b0=2 then ledhigh
goto main
ledhigh:
high 3
pause 1
low 3
pause 1
high 4
high 3
pause 1
low 3
low 4
gosub six
gosub seven
gosub eight
gosub nine
gosub zero
high 3
pause 1
low 3
goto main
ledlow:
high 3
pause 1
low 3
pause 1
high 4
high 3
pause 1
low 3
low 4
gosub one
gosub two
gosub three
gosub four
gosub five
high 3
pause 1
low 3
goto main
Any ideas?
Richard
What I've checked.... Yes, I am switching the input from the serial download pin to input pin 1 (physical pin 18) after downloading the program. Yes, the protocol in the editor is 2400,N,8,1.
Here's the code... (without the serin parts, if the 'ledhigh' and 'ledlow' subs are just looped, the display flops back and forth betwen "12345" and "67890" just like it should)
main:
serin 1,n2400,b1
b0 = b1
if b0=1 then ledlow
if b0=2 then ledhigh
goto main
ledhigh:
high 3
pause 1
low 3
pause 1
high 4
high 3
pause 1
low 3
low 4
gosub six
gosub seven
gosub eight
gosub nine
gosub zero
high 3
pause 1
low 3
goto main
ledlow:
high 3
pause 1
low 3
pause 1
high 4
high 3
pause 1
low 3
low 4
gosub one
gosub two
gosub three
gosub four
gosub five
high 3
pause 1
low 3
goto main
Any ideas?
Richard