Producing a square wave for driving LCD displays.

casdsys

New Member
Hi all.

I need to produce a square wave for driving a 2 digit LCD display. Im using the 4543 and the square wave needs to be applied to both the common on the LCD display as well as the PH input of the 4543.
Suggested frquency is 30Hz. So the question is, is it as simple as writting the the code such as , bit 1 high, pause X, bit 1 low, pause X ( and repeat ).
 

ol boy

Member
Suggested freq of 30 hz... Can it be faster? You can set the servo timers into motion at 50 hz and have a pulse value of 1000 or 10ms to get your square wave.
 

Goeytex

Senior Member
Hi all.

I need to produce a square wave for driving a 2 digit LCD display. Im using the 4543 and the square wave needs to be applied to both the common on the LCD display as well as the PH input of the 4543.
Suggested frquency is 30Hz. So the question is, is it as simple as writting the the code such as , bit 1 high, pause X, bit 1 low, pause X ( and repeat ).
What Picaxe chip? What else will the Picaxe be doing?
 

westaust55

Moderator
Some further data on your overall circuit and the exact purpose of the square wave may be helpful.
The PULSOUT command could be a possibility for a squarewave pulse train may be a possibility.
 

casdsys

New Member
Some further data on your overall circuit and the exact purpose of the square wave may be helpful.
The PULSOUT command could be a possibility for a squarewave pulse train may be a possibility.
Hi

Please read the 1st post.
I may dedicate a 8pin device just for producing the squave wave, I heard someone else mention using the servo command to produce a constant square wave.
 

westaust55

Moderator
If you want a continuous square wave with a 50 percent duty cycle the. PWM may be better running in the background.

Servo commands generate a pulse of around 1 to 2 ms every 20 ms so duty cycle is in the 5 to 10 percent range. To me that is a pulse train rather than try square wave but that may work - give it a try.
 
Last edited:

geoff07

Senior Member
If it's just a constant pulse train why not a 555 timer
Cost-wise I agree - say 35p vs £1.50. But then you have to find space for all those extra components and fiddle with the timing. (assuming you program off the board)
 

Goeytex

Senior Member
A CD4060 or any number of Logic ICs will produce a precise 50% duty square wave. A Schmitt Inverter IC with a resistor and a cap will also work. No negative supply required as with the 741 OPAMP.

I doubt that the OP requires "exact" 50/50 mark space. "Close" should be good enough can can be easily done with a 555 timer. I would not discount the 555 just because it might take a few minutes to get the components values optimized.
 

tmfkam

Senior Member
Do the two square wave signals not need to be out of phase? I seem to recall making a circuit to drive a two digit LCD and it needed an inverter to ensure the phase of one of the 'clocks' was out of phase.

Looking at my (not labelled) schematic, yes indeed the backplane 'clock' needs to be inverted relative to the digit segment clocks. I remember that I only made this as a one off to demonstrate the principals of LCD drivers which is why there are so many points for connecting an oscilloscope to, in order to show that the digit elements are strobing on and off constantly. I was led to believe that if the digit elements were left on for any length of time the crystals within them would be destroyed.

The circuit was only wired to one of the two digits on the 7 segment displays that were to hand. Disp_A connects to segment 'A' of the LCD display, Disp_B to segment 'B' of the LCD display and so on. The 74LS74 decoded the BCD value selected by the push button switches and the output of this is then combined with the clock signal in the relevant section of the 74AC86 IC. The clock in this case was provided by an external function generator.

View attachment LCD_Driver_2.pdf
 

nekomatic

Member
The 4543 has a single backplane input and makes the segment outputs the same as the backplane if the segment is off, or the inverse of it if the segment is on - essentially it outputs an XOR of the backplane drive with the value from a BCD-to-7-segment decoder.

If space is critical and you can cope with SMT, you can get packages containing one or two Schmitt inverter gates (e.g. 74LVC1G132DBVR), which would generate your square wave using one resistor and one capacitor.
 
Last edited:
Top