Searching \ for 'Adjusting Contract w/PWM ?' 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/io/pwm/index.htm?key=pwm
Search entire site for: 'Adjusting Contract w/PWM ?'.

Truncated match.
PICList Thread
'Adjusting Contract w/PWM ?'
1997\12\09@082729 by Jim Dolson

picon face
Thomas M¿rch wrote:
>
> Or make a PWM to control the contrast, then it's all 'computerized'
> I have been thinking about making a lcd display i2c compatible with a pic,
> just for fun and to keep myself occupied with something.. And make the
> contrast/brightness (i've got some lcd's with backlight) controlable from
> the i2c....
>


OK, I give.  

I just ordered a DS1669 (PIC controllable pot) to adjust the contrast on
an LCD panel under PIC control.  I'm always interested in reducing the
parts count.  How would I adjust the contrast using PWM?

Jim
spam_OUTjdolsonTakeThisOuTspamiserv.net

1997\12\09@085949 by Andrew Warren

face
flavicon
face
Jim Dolson <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU> wrote:

> I just ordered a DS1669 (PIC controllable pot) to adjust the
> contrast on an LCD panel under PIC control.  I'm always interested
> in reducing the parts count.  How would I adjust the contrast
> using PWM?

   It's pretty simple, Jim:

   1.  Generate a PWM signal.  If your PIC has a hardware PWM
   generator, great... If not, do it in software.  Make the PWM
   frequency as high as possible.

   2.  Integrate the signal with an RC low-pass filter.  You can
   build an op-amp integrator if you like, but it's not really
   necessary... The important thing is to get the filter's 3dB
   point well below your PWM frequency.

   3.  The output from your RC or integrator will be a voltage
   proportional to your PWM signal's duty-cycle; run it to the
   LCD's contrast pin.

   -Andy

=== Andrew Warren - fastfwdspamKILLspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

1997\12\09@114155 by sdattalo

face
flavicon
face
Andrew Warren wrote:
>
> Jim Dolson <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU> wrote:
>
> > I just ordered a DS1669 (PIC controllable pot) to adjust the
> > contrast on an LCD panel under PIC control.  I'm always interested
> > in reducing the parts count.  How would I adjust the contrast
> > using PWM?
>
>     It's pretty simple, Jim:
>
>     1.  Generate a PWM signal.  If your PIC has a hardware PWM
>     generator, great... If not, do it in software.  Make the PWM
>     frequency as high as possible.

1a. And if you can't make the PWM frequency very high, then consider
bursts of pulse width modulated pulses, where a "burst" may only be a
single PWM cycle. The trick is that while your not PWMing (is that
one or two ems?) the PWM output is reprogrammed as an input and
consequently a high impedance (i.e. no load on your RC filter).


Scott

1997\12\10@103632 by Tom Handley

picon face
  LCD contrast is very subjective based on ambient light, viewing angle,
and user-preference. If you are going to provide adjustable contrast why
not just use a pot?

  - Tom

At 08:27 AM 12/9/97 -0500, you wrote:
{Quote hidden}

1997\12\10@162752 by Andrew Warren

face
flavicon
face
Tom Handley <PICLISTspamspam_OUTMITVMA.MIT.EDU> wrote:

> LCD contrast is very subjective based on ambient light, viewing
> angle, and user-preference. If you are going to provide adjustable
> contrast why not just use a pot?

Tom:

I can think of a couple of reasons...

1.  Although it's often used to adjust for viewing angle, the MAIN
   reason for the contrast adjustment is to compensate for
   temperature... If the contrast is controlled by software, you
   can do things like, for example, display "Press a key when the
   display is most readable" and cycle through the contrast range.
   Without software control of the contrast, a new user faced with
   a blank (or black) display might not think to turn the contrast
   knob.

2.  If the product needs to be water-tight, it's difficult to include
   an externally-adjustable pot.

-Andy

=== Andrew Warren - @spam@fastfwdKILLspamspamix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

1997\12\10@182400 by Tom Rogers

flavicon
face
I'll add two more:

1) Twiddle pots cost money and take up space.

2) Twiddle pots need adjusting and then they fail.

Best to avoid them if at all possible.

--Tom Rogers

{Original Message removed}

1997\12\10@193433 by Steve Baldwin

flavicon
face
>     Without software control of the contrast, a new user faced with
>     a blank (or black) display might not think to turn the contrast
>     knob.

As opposed to a mesage on the display that says "Press button A if you
can't read this".
That must be in the same library as "No keyboard found. Press F1 to
continue."

:-)

Steve.

======================================================
 Very funny Scotty.  Now beam down my clothes.
======================================================
Steve Baldwin                Electronic Product Design
TLA Microsystems Ltd         Microcontroller Specialists
PO Box 15-680                email: KILLspamstevebKILLspamspamkcbbs.gen.nz
New Lynn, Auckland           ph  +64 9 820-2221
New Zealand                  fax +64 9 820-1929
======================================================

1997\12\10@194446 by Rick Dickinson

flavicon
face
At 12:46 PM 12/11/97 +1300, Steve Baldwin wrote:
>>     Without software control of the contrast, a new user faced with
>>     a blank (or black) display might not think to turn the contrast
>>     knob.
>
>As opposed to a mesage on the display that says "Press button A if you
>can't read this".

Actually, Steve, he suggested having the LCD repeatedly cycle back & forth
through all values of contrast upon startup, with the user pressing a button to
"lock in" the current value when the display was legible.

I would suggest storing the "last" value in EEPROM, and using that if the user
does nothing for 5 seconds or so.  That way, your project will restart cleanly
without intervention after losing and regaining power.

