stk504_lcd.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00024 /**************************************************************/
00025 // Definitions
00026 /**************************************************************/
00027 #define LCD_INITIAL_CONTRAST    0x0F            // Valid range [0x00 .. 0x0F]
00028 #define LCD_REGISTER_COUNT              20                      
00029 #define LCD_TIMER_SEED                  5
00030 
00031 // Useful LCD segment (symbol) definitions
00032 // Symbol format = bbbnnnnn where b is bit[0..7] and n is offset in IO map[0..20]
00033 #define MO          0x60
00034 #define TU          0xE0
00035 #define WE          0x61
00036 #define TH          0xE1
00037 #define FR          0x62
00038 #define SA          0xE2
00039 #define SU          0x63
00040 
00041 #define MO_         0x40
00042 #define TU_         0xC0
00043 #define WE_         0x41
00044 #define TH_         0xC1
00045 #define FR_         0x42
00046 #define SA_         0xC2
00047 #define SU_         0x43
00048 
00049 #define BC8         0x51
00050 #define G8          0xD0
00051 
00052 #define segIN       0x50
00053 #define segOUT      0xC4
00054 #define AVR         0xF2
00055 #define BELL        0x4F
00056 #define WARNING     0xCF
00057 #define SG0         0xE3
00058 #define SG1         0xE8
00059 #define SG2         0xED
00060 #define KEY         0x52
00061 #define WARM        0xD1
00062 #define ICE         0x04
00063 #define COL         0x44
00064 #define DOT         0x84  // P in the LCD segment mapping table
00065 
00066 #define S0          0x83
00067 #define S1          0xC3
00068 #define S2          0xA3
00069 #define S3          0xC8
00070 #define S4          0xA8
00071 #define S5          0xCD
00072 #define S6          0xAD
00073 #define S7          0xD2
00074 #define S8          0xB2
00075 #define S9          0x92
00076 #define S10         0x8D
00077 #define S11         0x88
00078 
00079 /**************************************************************/
00080 //MACROS
00081 /**************************************************************/
00082 #define pLCDREG (*(unsigned char *)(0xEC))                // DEVICE SPECIFIC!!! (ATmega3290)
00083 #define LCD_CONTRAST_LEVEL(level) LCDCCR=(0x0F & level);  // DEVICE SPECIFIC!!! (ATmega3290)
00084 
00085 /**************************************************************/
00086 // Global functions
00087 /**************************************************************/
00088 void LCD_init( void );
00089 void LCD_AllSegments( unsigned char input );                                            
00090 void LCD_Update( void );
00091 void LCD_BarSeg ( unsigned char value );
00092 void LCD_PutChar( unsigned char c, unsigned char digit );
00093 void LCD_PutDigit( unsigned char c, unsigned char digit );
00094 void LCD_SetSeg( unsigned char symbol, unsigned char val );
00095 
00096 /**************************************************************/
00097 // Global variables
00098 /**************************************************************/
00099 union _LCD_status{
00100   unsigned char allFields;
00101   struct{
00102     unsigned char updateRequired : 1; //Indicates that the LCD_displayData should be latched to the LCD Data Regs
00103                                       // Can be used to block LCD updating, while updating LCD_displayData.
00104     unsigned char updateComplete : 1; //Indicates that the LCD_displayData has been latched to the LCD Data Regs
00105                                       // Can be used to determine if LCD_displayData is ready for new data.
00106     unsigned char unused : 6;
00107   };
00108 };
00109 volatile extern union _LCD_status LCD_status;
00110 
00111 extern unsigned char LCD_timer;           //Determine the delay to next LCD update
00112 extern unsigned char LCD_displayData[LCD_REGISTER_COUNT];

Generated on Fri Feb 17 11:16:38 2006 for AVR063 LCD Driver for the STK504 by  doxygen 1.4.5