Temperature.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00024 // Function declarations
00025     void ADC_init (unsigned char);          //initialize the ADC
00026     void PWM_init (void);                //initialize Timer Counter 1
00027     void ADC_conversion (void);             //do a ADC_conversion, either differential or single-ended
00028     void Temp_calculation (int);            //calculate the temperature from the ADC-measurement
00029     void Temperature_regulation (void);     //"regulate" the temperature by setting heating or cooling LED/pin
00030 
00031 
00032 
00033 /************************************************************************
00034 *
00035 *                 Vref = 1.263V
00036 *                 _____
00037 *                   |
00038 *                   |
00039 *                 -----
00040 *                 |   |
00041 *                 |   |  R_1 = 10 Kohm
00042 *                 |   |
00043 *                 -----
00044 *                   |
00045 *                   |---------------------X    ADC channel #0
00046 *                   |
00047 *                 -----
00048 *                 |   |
00049 *                 |   |  R_NTC = ? ohm   (10Kohm @ 25 degree celcius)
00050 *                 |   |
00051 *                 -----
00052 *                   |
00053 *                   |---------------------X    ADC channel #1
00054 *                   |
00055 *                   |
00056 *                  ---
00057 *                   -
00058 *                  GND
00059 *
00060 ************************************************************************/
00061 
00062 // Defines
00063     #define V_ref           1.263       // voltage-reference
00064 
00065 // NTC-thermistor defines
00066     #define Beta            3450.000    // the Beta-value for the NTC transitor
00067     #define R_th            10000.00    // the thermistor resistans @ 25 degree Celsius
00068     #define T_amb           298.0000    // the temperature in Kelvin for 25 degree Celsius
00069     #define T_zero          273.0000    // the temperature in Kelvin for 0 degree Celsius
00070 
00071 
00072     #define SingleEnded     0x00
00073     #define Differential    0x10
00074     #define Heater          0x7F
00075     #define Cooler          0xEF
00076 
00077 
00078 

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