Programming the Smart Switch Using Microsoft Visual Basic 6.0 Dim TxChar As Byte ' variable for 2nd character ' the default value for the second character TxChar = 2 Private Sub OpenPort ' assumes that a MSComm control called MSComm1 was added to the form. ' set the port setting to match the module's default settings of ' baud rate 9600, no parity, 8 data bits and 1 stop bit MSComm1.settings = "9600,N,8,1" ' read input as binary MSComm1.InputMode = comInputModeBinary ' to select port 1 MSComm1.Port = 1 ' to open the port MSComm1.PortOpen = True End Sub Private Sub ClosePort ' to close the port set the PortOpen property to false MSComm1.PortOpen = False End Sub ' Read the documentation provided in the MSDN library and the VbTerm sample ' for more information on using the MSComm control. ' Smart Switch Commands Private Sub SelectNoPort() ' all ports closed MSComm1.Output = Chr$(27) + Chr$(TxChar) + Chr$(4) ' close port End Sub Private Sub SelectPortA() ' Open port "A" MSComm1.Output = Chr$(27) + Chr$(TxChar) + Chr$(4) ' close port MSComm1.Output = Chr$(27) + Chr$(TxChar) + "A" ' open port "A" End Sub Private Sub SelectPortB() ' Open port "B" MSComm1.Output = Chr$(27) + Chr$(TxChar) + Chr$(4) ' close port MSComm1.Output = Chr$(27) + Chr$(TxChar) + "B" ' open port "B" End Sub Private Sub SelectPortC() ' Open port "C" MSComm1.Output = Chr$(27) + Chr$(TxChar) + Chr$(4) ' close port MSComm1.Output = Chr$(27) + Chr$(TxChar) + "C" ' open port "C" End Sub Private Sub SelectPortD() ' Open port "D" MSComm1.Output = Chr$(27) + Chr$(TxChar) + Chr$(4) ' close port MSComm1.Output = Chr$(27) + Chr$(TxChar) + "D" ' open port "D" End Sub End SubDownload Driver Pack
After your driver has been downloaded, follow these simple steps to install it.
Expand the archive file (if the download file is in zip or rar format).
If the expanded file has an .exe extension, double click it and follow the installation instructions.
Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.
Find the device and model you want to update in the device list.
Double-click on it to open the Properties dialog box.
From the Properties dialog box, select the Driver tab.
Click the Update Driver button, then follow the instructions.
Very important: You must reboot your system to ensure that any driver updates have taken effect.
For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.