Difference between revisions of "Component: LCD I2C (Backpack) ()"
Line 20: | Line 20: | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 32: | Line 34: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 375: | Line 379: | ||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | I2C Config | ||
|- | |- | ||
|- | |- | ||
Line 401: | Line 409: | ||
|- | |- | ||
| 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" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | SDA | ||
+ | |- | ||
+ | | colspan="2" | Pin used for SDA (data signal) | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | SCL | ||
+ | |- | ||
+ | | colspan="2" | Pin used for SCL (clock signal) | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | LCD Configuration | ||
+ | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
Line 417: | Line 443: | ||
| 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" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | width="10%" align="center" style="background-color:# | ||
− | | width="90%" style="background-color:# | ||
|- | |- | ||
|- | |- |
Latest revision as of 17:25, 9 November 2022
Author | Matrix Ltd |
Version | 2.2 |
Category |
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 Pack
DISPLAYS
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.
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
Downloadable macro reference
![]() |
Clear |
![]() |
Return |
![]() |
PrintString |
![]() |
Text |
![]() |
Return |
![]() |
PrintAscii |
Takes the ascii value for a character and prints the character | |
![]() |
character |
![]() |
Return |
![]() |
PrintNumber |
Allows you to print a number. This is limited to a signed-INT, -32768 to 32767 | |
![]() |
Number |
![]() |
Return |
![]() |
BacklightControl |
![]() |
State |
![]() |
Return |
![]() |
ClearLine |
![]() |
Line |
![]() |
Return |
![]() |
Cursor |
Moves the cursor on the LCD Display | |
![]() |
x |
![]() |
y |
![]() |
Return |
![]() |
ScrollDisplay |
Scrolls the display left or right by a number of given positions. | |
![]() |
position |
![]() |
direction |
![]() |
Return |
![]() |
Start |
Startup routine required by the hardware device. | |
![]() |
Return |