Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 1st February 2005, 01:54 PM   (permalink)
Default PWM --> LCD Contrast

Hello!

Is it possible to use the PWM output of a PIC to controll the contrast of an LCD? (into pin 3 of lcd)


Thank you!
hantto is offline  
Old 1st February 2005, 02:16 PM   (permalink)
Default Re: PWM --> LCD Contrast

Quote:
Originally Posted by hantto
Hello!

Is it possible to use the PWM output of a PIC to controll the contrast of an LCD? (into pin 3 of lcd)
Yes, you may need a lowpass filter to generate a stable DC voltage, but it's a commonly used technique (to allow contrast adjustments via the processor).

Personally I've never tried it, I'll be interested to hear how you get on, particularly if you need a filter or not. I'm sure you'll be able to find something about it on the net, maybe even in the MicroChip application notes somewhere?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 1st February 2005, 06:40 PM   (permalink)
Default

Finally I got my LCD to work :þ
Had some problems to get it to work with a 887, so I swiched to 628. Now it works. (yes, your tutorials (: )

Now I will start experimenting with the contrast.
hantto is offline  
Old 1st February 2005, 08:02 PM   (permalink)
Default

OK my initial tests show that filtering is definately required.

Here are som pics. There is some distortion that doesn't show well on these pictures.
Attached Images
File Type: jpg lcd_004.jpg (71.6 KB, 849 views)
File Type: jpg lcd_003.jpg (77.5 KB, 848 views)
File Type: jpg lcd_002.jpg (75.5 KB, 849 views)
hantto is offline  
Old 1st February 2005, 08:26 PM   (permalink)
Default

Here's a clip to show it.

(forgot to turn off the music)

http://removed.link
hantto is offline  
Old 1st February 2005, 10:58 PM   (permalink)
Default

That's pretty cool. 8) What was the PWM rate for your contrast signal? And what kind of filtering did you have to apply?
__________________
The most-hated young engineer in America.
* AVR Projects
* Robot War: TI
* About
DigiTan is offline  
Old 2nd February 2005, 11:14 AM   (permalink)
Default

100% is 100% PWM and 0% is 0% PWM, so actually it should say 'PWM' instead of 'Contrast'

I did some experimenting. Used a 330ohm and 10µF as a lowpass filter. It showed some distortion on higher PWMs. After increasing the capacitor to 100µF the distortion dissapeared. So a capacitor between 10µ and 100µ would be optimal.
hantto is offline  
Old 2nd February 2005, 05:39 PM   (permalink)
Default

Your thoughts? (nigel? )
hantto is offline  
Old 2nd February 2005, 11:54 PM   (permalink)
Default

Quote:
Originally Posted by hantto
Your thoughts? (nigel? )
Well I loved the video!, even the music was quite amusing :lol:

It looks like you have the situation well under control, from your tests it looks like a filter is essential.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 4th February 2005, 02:35 AM   (permalink)
Default

Quote:
Originally Posted by hantto
100% is 100% PWM and 0% is 0% PWM, so actually it should say 'PWM' instead of 'Contrast'

I did some experimenting. Used a 330ohm and 10µF as a lowpass filter. It showed some distortion on higher PWMs. After increasing the capacitor to 100µF the distortion dissapeared. So a capacitor between 10µ and 100µ would be optimal.
Actually, I just meant the wave period in general. Was there any flickering that was noticeble to the naked eye?
__________________
The most-hated young engineer in America.
* AVR Projects
* Robot War: TI
* About
DigiTan is offline  
Old 4th February 2005, 08:28 AM   (permalink)
Default

Umm... YES! as you can see from the pictures (without the filter that is).

Or am I not still understanding your queston?
hantto is offline  
Old 4th February 2005, 09:00 AM   (permalink)
Default

That's a pretty cool enhancement you made. Never thought of using PWM for the contrast before.
checkmate is offline  
Old 4th February 2005, 09:07 AM   (permalink)
Default

Quote:
Originally Posted by checkmate
That's a pretty cool enhancement you made. Never thought of using PWM for the contrast before.
It's common commercial practice, many items use it.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:27 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker