Using connection mode 8:
Using connection mode will require R/W
, RS
, Enable
and all 8 data
lines.
The data lines must all be connected to the same I/O port, in sequential
order. For example, DB0
to PORTB.0
, DB1
to PORTB.1
and so on, with DB7
going to PORTB.7
.
Relevant Constants:
These constants are used to control settings for the Liquid Crystal
Display routines included with GCBASIC. To set them, place a line in the
main program file that uses #define
to assign a value to the particular
constant.
Constants are required for 8-bit mode as follows.
Constant Name | Controls | Default Value |
---|---|---|
|
|
|
|
The I/O mode. Can be 2, 4 or 8. |
|
|
Specifies the output pin that is connected to Register Select on the LCD. |
Must be defined |
|
Specifies the output pin that is connected to Read/Write on the LCD. The R/W pin can be disabled*. |
Must be defined (unless R/W is disabled) |
|
Specifies the output pin that is connected to Read/Write on the LCD. |
Must be defined |
|
Output port used to interface with LCD data bus |
Must be defined |
|
Drives the port with |
Optional |
The R/W
pin can be disabled by setting the LCD_NO_RW
constant. If this
is done, there is no need for the R/W
to be connected to the chip, and
no need for the LCD_RW
constant to be set. Ensure that the R/W line on
the LCD is connected to ground if not used.
For a code example download Eight Wire LCD example.
For code examples see Eight Wire Examples.
See the separate sections of the Help file for the specifics of each Connection Mode.
For more help, see LCD_IO 0, LCD_IO 1, LCD_IO 2, LCD_IO 2_74xx164, LCD_IO 2_74xx174, LCD_IO 4, LCD_IO 10 or LCD_IO 12