Multiplexing 7-segment LCD displays

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,
I know how to multiplex 7-segment displays, but does the same work for those LCD 7-segments? I attached an image of the display below.

Attachment(s): 

Last Edited: Tue. Feb 16, 2021 - 09:28 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Seif_1999 wrote:
I know how to multiplex 7-segment displays

You mean 7-segment LED displays?

 

Seif_1999 wrote:
does the same work for those LCD 7-segments?

 

It depends - you would need to study the datasheet for the specific display in question.

 

It looks like that one probably needs direct drive of individual segments?

 

Google "LCD Glass drive" or similar; eg

 

https://www.edn.com/how-an-lcd-controller-drives-an-lcd-glass/

 

https://www.instructables.com/How-to-Drive-an-LCD-glass-with-your-own-processor/

 

Typically, it requires both positive & negative drive voltages - so not as simple as LEDs!

 

Some microcontrollers have LCD glass drivers built in ...

 

Or get a display that has a driver built in.

 

EDIT

 

google examples.

 

and here's a driver chip datasheet - showing the types of waveforms you'd need to generate:

 

https://www.nxp.com/docs/en/data-sheet/PCF21XXC_FAM.pdf

 

via: https://electronics.stackexchange.com/questions/475086/lcd-glass-driving-waveform

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Feb 16, 2021 - 09:53 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes it does require direct drive of individual segments, it works exactly like a 4-digit normal 7-segment display, my concern was if it is going to react like normal 7-segment to multiplexing

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Seif_1999 wrote:
normal (sic) 7-segment

you mean an LED 7-segment.

 

As far as LCD 7-segments go, it is "normal" - but that is quite different from what is "normal" for an LED display.

 

Look at the linked pages & datasheet; eg,

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes I got it thanks you

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Time to mark the solution, then?

 

See Tip #5 in my signature, below (also note Tip #1):

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You are going to want to use something like a meag169 for that kind of display. If you think that Andy's waveform diagram in post #4 looks complex then you don't need to worry as the LCD driver peripheral inside a 169 exists to do exactly that. You basically just say which segments you want lit and it does all the heavy lifting to make it happen.

 

I don't know if you can still buy them but an Atmel Butterfly would be a good place to start exploring all this and understanding how a 169 works to drive an LCD.

 

But how attached are you to segmented display anyway - obviously the segments are fixed and it's limited in what it can show (though the power consumption is great!). Perhaps a small OLED or eInk with the same form factor but with dot addressable pixels would allow you more control over what is displayed. Certainly with eInk the power thing can be similar (or better) - but maybe not if the data/display will be "fast moving" ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
You are going to want to use something like a meag169 for that kind of display.
A subset of mega169 are making the transition to 8in (200cm) wafers.

In AVR segment LCD, XMEGA B is another; recent PIC24 have more functionality.

megaAVR can static drive segment LCD (iow not multiplexed)

clawson wrote:
I don't know if you can still buy them but an Atmel Butterfly ...
In stock though its mega169V may no longer be order-able.

clawson wrote:
... obviously the segments are fixed and it's limited in what it can show ...
Pictures are universal; we share cognition of that with other species.

The operator's guide usually will have sections by natural language.

Custom segment LCD can be created by a bit of effort and at a reasonable price.

The first prototype "might" be able to have a segment LCD from a local distributor.

clawson wrote:
Certainly with eInk the power thing can be similar (or better) ...
Memory-In-Pixel displays are another (reflective, IIRC transflective is by a backlight)

 


Tempe Fab 2, Gresham Fab 4 | AVR Freaks

ATxmega64B3 - 8-bit Microcontrollers

New PIC24F MCUs Feature Low-power Animated Display Driver for Battery-powered Devices | Microchip Technology | Microchip Technology

PIC24F GU/GL/GP Family | Microchip Technology

AN_2569 AVR241: Direct driving of LCD display using general I/O on tinyAVR and megaAVR devices

 

AVR Butterfly

ATAVRBFLY | Octopart

 

Products - Sharp - Memory LCD

Sharp Product Specifications and Documentation - Sharp

Products :: Memory-In-Pixel (MIP) Technology (Kyocera Display)

Memory Display Controllers (Epson Vancouver Design Center)

 

edit :

AN_8103 AVR340: Direct Driving of LCD Using General Purpose IO using tinyAVR and megaAVR devices

[second sentence]

This application note describes the operation of a Multiplexed LCD.

 

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Tue. Feb 16, 2021 - 10:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am sorry guys but After a lot of hustle and online search, I understood that an LCD segment cannot be driven like the LED ones and that I need a special driver. The problem is I cannot find a driver that I can understand how to wire and multiplex, does it make a difference if the LCD I am using have a backplane for each separate digit or 1 backplane for all 8? Can I use CD4543B driver to multiplex all 8? How to use multiplexing with a microcontroller that has LCD driver built in? Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seif_1999 wrote:
How to use multiplexing with a microcontroller that has LCD driver built in?

Multiplexing an LCD may not work as the LCD is too slow to change, as for your question above, it makes no sense, as the micro directly drives each element, no multiplexing is used.

Since this thread has turned into an x/y problem, why don't you start over and tell us the big picture of what it is you want to do with your project, then maybe we can help you come to a proper way to handle your LCD display.

 

Jim

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What I am trying to do is a stopwatch for which the software part is done if I was to use LED 7-segments, I want to use LCD
About multiplexing, as I understand I need to control 64 segments ( including decimal points) how can I do that without multiplexing?, or if I can multiplex them, how can I do that

