Searching \ for 'C-compilers, LCD' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/lcds.htm?key=lcd
Search entire site for: 'C-compilers, LCD'.

Truncated match.
PICList Thread
'C-compilers, LCD'
1997\02\06@121111 by jiri kuukasjarvi

flavicon
face
Hi!

         I have some questions:

       1. Does anyone know any free c-compilers for PIC`s?
          I use 16C84 and 16C924.

       2. How are LCD`s used? I have these 5 digit 7-segment
          LCD`s, and I would like to use them in my project,
          but the 16C924 doesn4t drive more than 31 or so
          segments with one common, and I need to control
          37 segments.
Bye!

-Jiri K.

1997\02\06@193800 by John Payson

picon face
>         1. Does anyone know any free c-compilers for PIC`s?
>            I use 16C84 and 16C924.

There is one called Pico-C, which was developed as someone's class project.
Limitted to 8 bit numeric types, however, and its generated code is really
pretty bad.  I'd recommend that you contact CCS, makers of the PCM compiler
for the 16Cxx (non-5x, non 12C50x) parts and the PCB compiler (for the 5x
and 12C508).  Their compilers are about $100 each and work pretty well, pro-
ducing much better code than the MPLABC compiler.

>         2. How are LCD`s used? I have these 5 digit 7-segment
>            LCD`s, and I would like to use them in my project,
>            but the 16C924 doesn4t drive more than 31 or so
>            segments with one common, and I need to control
>            37 segments.

The 16C924 allows you to multiplex LCD's one, two, three, or four ways, for
a total of 32, 62, 90, or 116 segments.  For your application, I would guess
your best bet would be a by-two multiplex arrangement.  In this arrangement,
the common wires for the first, third, and fifth digits would be wired to-
gether as would be those of the second and fourth.  The segment wires of the
first two digits would be wired together, as would those of the third and
fourth.

This is assuming, btw, that each display has one common wire and seven segment
wires.  Is this in fact how they are configured?

1997\02\09@175720 by Robert Lunn

flavicon
face
>        2. How are LCD`s used? I have these 5 digit 7-segment
>           LCD`s, and I would like to use them in my project,
>           but the 16C924 doesn4t drive more than 31 or so
>           segments with one common, and I need to control
>           37 segments.

An easy way to add just a few extra segments is with XOR gates, but at
the cost of extra I/O lines.

Get a 74HC86 (a quad 2-input XOR chip) and tie one input of each gate
to common.  Tie the other input of each gate to a separate output pin
on the PIC.  Then connect the output of each gate to a display segment.

By setting the PIC output high/low you will drive the segment on/off.

It's usually easiest to use these extra outputs for the annunciators,
such as decimal point, 'low battery', etc.  This leaves the purely
numeric output to be handled by the standard LCD driver circuitry.
This tends to simplify the coding.

___Bob

1997\02\10@065331 by Jiri Kuukasjarvi

flavicon
face
On Mon, 10 Feb 1997, Robert Lunn wrote:

> >        2. How are LCD`s used? I have these 5 digit 7-segment
> >           LCD`s, and I would like to use them in my project,
> >           but the 16C924 doesn4t drive more than 31 or so
> >           segments with one common, and I need to control
> >           37 segments.
>
> An easy way to add just a few extra segments is with XOR gates, but at
> the cost of extra I/O lines.
>
> Get a 74HC86 (a quad 2-input XOR chip) and tie one input of each gate
> to common.  Tie the other input of each gate to a separate output pin
> on the PIC.  Then connect the output of each gate to a display segment.

       What aboat those special driving voltages that are needed in
       LCD? I haven«t yet done much research to know how LCD«s actually
       work, but I think the driver sends some kind of A.C. voltage.
       Wether it«s sine- or square wave, I don«t know..

> By setting the PIC output high/low you will drive the segment on/off.
>
> It's usually easiest to use these extra outputs for the annunciators,
> such as decimal point, 'low battery', etc.  This leaves the purely
> numeric output to be handled by the standard LCD driver circuitry.
> This tends to simplify the coding.

       Thanks

- Jiri K.

1997\02\10@102149 by John Payson

picon face
>       What aboat those special driving voltages that are needed in
>       LCD? I haven4t yet done much research to know how LCD4s actually
>       work, but I think the driver sends some kind of A.C. voltage.
>       Wether it4s sine- or square wave, I don4t know..

If you are not multiplexing LCD's, the driving waveform for a lit LCD segment
is simply a square wave that goes between [positive some voltage] and [nega-
tive some voltage], relative to the common terminal.  The simplest way to get
this is to drive the common wire with a 5-volt square wave and drive the seg-
ments either in-phase or out-of-phase.

