View previous topic :: View next topic |
Author |
Message |
naveen13m
Joined: 01 Jun 2012 Posts: 4 Location: India
|
LCD with PIC16F882 |
Posted: Fri Jun 01, 2012 3:26 pm |
|
|
Can someone help me out with how to interface an LCD with PIC16F882. |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Fri Jun 01, 2012 3:35 pm |
|
|
You need to tell us which LCD, complier version etc.
Do a search on this forum, you'll find loads of samples.
CCS also provides some with the compiler.
Mike |
|
|
naveen13m
Joined: 01 Jun 2012 Posts: 4 Location: India
|
|
Posted: Sat Jun 02, 2012 2:59 am |
|
|
I'm using CCSc 4.114 and I want to interface a 16x2 lcd with PIC16f882. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19499
|
|
Posted: Sat Jun 02, 2012 3:39 am |
|
|
lcd.c with the compiler, or the flex_lcd driver in the code library.
The latter is more flexible (hence the name....), allowing various bits to be used on multiple ports.
You need just the four high data lines connected to four pins on the PIC, the register select line, the enable line and (optionally) the R/W line. The pins used are in the text at the top of the files for each driver, and you can change them to suit yourself.
Other connections. +5v, GND, and Vo (the contrast supply). The voltage needed on this, depends on the LCD model involved. A lot of modern LCD's work fine with this set to 0v. Many older models require a -ve voltage (typically about -0.4v) on this.
You need to start by getting the data sheet for the exact model LCD you have. 99% of these are basically clones of the Hitachi controller chip, that was launched perhaps 30 years ago, and it is these that the drivers can operate. There are a few differences with some chips though (a few need longer delays on start up), and there are a very few such displays that use completely their own controller, needing different software.
Best Wishes |
|
|
|