Advertisement

Design Design Ideas

One wire controls LCD module

Advertisement

The ubiquitous LCD (and VFD) modules based on the HD44780 controller IC can require up to 12 lines from the host.

This hardware interface Design Idea reduces the connection to just one wire, allowing a basic microcontroller with limited I/O to drive a large display, either directly, through a standard interface, or even an opto-isolator.

Advertisement

Figure 1   A typical LCD module

Advertisement

The LCD’s eight data-bit inputs are encoded by a sequence of short and long pulses clocking a serial-to-parallel shift register, with control and data signals generated by a pair of dual monostables. The RS signal is controlled by leaving the serial line low or high after the eight data bits are sent. The read function of the display is dispensed with (R/W is tied low), so status can’t be read, meaning the module’s processing delays (up to several milliseconds) must be accommodated by software timing alone.


Figure 2  One-wire LCD interface schematic

Each byte needs to be sent as eight bits, MSb first. The firmware timing needs to match the hardware time constants: The bits should be transmitted two delay units apart. The delay SS (Figure 3 ) should be several delay units. There needs to be a gap between bytes of several bit times to allow the E pulse to finish before changing RS. A delay unit is defined as the monostable period set by R2 & C2, which can range from around 7µs to 12µs depending on the particular IC family used.


Figure 3  Timing diagram


Download PIC assembly code fragment.

Also see :

 —Rex Niven has a Masters Degree in Engineering Science from the University of Melbourne and has worked as a design engineer in New Zealand, Britain, France, and Australia. Since 2000 he has managed his own firm, Forty Trout Electronics.

3 comments on “One wire controls LCD module

  1. Michael Thomas
    March 27, 2017

    “I love these designs to remind me about discrete logic and design, but in practice this type of application would be better handled by a microcontroller. A PIC capable of doing this and much more costs less than $5 and a basic microcontroller could do it

  2. Tsushihashi
    June 25, 2017

    ” in practice this type of application would be better handled by a microcontrollernread more http://songlongmedia.com/tai-nghe-plantronics-chinh-hang.html

  3. Michael198532
    November 21, 2018

    “nHi ,nI'm Michael from China !nWe are a EMS company , Do you need pcb assembly services ? nPls contact me :Michael@leabon-technology.com ,thanks ! “

Leave a Reply