0
\$\begingroup\$

In a 16x2 LCD there are 16 columns and 2 rows of characters, each character is made up of a grid of 40 pixels. My question is, do each of these characters have their own driver that drive every pixel simultaneously or is it a persistence of vision method, where one row of pixels at a time is turned on one after another?

A corollary question would be where would I find any kind of documentation on the best way to control each pixel. Its more out of curiosity than anything, and i plan on making my own LED matrix and playing around on my FPGA but obviously I want to use the fewest pins possible. This got me wondering exactly how an actual display does it.

Thanks for any info.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Hint: The driver IC behind the display handles all the timing and pixel details. You send commands to position the cursor, then send your character stream in ascii code. You should have a datasheet that spells all this out. I use the 40x4 LCD myself. \$\endgroup\$
    – user105652
    Commented Aug 7, 2016 at 3:12
  • 1
    \$\begingroup\$ @Sparky: I think he wants to understand how that driver IC does its job. I refer him to documentation on the MSP430 parts that support an LCD. Namely, here: ti.com/lit/an/slaa654a/slaa654a.pdf \$\endgroup\$
    – jonk
    Commented Aug 7, 2016 at 3:39
  • \$\begingroup\$ @jonk. I think the original driver was the HD4778, for all text-only displays. It is painfully slow however (so was the display), so anything faster is a good thing. \$\endgroup\$
    – user105652
    Commented Aug 7, 2016 at 3:55
  • \$\begingroup\$ If you want to make a LED array you can, no doubt, use a persistence of vision strategy and reduce your pin count to n+m, where n is the number of columns and n the quantity of rows of pixels. \$\endgroup\$ Commented Aug 7, 2016 at 3:57
  • 1
    \$\begingroup\$ TT-E: Did you really mean you want to build and "LED" matrix (2nd paragraph)? Or, did you mean "LCD matrix"? Since you preface your question with the LCD drive question. \$\endgroup\$
    – FiddyOhm
    Commented Aug 7, 2016 at 10:13

1 Answer 1

4
\$\begingroup\$

There are neither individual drivers nor is it a persistence of vision.

The displays are typically multiplexed 1/16 with 5x8 dots per character. There is not enough RAM internally to control each dot individually (this is a mid-1980s vintage chip)- the internal character generator ROM generates characters (and there are some custom characters allowed for in RAM).

Here is what the hardware connection looks like for an 8x2 display connected to an HD44780 compatible controller:

enter image description here

As you can see, only 56 connections allow 640 pixels to be controlled. Complex waveforms switching between 5 voltage levels allow the controller to individually control the state of each pixel above or below a threshold voltage and simultaneously maintain essentially zero DC component between commons and 'segments' (more than 50mV can damage the LCD 'glass' (the bare display, not literally the glass) by causing electrochemical action).

The disadvantage of the 1/16 multiplex scheme is that the display is temperature sensitive and tends to have lower contrast and viewing angle because it has to narrowly distinguish between slightly different AC voltages across the pixels. Hence the contrast pot or temperature compensation circuit to shift that threshold around so that the dots that should be black are black and vice versa.

There is an LGPL opencores HD44780 compatible HDL (Verilog) if you look for it.

LEDs are diodes and don't care about average voltage so driving them is simpler, but not necessarily easier. LCDs have the advantage they take almost no current, so a bunch of analog switches made of on-chip MOSFETs can switch the outputs. For a 8x2 LED matrix you might use a 40 bit power shift register to sink the column lines and source row lines with 16 high side drivers. If you want 1mA average per LED you would have to allow for a 640mA supply current, and the column lines would have to sink up to 16mA at 100% duty cycle and the row drivers source 640mA each at 1/16 duty cycle. Probably the 16mA is not acceptable using the FPGA directly because, while the individual sink current is reasonable, the total current through the ground pins is likely too high.

Edit: You asked about 16x2 display- those use an additional driver HD44100-compatible chip to handle the other half of the display. The HD44780 can only handle an 8x2 display by itself (also corrected some numbers above).

\$\endgroup\$
2
  • \$\begingroup\$ In the image you provided it seems as if you need 96 pins in order to control the LCD instead of 56, are there two controllers or is it multiplexing one then the other? \$\endgroup\$ Commented Aug 7, 2016 at 18:34
  • \$\begingroup\$ @π-e Yes, fixed, thanks. See link to the HD44100 expansion driver chip. Character LCD display modules with more than 16 digits would typically use one or more HD44100 chips (maybe someone has integrated the HD44780+HD44100 into a single compatible controller chip by now- but the original part numbers are the Hitachi and others have copied and perhaps enhanced). \$\endgroup\$ Commented Aug 7, 2016 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.