Subversion Repositories HomeAutomation

Rev

Rev 202 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 202 Rev 221
Line 75... Line 75...
75
 *---------------------------------------------------------------------------*/
75
 *---------------------------------------------------------------------------*/
76
int main(void) {
76
int main(void) {
77
    uint8_t nSensors, i;
77
    uint8_t nSensors, i;
78
    uint8_t subzero, cel, cel_frac_bits;
78
    uint8_t subzero, cel, cel_frac_bits;
79
   
79
   
-
 
80
    Mcu_Init();
80
    Timebase_Init();
81
    Timebase_Init();
81
    Serial_Init();
82
    Serial_Init();
82
    #if defined(__AVR_ATmega88__)
-
 
83
    // set the clock speed to 8MHz
-
 
84
    // set the clock prescaler. First write CLKPCE to enable setting of clock the
-
 
85
    // next four instructions.
-
 
86
    CLKPR=(1<<CLKPCE);
-
 
87
    CLKPR=0; // 8 MHZ
-
 
88
    #endif
-
 
89
   
83
   
90
    sei();
84
    sei();
91
   
85
   
92
    printf( "\nDS18X20 1-Wire-Reader\n" );
86
    printf( "\nDS18X20 1-Wire-Reader\n" );
93
    printf( "-----------------------" );
87
    printf( "-----------------------" );