EE 316 Computer Engineering Junior Lab LCD modules
EE 316 Computer Engineering Junior Lab LCD modules, PROMs, Serial Ports Spring 2006 1
Topics Liquid Crystal Display Modules Eraseable Progrmmable ROMs Serial Ports Spring 2006 2
Liquid Crystal Display (LCD) modules Majority of the pixel-based alphanumeric LCD module uses the Hitachi HD 44780 LCD controller chip. Makers are: Densitron, Epson, Hewlett Packard, Optrex, or Sharp. Most have 16, 20, 24, 32, or 40 characters by 1, 2, or 4 lines. The LCD module we will use has a single line of 20 characters. Each character is made of 5 x 7 dot matrix For more info: http: //www. doc. ic. ac. uk/~ih/doc/lcd / Spring 2006 3
LCD Display To use these LCD module, you have follow the timing requirement very precisely. Pay attention to these times Spring 2006 Important times 4 http: //www. mil. ufl. edu/imdl/handouts/lcd-faq. htm
LCD Initialization Before you use the LCD, you need to initialize the LCD with a very precise sequence of instructions. Follow the intialization very accurately Need to generate a sequence of 8 -bit instructions with a minimum timing delay between two instructions each instruction requires multiple steps • raise the enable signal ‘E’, apply data or instruction, lower ‘E’, hold data or instruction You may store these values in a PROM and apply to the LCD with correct times between two instructions. Spring 2006 5
LCD Initialization Contd. In this example at the end of the initialization the LCD is asked to return cursor to the home postion and clear previous display. The LCD is then readied for display data (DD) input. The ASCII code for capital “D” is then sent to the LCD module Initialization ends here ASCII 0 x 44 = D Initialization begins here LCD is ready for Display data input Spring 2006 6
ASCII code Spring 2006 7
PROM Spring 2006 Read only memory 32 K x 8 bits or 64 K x 8 bits, etc. Erasable with UV exposure (15 -20 mins) For 32 K, 10 address Pins 8 data Pins Pin named Vpp used for progrmming Chip enable Read enable 8
Power-On Reset In most sequential circuits (i. e. , circuits that have FF, latch, or counters, memories), the initial state may not be known after the power is turned on. Use a RC circuit for the Reset or Clear the FFs. Choose the RC values for correct timing. Spring 2006 9
PC's Serial Ports PC's Serial port (RS-232 c interface) is also known as the communication (COM)port. ● The serial port transmits a byte of data by sending 8 bits separately. It adds a start bit, a stop bit and if desired, a parity bit. ● COM ports are bi-directional. Serial ports use a special controller chip known as the Universal Asynchronous Receiver/Transmitter (UART), to function correctly. ● Used to connect to Modems, some printers and digital cameras. ● Spring 2006 Ref: http: //computer. howstuffworks. com/serial-port. htm 10
PC's Serial Port, contd. Serial cables can be longer than parallel cables. ● The RS-232 c data uses -3 to -12 V to represent a 1 (called Mark) and +3 to +12 to represent a Logical '0' (called Space). ● Serial data must be converted to TTL/CMOS level for digital circuits. ● Spring 2006 http: //www. beyondlogic. org/serial 1. htm#40 11
PC's Serial Port, contd. One can use the RS-232 drivers and recievers to transform the RS-232 level to TTL/CMOS level. ● Spring 2006 http: //www. beyondlogic. org/serial 1. htm#40 12
UARTs Universal Asynchronous Receiver/Transmitter To use the serial data in digital applications, we need to convert the TTL/CMOS serial data into parallel data using UARTs. ➔ Popular UARTs: 16550, 16450 & 8250 series ➔ We will use a CMOS based UART: HD 6402. Read the data sheet carefully before using. ➔ UARTs use a clock with is 16 times the baud rate of the serial port. ➔ Spring 2006 13
UART Timing & Control Issues Spring 2006 14
Interfacing a digital system with a PC (another digital system) MAXIM 233 UART PC and its UART and level converter Spring 2006 15
References http: //www. doc. ic. ac. uk/~ih/doc/lcd/ http: //www. mil. ufl. edu/imdl/handouts/lcd-faq. htm http: //computer. howstuffworks. com/serial-port. htm http: //www. beyondlogic. org/serial 1. htm#40 Spring 2006 16
- Slides: 16