Connecting Tech Pros Worldwide Help | Site Map

RS232 Class Question

  #1  
Old March 21st, 2006, 02:51 PM
Newbie
 
Join Date: Mar 2006
Posts: 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:

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

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

Thanks
  #2  
Old March 21st, 2006, 04:46 PM
Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,117

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.
  #3  
Old March 21st, 2006, 05:40 PM
Newbie
 
Join Date: Mar 2006
Posts: 2

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed using sample RS232 class to read from serial port Dave Harry answers 4 March 27th, 2006 12:35 AM
Rs232-class question Mika M answers 2 November 21st, 2005 03:34 AM
RS232 Anyone??? Terry Olsen answers 8 November 21st, 2005 01:54 AM
__event and __delegate question Joe Thompson answers 5 November 17th, 2005 01:07 PM