|
Test Receive Roland from South Africa [107 posts] |
11 year
|
I have a numericl keypad connected to a serial port that sends in characters.
the program seems to respond to the characters.
However, I need letters too, and am using the 'Test Receive' to generate these. While these letters show in the console window, they don't show in the received varaible until maybe 10 key presses later. Is this correct?
It does work, but only eventually.
Will I be able to rely on a single character in when the machine is in use?
Is the serial-in value polled or does it set a service flag?
Roland
|
|
|
Steven Gentner from United States [1446 posts] |
11 year
|
Roland,
The receive sequence needs to have some sort of character to know when the sequence ends. This is to allow for strings of text to be transmitted. If you just need a single character you would use
single backslash[swing_read]
where single backslash is a single backslash if that isn't obvious just in case emails/posting/etc changes that.
This tells the serial reader that you only expect back a single character which will be read, inserted into the variable and then continue on.
STeven.
|
|