free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
sumalatha
Sun Aug 03 2008, 03:01AM
 User Offline
Registered Member #9531
Joined: Sun Aug 03 2008, 02:48AM

Posts: 2
Thanked 0 times in 0 posts
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

Back to top


pdi33
Sun Aug 03 2008, 07:15AM

 User Offline
Registered Member #1329
Joined: Mon Jun 04 2007, 09:28AM

Posts: 770
Thanked 185 times in 180 posts
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:17AM ]

* inspired to develop,developing to inspire *
Back to top


sumalatha
Sun Aug 03 2008, 09:44PM
 User Offline
Registered Member #9531
Joined: Sun Aug 03 2008, 02:48AM

Posts: 2
Thanked 0 times in 0 posts
Thank you pdi33, I am sending the data as binary bytes
Back to top


pdi33
Mon Aug 04 2008, 01:57AM

 User Offline
Registered Member #1329
Joined: Mon Jun 04 2007, 09:28AM

Posts: 770
Thanked 185 times in 180 posts
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, 01:59AM ]

* inspired to develop,developing to inspire *
Back to top


 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems