USBmicro

Your source for USB electrical device interface products.

  • Home
  • Services
    • Design
    • Contact USBmicro
  • Where to buy…
You are here: Home / Documentation / Device Commands / LCDCmd

LCDCmd

Send a command to the LCD


Description:

This is a function that writes a command 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_LCDCmd( device, data )

The USBm_LCDCmd 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 command register.

Remarks:

 


VB Declaration

Public Declare Function USBm_LCDCmd _
    Lib “USBm.dll” _
        (ByVal device As Byte, _
        ByVal data As Byte) _
    As Integer

VB Example

USBm_LCDCmd 2, &H33

This code fragment will write the command byte of &H33 to the LCD command register connected to device 2.


C Prototype

int USBm_LCDCmd( unsigned char device, unsigned char data );

C Example

 


RobotBASIC

usbm_LCDCmd(ne_DeviceNumber,ne_CommandByte)

Returns true if successfull, false otherwise. Sends a command code to the LCD.


Raw Command  Format:

Byte Number Description
0 11h: LCDCmdCmd
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 data to transfer to the LCD command register. Byte 2 through byte 7 are unused.

Raw Command Response Format:

Byte Number Description
0 11h: LCDCmdCmd
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:

11-33-00-00-00-00-00-00 will write the command byte of 33h to the LCD command register.

Documentation

Open all | Close all