Character Display LCDs
Character display LCD ares used in so many products we used daily. We can find them in Espresso machines, 3D printers, microwaves and printers and many other products. In this lesson we going to lean how to interface LCD’s to our cortex- microcontroller board. This lessons covers just character display LCD’s there is another lesson covering graphics display LCDs. Th most popular LCD controller currently on the market is the Hitachi HD44780, some other well-known ones include the Tinssharp/Eon 1602A. The content of this lesson applies to all LCD controllers. Where there is a little difference, it shall be indicated.
Things to know
- LCD has two internal registers; instruction register and data register
- RS pin is used for selecting these register-
-RS = 0 : instruction command code select
-RS = 1 : data command code select
-RS =0 allows us to send commands such as clear screen, move cursor etc.
-RS= 1 allows us to send data to be displayed or retrieve displayed data .
- R/W : Allows reading and writing information to LCD
-R/W = 1 : reading
-R/W = 0 : writing
- E : E is known as the enable pin. It us used by the LCD to secure information.
– When data is supplied to the data pins a High-Low pulse must be applied
to the E pin in order to secure the data. Minimum width of pulse should be
230ns for the Hitachi and 140ns for the Tinsharp.
- D0-D7 : These are known as the 8-bits data pins. They are used to transfer information to and from the LCDs.
LCD Pin Groupings
Programming the LCD
- Set RS =0 to select command register
- Send a High-Low pulse to E to secure command
- Set RS=1 to select data register
- Send a High-Low pulse to E to secure data