meta data for this page
Differences
This shows you the differences between two versions of the page.
| — | arduino:display_lcd [2024/05/30 23:01] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== LamaPLC: Arduino LCD ====== | ||
| + | |||
| + | ===== classic, no I²C ===== | ||
| + | An LCD character display is a unique type of display that can only output individual ASCII characters with fixed size. Using these individual characters then we can form a text. | ||
| + | |||
| + | If we take a closer look at the display we can notice that there are small rectangular areas composed of 5×8 pixels grid. Each pixel can light up individually, | ||
| + | |||
| + | The number of the rectangular areas define the size of the LCD. The most popular LCD is the 16×2 LCD, which has two rows with 16 rectangular areas or characters. Of course, there are other sizes like 16×1, 16×4, 20×4 and so on, but they all work on the same principle. Also, these LCDs can have different background and text color. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The LCDs have a parallel interface, meaning that the microcontroller has to manipulate several interface pins at once to control the display. The interface consists of the following pins: | ||
| + | |||
| + | * A register select **(RS)** pin that controls where in the LCD's memory you're writing data to. You can select either the data register, which holds what goes on the screen, or an instruction register, which is where the LCD's controller looks for instructions on what to do next. | ||
| + | * A Read/Write **(R/W)** pin that selects reading mode or writing mode | ||
| + | * An **Enable** pin that enables writing to the registers | ||
| + | * 8 **data pins (D0 -D7)**. The states of these pins (high or low) are the bits that you're writing to a register when you write, or the values you're reading when you read. | ||
| + | |||
| + | There' | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Liquid Crystal Displays (LCD) with Arduino: https:// | ||
| + | LiquidCrystal library: https:// | ||
| + | |||
| + | ===== I²C LCD ===== | ||
| + | |||
| + | ==== I²C LCD Adapter ==== | ||
| + | At the heart of the adapter is an 8-bit I/O expander chip – PCF8574. This chip converts the I²C data from an Arduino into the parallel data required for an LCD display. More information from I²C » [[com: | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | An important point to note here is that several companies, including Texas Instruments and NXP Semiconductors, | ||
| + | |||
| + | * //Texas Instruments’// | ||
| + | * //NXP’s// PCF8574, default I²C address of **0x3F**, can set: 0x38 .. 0x3F | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | More info: https:// | ||
| + | I²C Liquid Crystal Displays: https:// | ||
| + | LiquidCrystal I2C: https:// | ||
| + | |||