CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

3 volt PIC and 5 volt LCD

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

3 volt PIC and 5 volt LCD
PostPosted: Wed Apr 13, 2016 5:16 pm     Reply with quote

As most of you are aware there are a LOT of 5 volt LCD modules at great prices. The problem is trying to run them with a 3 volt PIC. Seems every other add-on peripheral these days IS 3 volts (GPS, RFID, etc.)
So if you can spare a PWM output, even at 4KHz I've come up with a solution. Right now I've got an 18F46K22 running on 3V attached to a 4x20 LCD. I'm using the 'flex_LCD_420' driver. The only hardware mod is to add 2 diodes and 2 caps to form a 'Dickson doubler'. The PIC supplies a free running, 50% duty cycle square wave to the doubler which produces a good 5 volts to power the LCD.
I did this to test a new 4x20 LCD driver, that displays 4 characters, each 4 pixels high. Once I clean up the code, I'll post it in the code library.

Jay
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Thu Apr 14, 2016 7:04 am     Reply with quote

Hi Jay,

Hmmm, that seems to address the supply to the +5V display, but what about the I/O? Are +5V displays happy with +3.3V I/O signals?

I've got a lot of mixed voltage designs. +12V in is regulated down to +5V and +3.3v with individual regulators. Seems easier and cleaner to me??

It seems rare that you're starting with only +3.3V anyway, almost always something higher, right?
_________________
John

If it's worth doing, it's worth doing in real hardware!
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Apr 14, 2016 9:45 am     Reply with quote

The PIC's being powered through TTL<>USB which has 3V output. The LCD seems quite happy with 3V on the data+cmd pins. Almost a week 24/7. ZERO missed data!
This all comes about with trying to get some nRF24L01+ to talk to each other for the wife's greenhouse.
I've yet to find economical, SIMPLE RF 2way transceivers (serial<>RF). Zigbee is too powerful (overkill), Bluetooth can't go the distance. RF Digital have them but $$$. sigh....

Jay
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Thu Apr 14, 2016 10:59 am     Reply with quote

I liked the level shifter that Sparkfun has for sale ( https://www.sparkfun.com/products/12009 ) and was planning on using that system with my next little project. (you still need Jay's voltage step up for the supply though).

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Apr 15, 2016 10:47 am     Reply with quote

temtronic wrote:

The PIC's being powered through TTL<>USB which has 3V output. The
LCD seems quite happy with 3V on the data+cmd pins. Almost a week
24/7. ZERO missed data!

A 3v PIC would work with this LCD because it has ~TTL i/o levels (ie., the
lcd pins have 2.2v input, and 2.4v output levels): https://www.crystalfontz.com/products/document/456/CFAH1602AYYHJP.pdf

This one has ~CMOS i/o levels, with an input voltage requirement of 3.5v
and an output voltage of 3.7v. In fact those levels are for a 4.5v Vdd on
the LCD. The actual levels with a 5v Vdd on the LCD would be even
higher. This LCD would not be reliable with a 3.3v PIC.
https://www.crystalfontz.com/products/document/960/CFAH1602LNFHJT_v1.0.pdf

These are both 5v lcds. I am looking at the Vih and Voh parameters in the
Electrical Specifications / DC characteristics section of the lcd data sheets.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Fri Apr 15, 2016 11:09 am     Reply with quote

This is a nifty idea --
i tried it - this morning with a devel board on hand
already set up with an LED illuminated LCD.

as somebody who has a LOT of analog circuitry in my pic work -there is an unsavory aspect of this means of voltage generation.
i was drawing 55ma with a 5.1 ohm series I limiter -series with the led at doubler output -

If you build this circuit - add a small sense resistor
Look at the input current waveform to the doubler to see what i mean

i used .47 ohms I-sense resistor in series with Vdd 3.3v and
a 330uf/10v ( $$ ) tantalum cap , which HELPS but ..........
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Fri Apr 15, 2016 1:42 pm     Reply with quote

For low cost, reliable data, "good" range, go for the ESP8266!... and guess what! they are 3.3V... who says you cant transmit small bits of data via WIFI.


as for the Power generation, i posted a "driver" for an LM35 a looong time ago using a charge pump (voltage doubler, or other fancy names) ... same solution as you.

Just dont read data from the LCD!

Its incredibly simple.... its good to know it can drive a whole LCD!

G.
_________________
CCS PCM 5.078 & CCS PCH 5.093
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Apr 15, 2016 2:27 pm     Reply with quote

Just a 'point of clarification'...
The 3>5 doubler feeds the LCD 'VCC' only

The regular 3 volts powers the backlighting LEDS.

I didn't even look with a scope, just grabbed what was lying on the bench and it worked! I suppose I should properly engineer it, heck i didn't even put a resistor in the 'I'm alive ' flashing green test LED.
To do it 'right' I'll have to get the magnifying glass out, can't read nothing on little parts any more, sigh.......


Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group