My first foray into serial communications on the 14M is going well, but there's one slight problem I can't track down. I'm trying to just make a simple serial "echo" program that will send back whatever I send it, but it occasionally drops characters.
I'm using the program editor's terminal, and when I sent it this:
...I got back this:
Almost, but not quite, right. I've made sure the terminal is adding 5ms delay between bytes. I originally was doing this on input 3, but saw that the manual said serin on input 3 was flaky without a diode, so I switched to input 1. I have the 22k/10k resistors on input 1 (same as on the serial programming pin).
I considered the possibility is that there simply isn't enough time between incoming bytes to send outgoing bytes. To test this, I loaded up hyperterminal and tried typing really slowly (2 characters/second). Even with the huge gaps between letters the picaxe still dropped some.
I'm not sure what else it could be. Has anyone else tried something similar and gotten it to work?
Code:
main:
serin 1, N2400, b0
serout 0, N2400, (b0)
goto main
Code:
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
Code:
The quick brown foxjums over the lazy dog.
The quick brown fox jumps over the lazy dog
The quick brown fox jmpsoer the lazy dog.
The quick bow fo jumps over the lazy dog.
The qick brown fox ups over the lazy do.
I considered the possibility is that there simply isn't enough time between incoming bytes to send outgoing bytes. To test this, I loaded up hyperterminal and tried typing really slowly (2 characters/second). Even with the huge gaps between letters the picaxe still dropped some.
I'm not sure what else it could be. Has anyone else tried something similar and gotten it to work?