| Online Development Notebook > Index > ODN > USBm DLL Programming > Device Commands > SetBit |
SetBit
Description:
This is a USBm.dll function that sets a single bit⁄line high.
Command Syntax: (USBm.dll)
USBm_SetBit(device, bit)
The USBm_SetBit function syntax has these parts:
| Part | Description |
| device | A zero-based index to address the appropriate USB device. |
| bit | The bit that will be affected. |
Remarks:
Bit⁄Line Selection
| Byte Value | Result | Byte Value | Result | |
| 00h | Affect A.0 | 08h | Affect B.0 | |
| 01h | Affect A.1 | 09h | Affect B.1 | |
| 02h | Affect A.2 | 0Ah | Affect B.2 | |
| 03h | Affect A.3 | 0Bh | Affect B.3 | |
| 04h | Affect A.4 | 0Ch | Affect B.4 | |
| 05h | Affect A.5 | 0Dh | Affect B.5 | |
| 06h | Affect A.6 | 0Eh | Affect B.6 | |
| 07h | Affect A.7 | 0Fh | Affect B.7 |
VB Declaration
| Public Declare Function USBm_SetBit _ Lib "USBm.dll" _ (ByVal device As Byte, _ ByVal bit As Byte) _ As Integer |
VB Example
| USBm_SetBit 0, 3 |
This code fragment sets bit A.3 of device 0.
C Example
-TBD-
| Hardware: U401 USB Interface U421 USB Interface |
| Programming: USBm DLL Programming Download Files |
| Application Notes: U4x1 Application Notes Misc Applications and Information FAQ |