Main Page   Data Structures   File List   Data Fields   Globals  

conf/ks0108conf.h

Go to the documentation of this file.
00001 /*! \file ks0108conf.h \brief Graphic LCD driver configuration. */
00002 //*****************************************************************************
00003 //
00004 // File Name    : 'ks0108conf.h'
00005 // Title        : Graphic LCD driver for HD61202/KS0108 displays
00006 // Author       : Pascal Stang - Copyright (C) 2001-2002
00007 // Date         : 10/19/2001
00008 // Revised      : 5/30/2002
00009 // Version      : 0.5
00010 // Target MCU   : Atmel AVR
00011 // Editor Tabs  : 4
00012 //
00013 // NOTE: This code is currently below version 1.0, and therefore is considered
00014 // to be lacking in some functionality or documentation, or may not be fully
00015 // tested.  Nonetheless, you can expect most functions to work.
00016 //
00017 // This code is distributed under the GNU Public License
00018 //      which can be found at http://www.gnu.org/licenses/gpl.txt
00019 //
00020 //*****************************************************************************
00021 
00022 
00023 #ifndef KS0108CONF_H
00024 #define KS0108CONF_H
00025 
00026 // define LCD hardware interface
00027 // -LCD_MEMORY_INTERFACE assumes that the registers of the LCD have been mapped
00028 // into the external memory space of the AVR processor memory bus
00029 // -LCD_PORT_INTERFACE is a direct-connection interface from port pins to LCD
00030 // SELECT (UNCOMMENT) ONLY ONE!
00031 
00032 //#define LCD_MEMORY_INTERFACE
00033 #define LCD_PORT_INTERFACE
00034 
00035 // LCD_PORT_INTERFACE specifics
00036 #ifdef LCD_PORT_INTERFACE
00037     #ifndef LCD_CTRL_PORT
00038         #define LCD_CTRL_PORT   PORTB       // PORT for LCD control signals
00039         #define LCD_CTRL_DDR    DDRB        // DDR register of LCD_CTRL_PORT
00040         #define LCD_CTRL_RS     PB0     // pin for LCD Register Select
00041         #define LCD_CTRL_RW     PB1     // pin for LCD Read/Write
00042         #define LCD_CTRL_E      PB2     // pin for LCD Enable
00043         #define LCD_CTRL_CS0    PB3     // pin for LCD Cntrlr 0 Chip Select
00044         #define LCD_CTRL_CS1    PB4     // pin for LCD Cntrlr 1 Chip Select
00045         #define LCD_CTRL_RESET  PB5     // pin for LCD Reset
00046     #endif
00047     #ifndef LCD_DATA_PORT
00048         #define LCD_DATA_PORT   PORTC                   // PORT for LCD data signals
00049         #define LCD_DATA_DDR    DDRC        // DDR register of LCD_DATA_PORT
00050         #define LCD_DATA_PIN    PINC        // PIN register of LCD_DATA_PORT
00051     #endif
00052 #endif
00053 
00054 // LCD_MEMORY_INTERFACE specifics
00055 #ifdef LCD_MEMORY_INTERFACE
00056     #ifndef LCD_CTRL_ADDR
00057         #define LCD_CTRL_ADDR   0x1000  // absolute address of LCD Ctrl register
00058     #endif
00059     #ifndef LCD_DATA_ADDR
00060         #define LCD_DATA_ADDR   0x1001  // absolute address of LCD Data register
00061     #endif
00062 #endif
00063 
00064 
00065 // change these definitions to adapt settings
00066 #define LCD_LINES           8     // visible lines
00067 #define LCD_LINE_LENGTH    22     // internal line length
00068 
00069 #define LINE1       0
00070 #define LINE2       1
00071 #define LINE3       2
00072 #define LINE4       3
00073 #define LINE5       4
00074 #define LINE6       5
00075 #define LINE7       6
00076 #define LINE8       7
00077 
00078 // LCD geometry defines 
00079 #define GLCD_XPIXELS            128 // pixel width of entire display
00080 #define GLCD_YPIXELS            64      // pixel height of entire display
00081 #define GLCD_CONTROLLER_WIDTH   64      // pixel width of one display controller
00082 
00083 #endif

Generated on Tue Feb 4 20:18:36 2003 for Procyon AVRlib by doxygen1.3-rc2