| Online Development Notebook > Index > Programming Overview > Device Commands > LCDData |
LCDData - Send a character to the LCD
Description:
This is a function that writes a character to the LCD. The RS, RW, E lines and the data port are selected by the InitLCDCmd. The data byte is written to the selected port and the control lines are set appropriately. The E line is toggled for five to eight microseconds.
Command Syntax: (USBm.dll)
USBm_LCDData( device, data )
The USBm_LCDData function syntax has these parts:
| Part | Description |
| device | A zero-based index to address the appropriate USB device. |
| data | The value to transfer to the LCD data register. |
Remarks:
VB Declaration
| Public Declare Function USBm_LCDData _ Lib "USBm.dll" _ (ByVal device As Byte, _ ByVal data As Byte) _ As Integer |
VB Example
| USBm_LCDData 2, 'H' |
This code fragment will write the command byte of "H" to the LCD display connected to device 2.
C Prototype
| int USBm_LCDData( unsigned char device, unsigned char data ); |
C Example
RobotBASIC
usbm_LCDData(ne_DeviceNumber,ne_DataByte)
Returns true if successfull, false otherwise. Sends a data byte to the LCD.
Raw Command Format:
| Byte Number | Description |
| 0 | 12h: LCDDataCmd |
| 1 | Byte Data |
| 2 | <not used> |
| 3 | <not used> |
| 4 | <not used> |
| 5 | <not used> |
| 6 | <not used> |
| 7 | <not used> |
Raw Command Format Details:
Byte 0 contains the command. Byte 1 is the character to transfer to the LCD display. Byte 2 through byte 7 are unused.
Raw Command Response Format:
| Byte Number | Description |
| 0 | 12h: LCDDataCmd |
| 1 | <not used> |
| 2 | <not used> |
| 3 | <not used> |
| 4 | <not used> |
| 5 | <not used> |
| 6 | <not used> |
| 7 | <not used> |
Raw Command Response Format Details:
Byte 0 contains the command. Byte 1 through byte 7 are unused.
Raw Command Example Usage:
12-42-00-00-00-00-00-00 will display a 'B' on the LCD.
Hardware: U401 USB Interface U421 USB Interface U451 USB Interface
Programming: USBm DLL Programming Download Files
Application Notes: U4x1 Application Notes Misc Applications and Information FAQ
While every effort has been made to make sure that the information posted on this site is correct, the author can not be held liable for any damages whatsoever for losses as a result of the application of this information. Use this information at your own risk.
USBmicro can design your custom and semi-custom USB product. Email about USB design can be directed to " Robert " at usbmicro.com.
Copyright © USBmicro, L.L.C., 2002-2010