Sending Data and Commands
Sending Data and Commands
Sending Data and Commands
a backlight. The circuit diagram below shows the LCD module with the basic "plumbing" wired up. You will notice that pin 5 (RW) is tied to ground. This pin is use to control whether you are reading or writing to the display. Since reading from the display is very rare, most people just tie this pin to ground. The potentiometer connected to pin 3 controls the LCD contrast.
Sending Data and Commands Data and commands are sent to the module using the 8 data lines (pins 7-14) and the RS line (pin 4). The RS lines tells the module whether the 8 data bits relate to data or a command. The data/command is read on the falling edge of the enable line (pin 6). This means that when enable transitions from high to low, the values of D0 to D7 and RS are read. So to send data or a command to the display, you need to 1. Set Enable to high 2. Set RS and D0-D7 desired values 3. Set Enable to low There are minimum wait times between these operations, but I won't go into them here. You can look these up in the LCD Module Datasheet. (look at the timing diagrams on page 4)
HD44780 based display modules also have a 4 bit interface mode. Under this mode the data or command is transferred to the module using 2, 4 bit nibbles.
Type: Character Display format: 16 x 1 characters Built-in controller: KS 0066 (or equivalent) Duty cycle: 1/16 5 x 8 dots includes cursor + 5 V power supply (also available for + 3 V) LED can be driven by pin 1, pin 2, pin 15, pin 16, or A and K N.V. optional for + 3 V power supply Compliant to RoHS directive 2002/95/EC
VCC,VSS,VEE: While Vcc and Vss provide +5V and ground , respectively, Vee is used for controlling LCD contrast RS , register select: There are two very important registers inside the LCD.The RS pin is used for their selection as follows.If RS = 0,the instruction command code register is selected, allowing the user to send a command such as clear display,cursor at home,etc.If RS=1 the data register is selected ,allowing the user to send data to be displayed on the LCD. .
dspace.unimap.edu.my/dspace/bitstream/123456789/3115/.../Conclusion.p..