Solved

Format of the data received by MSComm from a COM Port??

Posted on 2004-09-06
2
909 Views
Last Modified: 2013-12-25
I am interfacing a 8 bit microcontroller based system with a PC using COM port. I am trying to send data in binary format (conforming to RS232) from the microcontroller to the PC. On the PC side I have a simple application which has to receive data and display it. Later I would enhance the application so that it can store and plot graphs using the data.

I am using MSComm control. The settings for the serial port are 9600 baud rate, no parity bit, 8 bit data and 1 stop bit.

When I am displaying the data received from the microcontroller, I am getting garbage output. I am facing problem in understanding the format in which VB receives the data. E.g. I am repeatedly sending 9 from the microcontroller but I am getting ‘I’ as output on the PC side.

Please provide me information about the format in which data is received by MSComm and how I can overcome the above problem. I feel that I am making mistake in conversion of data format and am not being able to figure it out?

Please help urgently??

0
Comment
Question by:prashant_agr
2 Comments
 
LVL 13

Accepted Solution

by:
imarshad earned 125 total points
ID: 11989471
You should first monitor the coming data with Hyper Terminal......Set the following parameters .....9600 baud rate, no parity bit, 8 bit data and 1 stop bit......Now what you receive ? Is it still "I" or now you receive "9" ??? If you are still receiving "I" then there is some problem with the handshaking and/or Baud Rate.......Try to adjust the Baud rate accordingly......If you receive "9"
in the Hyper Terminal screen then you need to post your code here so that we can check what was the problem in your code......

Imran Arshad
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Write data from SQL to CSV file - position 1 59
Need VBS version of Excel date conversion 4 70
VBA error replacing data 6 39
fso.FolderExists("\\server\HiddenFolder$") 4 64
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question