Quote Originally Posted by jmbanales21485 View Post
on the transmitter side i have:
serout SerialOut, mode, ["LCD", $FE, 1, "transmit", CR]
i am transmitting at 2400 baud, sends "LCD" to initialize LCDDriver, and then sends the LCD commands, which in this case is $FE, 1, "transmit"

on the reciever i have :
serin2 SerialIn, mode, [WAIT("LCD"), testHEX, testHEX2, STR testSTR\16\CR]
I am receiving at 2400 baud, it will wait for "LCD" and receive the data. the string testSTR will receive 16 characters.

when i do this my LCD will display "transmit" (GOOD!!!) BUT will fill the remaining 8 slots with random characters (BAD).

so i need to know if there is a way of determining the last leter of a string sent or something that gives me an indication that its done transmitting so the receiving side won't fill the remaining characters with random. attached is a sample code that i have and works (except for the random characters issue)

thank you all in advanced!
Your answer is right there in the code you wrote!
Your transmit routine sends:
L, C, D, $FE, 1, t, r, a, n, s, m, i, t, CR
The last character of the string you sent is the character right before the 'CR' (ASCII code decimal 13).
Write a subroutine to search for that character and zero it out along with anything else past that character in the string.