Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

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-2003
00007 // Date         : 10/19/2001
00008 // Revised      : 5/1/2003
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 // *** NOTE: memory interface is not yet fully supported, but it might work
00033 
00034 //#define GLCD_MEMORY_INTERFACE
00035 #define GLCD_PORT_INTERFACE
00036 
00037 // GLCD_PORT_INTERFACE specifics
00038 #ifdef GLCD_PORT_INTERFACE
00039     // make sure these parameters are not already defined elsewhere
00040     #ifndef GLCD_CTRL_PORT
00041         #define GLCD_CTRL_PORT  PORTB   // PORT for LCD control signals
00042         #define GLCD_CTRL_DDR   DDRB    // DDR register of LCD_CTRL_PORT
00043         #define GLCD_CTRL_RS    PB0     // pin for LCD Register Select
00044         #define GLCD_CTRL_RW    PB1     // pin for LCD Read/Write
00045         #define GLCD_CTRL_E     PB2     // pin for LCD Enable
00046         #define GLCD_CTRL_CS0   PB3     // pin for LCD Controller 0 Chip Select
00047         #define GLCD_CTRL_CS1   PB4     // pin for LCD Controller 1 Chip Select(*)
00048         #define GLCD_CTRL_CS2   PB6     // pin for LCD Controller 2 Chip Select(*)
00049         #define GLCD_CTRL_CS3   PB7     // pin for LCD Controller 3 Chip Select(*)
00050         #define GLCD_CTRL_RESET PB5     // pin for LCD Reset
00051         // (*) NOTE: additonal controller chip selects are optional and 
00052         // will be automatically used per each step in 64 pixels of display size
00053         // Example: Display with 128 hozizontal pixels uses 2 controllers
00054     #endif
00055     #ifndef GLCD_DATA_PORT
00056         #define GLCD_DATA_PORT  PORTC   // PORT for LCD data signals
00057         #define GLCD_DATA_DDR   DDRC    // DDR register of LCD_DATA_PORT
00058         #define GLCD_DATA_PIN   PINC    // PIN register of LCD_DATA_PORT
00059     #endif
00060 #endif
00061 
00062 // GLCD_MEMORY_INTERFACE specifics
00063 #ifdef GLCD_MEMORY_INTERFACE
00064     // make sure these parameters are not already defined elsewhere
00065     #ifndef GLCD_CONTROLLER0_CTRL_ADDR
00066         // absolute address of LCD Controller #0 CTRL and DATA registers
00067         #define GLCD_CONTROLLER0_CTRL_ADDR  0x1000
00068         #define GLCD_CONTROLLER0_DATA_ADDR  0x1001
00069         // offset of other controllers with respect to controller0
00070         #define GLCD_CONTROLLER_ADDR_OFFSET 0x0002
00071     #endif
00072 #endif
00073 
00074 
00075 // LCD geometry defines (change these definitions to adapt code/settings)
00076 #define GLCD_XPIXELS            128     // pixel width of entire display
00077 #define GLCD_YPIXELS            64      // pixel height of entire display
00078 #define GLCD_CONTROLLER_XPIXELS 64      // pixel width of one display controller
00079 
00080 // Set text size of display
00081 // These definitions are not currently used and will probably move to glcd.h
00082 #define GLCD_TEXT_LINES           8     // visible lines
00083 #define GLCD_TEXT_LINE_LENGTH    22     // internal line length
00084 
00085 #endif

Generated on Sun Oct 29 03:41:06 2006 for Procyon AVRlib by  doxygen 1.4.2