'NOTE: Depending on the LCD you have, SCL and SDA may already have onboard ' nybble into D7-D4 and do the same hi-to-lo sequence for the E bit. ' which strobes the nybble into the HD44780. ' set RS=0, RW=0, then do two I2CWRITEs with E=1 in the first write and ' most significant nybble into D7-D4 (here it's P7-P4 on the PCF8574), ![]() ' Bytes (commands or data) must be sent as two sequential nybbles. 'D7,D6,D5,D4: data or commands are sent to the 8574/LCD in 4-bit nybbles. ' The data or cmd nybble is strobed on the falling edge of the E bit. data or command is strobed into the data or cmd register 1 = read from LCD 0 = write to LCD (cmd or data) 1 = sends to data reg 0 = sends to command reg ' HD44780 or ST7066U LCD controller and a PCF8574 I2C port expander. ' commands and data to an I2C LCD in 4-bit mode. ![]() ' Initializes a 2x16 I2C LCD, and contains routines to write '* Notes : This is an include file to use with an I2C-controlled LCD module. '* Name : LCD_I2C.inc, written for 16F877
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |