Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

About Visual Basic6 and RS232 ASCII communication

Status
Not open for further replies.

cyw1984

Member level 2
Joined
Sep 6, 2005
Messages
45
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,643
About Visual Basic6 and RS232 ASCII communication
**broken link removed**

If I want to send the value (ASCII) to 8051 series port

VB block input:
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
0.1
0.11
0.12
0.13
0.14
0.15
0.16
0.17
0.18
.
.
.
.
.
.
.
29.93
29.94
29.95
29.96
29.97
29.98
29.99
30.00

RS232 transmit :

0000
0001
0002
0003
0004
0005
0006
.
.
.
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000


If i want display 0-30 with 0.00 (ACSII).....
How can I write the VB software , It need to write 3000 structure????
 

Hope this works for you

Code:
for A=1 to 3000
 M=chr(A)
 while len(chr(A))<4
   M= "0" & M
 wend
 MsComm1.Output=M
next

What I'm not sure about is how long you should wait before sending the next data.
[/code]
 

thedesolatesoul said:
Hope this works for you

Code:
for A=1 to 3000
 M=chr(A)
 while len(chr(A))<4
   M= "0" & M
 wend
 MsComm1.Output=M
next

What I'm not sure about is how long you should wait before sending the next data.
[/code]

Um....if I send a new values.....the sending data is updated immediately....

THX
 

Hi,

You can try to send a string message through the serial port, like this

MSComm1.Output = "29.87" and then you can see this string into your microcontroller system. Further messages can be sent following this approach.

Best Regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top