Hello,
I want to use the serial driver to echo back what is received from the serial port back by using , I intend to write parsing routines eventually
Below is a fragment of my code in a thread
while (TRUE) {
chr=chIOGet(chp);
if (chr >0 && chr<128) //check if character is valid ascii
chIOPut(chp,chr);
chr=0;
}
I am getting characters echoed back to the serial port using the code above at a very slow rate and sometimes garbage chars.
What is the correct approach to reading characters from the serial port and eventually parsing it
Thanks,
Hansen
Basic Question relating to the serial driver
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Basic Question relating to the serial driver
Hi,
Is the thread doing this loop at equal or lower priority of some other thread that could delay it?
Giovanni
Is the thread doing this loop at equal or lower priority of some other thread that could delay it?
Giovanni