Close

Bit-banging LCDs

A project log for Anti-Seasickness Sunglasses

Wear these LCD shutter glasses and enjoy your trip!

ted-yapoTed Yapo 04/22/2018 at 14:120 Comments

The LCD elements in the 3D glasses I'm using for a prototype are normally transparent and become opaque when driven with an AC waveform.  To prevent damage to the LCDs, it's important to eliminate any DC component in the driving waveform; a DC bias across the the elements will eventually damage them.  The PIC12LF1571 doesn't feature dedicated LCD-driving hardware, but for something this simple, the required waveforms are easily generated in code.

The LCDs will be driven by two pins.  When the LCD is clear, both pins will be low.  To darken the LCD, the pins will drive the elements in push-pull, with an identical number of positive pulses from each phase to ensure no overall DC bias.  A representative waveform is shown here:

In this case, 5 positive pulses and 5 negative pulses are generated each on the clk_a and clk_b lines to darken the LCDs for 10 periods.  To clear the LCD for 1 period, both lines are brought low, then the cycle begins again, generating a 9.1% duty cycle.  In practice, the switching frequency will be higher than this, so that perhaps hundreds of cycles of AC will punctuate periods of transparency.  This is necessary to prevent flickering during the dark period.

The actual frequency and voltage level required depend on characteristics of the LCDs themselves.  Since I don't have a datasheet for the prototype glasses, I'll have to determine appropriate values experimentally, but this shouldn't take long.

Discussions