00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KS0108CONF_H
00024 #define KS0108CONF_H
00025
00026
00027
00028
00029
00030
00031
00032
00033 #define LCD_PORT_INTERFACE
00034
00035
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
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
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
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