-
Notifications
You must be signed in to change notification settings - Fork 8
lcd_io_12_port_configuration
Anobium edited this page Oct 18, 2020
·
1 revision
Using mode 12:
When using I2C LCD mode 12 the target I2C device address is setup as
shown below. Each bit of the the variable i2c_lcd_byte
is defined to
address the correct LCD display port.
i2c_lcd_e = i2c_lcd_byte.4
i2c_lcd_rw = i2c_lcd_byte.5
i2c_lcd_rs = i2c_lcd_byte.6
i2c_lcd_bl = i2c_lcd_byte.7
i2c_lcd_d4 = i2c_lcd_byte.0
i2c_lcd_d5 = i2c_lcd_byte.1
i2c_lcd_d6 = i2c_lcd_byte.2
i2c_lcd_d7 = i2c_lcd_byte.3
If you have an I2C LCD display adapter with a different set of connection of the adapter then change this configuration to suit the specific of the adapter as follows. This should be done in the your main program code.
#define i2c_lcd_e i2c_lcd_byte.4
#define i2c_lcd_rw i2c_lcd_byte.5
#define i2c_lcd_rs i2c_lcd_byte.6
#define i2c_lcd_bl i2c_lcd_byte.7
#define i2c_lcd_d4 i2c_lcd_byte.3
#define i2c_lcd_d5 i2c_lcd_byte.2
#define i2c_lcd_d6 i2c_lcd_byte.1
#define i2c_lcd_d7 i2c_lcd_byte.0