-
Serial Communication
Having a problem with the serial comm. using a Pic16F88/20mhz/baud rate 34800. When I get in a loop and do the following about 30 times, I sometimes chop off the first 2 or 3 bytes and the last 2 or 3 byte. Question am I pausing enough between sends? Is there a way to check to see if a send has completed, before I send the next? Lowering the baud rate doesn't seem to help.
Xva var word
Yval var Word
for i = 0 to 29
HSEROUT ["~","D",#Xval,"~",#Yval,":",#i]
pauseus 50
next
Any help would be great,
Keith
-
The hserout command won't send a character unless the buffer is empty. It does move on to the next command while the last character is being sent.
I've seen it lose the last character if you put the PIC to sleep or hit an END command before the character is completely gone.