By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
461,995 Members | 504 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 461,995 IT Pros & Developers. It's quick & easy.

RS232 Class Question

P: 2
I have created a software to receive data from an equipment through RS232 communication. It is a simple application of the RS232 class. The software does receive strings from the equipment every time an event is triggered on it. The Expecting reading data is expected like this example:

{Rd,d:02123579ABCDEF000098EB18, .........

If so, I can retrieve wanted data from this returned string. However, the Actual reading data is rather not understandable. The following is an example:

hhkkhh++((++hhk k

Would this be a simple encoding problem or not? Any comments will be greatly appreciated.

Thanks
Mar 21 '06 #1
Share this Question
Share on Google+
2 Replies

Banfa
Expert Mod 5K+
P: 8,968
The most likely cause is that you have got the RS232 protocol mis-matched to the sending equipment.

You will need to know

Baud Rate
Data Bits
Start bits
Stop Bits
Parity

of the sending equipment and then set-up your receiving UART (serial port) in the same manor.

For instance a common set would be

Baud Rate - 19200 or 19k2
Data Bits - 8
Start bits - 1
Stop Bits - 1
Parity - no parity

Don't just use these values, you need to find out what the correct values for your link are.
Mar 21 '06 #2

P: 2
Thanks for your quick replying Banfa

I think we got it. the baud rate should be 57600 instead of the wrong value I used before.

Thanks again ! :D

The most likely cause is that you have got the RS232 protocol mis-matched to the sending equipment.

You will need to know

Baud Rate
Data Bits
Start bits
Stop Bits
Parity

of the sending equipment and then set-up your receiving UART (serial port) in the same manor.

For instance a common set would be

Baud Rate - 19200 or 19k2
Data Bits - 8
Start bits - 1
Stop Bits - 1
Parity - no parity

Don't just use these values, you need to find out what the correct values for your link are.
Mar 21 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.