I've seen this type of LCD many times in weigh scales, calculators, gauges, micrometers, etc. I know it's a fairly traditional display but I really like its compactness, simplicity, and maybe it even costs less, versus TFTs or smartphone-type touch displays.

Digits-only LCD

[What is it called? Answered by @kevlar1818 and @stevenvh: "Seven-segment display"]

I would like to work with this type of LCD, for example, I just found this 8-digit one called VIM-878 from the Digikey catalog; here is its datasheet.

How do I interface with it? I would like to know what would be a good/common way of interfacing with it from a simple AVR microcontroller like an Atmega8 -- preferably with interfacing circuitry/parts that aren't too physically large.

  • I presume some sort of driver or multiplexer would be necessary? I guess I'm looking for some beginning perspective from others who may have better experience interfacing with this type of LCD.
  • \$\begingroup\$ Thank you for adding the requested information. Please be careful that you don't undo previous edits in the process, however. \$\endgroup\$ – Chris Laplante Aug 29 '12 at 13:27
  • \$\begingroup\$ That is exactly what I did, didn't I, oops! Could you or someone help put the image back please? \$\endgroup\$ – boardbite Aug 29 '12 at 13:28
  • \$\begingroup\$ You could try rolling back to edit 2, and then adding your information to that. I don't have the rep to do rollbacks so I'll flag it. \$\endgroup\$ – Chris Laplante Aug 29 '12 at 13:29

It's a 7-segments display. Unlike the dot-matrix character displays kevlar refers to these are most often not intelligent module. Most dot matrix displays have an HD44780-compatible controller which you simply can write ASCII codes to, but a 7-segment LCD will often be just the glass, with connections for segments and a number of backplanes (often up to 4).

enter image description here

Driving LCDs can be awkward since they don't use just two levels, so you can't drive them with common digital logic.

enter image description here

The best thing you can do is select a microcontroller with integrated LCD controller, which you can connect the display directly to, like the TI MSP430x4xx. Like most controllers this one also knows just segments; it isn't aware of digits or anything. (Great, first we had a dumb display, now we have a dumb driver as well!) There's reason for this. These LCD drivers are often used to drive custom LCDs which may be a mix of a numeric part, bar graphs and custom symbols. Such a symbol is also a single segment, so it makes no sense to talk about digits.

enter image description here

This display has symbols like "battery" and "alarm clock", but also all text fields, like "AM", "PM" and "SNOOZE" are symbols consisting of a single segment (i.e. controlled by a single bit).

Further reading
MSP430x4xx Family User's Guide. LCD controller is covered on p.709 ff.

| improve this answer | |
  • \$\begingroup\$ Assuming segments mean the number of parts used to construct a character/digit on my LCD, I think that microcontroller would be great - it can support 96, and it has only 200 uA current draw. Are you suggesting replacing my AVR with the TI microcontroller, or just communicating VIA it with the LCD? I'd prefer the latter, because of my AVR-based experience (also limited!); so can you comment on that? \$\endgroup\$ – boardbite Aug 29 '12 at 13:34
  • \$\begingroup\$ @Inga - I'm not aware of any AVR with an LCD driver on board. Using the MSP430 as display driver may be a good idea: your AVR can stick to its main task, and the program for the MSP430 can be kept simple (if you don't have much experience with it) or advanced (if you want to make it an intelligent driver, which you can supply with commands like "increment"). \$\endgroup\$ – stevenvh Aug 29 '12 at 13:39
  • \$\begingroup\$ That sounds very doable; I'm about to order one of the TI chips! By the way, in case my programming attempts with that microcontroller fail, can I use a simple multiplexer or LED driver, e.g. an IC like this one I just found from Maxim ? I am foreseeing trouble because of what you stated about the multiple levels. \$\endgroup\$ – boardbite Aug 29 '12 at 13:43
  • \$\begingroup\$ @Inga - No, you can't use the MAX7219, that's a LED driver. For one thing they multiplex much too fast for LCDs. The multiple levels shouldn't be a problem; that's what you've got a driver for. That takes care of everything. What do you think of the intelligent driver which keeps count of the number to display? You could use commands like "load value", "increment count", "reset count", etc. \$\endgroup\$ – stevenvh Aug 29 '12 at 13:47
  • \$\begingroup\$ Haha, it really has commands like that?! I surely have to write code to implement those functions myself, don't I? \$\endgroup\$ – boardbite Aug 29 '12 at 13:50

What you are thinking of is called a 7 segment LCD. If you know how to light up a regular LED then your 1/8th of the way there.

Here is the Wiki to it. It has some theory on how you would create numbers by lighting up different arrays of the LED's: http://en.wikipedia.org/wiki/Seven-segment_display

(de)Multiplexing is a good method for lighting up a large 7-Segment panel, although not necessary. If your I/O ports are limited then it's the way to go. The basic's of demuxing work like this (assuming you know binary here). Look at this picture:

