3digit multiplexed LCD driver from Logic Gates

Thread Starter

q12x

Joined Sep 25, 2015
1,532
Hello !
I am building for some time a cct to drive a 3digit multiplexed LCD. (from aliexpress)
3-digit 10pin LCD 3V_i1.jpg
From the sellers on aliexpress I managed to find a circuit diagram of the LCD. I color it myself to understand exactly how to actually drive it.
After making the cct in reality, I discovered that those COM1-4 pins in the diagram are actually inverted on my LCD device. That alone eat me a couple of days and numerous hours of error debugging. I trusted the diagram too much.
3-digit 10pin LCD Pinout - forPrint.jpg
My Driver Circuit.
I initially started with a PIC 12F508 and I was 'sure' it will work. It didnt. Then I back down to Arduino and here is the circuit with it, 'mimicking' the PIC pins and role. So using Arduino I am paralleling the PIC. You got me so far?
(click to see a large file img) View attachment LCD_3digitF-arduino.jpg
I understand this is probably a hard subject for some, all I ask is your thoughts. What it may be the solution to the problem? To somehow find the real problem and make it work. If you worked already with such stuff, then lucky me. If not, then we will make assumptions, until we will find some good results. That's the idea of my question on your forum here.
As you can see, I am using logic ICs to drive only 1 single digit (from 3). I am driving each segment of 1 digit. Specifically digit 3, the blue marked one.
I have a video with a lot of detailed experimentation and testings and error showing. I will give you the link (from youtube) if you want to help me and if you are into this subject. Send me a private request and I will send you the link. I can not post it here officially because I am swearing a lot in the movie and ... I don't want to upset some too sensitive souls around here. I know there are great and really helpful guys here. If the video is too much for some, discussion will be fine for me as well. No problem. I will answer every question !
So...the real problem is like this:
- I get a lot of 'glitching' when the segments are moving to form a number. Does not matter the speed, the 'glitches' are always there. Both with PIC code or arduino code.
A 'glitch' (for example) is when Im powering segment B but segment F is activated as well, for some strange reason. Thus, making the number a blob of segments instead of a clean number as intended.
The first thought I had was "the code" must be the problem. So I commented out -everything-, leaving the minimum minimorum code, and is still glitching, with no difference from before. I start to believe it is not the code anymore. It is a pure hardware matter !
An english friend told me he thinks that clock (marked with red square) must be synchronized from code. I thought that as well. Im actually starting
1692300920088.png
my movie with this setup as well. But then I understood better the problem.
So my response to him and how I see the situation, is like this:
This XOR_CLK is there only as a segment driver and not the logic driver. Its only purpose is to clock how fast 1 segment is rendered. If it will clock too slow, the segment will flicker, if too fast, the segment will show correctly, with no flicker at all.
Switching between segments, is another -very different- story. So this XOR_CLK is absolutely independent of the logic clock from the code !!! The code role is to open and close those doors called 'buffer' or 'transistors' or even 'relays'. It has NOTHING to do with the ---segment--- display frequency ! Get my point now? This is how I see it.
Lets say I will clock it directly from code. I will set it to very slow speed, so the logic switching 'doors' will run 1by1 very slowly, and ALSO the segment rendering, also very slow ! You see how separate they are, now?

I think I expose a long and somewhat complicated question.
Tell me your experience and what you may think on this issue. I will provide any links or files are needed, on request.
I attached both PIC12F508 PIC code (made in CCS C program) and Arduino code. Take a look.
Thank you !
 

Attachments

Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
1,532
And, it didnt work....
The idea I had was to use another type of shift register, one that is latching the output. I searched and find 74LS595 and I made a quick test in Proteus with it. It appears it is doing what I needed to. But not having this particular component right now, I made an improvisation already.
1692387002387.png1692387044452.png
You see those red marked zones? I made a 'Storage' zone. In sim I used buffers, but in reality I used transistors. When the code is finishing sending 1segment, it is activating that area. And it is indeed working fine, both in sim and in reality.
In reality it is still not working. If Im powering with 3V everything, the LCD display shows nothing. If im powering with 5V some buffers, or the XOR IC, I got again those double segments as before instead of 1. The code runs fine, both in slow and fast speed. So... still not there yet.
See if you can think of anything to improve from the hardware perspective.
Thanks.
 

