# PIC-to-LCD interface, Powersupply, Oscillator freq.

Status
Not open for further replies.

#### egh01

##### New Member
1. Does anyone have any good schematics for interfacing a PIC16F84A-20 with a HD44780 LCD? 8-bit preferably if thats possible.

2. Will an AC to DC adapter with variable output V (3, 4.5, 6, 7.5 ...) like this: http://www.dcacpowerinverters.com/cgi-bin/shopper.cgi?preadd=action&key=GS-1000 work to supply a PIC16F84 with power, or will I need any capasitors or similar?

3. What should the clock freq. of my oscillator be if I have a PIC16F84A-20 and I want to get as much as possible out of it? And what if I will just use the pic to control a LCD, are there any cons with using an 20MHz oscillator instead of an 4Mhz?

#### ivancho

##### New Member
1. Does anyone have any good schematics for interfacing a PIC16F84A-20 with a HD44780 LCD? 8-bit preferably if thats possible.
Do you know the pin out of the connector? would it be something like this?:
Pin1= GND
Pin2= +5V
Pin3= Contrast
Pin4= Register Slection
Pin5= Read/Write
Pin6= Enable
Pin7-14= Data

Try something like this:
(Taken from Melabs)
It is not 8 bit but you can use portB instead. I would recommend to use 4 bit if you are running out of I/O for other stuff.

2. Will an AC to DC adapter with variable output V (3, 4.5, 6, 7.5 ...) like this: http://www.dcacpowerinverters.com/cgi-bin/shopper.cgi?preadd=action&key=GS-1000 work to supply a PIC16F84 with power, or will I need any capasitors or similar?
If you are able to find one that is 5V output regulated so that you don't have to deal with that then it would be better. Otherwise use that one and set it to 7.5V and pass it through a 7805 (5V voltage regulator)

3. What should the clock freq. of my oscillator be if I have a PIC16F84A-20 and I want to get as much as possible out of it? And what if I will just use the pic to control a LCD, are there any cons with using an 20MHz oscillator instead of an 4Mhz?
The LCD should have some specific timing, so that will be how fast you can send out to the LCD more or less a routine would go like this

1. Power LCD and PIC
2. Pause 30msec while LCD inizialize
3. ENABLE Pin HIGH
4. TURN ON LCD --the comand is 0000001100(RS,R/W,D7-D0 respectively)
5. ENABLE PIN LOW
6. Pause 1ms
7. High ENABLE PIN
8. Send LCD settings (like type of LCD, cursor on, etc)
9. repeat steps 5-7

So a 20mHz crystal will be goo if you are doing other stuff and what to be able to keep up with other stuff.

Good Luck,

Ivancho

#### Chippie

##### Member
Here's something that may interest you.......but pdf's not allowed....
Send me your email addy and I'll post it on.... :cry: :cry: :cry:

#### chappy1403

##### New Member
2 wire lcd interface

try this site .... only mistake on page is the 74ls174 should be 74ls164 or a 4094....... www.rentron.com/Myke1.htm also try www.talkingelectronics.com very good info here have helped me for many years from when i was 15 and im 35+ now

#### Attachments

• 21.9 KB Views: 2,186
• 25.8 KB Views: 2,340

#### usaf1

##### New Member
Hey there,

Looks like the others already got you some good advice.

I got a similar HD44780 LCD 16x1 for under $3, and a 5V/1.2A power supply for$5 from www.bgmicro.com. Most of their stuff is salvaged, but for the price they almost can't be beat.

Might want to check them for your power supply.

Status
Not open for further replies.

Loading