Pongo
Senior Member
Is there a limit to the number of bytes that hserin can read at one time using a 20x2?
I have a system that sends an 82 byte string @ 9600 baud. It was set up to send to a BS2 and so transmits fairly slowly with 20 milliseconds between bytes. A 20x2 reads the data fine up to about 55 bytes, but it either ignores or garbles anything further. Test code below, what am I doing wrong?
I have a system that sends an 82 byte string @ 9600 baud. It was set up to send to a BS2 and so transmits fairly slowly with 20 milliseconds between bytes. A 20x2 reads the data fine up to about 55 bytes, but it either ignores or garbles anything further. Test code below, what am I doing wrong?
Code:
#picaxe 20X2
#No_Table
#No_Data
#Terminal 9600
hsersetup b9600_8, %00
main:
hserin [10000,whoops],0,65,("W")
for ptr = 0 to 65
sertxd(@ptr)
next
sertxd(CR, LF)
pause 100
goto main
whoops:
sertxd("whoops")
sertxd(CR, LF)
pause 200
goto main