00001 /* This file has been prepared for Doxygen automatic documentation generation.*/ 00025 /**************************************************************/ 00026 // Definitions 00027 /**************************************************************/ 00028 #define LCD_INITIAL_CONTRAST 0x0F 00029 #define LCD_TIMER_SEED 15 00030 #define LCD_REGISTER_COUNT 20 00031 00032 /**************************************************************/ 00033 //MACROS 00034 /**************************************************************/ 00035 #define LCD_SET_COLON(active) LCD_displayData[8]=active; //active =[TRUE;FALSE] 00036 #define pLCDREG (*(unsigned char *)(0xEC)) // DEVICE SPECIFIC!!! (ATmega169) 00037 #define LCD_CONTRAST_LEVEL(level) LCDCCR=(0x0F & level); // DEVICE SPECIFIC!!! (ATmega169) 00038 00039 /**************************************************************/ 00040 // Global functions 00041 /**************************************************************/ 00042 void LCD_Init (void); 00043 void LCD_WriteDigit(unsigned char input, unsigned char digit); 00044 void LCD_AllSegments(unsigned char); 00045 00046 /**************************************************************/ 00047 // Global variables 00048 /**************************************************************/ 00049 union _LCD_status{ 00050 unsigned char allFields; 00051 struct{ 00052 volatile unsigned char updateRequired : 1; //Indicates that the LCD_displayData should be latched to the LCD Data Regs 00053 // Can be used to block LCD updating, while updating LCD_displayData. 00054 volatile unsigned char updateComplete : 1; //Indicates that the LCD_displayData has been latched to the LCD Data Regs 00055 // Can be used to determine if LCD_displayData is ready for new data. 00056 volatile unsigned char blinkLCD : 1; //Indicates whether the actual LCD-digit should blink or not 00057 // Added to the LCD_driver.h due to the application note AVR064 00058 00059 unsigned char unused : 5; 00060 }; 00061 }; 00062 extern union _LCD_status LCD_status; 00063 00064 extern unsigned char LCD_displayData[LCD_REGISTER_COUNT];
1.4.5