I don't think so. By limiting the decimal value of 'a' to printable characters, the byte being sent will print that ASCII character. So, the way its being sent now is '32' will print a space, '33' will print "!",,,, '65' will print "A", etc..
Are you willing to try separate and different ports for the SERIN and SEROUT? Sending and receiving on the same port pin is something I've never seen done using SERIN and SEROUT... and I have never considered doing it myself. It sure would eliminate one obvious anomaly.
<snip...>
SI var PORTB.7
start:
SERIN si,N2400,B0 <===== SERIN (on) PORTB.7
if b0 <> "0" then
for a= 32 to 126
serout si,N2400,[a] <====== serout (on) PORTB.7
Try not using the same port for SERIN and SEROUT.
It may not be an issue for PBP to use the same port pin, but I can't imagine what the hookup to the RS232 would look like.
EDIT: To be simple about it, just remark out:
start:
' SERIN si,N2400,B0
' if b0 <> "0" then
for a= 32 to 126
serout si,N2400,[a]
next a
' endif
goto start





Bookmarks