Last Edited: Tue. Feb 16, 2021 - 09:44 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well there is an app note for that here: http://ww1.microchip.com/downloa...

Then because you have limited number of port pins, use a port expander such as some 74ls595's to drive all your segments.

But it would be easier to use a mega169 that is made for this type of display.

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did you look at the Mega169 as clawson suggested? And the Butterfly?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

okay thank you

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seif_1999 wrote:
How to use multiplexing with a microcontroller that has LCD driver built in?

ATmega169/329/3290/649/6490/A/P/PA Datasheet

[bottom of page 222]

24.2.4 LCD Memory

...

When a bit in the display memory is written to one, the corresponding segment is energized (on), and non-energized when a bit in the display memory is written to zero.

...

[next page]

...

Latched data from LCDDR4 - LCDDR0 is multiplexed into the decoder.

...

XMEGA B segment LCD - IIRC, character RAM with programmable encoding to segments.

Didn't look at PIC24F GU/GL.

https://github.com/microchip-pic-avr-examples/pic24f-lcd-curiosity-oob/blob/master/pic24f-lcd-curiosity-oob.X/mcc_generated_files/lcd_7seg.h

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Tue. Feb 16, 2021 - 11:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seif_1999 wrote:
What I am trying to do is a stopwatch ...
A segment LCD may not have a backlight; not an issue for track & field though some athletic events occur in near darkness (operators would likely have a head lamp/torch)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Seif_1999 wrote:
I am sorry guys but After a lot of hustle and online search, I understood that an LCD segment cannot be driven like the LED ones and that I need a special driver. The problem is I cannot find a driver that I can understand how to wire and multiplex, does it make a difference if the LCD I am using have a backplane for each separate digit or 1 backplane for all 8? Can I use CD4543B driver to multiplex all 8? How to use multiplexing with a microcontroller that has LCD driver built in? Thanks
I'll ask again, why "segmented". There are various forms of LCD you can connect to an AVR:

Your display is "segmented". That means that the "black bits" are in a fixed pattern. In some displays of this kind the segments are even more dedicated to a particular role:

 

 

To drive this kind of display you need a row/column driver that has one segment at each intersection but the driving pattern:

 

 

 

is pretty complex. To handle this (it has to happen continuously) you need a special micro peripheral that can drive the segments in this way. The ATmega169 and ATmega369 are special AVRs that contain exactly that kind of driver (though there is a limit to the total number of segments that is mainly decided by the number of pins). Atmel's most famous use of the ATmega169 was in:

 

 

Long before all your Arduinos and other AVr development boards this was possibly the main entry level dev board for AVRas it had that display, LEDs and a 5 way "joystick" that could be used for "menu selecting" buttons.

 

But a different form of LCD are the kind of module that are driven by a Hitachi HD44780 LCD controller:

 

 

It may not be obvious but each character there is actually a little grid of dots:

 

 

These are the same as the "segments" in that display you linked to or the Butterfly display but instead of the entire display being made up of just 50-100 segments this kind of display has far, far more segments. In fact each character square is 5 by 7 dots (so 35) and the display might typically have 2 lines of 16 characters so in total there are 5 x 7 x 16 x 2 = 1120 segments. That gives you far more control over what is displayed. On each 5x7 grid you can create all kinds of patterns. The HD44780 chip itself (which is like a very advanced version of mega169) includes a ROM that has a load of predefined patterns:

 

 

So for each grid location you simply give it a character numbers 0..255 and it shows the selected character (probably from the Euro set on the right rather than the Japanese set on the left).

 

There are even 8 locations in the grid that are held in RAM in the HD44780 and you can send the pattern (as a definition of 5x7) of what you want to show. But as there are only 8 characters that can be defined in this way it can be limited. This shows a display with some ROM characters and also some RAM defined characters:

 

 

To drive an HD44780 you get to pick whether the AVR connects using 4 data lines (so a 0..255 character number has to be sent in two halves) or 8 data lines. To save AVR pins most people opt to use the 4 bit interface. You then connect up with a circuit like:

 

and drive it with code such as:

 

http://www.peterfleury.epizy.com...

 

But even with this kind of display ("character LCD") you are still limited to fixed grids and (mainly) fixed character patterns.

 

The ultimate form of LCD is a "Graphic LCD" in this the entire screen is just a sea of individual dots (each one still a "segment") . For example in a display like this:

 

 

Every one of the 128 x 32 dots can be turned on/off so you can create whatever patterns you like:

 

 

 

On this display there are 128x32 = 4096 segments (dots). Each one can be controlled individually. These displays usually have an "intelligent controller" on the back - something even more powerful than an HD44780. The controller will often have RAM too so the image data does not need to be held in AVR SRAM but you can write direct to the RAM in the display controller.

 

You can also get displays with considerably more dots (the likelihood is you are reading this on such a display!) but for speed of display updates the limit of what an AVR can cope with might be something like 480x320 with each coloured dot having two bytes to define the colors (often 5 bits for Red and Blue and 6 bits for Green).

 

So I'd say that before plumping for the segmented glass type of display (where the control becomes your responsibility - perhaps using something like a 169 that can control it) you might want to consider character LCD or even graphic LCD to get more display resolution and hand over the segment control to an advanced display controller on the back of a "module" that includes the segmented glass and the control chip(s).

 

Last Edited: Wed. Feb 17, 2021 - 11:42 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

on sale this month

PIC24F LCD and USB Curiosity Development Board

 

edit : on sale for June'21

"Dare to be naïve." - Buckminster Fuller

Last Edited: Mon. Jun 7, 2021 - 11:10 PM