|
-
December 7th, 1999, 01:03 AM
#1
Sending '1's and '0's...
Does anyone know how to send a string of '1's and '0's throught the serial port using VB? Is there any functions in VB which is similar to the outp function in C??? Urgent...Thanks!!!
-
December 7th, 1999, 02:21 AM
#2
Re: Sending '1's and '0's...
I don't know which version of VB you use. If it is 5.0 or 6.0 it is very easy:
MSComm1.InputMode = 1
Dim bOutput(0 To 10) As Byte ' Output Binary Array
bOutput(0) = 0
bOutput(1) = 1
MSComm1.Output = bOutput
But if you use VB 4 or less, you'd better use API functions CreateFile(), ReadFile(), WriteFile().
Good Luck!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|