Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC LCD driver - need some advice

Status
Not open for further replies.

Futterama

Member
Hello forum,

I'm interfacing a 40pin PIC with a 3½digit LCD display. The LCD is a "clean" LCD - there is no IC onboard. It's the same type of display you would find in any cheap multimeter, the difference is, this LCD has pins to solder.

I need to know how the "signal" to the individual LCD segments should be shaped to give the best viewable result.
I measured on an old multimeter display with my scope, and found that the signal for the LCD segments was a square wave at 50Hz.

Now, the supply voltage for my LCD is stated to be 3.0V. If I supply the LCD segments with a square wave at 50Hz and 3V, the LCD segment is barely visible. If I crank the voltage up to 5V, the LCD segment is clearly visible.

But, I'm not sure if 5V is a good idea since the datasheet says 3.0V. But perhaps it's 3.0V average? With a 50% duty square wave, that would give me a Peak-to-Peak voltage of 6V.

What is your opinion on this? Do you perhaps know how the "signal" from a true LCD driver looks like?

Thanks.


Regards,
Futterama
 
Futterama said:
Hello forum,

I'm interfacing a 40pin PIC with a 3½digit LCD display. The LCD is a "clean" LCD - there is no IC onboard. It's the same type of display you would find in any cheap multimeter, the difference is, this LCD has pins to solder.

I need to know how the "signal" to the individual LCD segments should be shaped to give the best viewable result.
I measured on an old multimeter display with my scope, and found that the signal for the LCD segments was a square wave at 50Hz.

Now, the supply voltage for my LCD is stated to be 3.0V. If I supply the LCD segments with a square wave at 50Hz and 3V, the LCD segment is barely visible. If I crank the voltage up to 5V, the LCD segment is clearly visible.

But, I'm not sure if 5V is a good idea since the datasheet says 3.0V. But perhaps it's 3.0V average? With a 50% duty square wave, that would give me a Peak-to-Peak voltage of 6V.

What is your opinion on this? Do you perhaps know how the "signal" from a true LCD driver looks like?

I would suggest it's 'push pull', so it's got a 6V drive waveform under normal use off 3V - you can't feed it of a single ended drive, they require true AC to drive them, or you get drastically shortened life.
 
Nigel Goodwin said:
I would suggest it's 'push pull', so it's got a 6V drive waveform under normal use off 3V - you can't feed it of a single ended drive, they require true AC to drive them, or you get drastically shortened life.

So, what you are saying is that it should be driven by +/-3V compared to GND/common pin?
 
Futterama said:
Nigel Goodwin said:
I would suggest it's 'push pull', so it's got a 6V drive waveform under normal use off 3V - you can't feed it of a single ended drive, they require true AC to drive them, or you get drastically shortened life.

So, what you are saying is that it should be driven by +/-3V compared to GND/common pin?

