Discussion in "Software" started by    sumalatha    Aug 3, 2008.
Sun Aug 03 2008, 03:31 pm
#1
Hello,

I need to use Visual basic to acquire some data through the serial port, store it etc. As I am just getting acquainted with VB6 I need some help.

My Controller board (8 bit micro) sends out serial data 3 bytes at a time ( a packet). The data are typically binary bytes and can have values from 0 to 255. To signal the start of a set of bytes the CTS line is given a high. The data set is sent at intervals of 35 milliseconds. I need to receive the data and store them into 3 different arrays so that at the end of a given period of time we have the three arrays with Bytes 1, Bytes 2 and Bytes 3 respectively.

I have done some study of the MSCOMM control but I am confused about what data types to use, how to buffer the data into appropriate arrays etc. I cannot do this in polled mode also.

Looking forward for help in this regard

Thanks

Suma
Sun Aug 03 2008, 07:45 pm
#2
hi sumalatha,
welcome to the forum.
do check the tutorial for more information regarding visual basic programming using the MSComm object. also check the following thread:
http://www.8051projects.net/forum-t5021.html

P.S. hope u have send the data to the PC in ASCII format.

good luck. :-)


[ Edited Sun Aug 03 2008, 07:47 pm ]
Mon Aug 04 2008, 10:14 am
#3
Thank you pdi33, I am sending the data as binary bytes
Mon Aug 04 2008, 02:27 pm
#4
well, the PC doesnot recognise binary format. so u have to covert the binary data into ASCII format at the uC end before sending it to the PC.
first just try sending the data to the PC using the MAX232 and check if u are getting the bytes at the PC using hyperterminal before going in for a VB interface. that would ensure that ur hardware and the uC code is correct.


[ Edited Mon Aug 04 2008, 02:29 pm ]

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Robertrip
Fri Apr 26 2024, 11:20 am
ArnoldDiant
Fri Apr 26 2024, 03:53 am
RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm