You
DO need the enable PIN.... I was kind of lazy to write something up since you should be able to find that information about everywhere on the net.... but here it goes :wink:
A standard LCD module comes with 14 pins (sometimes 16)
- 8 Dtata Lines (D0-D7)
- 3 Control Lines (RS, W/R, E)
- 3 Power Lines ( Vdd"+", Vss "-", Vee-Contrast Control "Sometimes negative")
:arrow: The
Vee (if not a negative source required) can be obtain with a Potenciometer connected between
Vdd and
Vss.
:arrow: The Data lines
D0-D7 are bus lines where information can be transfered from AND to the display. There are two modes of transmitting data 8-bits (using all 8 lines) at a time... or using nibbles (transmiting 4 bits, twice). Either way you are always transmitting 8-bits of data. When transmitting characters you will need to refer to a ASCII table most of the time. When transmitting commands you will need the commands intruction set for the LCD
:arrow: On the control side, we have the
RS-
Register Select. At this time I would like you to see the back of the LCD and check the chip that is in it. The most common is a
HD44780 or similar. You can do a google search if yours is different and check the instruction set. Back to the
RS.... you can send characters to the LCD or Commands such as position the cursor on the second line. To diferenciate between what you are sending if a command or Data you have to manipulate this line. If the
RS line is set high, the LCD will interpret any information in its D0-D7
as a character. If the
RS is Low then the LCD will read its D7-D0 and interpret that
as a commands, according to its Instructions Set.
:arrow:
R/W is the
Read/Write line control... as you can probably guess they control weather you want to send data to the LCD or recieve information form the LCD. Most application you only want to send data to the display therefore you
pull this line low in hardware, so you don't waste pins on your controller.
:arrow: And with the infamus
E- Enable control input. This pin is used to tell the LCD that the data in its port is ready to be read and that the RS and R/W are also set. This
Enable line is kept normally LOW and pulsed HIGH for a X amount of time (depending on your chip set). When the transition from low to high is detected on the pin E then and only then the data in the D0-D7 port will be read.
:arrow: Other things to consider... a LCD when powered up needs to go thru its initialization process, before you can send any commands to it. When powered up there are also certain "defaults" that the LCD starts with, such as Display is OFF (so altough you have power the LCD, it won't show characters sent), therefore in your LCD controller you must turn the LCD display ON.... certain cursor properties will be in default too... like Cursor OFF, etc. The controller CHIP intruction set will tell you what are the defults.
:idea: So the first thing you should do is get the instrucion set for your LCD controller. Here is a link to the
HD44780..... try also looking for the specs on your LCD online... a google search will help you with something.
Well I hope it helps you some,
Good Luck
Ivancho