Connecting Tech Pros Worldwide Forums | Help | Site Map

RS232 Class Question

Newbie
 
Join Date: Mar 2006
Posts: 2
#1: Mar 21 '06
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:

hh˜˜ˆˆˆˆkkÐÐhh˜˜ˆˆˆˆ++ÐÐ((˜˜ˆˆ++ÐÐhhÈÈk kÐ

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

Thanks

Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,200
#2: Mar 21 '06

re: RS232 Class Question


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.
Newbie
 
Join Date: Mar 2006
Posts: 2
#3: Mar 21 '06

re: RS232 Class Question


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

Quote:

Originally Posted by Banfa

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.

Reply