Professional Documents
Culture Documents
History
1
Driver Installation
The Com port number will vary depending on the number of existing com ports on your
computer and the number of USBIO24s connected to your system.
Step 1
Plug in the USBIO24 using a USB cable.
Step 2
2 drivers would be installed.
Firstly is the USB serial converter
2
3
Step 3
Secondly it will install the USB Serial Port driver.
4
5
Step 4
Run the setup program on the CD.
Step 5
Next run the sample program [USBIOex1]
You should get the screen below which show that the installation is successful.
6
Step 6
Run VB and start a new project to develop your own program.
7
Commands
(1) Identity
USBIO.Identity
(2) Connect
USBIO.Connect
Connect the USBIO24 to the virtual serial port for Windows 2000.
For Windows 98 use USBIO24.comPort. The driver is installed as a Virtual Com Port
and when installed the USBIO24 will appear in the System Properties / Device Manager
as an USB Serial Port (COMn) as follows.
8
(3) ComPort
USBIO.ComPort
Display the serial port number that the USBIO24 is currently connected to.
USBIO.ComPort = 3
(4) WriteDDR
USBIO.WriteDDRA
Example
USBIO.WriteDDRB
USBIO.WriteDDRC
9
(5) WritePort
USBIO.WritePortA
Example
USBIO.WritePortB
USBIO.WritePortC
(6) ReadPort
USBIO1.ReadPortA
USBIO.ReadPortB
USBIO.ReadPortC
10
(7) SetBit
USBIO.SetBitA
USBIO.SetBitB
USBIO.SetBitC
(8) ClearBit
USBIO.ClearBitA
Example
USBIO.ClearBitA = &H12 ‘00010010 – switch off pin 1 and 4. Other pins no change
USBIO.ClearBitA = &HA1 ‘10100001 – switch off pin 0, 5 and 7.
‘ Other pins no change
USBIO.ClearBitA = &HFF ‘11111111 – switch off all pins
USBIO.ClearBitA = 0 ‘00000000 – All pins no change
USBIO.ClearBitB
USBIO.ClearBitC
11
(9) Serial Number
USBIO.SerialNo
12
Sample program 1
Private Sub Form_Load()
Text2.Text = Hex$(USBIO1.ReadPortA)
End Sub
Sample program 2
Private Sub Form_Load()
USBIO1.Connect
Text1.Text = USBIO1.Identity & USBIO1.ComPort & vbCrLf & USBIO1.SerialNo
USBIO1.WriteDDRA = &H0
USBIO1.WriteDDRB = &H0
USBIO1.WriteDDRC = &H0
USBIO1.WritePortA = &HF1
USBIO1.WritePortB = &H22
USBIO1.WritePortC = &HFF
USBIO1.SetBitA = (&H2)
USBIO1.SetBitB = (&H2)
USBIO1.ClearBitC = (&H30)
Text2.Text = Hex$(USBIO1.ReadPortA)
Text3.Text = Hex$(USBIO1.ReadPortB)
Text4.Text = Hex$(USBIO1.ReadPortC)
End Sub
13
Disclaimer
This product and its documentation are provided as-is and no warranty is made or implied
as to their suitability for any particular purpose.
14
USBIO24 Accessory Boards
All the accessory boards listed below can be used on the USB I/O 24
15
(3) USBIO24 Opto Input Board
16