If you are using a multiplexed display, it's desirable to be able to drive
segments with different voltage levels so as to eliminate "bleed-through"
effects; unlike an LED, an LCD does not act as a diode so you definitely
have to worry about balancing all the voltages on the matrix.  I'll write
more on this if you're interested, but I don't have time right now.

1997\02\10@121253 by jiri kuukasjarvi

flavicon
face
John Payson wrote:
>
> >       What aboat those special driving voltages that are needed in
> >       LCD? I haven4t yet done much research to know how LCD4s actually
> >       work, but I think the driver sends some kind of A.C. voltage.
> >       Wether it4s sine- or square wave, I don4t know..
>
> If you are not multiplexing LCD's, the driving waveform for a lit LCD segment
> is simply a square wave that goes between [positive some voltage] and [nega-
> tive some voltage], relative to the common terminal.  The simplest way to get
> this is to drive the common wire with a 5-volt square wave and drive the seg-
> ments either in-phase or out-of-phase.

         No, I4m not. I just have these 39 segment displays with 1 common,
       and I need to drive max. 37 segments with a pic that can control 32.
         Somebody suggested me to use XOR4s for this "extension", but that
       way I can4t get that negative side of voltage. The way he said was
       to connect one common to other input of XOR, and other input to
       PIC4s output pin. Then the XOR4s output goes to LCD4s input.
       I think I4ll try that tomorrow..

-Jiri K.

1997\02\10@202057 by Robert Lunn

flavicon
face
>> Get a 74HC86 (a quad 2-input XOR chip) and tie one input of each gate
>> to common.  Tie the other input of each gate to a separate output pin
>> on the PIC.  Then connect the output of each gate to a display segment.
>
>       What aboat those special driving voltages that are needed in
>       LCD? I haven«t yet done much research to know how LCD«s actually
>       work, but I think the driver sends some kind of A.C. voltage.
>       Wether it«s sine- or square wave, I don«t know..

The simple LCD that you are wanting to use is "static" (as distinct from
"multiplexed").  That is, you have a single 'common' or 'backplane' signal,
and one signal for each segment on the display.

For a static LCD you only need two drive voltages (also called "bias"
voltages).

Unless you have an unusual display, you will find that drive voltages of
+5/-5 volts gives very adequate performance.  Therefore, you can simply
use your standard logic power rail to drive the LCD (don't worry, you'll
see where the -5V comes from soon).

There is then the question of the voltage WAVEFORM to use.  As you correctly
state, you must use an AC waveform to drive the display.  If you apply a DC
voltage across a liquid crystal you very quickly destroy the crystal.  To
avoid this, the applied voltage must be reversed frequently.

Let's look at a _single_ segment on the LCD.  The liquid crystal is sand-
wiched between two sheets of glass, and on each sheet of glass is a trans-
parent metal electrode.  The bottom electrode is connected to 'backplane'
and the top electrode is connected to the 'segment' pin.

Apply the following waveforms to each pin:

           ----      ----      ----      ----
        ____|    |____|    |____|    |____|    |____   common

      ----      ----      ----      ----      ----
       |    |____|    |____|    |____|    |____|               segment

                  ^    ^
                  |    |
                 one  two

Assume that the high voltage is +5V, and the low voltage is 0V.  At point
'one' the segment electrode is +5V relative to the common electrode.  At
point 'two' the segment electrode is -5V relative to the common electrode.
This causes the liquid crystal at this segment to appear opaque.

Note that the voltage continuously reverses.  This prevents the crystal
>from breaking down.  The _average_ DC voltage across the segment is very
nearly zero.  For 'typical' static LCD's the waveform frequency should be
between 60Hz and 120Hz approximately.

To turn the segment off (transparent) simply invert the segment signal.
The voltage across the liquid crystal is now always zero.

Now presumably you already have an LCD driver chip, but it doesn't have
enough segment drive pins for your purpose.  The driver chip will produce
the 'backplane' signal for you, and this signal is simply the square wave
shown above (look at it with an oscilloscope).

To drive an _additional_ segment pin you only need to connect to it the
backplane signal (to turn the segment off), or the backplane signal
inverted (to turn the segment on).  That is, you want a logic element
which either GATES its input to its output, or INVERTS its input to its
output, based on the state of a CONTROL pin.

Such a logic element is simply an XOR gate.

Just in case you _don't_ have an LCD driver chip, you will find the
MM145453 from Motorola is very easy to use.  Phillips also have some
I2C interfaced LCD driver chips.

___Bob

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...