Not a bad idea for eliminating a moving part from the design.

- Rick "PWM and Pwoper" Dickinson

1997\12\10@195447 by Andrew Mayo

flavicon
face
I nearly posted a similar reply until I noted carefully that he had said
the contrast would be continually cycled, so presumably the message
*does* become visible periodically.

{Quote hidden}

1997\12\11@045409 by Steve Baldwin

flavicon
face
> I nearly posted a similar reply until I noted ....

> > As opposed to a mesage on the display that says "Press button A if you
> > can't read this".
> > That must be in the same library as "No keyboard found. Press F1 to
> > continue."
> >
> > :-)

I guess I should have drawn more attention to that last line when I
replied.

Steve.

======================================================
 Very funny Scotty.  Now beam down my clothes.
======================================================
Steve Baldwin                Electronic Product Design
TLA Microsystems Ltd         Microcontroller Specialists
PO Box 15-680                email: RemoveMEstevebspamTakeThisOuTkcbbs.gen.nz
New Lynn, Auckland           ph  +64 9 820-2221
New Zealand                  fax +64 9 820-1929
======================================================

1997\12\11@105257 by Tom Handley

picon face
  Andy, I understand your points but if a user has to adjust the
display, I should think a pot would be more intuitive. I still use
a Radio Shack graphics calculator for quick calculations and it has
a contrast menu where you use the left and right arrow keys for
adjustment. It get's in my way... You can scale the pot value with
a resistor or two to ensure that there is a minimum display.
Temperature compensation can easily be added for any method of
adjustment. For water-tight applications you are dealing with
hermetically sealed components be they switches/keys or pots.
If you already have the switches/keys and available program
memory then I can see a software approach. It just seems like a
lot of overhead for such a simple task.

  The reason I jumped in on this thread is that it seems to be a
classic case of `over PICifying' which I have been guilty of ;-)
I tend to step back from code solutions and take a hard look at
just what the heck I'm trying to accomplish here.

  What this really boils down to is human factors. One customer
may prefer peas and another carrots ;-)

  - Tom

At 01:25 PM 12/10/97 -0800, you wrote:
{Quote hidden}

1997\12\11@124115 by Alessandro Zummo

flavicon
face
Il 10-Dic-97, Andrew Warren scrisse:


>> LCD contrast is very subjective based on ambient light, viewing
>> angle, and user-preference. If you are going to provide adjustable
>> contrast why not just use a pot?

>1.  Although it's often used to adjust for viewing angle, the MAIN
>    reason for the contrast adjustment is to compensate for
>    temperature... If the contrast is controlled by software, you

only a question: while the pic is pwmming, he can't obviusly do
any other thing..... ?

--

  - *Alex* -

     (RemoveMEazummoEraseMEspamEraseMEita.flashnet.it)

1997\12\11@125616 by Rick Dickinson

flavicon
face
At 01:31 PM 12/11/97 +0100, Alessandro Zummo wrote:

[regarding using a PWM signal from a PIC, integrated by a low-pass RC
filter, to set the contrast voltage for an LCD]

>only a question: while the pic is pwmming, he can't obviusly do
>any other thing..... ?

Good point.  However, nothing says the PWM signal has to be there
continuously.  PWM for a half dozen cycles to get the integrator up to
voltage, then tri-state the output (make it an input).  No load (other than
that from the LCD, which is minimal) means it should hold the voltage for a
while.  Just come back every now and then when you have CPU cycles to spare
and PWM for a while, then tri-state again.  Increasing the C in the RC
filter also helps.

- Rick "Modulating a PWM output... hmm..." Dickinson
+---------------------------------+---------------------------+
| Enterprise ArchiTechs Company   |                           |
|     Lotus Certified Notes       |  Never underestimate the  |
|  Appl. Design & Administration  |  bandwidth of a station-  |
|(818)563-1061  RemoveMErtdspam_OUTspamKILLspamnotesguy.com  | wagon full of tape reels. |
|   http://www.eArchiTechs.com    |                           |
+---------------------------------+---------------------------+

1997\12\11@141931 by Andrew Warren

face
flavicon
face
Tom Handley <RemoveMEPICLISTTakeThisOuTspamspamMITVMA.MIT.EDU> wrote:

> Andy, I understand your points but if a user has to adjust the
> display, I should think a pot would be more intuitive.

   Tom:

   If the user can see anything at all on the screen, you're
   right... But if the temperature's so high that the display is
   completely blank, he's more likely to assume the thing's broken
   than to go looking for a contrast adjustment.

   I tested verious contrast-setting methods on about 100 people,
   and ended up using the contrast-cycling-on-startup method
   because it was the ONLY one with a 100% success rate.

> You can scale the pot value with a resistor or two to ensure that
> there is a minimum display. Temperature compensation can easily be
> added for any method of adjustment.

   You're right, of course, but all those components cost money,
   board space, and power... This was a small, solar-powered
   consumer product for which those three quantities had to be
   absolutely minimized.

> For water-tight applications you are dealing with hermetically
> sealed components be they switches/keys or pots. If you already
> have the switches/keys and available program memory then I can see
> a software approach. It just seems like a lot of overhead for such
> a simple task.

   Since we were using a PIC16C74 (which has a hardware PWM
   generator), there was essentially no software overhead.

   The switches were just membranes, sealed water-tight behind a
   plastic faceplate.  To add a sealed pot would have been very
   costly.

   -Andy

=== Andrew Warren - EraseMEfastfwdspamspamspamBeGoneix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

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