View Full Version : Identifying ASCII character ?
03-01-2005, 08:58 PM
I have communication between a PC (for now,·Basic Samp later)·and another device via RS232 port. Using HyperTerminal I send a command to the device and it sends out a string of text. How can I find out if there is any specific character (ASCII code) at the end of transmission, and if there is one I need to know what it is.
Is there any software that will receive info from serial port but display just ASCII codes, not letters.
03-01-2005, 09:43 PM
Do a search on "serial sniffer" using Google -- that should help you find the kind of program you're looking for.
Applications Engineer, Parallax
Dallas, TX· USA
03-01-2005, 10:04 PM
Hello, thank you for the info. I actually just copy-pasted text from HyperTerminal into excel and used excel's MID and CODE functions to find that there is always Line Feed ASCII code 10 at the end of each line.
Now how would I go about making stamp SERIN untill it encounters Char 10?
In the line below I am trying to receive data, BaudRT is a set constant, NoData is a label. Receive maximum of 20 characters.
But how do I define "stop if reached ASCII 10"
SERIN 16,BaudRT,10000,NoData,[STR Faults\20\????]
03-01-2005, 10:18 PM
That should be pretty simple.· How long is the text string coming from the device and what does it start with?· I would just use the SERIN command, use the text sentence start character to que the SERIN command, skip the first X characters, and debug the last character in ASCII format.
03-01-2005, 10:30 PM
I need from the 1st character of the string up to 20 characters OR ASCII code 10, which ever happens 1st.
SERIN 16,BaudRT,10000,NoData,[STR Faults\20 \10] should work.