HD44780 based LCD displays are very popular for embedded projects because they are cheap, easy to interface, can display characters, consume power lot less than seven-segment displays, and most of the present day compilers have in-built library routines for them. However, the only disadvantage is that they require at least 6 I/O pins of microcontroller. Well, you may ask, isn’t that less than what seven-segment displays require? Yes, that’s true but there are circumstances where you don’t have left enough pins for LCD display. For example, if you are going to design a temperature sensor based on a PIC12F683 microcontroller, which has just 6 I/O pins, you won’t have pins for interfacing a LCD. One solution for cases like that is to use serial LCD’s. Serial LCD’s available in the market cost more than double of HD44780 based standard one. The serial LCD’s still have the standard LCD module but it has an extra built-in driver module that receives data/command from a host microcontroller in serial format and convert it to appropriate parallel format suitable for HD44780 driver input.
The goal of this project is to show how to make a 3-wire serial LCD driver for low pin-count microcontrollers like PIC12F series using a serial-in parallel-out shift register (74HC595 in this case). PIC12F683 has been chosen here to test the end product. Since 74HC595 is just a shift register with no intelligence of its own, the burden goes to the host microcontroller (PIC12F683) to appropriately transfer the LCD character/command data and control signals in serial format. This part of the intelligence is embedded in the firmware inside PIC12F683. So, a portion of program flash memory inside PIC12F683 is sacrificed for this purpose. The required three pins of PIC12F683 performs following functions.
- Serial data transfer to 74HC595
- Clock signal for the Shift/Storage register
- Enable signal to HD44780 LCD Module
74HC595 Shift Register
74HC595 is a high-speed 8-bit serial in, serial/parallel-out shift register. It also has a storage register and 3-state outputs. The two registers (shift and stoarge) have separate clocks, SH_CP and ST_CP respectively. Data in the shift register is shifted on the positive-going transitions of SH_CP, and the content of shift register will be transferred to the storage register on a positive-going transition of the ST_CP. If both the clocks are together, the shift register will be one clock ahead of the storage register. The output enable (OE) pin, when pulled Low, enables the 8-bit data of the storage register to show up at the parallel output (Q0-Q7).
HD44780-based character LCD
HD44780 based character LCD displays use 14 wire connections: 8 data lines (D0-D7), 3 control lines (RS, E, R/W), and three power lines (Vdd, Vss, Vee). Some LCDs come with backlight features that help reading display data in low illumination conditions. They have two additional connections (LED+ and LED-).
For more detail: Serial LCDs you can make your own using PIC12F683
Current Project / Post can also be found using:
- pic12f683 lcd
- projects that can made with 12f683