130 likes | 326 Views
LCD Lecture Part 1. Eric Chapman October 6, 2005. Overview What kind of LCD Interfacing the LCD Displaying Text and Numbers Common Issues. What kind of LCD??? Nokia and Motorola cell phones Fax machines and Printers Character or Graphic Hitachi HD44780.
E N D
LCD Lecture Part 1 Eric Chapman October 6, 2005
Overview • What kind of LCD • Interfacing the LCD • Displaying Text and Numbers • Common Issues
What kind of LCD??? • Nokia and Motorola cell phones • Fax machines and Printers • Character or Graphic • Hitachi HD44780 HD44780 Character Display Driver Takes in a parallel data stream and converts it to a character.
Interfacing the LCD ASCII characters(10 pins on chip) 8 Bit Data Connection 2 Control Pins 8 Data Pins 4 Power Supply Pins PINS GND 1Vcc 2Contrast 3RS 4R/W 5E 6D0 7D1 8D2 9D3 10D4 11D5 12D6 13D7 14 Power Supply Control Pins Data Pins
Control Lines • RS = Register Select • E = Clock Input • R/W = Ground (power supply line) ASCII characters(10 pins on chip) PINS GND 1Vcc 2Contrast 3RS 4R/W 5E 6D0 7D1 8D2 9D3 10D4 11D5 12D6 13D7 14 RS 0 for control codes 1 for display characters E 0 while sending cursor positioning code 1 while delivering character Power Supply Control Pins Data Pins
Example Send the letter V to the display and place it in the top center of a 2x8 character display. V PINS GND 1Vcc 2Contrast 3RS 4R/W 5E 6D0 7D1 8D2 9D3 10D4 11D5 12D6 13D7 14 Cursor Position Codes #$80 #$81 #$82 #$83 #$84 #$85 #$86 #$87 #$88 #$C0 #$C1 #$C2 #$C3 #$C4 #$C5 #$C6 #$C7 #$C8
Example Send the letter V to the display and place it in the top center of a 2x8 character display. V PINS GND 1Vcc 2Contrast 3RS 4R/W 5E 6D0 7D1 8D2 9D3 10D4 11D5 12D6 13D7 14 Step 1 Drive RS pin low Step 2 Send position code #$83 Step 3 Drive RS pin high Step 4 Drive E pin high Step 5 Load ASCII “V” in to the port ASCII “V” = #$56 = 01010110 Step 6 Drive E pin low Tells display to accept byte Control Pins Data Pins
Interfacing the LCD ASCII characters(6 pins on chip) 4 Bit Data Connection 2 Control Pins 4 Data Pins 4 Power Supply Pins PINS GND 1Vcc 2Contrast 3RS 4R/W 5E 6D0 7D1 8D2 9D3 10D4 11D5 12D6 13D7 14 Power Supply Control Pins Data Pins
Example V Step 1 Drive RS pin low Step 2 Send position code #$83 Step 3 Drive RS pin high Step 4 Drive E pin high Step 5 Load high nibble in to the port ASCII “V” = #$5 = 0101 Step 6 Drive E pin low Tells display to accept byte Step 7 Drive E pin high Step 7 Load low nibble in to the port ASCII “V” = #$6 = 0110 Step 6 Drive E pin low Tells display to accept byte PINS GND 1Vcc 2Contrast 3RS 4R/W 5E 6D0 7D1 8D2 9D3 10D4 11D5 12D6 13D7 14 Control Pins Data Pins
Shift Registers • Save I/O pins on micro processor • Requires more effort to stream out data
How do you display numbers??? • What is the ASCII code for Decimal 75?
How do you display numbers??? • What is the ASCII code for Decimal 75? The Decimal value must be broken down in to single digits that represent the 100’s, 10’s and 1’s.
How do you display numbers??? • What is the ASCII code for Decimal 75? The Decimal value must be broken down in to single digits that represent the 100’s, 10’s and 1’s. Binary Coded Decimal conversion