Hardware - LCD display

 

The LCD display can be connected as follows:

LCD-DISPLAY PORT PIN
DB7 P1.7 14
DB6 P1.6 13
DB5 P1.5 12
DB4 P1.4 11
E P1.3 6
RS P1.2 4
RW Ground 5
Vss Ground 1
Vdd +5 Volt 2
Vo 0-5 Volt 3

This leaves P1.1 and P1.0 and P3 for other purposes.

You can change the LCD pin layout from the Options LCD menu.
You can select the display used with the CONFIG LCD statement.

The LCD display operates in 4-bit mode.
See the $LCD statement for operation in 8-bit mode.

BASCOM supports a lot of statements to control the LCD display.
For those who want to have more control the example below shows how to do so.

Acc = 5 'load register A with value

Call Lcd_control 'it is a control value to control the display
Acc = 65 'load with new value (letter A)
Call Write_lcd 'write it to the LCD display

Note that lcd_control and write_lcd are assembler subroutines which can be called from BASCOM.


See manufacture details from your LCD display for the correct assignment.