Main.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00024 //revision number 01
00025     #define REVISION_H 0x30     // ASCII: 0
00026     #define REVISION_L 0x33     // ASCII: 3
00027 
00028 // Includes
00029     #include <inavr.h>
00030     #include <iom169.h>
00031 
00032 
00033 // Function declarations
00034     void Delay(int);                //standard delay-routine
00035     void Initialization(void);      //Initializate the different modules in the ATmega169(P)
00036     void OSCCAL_calibration(void);  //Calibrates the OSCCAL byte
00037 
00038 // Macro definitions
00039     #define sbi(port,bit)  (port |= (1<<bit))   //set bit in port
00040     #define cbi(port,bit)  (port &= ~(1<<bit))  //clear bit in port
00041 
00042     #define FALSE   0
00043     #define TRUE    1
00044 
00045 /************************************************************************************************
00046 *       Variables defined to SRAM locations
00047 *
00048 *   To avoid something else to overwrite these, the line "-Z(DATA)SAMPLE_CODE_REGISTERS=4F0-4FF"
00049 *   is added in the lnkm169s_AVR064.xcl include-file, and "-D_..X_RAMEND=4FF" ramend is set down to 0x4EF.
00050 ************************************************************************************************/
00051 #define CONTRAST            (*(unsigned char *) (0xE7))
00052 
00053 #define HOUR                (*(unsigned char *) (0x4F0))     // 01
00054 #define MINUTE              (*(unsigned char *) (0x4F1))     // 02
00055 #define SECOND              (*(unsigned char *) (0x4F2))     // 03
00056 #define DAY                 (*(unsigned char *) (0x4F3))     // 04
00057 #define MONTH               (*(unsigned char *) (0x4F4))     // 05
00058 #define YEAR_HI             (*(unsigned char *) (0x4F5))     // 06
00059 #define YEAR_LO             (*(unsigned char *) (0x4F6))     // 07
00060 #define SET_POINT           (*(unsigned char *) (0x4F7))     // 08
00061 #define TEMP_HIGHBYTE       (*(unsigned char *) (0x4F8))     // 09
00062 #define TEMP_LOWBYTE        (*(unsigned char *) (0x4F9))     // 10
00063 #define OFFSET              (*(unsigned char *) (0x4FA))     // 11
00064 
00065 #define Nr_of_hex_bytes_to_send 11     // number of hex-bytes to send in one packet
00066 
00067 

Generated on Fri Feb 17 12:28:30 2006 for AVR064: A Temperature Monitoring System with LCD Output by  doxygen 1.4.5