Problem with serinp$
Posted: Wed Sep 17, 2014 9:51 am
I need a serial input on RX (pin 37) and output to TX (pin 36) just like "INPUT" and "PRINT" works on the USB port 0. I have tried the below code but it just falls thru with out any string or characters being received. The input to serinp$ could come at any time.
command$ = "" ' null command variable
serinit 1,9600,8,1,0 ' Init port
.
.
command$ = serinp$(1,20,13,1) ' Input string with max characters = 20, stop on CR, ?
error = serout(1,command$)
.
.
Now test for valid command. ' It never gets a valid command or any character, just falls thru the serinp$.
end
Is there something wrong with what I'm expecting from the code or how it is being used? I believe that signals are being sent into the hardware pin 36.
Phil
command$ = "" ' null command variable
serinit 1,9600,8,1,0 ' Init port
.
.
command$ = serinp$(1,20,13,1) ' Input string with max characters = 20, stop on CR, ?
error = serout(1,command$)
.
.
Now test for valid command. ' It never gets a valid command or any character, just falls thru the serinp$.
end
Is there something wrong with what I'm expecting from the code or how it is being used? I believe that signals are being sent into the hardware pin 36.
Phil