Direct driving an LCD using AVR

Hey,
I am trying to drive a calculator glass LCD directly using an AVR. I'm not trying to be cheap, just need to mod a calculator. I've done my reading extensively and want advice on 2 points.

The LCD is 10-digit multiplexed with 3 common lines. Each digit has 9 segments: 7 for displaying number, 1 decimal point and 1 comma(on top) for separating numbers into hundreds, thousands, etc. So for each 9 segment digit, there are 3 segment lines. 30 segment lines total for 10 digits. There is one other segment line for extras(M, -, E signs). So a total of 30 + 1 + 3 = 34 pins for the LCD. It uses 3V, 1.5V and 0V levels.

  1. Comparing the common pins signaling method, I saw 2 variations in the doc provided by atmel(http://www.atmel.com/images/doc8103.pdf) and microchip(http://ww1.microchip.com/downloads/en/AppNotes/00563c.pdf). Atmel says for COM1, give a positive voltage followed by reverse voltage for the same duration. Then do the same for COM2, followed by COM3. Microchip prefers to give positive voltage to COM1, then positive to COM2 and then COM3. Then provide reverse voltage to COM1, then COM2 and then COM3. Both methods keep the total voltage applied to 0, but Microchip keeps the bias for a longer period. Will this cause degradation of LCD over time or provide better contrast? The Casio calculator I'm hacking uses the Microchip method and I've seen it being used by other companies as well. Which method should I use(keeping our preference for Atmel aside :D)?

  2. Can I use a shift register(74HC595?) to signal the 31 segment lines? If my AVR is running at 3.3V 8MHz, then to run LCD at 50Hz, I have 20ms for a single frame. In a single frame, I'll have to change the 31 segment lines twice(once forward and once reverse). If I use 4 shift registers chained, then I'll have 322 us(=10ms/31) for each shift operation. If I use 2 pairs of chained shift registers, I get 645 us(=20ms/31) for each shift. Since most time values in datasheet for the 74HC595 seems in the nanosecond range, it seems possible. Can someone with better knowledge of shift registers help me out here? If this can work, I can reduces I/O pin count from 34 to 7/8 and can be saved from using a complex TQFN ATMega2560 to a simple ATMega328P on my custom hand-made PCB.

Atmel vs Microchip COM signaling.png

As long as the average is zero, it probably makes little difference as to how many milliseconds each phase is held. The main danger is the code crashing.

Kudos for the exercise in serious head-banging! :grinning:

Thanks for clearing that out. I've been bashing my head for 1-2 weeks now just reading up and checking the pin signals of the LCD. Hopefully I'll get it to work.

Do you have any idea about point no. 2?

As I understand it, both commons and segments must be driven by three (or whatever) level signals, so I cannot see how you can do that with a shift register.

Actually only commons need to be driven to three level signals.
Segments don't use the inactive (the 1/2 Vcc bias) state, they are always switched between negative and positive (i.e. 0V and Vcc).

@Antzy did you manage to drive the LED at the end?

I realize I'm over 2 years late, but I found this LCD driver datasheet here:

If you scroll on over to the block diagram, you can see that they use a shift register to drive the LCD, so it's definitely possible.

Again, I release that i'm 2 years late, but I've been looking for this info forever, and I found this post here on google with some info I'd like to add.'

If anyone's done this I'd love for some tips. I plan on using an attiny or something with a shift register...

dgramop:
If you scroll on over to the block diagram, you can see that they use a shift register to drive the LCD, so it's definitely possible.

Yes, you are two years late, and you are simply wrong. If you look at the block diagram, you see that they do not use a shift register to drive the LCD at all. The shift register is part of the data interface which feeds the latches containing the patterns to be displayed. The LCD drivers are a quite different part of the circuit.

Sorry! :astonished: