Component: LCD I2C (Backpack) (Alphanumeric): Difference between revisions
m Text replacement - "style="background-color:#EAE1EA; color:#4B008D;"" to "class="mtx-class-propfolder"" |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| Line 426: | Line 426: | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | I2C Config | | width="90%" class="mtx-class-propfolder" | I2C Config | ||
|- | |- | ||
| Line 455: | Line 455: | ||
| colspan="2" | On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications. | | colspan="2" | On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | Connections | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
| Line 469: | Line 469: | ||
| colspan="2" | Pin used for SCL (clock signal) | | colspan="2" | Pin used for SCL (clock signal) | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | LCD Configuration | | width="90%" class="mtx-class-propfolder" | LCD Configuration | ||
|- | |- | ||
| Line 488: | Line 488: | ||
| colspan="2" | Controls if the backlight is controlled as part of the main data routine or if it is handled separately. | | colspan="2" | Controls if the backlight is controlled as part of the main data routine or if it is handled separately. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | Simulation | | width="90%" class="mtx-class-propfolder" | Simulation | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | Matrix Ltd |
| Version | 2.2 |
| Category | Alphanumeric |
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 | |
| State | |
| Return | |
Clear
| Clear | |
| Return | |
ClearLine
| ClearLine | |
| Line | |
| Return | |
Command
Cursor
| Cursor | |
| Moves the cursor on the LCD Display | |
| x | |
| y | |
| Return | |
PrintAscii
| PrintAscii | |
| Takes the ascii value for a character and prints the character | |
| character | |
| Return | |
PrintFloat
PrintFormattedNumber
PrintNumber
| PrintNumber | |
| Allows you to print a number. This is limited to a signed-INT, -32768 to 32767 | |
| Number | |
| Return | |
PrintString
| PrintString | |
| Text | |
| Return | |
RAMWrite
ScrollDisplay
| ScrollDisplay | |
| Scrolls the display left or right by a number of given positions. | |
| position | |
| direction | |
| Return | |
SetI2CAddress
Start
| Start | |
| Startup routine required by the hardware device. | |
| Return | |
