8 Channel USB GPIO Module with VB-6 INPUT Code

Test INPUT of your 8 Channel USB card assembled with microchip processor type PIC18F14K50 through application program developed in Visual Basic 6. visit http://www.areptone.com/vb6/

Dim Buffer As String ‘Buffer to hold input string
Dim X
Private Sub Command1_Click()
MSComm1.CommPort = 6 ‘Com Port Number
MSComm1.Settings = “9600,N,8,1” ‘9600 baud, no parity, 8 data, and 1 stop bit.
MSComm1.InputLen = 0 ‘Tell the control to read entire buffer when Input is used.
MSComm1.PortOpen = True ‘Open the port.
‘Text1.Text = “gpio read 0”
MSComm1.Output = “gpio read 0″ & Chr$(13)
‘Print Text1.Text & ” written successfully”
Buffer = MSComm1.Input
Loop Until InStr(Buffer, “” & Chr$(13))
Label1.Caption = Buffer
MSComm1.PortOpen = False ‘Close the port.
End Sub
Adeeb Raza
Areptone Electronic Products
Email: areptone@hotmail.com

About adeebraza1236

I am an electronic instrumentation engineer by profession but I am working as a design engineer. I can design electronic hardware interface circuits for computer based security system, Computer based industrial control system for automation and process control Etc. My Interests: Electronics Circuit designing with PCB Designing, Computer software development using VB & C , PC based security system, Designing LED Lights, UPS, Inverter Etc
This entry was posted in Uncategorized, Visual Basic 6 Code. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s