serin command & LED Terminal AppMod
Archiver
Posts: 46,084
Fred-
If the !LT0RTR command evokes a quick response from your terminal,
you'll lose it--it will have already happened while the debug "2"
and pause 100 commands are executing. As a result, the Stamp will
sit looking for something that isn't coming (again, that is).
Try:
ck0: serout 6,br,[noparse][[/noparse]"!LT0BIN",t.lowbyte,t.highbyte,$0,$0]
debug "1"
pause 100
serout 6,br,[noparse][[/noparse]"!LT0RTR"]
' debug "2"
' pause 100
serin 6,br,200,ck0,[noparse][[/noparse]STR datain\5]
debug "3"
Steve
If the !LT0RTR command evokes a quick response from your terminal,
you'll lose it--it will have already happened while the debug "2"
and pause 100 commands are executing. As a result, the Stamp will
sit looking for something that isn't coming (again, that is).
Try:
ck0: serout 6,br,[noparse][[/noparse]"!LT0BIN",t.lowbyte,t.highbyte,$0,$0]
debug "1"
pause 100
serout 6,br,[noparse][[/noparse]"!LT0RTR"]
' debug "2"
' pause 100
serin 6,br,200,ck0,[noparse][[/noparse]STR datain\5]
debug "3"
Steve
Comments
I have experimented with pauses, baud rates, different serout commandsand hide/show real time clock to no avail. I have had problems withserin's following PBR, NKR and RTR commands. If there is atypographical/syntax error I'm not finding it.
A typical snippet on my BS2 is:
br con 32+$8000
datain var byte(5)
t var word
[font=Courier New, Courier]'...
ck0:············serout6,br,[noparse][[/noparse]"!LT0BIN",t.lowbyte,t.highbyte,$0,$0]
················debug"1"
················pause100
················serout6,br,[noparse][[/noparse]"!LT0RTR"]
················debug"2"
················pause100
················serin···6,br,200,ck0,[noparse][[/noparse]STRdatain\5]
················debug"3"
'...
In the above snippet the debug screen shows 12121212121212....
If I remove the 200,ck0 timeout it hangs forever after 12.
Does anyone have a clue as to what would make the LED Terminal choke likethis?
Fred[/font]
Excellent observation. I have to remember that these guys have no serial
buffers, a feature that I have taken for granted for so many years. I also
have to remember who is talking to who; in this case the Basic Stamp is
talking to its peripheral and I must not interfere with its dialog. That
communication has nothing to do with the PC's ability to handle to debug
output.
Thank you much.
Fred
At 01:17 AM 2/14/01, you wrote:
>Fred-
>
>If the !LT0RTR command evokes a quick response from your terminal,
>you'll lose it--it will have already happened while the debug "2"
>and pause 100 commands are executing. As a result, the Stamp will
>sit looking for something that isn't coming (again, that is).
>
>Try:
>
>
>ck0: serout 6,br,[noparse][[/noparse]"!LT0BIN",t.lowbyte,t.highbyte,$0,$0]
> debug "1"
> pause 100
> serout 6,br,[noparse][[/noparse]"!LT0RTR"]
>' debug "2"
>' pause 100
> serin 6,br,200,ck0,[noparse][[/noparse]STR datain\5]
> debug "3"
>
>Steve