473,325 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

RS232 Class Question

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
Mar 21 '06 #1
2 3608
Banfa
9,065 Expert Mod 8TB
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
KCUK
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

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

Similar topics

1
by: Dan | last post by:
I wnat to see in browser an status from an device connected on rs232 port The java class for read from serial port is: //Serial.java import java.io.*; import java.util.*; import...
0
by: Jason T | last post by:
I've downloaded and installed the '101 Visual Basic and C# Code Samples' from http://www.microsoft.com/downloads/details.aspx?familyid=08e3d5f8-033d-420b-a3b1-3074505c03f3&displaylang=en I have...
6
by: Ken Breit | last post by:
I am using the RS232.vb class to talk to the serial port. The problem I am having is when I try to read if anything is on the comm port. I call the read method, with the number of bytes I am...
3
by: Przemo | last post by:
Hi, Do you know some good RS232C class? There is one in VB.NET 101 Examples, but I think it is poor. 1. I can't for e.g. read into my application all data received. I must tell how many...
8
by: Terry Olsen | last post by:
I'm trying to use the RS232 class that was in the Platform SDK (i think). Has anyone else used this with events successfully? Here's what i've got: ====================== Public WithEvents...
2
by: Mika M | last post by:
Hi! My application uses Rs232-class, which was shipped with "101 VB.NET Samples\Framework - Using the COM Port". I need to sent certain kind of string into peripheral equipment attached to...
4
by: Dave Harry | last post by:
I found the RS232 class from MS's 101 VB samples. Writing to the port works fine. (I've got hyperterminal on the other comm port and a crossover cable between COM1 and COM2) The port is opened...
1
by: fidel | last post by:
Hello, my target is a small application which: * Start as a small Window * Offers several input fields for RS232-related connection informations (like parity etc...) * A Send-function to...
5
by: =?Utf-8?B?Q2hyaXN0aWFuIEhhdmVs?= | last post by:
Hi, how can I access the RS-232 hardware interface using C# and .NET2.0 to send and receive messages to a hardware component? Christian
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.