Component: LCD I2C (Backpack) (Alphanumeric)
Author | Matrix Ltd |
Version | 2.2 |
Category | Alphanumeric |
Contents
LCD I2C (Backpack) component
Standard alphanumeric LCD based on a standard I2C control bus. Usually using either a PIC device or Microchip IO expander IC.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_LCD_I2C.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_LCD_I2C.fcfx
Detailed description
No detailed description exists yet for this component
Examples
A simple example that shows how to use some common functions.
If the display is not showing the expected characters, the I2c address or contrast could be wrong.
It's best to keep the jumper connected since the backlight is enabled by default.
Using an Arduino Uno the correct I2C address can be determined by using an IC2 Address Sniffer
The I2C address to use is the one within the first set of square brackets.
For example, with my backpack display, the correct address to use is 0x3F [63]:
The other two Addresses i.e. 0x56 [86] and 0x68 [104] is for my 24C32 EEPROM and DS3231 RTC respectively.
Note The I2c addresses scan will repeat every 5seconds.
The sniffer will send data to your PC via UART to USB.
The Arduino range and clones will have it built-in.
More details on I2C can be found here,
Matrix Flowcode Blog: Simplified communications I2C and SPI
Macro reference
BacklightControl
BacklightControl | |
- BYTE | State |
- VOID | Return |
Clear
Clear | |
- VOID | Return |
ClearLine
ClearLine | |
- BYTE | Line |
- VOID | Return |
Command
Cursor
Cursor | |
Moves the cursor on the LCD Display | |
- BYTE | x |
- BYTE | y |
- VOID | Return |
PrintAscii
PrintAscii | |
Takes the ascii value for a character and prints the character | |
- BYTE | character |
- VOID | Return |
PrintFloat
PrintFormattedNumber
PrintNumber
PrintNumber | |
Allows you to print a number. This is limited to a signed-INT, -32768 to 32767 | |
- INT | Number |
- VOID | Return |
PrintString
PrintString | |
- STRING | Text |
- VOID | Return |
RAMWrite
ScrollDisplay
ScrollDisplay | |
Scrolls the display left or right by a number of given positions. | |
- BYTE | position |
- BYTE | direction |
- VOID | Return |
SetI2CAddress
Start
Start | |
Startup routine required by the hardware device. | |
- VOID | Return |