Reference

Last revision 2026/01/17

Library

  • Library version:1.1
  • Arduino Library(compatible with IDE V1.0 and above): https://github.com/johnrickman/LiquidCrystal_I2C
  • Library Support Functions:
    • LiquidCrystal_I2C() //set the LCD address for a 16 chars and 2 line display
    • init() //Initialization for the LCD
    • clear() //clear display, set cursor position to zero
    • home() //set cursor position to zero
    • createChar() //Fill the first 8 CGRAM locations with custom characters
    • setCursor() //set the position of the cursor
    • cursor() //Turns the underline cursor on
    • noCursor() //Turns the underline cursor off
    • blink() //Turn on the blinking cursor
    • noBlink() //Turn off the blinking cursor
    • display() //Turn the display on(quickly)
    • noDisplay() //Turn the display 0ff(quickly)
    • backlight() //Turn the backlight on
    • noBacklight() //Turn the backlight off
    • scrollDisplayLeft() //Make the display scroll left without changing the RAM
    • scrollDisplayRight() //Make the display scroll right without changing the RAM
    • autoscroll() //This will 'right justify' text from the cursor
    • noAutoscroll() //This will 'left justify' text from the cursor
    • leftToRight() //This is for text that flows Left to Right
    • rightToLeft() //This is for text that flows Right to Left

Communication Protocol Description

I2C Address Setting

A2 A1 A0 地址
0 0 0 0x20
0 0 1 0x21
0 1 0 0x22
0 1 1 0x23
1 0 0 0x24
1 0 1 0x25
1 1 1 0x26
1 1 1 0x27
  • 0: The Jumper Cap is connected
  • 1: The Jumper Cap is disconnected

The default address is 0x20. All the jumper caps will be connected from the factory.

API Description

  • LiquidCrystal_I2C() //set the LCD address for a 16 chars and 2 line display
  • init() //Initialization for the LCD
  • clear() //clear display, set cursor position to zero
  • home() //set cursor position to zero
  • createChar() //Fill the first 8 CGRAM locations with custom characters
  • setCursor() //set the position of the cursor
  • cursor() //Turns the underline cursor on
  • noCursor() //Turns the underline cursor off
  • blink() //Turn on the blinking cursor
  • noBlink() //Turn off the blinking cursor
  • display() //Turn the display on(quickly)
  • noDisplay() //Turn the display 0ff(quickly)
  • backlight() //Turn the backlight on
  • noBacklight() //Turn the backlight off
  • scrollDisplayLeft() //Make the display scroll left without changing the RAM
  • scrollDisplayRight() //Make the display scroll right without changing the RAM
  • autoscroll() //This will 'right justify' text from the cursor
  • noAutoscroll() //This will 'left justify' text from the cursor
  • leftToRight() //This is for text that flows Left to Right
  • rightToLeft() //This is for text that flows Right to Left

Other Supplementary Information

LCD datasheet
PCA8574 Datasheet

Was this article helpful?

TOP