With a 3 bit binary number like 000 we can represent up to the number 7 (I.E. to select port 5 we'd have ABC be 101). What would happen in the demux in your situation is one input is something like a high signal, and AB&C are I/O ports. The 0 to 7 are connect to each segment of the LCD and by writing to ABC from your controller you can light up a segment. You may be saying wait but if I want to light up a number I need many segments lit, not just the 5th segment. Well after that you can look into two roads to get the LCD to display a number. The first is add more demux's for additional needed segments. The second is a software approach which involves very very quickly flashing each of the segment required to create the illusion that the panel is completely lit. The AVR chip in your mega is operating in the Megahertz range if you write a loop to display ABGED (from the wiki pic) you will end up seeing something that looks like a number 2. Hope this gets you started.

| improve this answer | |
  • \$\begingroup\$ I like the first approach that you suggested: more demux's. But if I were to go that route, how can one cut down on physical size of components? In my case, I would need 8 digits = 56 segments, you know? \$\endgroup\$ – boardbite Aug 29 '12 at 13:53
  • \$\begingroup\$ Err well you're not going to have enough I/0 to drive 8 digits with a nothing but hardware approach. Here is a link, it's scary I know but I don't think I can draw/explain an easier breakdown. doctronics.co.uk/4511.htm. That's the theory though. In practicality I would consider the scanning method, I know it may seem like it would not provide a nice image or would be complicated but it's a very common practice in industry. Best of luck. \$\endgroup\$ – Nimjox Aug 29 '12 at 15:12
  • \$\begingroup\$ @Inga - even 64 if you also count decimal points! There are two reasons you won't find those non-multiplexed. One is just the sheer number of pins, both on the display and the microcontroller. The microcontroller would need at least 80 pins and more pins = more cost. But there's also routing. If you have a multiplexed display you will have the routing of one segment going via an adjacent segment, but if they're all separate you can't do a thing like that. That's also an extra cost. \$\endgroup\$ – stevenvh Aug 29 '12 at 15:26

A seven-segment display or dot matrix display are what you're referring to I believe.

Here's an example on Sparkfun with the relevant datasheet. Found this AVR example/tutorial in the "Documents" section of the product page. Isn't Sparkfun great?

Given this 14-segment display, and its datasheet, let's figure out how to use it.

Let's take the example of showing a 7 in the first (leftmost) segment cluster.

To write a 7, we need to assert segments 1A, 1B, and 1C, as seen in the datasheet. These segments all map to pin 35 of the device, but on different COM lines. With such a cryptic datasheet, my best guess would be that these COM lines map to pins 17 through 20, given the table in the datasheet.

Thus, to assert each segment above, you would hold pin 35 high while quickly cycling between asserting COM1, COM2, and COM3 via pins 18, 19, and 20 respectively. The three segments would all appear lit simultaneously, creating a 7.

This being said, well-written code simply will use some sort of map for any given character to be displayed. The challenge is to make this map work for ANY of the segment clusters.

I still recommend a dot-matrix display like the first one I linked to; there are certainly more lightweight designs out there. The benefit to using a dot-matrix display is that most have a data register built-in, so you can just pass it 8-bit ASCII characters, no funky implementation issues like in the 14-seg example above.

| improve this answer | |
  • \$\begingroup\$ Incidentally, I have an LCD very similar to the example you posted! But it is a very thick module and it isn't very readable without its backlight on. Whereas the one I posted is visible much better despite no backlight, and somehow seems cleaner (no shadowy-remnant-type of appearance of the non-displayed digits). Any thoughts? Are there sub-categories within these displays? \$\endgroup\$ – boardbite Aug 29 '12 at 13:09
  • \$\begingroup\$ Using "seven-segment display" as my search term, I found this one: Digikey page I would like to work with this one, for example. And this is its datasheet. \$\endgroup\$ – boardbite Aug 29 '12 at 13:15
  • \$\begingroup\$ I was actually going to say (based on your explanation) that the 14-segment one seems SIMPLER, no? Well, OK, not simpler than just passing ASCII characters, but fairly simple in terms of logic and the amount of control (e.g., just lighting up one segment). BTW, in the approach you recommended above, how does it deal with what stevenvh said in his Answer about there not being two levels of logic for these displays? \$\endgroup\$ – boardbite Aug 29 '12 at 13:48
  • \$\begingroup\$ @Inga It doesn't seem to me like there would need to be more than two logic levels in this particular 14-segment display, as it has such a verbose pinout. I'm still not positive though, because the datasheet and Digikey page say nothing about voltage/logic levels. Honestly, it's usually not good practice to buy such a poorly documented device. \$\endgroup\$ – kevlar1818 Aug 29 '12 at 13:52
  • 1
    \$\begingroup\$ Why not use some of the LCD drivers, that interface over I2C, such as Holtek 1632 or similar? (I hope I got the part correct!) \$\endgroup\$ – Vaibhav Garg Sep 4 '12 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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