Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

rs232 problem

Status
Not open for further replies.

handsprince

New Member
i had write a vb program that can receive serial data, now i want to display the data at text box and within 10 lines then save it as text file, can anyone guide me??? thank
 
thank for your reply Nigel, i had wrote the vb program, my program can receive the serial data and display it . how can i make my program to auto save every 10 receive data into a text file.thank
 
handsprince said:
thank for your reply Nigel, i had wrote the vb program, my program can receive the serial data and display it . how can i make my program to auto save every 10 receive data into a text file.thank

How about a timer component?, or counting the data then saving it?.
 
handsprince said:
thank for your reply Nigel, i had wrote the vb program, my program can receive the serial data and display it . how can i make my program to auto save every 10 receive data into a text file.thank
no problem at all.. y can't u count the received data .? i presume u know how to open a file (or is that the question :oops: ?) it would be better to buffer the entire data first (for 10 receives) then flush them to file , rather that (opennig and ) writing at each receive.
 
thank you akg, now my program is display the receive data on a label. and now i want to change it to display on text box and save the it as a textfile. what can i do???
 
If your are having trouble with VB, maybe look at powerbasic.com, the PC/CC program is more like a DOS console program.
 
handsprince said:
thank you akg, now my program is display the receive data on a label. and now i want to change it to display on text box and save the it as a textfile. what can i do???
not clear what u intend ..
replace label1.text to text1.txt
the file open command is like file number = Open <filename> <filemode> , u may have to refer msdn
 
receiving is as simple as (taken from working program):

Code:
Private Sub MSComm1_OnComm()
  Text1.Text = Text1.Text + MSComm1.Input
End Sub

but the most common problem is that people forget to change Rtreshhold to 1. Default value of 0 means no received characters would be returned to program. To change this setting go to MSComm properties...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top