joeyd999

Joined Jun 6, 2011
5,034
Dude...this is a 4-Backplane multiplexed LCD. You need the right AC waveforms and voltages to drive it properly:

Selection_093.png

Generally, one would use an LCD driver (or a MCU with a built in LCD driver) to interface to such a display.
 

BobTPH

Joined Jun 5, 2013
8,092
Yes, this appears to be a raw LCD and needs an AC squarewave to drive it. Some PICs have LCD segment drive capability. That is what you need.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,532
Dude...this is a 4-Backplane multiplexed LCD. You need the right AC waveforms and voltages to drive it properly:
Dude... thats all this beauty here is doing !
1692396047869.png
trying my best to drive a multiplexed LCD, using a square alternative wave, that is created from those XOR gates on top ;)
This 'driver' I am making here should be good for only -1- single LCD digit with 7segments inside.
Generally, one would use an LCD driver (or a MCU with a built in LCD driver) to interface to such a display.
Yes, this appears to be a raw LCD and needs an AC squarewave to drive it. Some PICs have LCD segment drive capability. That is what you need.
To both comments;
Yes, I already purchased a specific multiplexed driver IC that will fit this specific LCD I have here. Its name is: HT1621B and is a small SSOP48 package (unfortunately). But that thing is on its way, and it will arrive soon, probably 2 weeks or even sooner. But until that will arrive, I want this thing to work using only logic gates and common sense. I am aware Im doing something out of the ordinary but... im trying it anyway. Feel free to intervene with any kind of solutions you may think.
Thank you.
 
Last edited:

joeyd999

Joined Jun 6, 2011
5,034
Dude... thats all this beauty here is doing !
View attachment 300811
trying my best to drive a multiplexed LCD, using a square alternative wave, that is created from those XOR gates on top ;)
This 'driver' I am making here should be good for only -1- single LCD digit with 7segments inside.


To both comments;
Yes, I already purchased a specific multiplexed driver IC that will fit this specific LCD I have here. Its name is: HT1621B and is a small SSOP48 package (unfortunately). But that thing is on its way, and it will arrive soon, probably 2 weeks or even sooner. But until that will arrive, I want this thing to work using only logic gates and common sense. I am aware Im doing something out of the ordinary but... im trying it anyway. Feel free to intervene with any kind of solutions you may think.
Thank you.
Your XORs will not provide the correct waveform or voltages for multiplexing. It. Will. Not. Work.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,532
This is the 'basic' square alternating wave created by the XOR gate and the normal +3V&0V signal wave.
This alternation will create at the input(s)of the LCD segment, a +3V(top) 0V(down) and then 0V(top) +3V(down).
On an osciloscope it will look like +3V 0V -3V on the LCD segment terminals.
1692397206067.png
This is how it looks on the sim osciloscope for this test cct right here:
1692397187944.png
I also test it in reality and I got good results for this particular test.
 

djsfantasi

Joined Apr 11, 2010
9,129
Note that in the waveform diagram presented in post #4, there are two positive voltages and two negative voltages (being that that this is an AC waveform). Digital logic can only supply ground and one positive voltage, as you diagrammed in post#8.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,532
A driver or mcu with built-in driver for multiplexed lcd displays. Microchip makes some.
I get your point and I already mentioned in post #6 that I wait for a HT1621B chip to come into mail in about 2weeks. Until then, I want to get to the bottom of what I started already.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,532
Note that in the waveform diagram presented in post #4, there are two positive voltages and two negative voltages (being that that this is an AC waveform). Digital logic can only supply ground and one positive voltage, as you diagrammed in post#8.
This is the 'basic' square alternating wave created by the XOR gate and the normal +3V&0V signal wave.
This alternation will create at the input(s)of the LCD segment, a +3V(top) 0V(down) and then 0V(top) +3V(down).
On an osciloscope it will look like +3V 0V -3V on the LCD segment terminals.

Practically it is an AC waveform but made from DC square waves.
Is how I understood it, because this is not my invention. I simply followed a mechanism. As best as I could understood it, ofcourse.
 

joeyd999

Joined Jun 6, 2011
5,034
This is the 'basic' square alternating wave created by the XOR gate and the normal +3V&0V signal wave.
This alternation will create at the input(s)of the LCD segment, a +3V(top) 0V(down) and then 0V(top) +3V(down).
On an osciloscope it will look like +3V 0V -3V on the LCD segment terminals.

