| Description: |
| |
A Hardware Object that outputs characters to any LCD module which uses the 44780 chip set. |
| Operation: |
| |
When the oLCD Object's Value property is set to the ASCII value of a character, that character is sent out the I/O Lines specified by the IOGroup, IOLineE, and IOLineRS properties in such a way that an LCD module using a 44780 chip set will display the character. Setting the String property to a string of characters will sequentially send each character in the string to the LCD module. Invoking the Locate method will cause the LCD's cursor to be positioned on the LCD's screen at the specified X-Y coordinates. Invoking the Clear method will cause the LCD module to clear its screen of any characters. |
| Storage size & Availability: |
| |
The following table lists the size and availability of the oLCD Object:
| Object | Size | Version |
 |
oLCD |
6 Bytes |
B.1.0 |
|
| Properties: |
| |
The following table lists the Properties of the oLCD Object:
| Property | Description |
| Address |
Returns a pointer to the address of the oLCD Object instance. Data-Type: Address, Read-Only Data-Range: 0 - 127 |
| IOGroup |
The physical I/O group to use for the data connections. Data-Type: Nibble Data-Range: 0 - 3 The following table lists the values of the IOGroup Property:
| IOGroup | Nibble | Constant | Description |
| 0 |
0 |
|
The instance of the oLCD Object is inactive. |
| 0 |
1 |
|
The instance of the oLCD Object is inactive. |
| 1 |
0 |
|
The oLCD Object uses pins 8 - 11 for its data I/O. |
| 1 |
1 |
|
The oLCD Object uses pins 12 - 15 for its data I/O. |
| 2 |
0 |
|
The oLCD Object uses pins 16 - 19 for its data I/O. |
| 2 |
1 |
|
The oLCD Object uses pins 20 - 23 for its data I/O. |
| 3 |
0 |
|
The oLCD Object uses pins 24 - 27 for its data I/O. |
| 3 |
1 |
|
The oLCD Object uses pins 28 - 31 for its data I/O. |
|
| IOLineE |
A value that specifies the physical I/O Line to use for the data strobe connection. Data-Type: Byte Data-Range: 1 - 31 |
| IOLineRS |
A value that specifies the physical I/O Line to use for the Register Select connection. Data-Type: Byte Data-Range: 0 - 31 |
| Nibble |
Specifies which side of an IOGroup to use. Data-Type: Bit Data-Range: 0 - 1 The following table lists the values of the Nibble Property:
| Nibble |
Constant |
Description |
| 0 |
cvLow |
The oLCD Object uses the lower 4 bits of the specified IOGroup |
| 1 |
cvHigh |
The oLCD Object uses the upper 4 bits of the specified IOGroup |
|
| Operate |
A value that indicates if an data assigned to the Value property is sent to the LCD. Data-Type: Bit, Flag Data-Range: 0 - 1 |
| RS |
A value that controls the output state of the I/O Line specified by the IOLineRS property. Data-Type: Bit Data-Range: 0 - 1
| Nibble |
Constant |
Description |
| 0 |
cvLow |
The I/O line specified by the IOLineRS property is set to logical low (0 Volts). |
| 1 |
cvHigh |
The I/O line specified by the IOLineRS property is set to logical high (5 Volts). |
|
| String |
The Value property represented as a string. Data-Type: String |
| Value |
The value of any ASCII or control character. Data-Type: Byte, Default Data-Range: 0 - 255 |
|
| Methods: |
|
| Methods | Description |
| Clear |
Clears the LCD screen. |
| Locate |
Sets the cursor to the specified location. The Locate command uses two arguments; Row & Column, both of which are 0 based. Example: X.Locate(0,1) ' will locate cursor at 1st row, 2nd column. Example: X.Locate(1,9) ' will locate cursor at 2nd row, 10th column. |
|
| Example: |
| |
In the following example, the oLCD Object is used to display the phrase "Hello World" on a LCD module that uses the 44780 chip set.
Dim LCD As New oLCD
Sub Main()
LCD.IOLineRS = 26 ' Set up the I/O.
LCD.IOLineE = 27
LCD.IOGroup = 3
LCD.Nibble = 1
LCD.Operate = 1 ' Turn on the oLCD Object.
LCD.Init ' Initialize the LCD Module.
LCD.Clear ' Clear the screen.
LCD.Locate(0,1) ' Locate cursor at 1st row, 2nd column.
LCD.String = "Hello World" ' Print "Hello World" on LCD.
End Sub
|
|
| Connections: |
|
The oLCD uses 6 I/O lines. The 6 I/O lines are divided into one group of 4 consecutive data lines and two independent control lines. The 4 consecutive data lines can be in IOGroup 1, 2, or 3 on either the upper or lower 4 bits. The two independent control lines can be on any unused I/O line.
LCD Module Connections Where: IOLineRS = 26 IOLineE = 27 IOGroup = 3 Nibble = 1 |
 |
| Pin | Name | Description | I/O Line | I/O Group |
| 1 | 2 | 3 |
| L | H | L | H | L | H |
| P1 |
Gnd |
Power Ground |
Gnd |
|
|
|
|
|
|
| P2 |
Power |
Power 5 Volts |
5 Volts |
|
|
|
|
|
|
| P3 |
|
|
Gnd |
|
|
|
|
|
|
| P4 |
RS |
Register Select |
1 - 31 |
|
|
|
|
|
|
| P5 |
|
|
Gnd |
|
|
|
|
|
|
| P6 |
E |
Enable/Strobe |
1 - 31 |
|
|
|
|
|
|
| P7 |
D0 |
Data 0 |
Gnd |
|
|
|
|
|
|
| P8 |
D1 |
Data 1 |
Gnd |
|
|
|
|
|
|
| P9 |
D2 |
Data 2 |
Gnd |
|
|
|
|
|
|
| P10 |
D3 |
Data 3 |
Gnd |
|
|
|
|
|
|
| P11 |
D4 |
Data 4 |
|
8 |
12 |
16 |
20 |
24 |
28 |
| P12 |
D5 |
Data 5 |
|
9 |
13 |
17 |
21 |
25 |
29 |
| P13 |
D6 |
Data 6 |
|
10 |
14 |
18 |
22 |
26 |
30 |
| P14 |
D7 |
Data 7 |
|
11 |
15 |
19 |
23 |
27 |
31 |
|
|
| See Also8: |
| |
oLCDSE - An Object that outputs characters to a Scott Edwards LCD Module. oLCDWZ - A Hardware Object that outputs characters to a Wirz SLI-OEM LCD Controller Module. oVideoIC - An Object that overlays text on a video signal using an Intuitive Circuits OSD232 On-Screen Display Character Overlay Board. |