RonHackett
Member
Hi All,
I haven't been able to get the optional timeout for the serrxd command to function correctly on any of the M2 processors. The following code works as expected with a 20X2, but all the M2 processors seem to skip right past the timeout (and fail to update the variables correctly).
Every time I send a single character (e.g., "z") to a 20X2, the Terminal Window displays "z***" after a brief delay, which is what I would expect. However, for all the M2 processors, it works correctly the first time through the loop, but all subsequent attempts result in no delay at all, and the Terminal Window displays "****".
Also, various other inputs (of 2, 3 or 4 characters) produce the expected results with a 20X2 processor, but the M2 chips seem to be ignoring the timeout altogether (and not receiving the characters I sent them); they immediately send back the default "*" for each variable.
If anyone can clarify what's happening, I would appreciate it!
Thanks... Ron
I haven't been able to get the optional timeout for the serrxd command to function correctly on any of the M2 processors. The following code works as expected with a 20X2, but all the M2 processors seem to skip right past the timeout (and fail to update the variables correctly).
Code:
' === TimeoutTest.bas ===============
' === Directives ===
#com 7
#picaxe 20M2
#no_data
'#no_table ' un-comment for 20X2
#terminal 9600
' === Begin Main Program ============
setfreq m8
do
b0="*":b1="*":b2="*":b3="*"
sertxd ("Test: ")
serrxd b0
serrxd [4000],b1,b2,b3
sertxd (b0,32,b1,32,b2,32,b3,cr,lf)
wait 1
loop
Also, various other inputs (of 2, 3 or 4 characters) produce the expected results with a 20X2 processor, but the M2 chips seem to be ignoring the timeout altogether (and not receiving the characters I sent them); they immediately send back the default "*" for each variable.
If anyone can clarify what's happening, I would appreciate it!
Thanks... Ron