Practically it is an AC waveform but made from DC square waves.
Is how I understood it, because this is not my invention. I simply followed a mechanism. As best as I could understood it, ofcourse.
That works only for a static (non-multiplexed) LCDs. You'll get segments to respond, but there will be ghosting on all the other digits. And, you may exceed the max Vrms level of the display which can damage it.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,532
That works only for a static (non-multiplexed) LCDs. You'll get segments to respond, but there will be ghosting on all the other digits. And, you may exceed the max Vrms level of the display which can damage it.
No. That works for any LCD segment ! In my case the LCD is multiplexed. All this entire cct presented here is specifically to drive this multiplexed LCD. It did worked fine in the simulator. In reality I am hitting all sorts of problems like ghosting, double segments (instead of 1) and glitches. The whole menu.
Ok then. If all this cct I made here is as you say, made for a static (or 1/1) LCD, then do show me a cct made with logic gates like I started here, but made for multiplexed LCDs. I personally searched for one and I couldn't find any.
Thanks.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,532
I believe I solved the glitching problem ! I also buy 10pcs of 74LS595 I present in the movie.
I start to believe.... the low voltage is a problem for high fv's ! So the fastest I run this thing, it clearly needs more voltage to --barely-- lit up the segment !!! so, I believe it will need somewhere about 7V or even 9V. Not for the entire cct, just for LCD display itself. At 1ms display speed probably will start to show up at 7V, and at faster than 1ms probably at 9V... I will have to test it out.
These are the hints from all my testing so far.
 

joeyd999

Joined Jun 6, 2011
5,034
I believe I solved the glitching problem ! I also buy 10pcs of 74LS595 I present in the movie.
I start to believe.... the low voltage is a problem for high fv's ! So the fastest I run this thing, it clearly needs more voltage to --barely-- lit up the segment !!! so, I believe it will need somewhere about 7V or even 9V. Not for the entire cct, just for LCD display itself. At 1ms display speed probably will start to show up at 7V, and at faster than 1ms probably at 9V... I will have to test it out.
These are the hints from all my testing so far.
7 to 9V seems rather high for a modern LCD.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,532
7 to 9V seems rather high for a modern LCD.
I dont like it either, but this is all the tests are pointing at.
The higher the fv, the higher the voltage. Its like in audio electronics and its Wattage thing - im not at all on this side of electronics but I know a bit. I know for sure you need powerful Wattage amplifier chips and cct around them to manage certain wattage for certain fv. Im not into fv electronics ! Not at all. Im saying what I know from my general knowledge I have.
So from this point of view, it is having sense the increase in voltage... but like you said, for a modern device.... hmmmm
If you'd watched my latest video, you'll agree with what you've have seen there.
---
My highest desire is to find a way to run everything at 5V (or under). But if I have to run it at greater than 5V... so be it. Future tests will tell what is what.
 
Last edited:

joeyd999

Joined Jun 6, 2011
5,034
I dont like it either, but this is all the tests are pointing at.
The higher the fv, the higher the voltage. Its like in audio electronics and its Wattage thing - im not at all on this side of electronics but I know a bit. I know for sure you need powerful amplifier chips and cct around them to manage certain wattage for certain fv. Im not into fv electronics ! Not at all. Im saying what I know from my general knowledge I have.
So from this point of view, it is having sense the increase in voltage... but like you said, for a modern device.... hmmmm
If you'd watched my latest video, you'll agree with what you've have seen there.
LCDs are not driven by power. They're driven by a voltage differential determined by geometry and chemistry, defined by the manufacturer, and published in the datasheet.

What's the datasheet say?
 

Thread Starter

q12x

Joined Sep 25, 2015
1,532
What's the datasheet say?
I dont think its having one. Or at least I didnt find one. As you can see Im driving it blindly.
This is the original page I bought them : https://www.aliexpress.com/item/1005005362685005.html
If you search for similar models, you will get across that internal wiring and table I colored and showed earlier. Not present on my page though. Here is the full complete name of my device. This is 3digit. There are 2digit ones as well, and I think they are all very cute.
But very hard to 'manual' drive them as Im trying. Hard, until I will figure out a way.
1692470101484.png
 
Top