You can power them in bridge mode (which presumably is how it's normally done?), take a pin at one side HIGH and a pin at the other side LOW, then reverse BOTH pins (and so on, continually) - effectively giving a 6V drive signal, not related to earth, and with no DC component. It's important to keep the mark/space ratio at 50/50 to prevent a DC offset, which the LCD won't like.
 
Futterama said:
So, what you are saying is that it should be driven by +/-3V compared to GND/common pin?

Perhaps an image would give you better idea. The common connection in this case is powered with a 0-3V square wave.

If the segment is powered with the square wave with similar phase, the voltage on the segment terminals change together and there is no net voltage across the segment. The segment will be OFF in this case.

If the segment drive square wave is opposite to that of the common line, the segment will experience +/- 3V across its terminals and turns ON.

When you view the drive voltage of a "ON" segment referring to ground, the voltage on two sides of the segment is like a "seesaw", while one goes up the other goes down.
 

Attachments

  • lcd_drive.gif
    lcd_drive.gif
    9.5 KB · Views: 752
Thank you both for your replies.

I found this document describing how to use a microcontroller as a LCD driver:

https://www.electro-tech-online.com/custompdfs/2005/11/00563c.pdf

It's the same thing as you guys told me.

I understand the principle, but how much do accurate timing mean? Does a few microseconds matter much? I'm not sure I can get all the nessacery output pins on the PIC to change in the same instruction. But it runs at 8MHz, so a few instructions wouldn't matter much I guess.

By the way, I'm using the CCS compiler, and PIC18F4550 (I know this PIC is overkill, but it was the only 40pin PIC I had laying around).
 
Hi again,

I have been thinking about this timing problem. I want to solve this problem in some way, since Nigel says that anything else than true AC will shorten the LCD displays life.

So, a solution could perhaps be to make the common LCD pin output on the PIC an input port, while changing the other outputs (for the segments). Making the PIC pin an input, will put it in a high impedance state, and then it will not affect the LCD segments while changing their state one by one. After all the segments states are updated, the common PIC pin will return to output state.

Is this a good solution? (it has been tested and it works OK, but is it good for the LCD health?).
 
Futterama said:
Is this a good solution? (it has been tested and it works OK, but is it good for the LCD health?).

Think of the LCD segments as capacitors. They will store the charges on them unless changes by external circuit. So I think the unbalance problem still exists.

The display would appear to work OK but you won't be seeing its bad effect after several days, weeks or even months?
 
eblc1388 said:
The display would appear to work OK but you won't be seeing its bad effect after several days, weeks or even months?
Is this a question?


I have tried to make a signal drawing, take a look below.

Perhaps it needs some explanation.

The first 3 signals (Seg1-GND, Seg2-GND, Com-GND) is the signals on the PIC with respect to ground.
The last 2 signals (Seg1-Com, Seg2-Com) is the signals seen by the LCD segments.

The time from when the first segment is changing state to the Com is changing state, will be longer when more segments are added. If there is 30 segments, the time will be 30x500ns at best (8MHz PIC OSC).

Will this 15uS really have any effect on the LCD life?

By the way, this is my drawing without the make-Com-pin-input-before-changing-state idea.
 

Attachments

  • seg-com.gif
    seg-com.gif
    5.1 KB · Views: 670
From the last page in original datasheet link you have posted.

A 4us delay resulted in some 50mV net voltage on segments and the manufacturer's specification is max 60mV. That's very close to the limit.

So your 15us delay would possibly result in a lot more net voltage?
 

Attachments

  • lcd_delay.gif
    lcd_delay.gif
    19.1 KB · Views: 736
eblc1388 said:
From the last page in original datasheet link you have posted.

A 4us delay resulted in some 50mV net voltage on segments and the manufacturer's specification is max 60mV. That's very close to the limit.

So your 15us delay would possibly result in a lot more net voltage?
That's correct, I missed that.

I don't know what the manufacturers specification says regarding net voltage.
I could try to find out.

If it really is impossible to to this with direct drive from the PIC pins to the LCD pins, does anyone have an idea of a circuit that would help? I'd rather throw in more components than burning out my LCD in a week :roll:

Edit: Perhaps I should find a circuit that generates -3V, and then switch from +3V to -3V on the segments and leave the common pin at GND. I could use some transistors to switch the voltage or perhaps some IC supplied with -3V as Vss, and +3V as Vdd that outputs Vss to Vdd signals.
 
Futterama said:
eblc1388 said:
From the last page in original datasheet link you have posted.

A 4us delay resulted in some 50mV net voltage on segments and the manufacturer's specification is max 60mV. That's very close to the limit.

So your 15us delay would possibly result in a lot more net voltage?
That's correct, I missed that.

I don't know what the manufacturers specification says regarding net voltage.
I could try to find out.

If it really is impossible to to this with direct drive from the PIC pins to the LCD pins, does anyone have an idea of a circuit that would help? I'd rather throw in more components than burning out my LCD in a week :roll:

Edit: Perhaps I should find a circuit that generates -3V, and then switch from +3V to -3V on the segments and leave the common pin at GND. I could use some transistors to switch the voltage or perhaps some IC supplied with -3V as Vss, and +3V as Vdd that outputs Vss to Vdd signals.

The usual solution is to feed the LCD via XOR gates, with the second input fed from an oscillator - presumably that's what micro-controllers with inbuilt LCD interfaces have?.
 
Nigel Goodwin said:
The usual solution is to feed the LCD via XOR gates, with the second input fed from an oscillator - presumably that's what micro-controllers with inbuilt LCD interfaces have?.

This is actually what I need.

I can set one input on the XOR gate with the PIC, the other input goes to the common pin signal. Then the XOR output will either follow the common or be the opposite of the common. And all segment pins will change state at the same time (within 100ns according to the XOR (74HC86) datasheet).

The only drawback is the number of extra components (1 for each 4 segments on the LCD, using 74HC86 which is available to me).

Thank you all, I think I have found my solution, the thing with the XOR gate definitely works. I'll check it for signal delays later with a MegaZoom scope.

Edit: The delay is almost non-existent (at most a few nanoseconds), so the thing with the XOR gates will be my solution.


Cheers,
Futterama
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top