Daryl's Computer Hobby Page
  Home     SBC Circuit Boards     SBC Software     I/O Devices     Windows 65C02 Simulator     Downloads     News, Events, & History  
  FAT16 IDE Interface     65SPI - SPI Controller Chip     PC keyboard interfaces     2-Way IR Communications     Displays     Device Programmers  
  LCD Text Display     Composite Video Text Display     Graphical LCD Display  


LCD Display (2x40, standard 14 pin LCD interface)

This is the basic wiring diagram for a standard HD44780 compatible LCD module.


    /--------- LCD Module Connection ---------\
     1  2  3  4  5  6  7  8  9  10 11 12 13 14  LCD pin numbers
     o  o  o  o  o  o  o  o  o  o  o  o  o  o
     |  |  |  |  |  |  |  |  |  |  |  |  |  |  
     -  +  C  RS RW E  D0 D1 D2 D3 D4 D5 D6 D7  LCD Pin names
     |  |  |  |  |  |  |  |  |  |  |  |  |  |  
     :  :  :  :  :  :  :  :  :  :  :  :  :  :  
     |  |  |  |  |  |  |  |  |  |  |  |  |  | 
     |  |  | B4 B5 B6 A0 A1 A2 A3 A4 A5 A6 A7   6522 IO Port names 
     |  |  |  |  |  |  |  |  |  |  |  |  |  | 
     |  |  |  o  o  o  o  o  o  o  o  o  o  o 
     |  |  | 14 15 16  2  3  4  5  6  7  8  9   6522 pin numbers
     |  |  | \------- 6522 Connections ------/ 
     |  |  | 
     |  |  \---| Contrast                    
     |  |      v                             
     |  o---\VVVVV/-\ 10K Ohm variable resistor  
     |  |           |                                             
     |  o +5vdc     |                                             
     |              |                                              
     o--------------/                                              
    _|_                                                       
     -                                                       
    gnd        

Home Top
Here is a list of the LCD software routines:

 
LCD_Byte  - Print contents of A as a 2 character HEX number
LCD_Chr   - Print contents of A as an ASCII chracter
LCD_Curs  - Set the Cursor Position from A (0-4F)
LCD_Home  - Move cursor to the home position without clearing display
LCD_Init  - Initialize the display
LCD_Wait  - Reads LCD command register and waits for it to be idle, returns
            with the address pointer (cursor position) in the A register.
LCD_Write - Strobes the Enable Pin and waits for the LCD to process the command.
            Uses LCD_Wait so cursor position is returned in A register.

You can download the source code under the Downloads tab.

All info provided "as-is" and is Copyright 2001.