Subversion Repositories HomeAutomation

Rev

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

Rev 199 Rev 202
Line 77... Line 77...
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
    Timebase_Init();
80
    Timebase_Init();
81
    Serial_Init();
81
    Serial_Init();
82
    sei();
82
    #if defined(__AVR_ATmega88__)
83
 
-
 
84
    // set the clock speed to 8MHz
83
    // set the clock speed to 8MHz
85
    // set the clock prescaler. First write CLKPCE to enable setting of clock the
84
    // set the clock prescaler. First write CLKPCE to enable setting of clock the
86
    // next four instructions.
85
    // next four instructions.
87
    CLKPR=(1<<CLKPCE);
86
    CLKPR=(1<<CLKPCE);
88
    CLKPR=0; // 8 MHZ
87
    CLKPR=0; // 8 MHZ
-
 
88
    #endif
-
 
89
   
-
 
90
    sei();
89
   
91
   
90
    printf( "\nDS18X20 1-Wire-Reader\n" );
92
    printf( "\nDS18X20 1-Wire-Reader\n" );
91
    printf( "-----------------------" );
93
    printf( "-----------------------" );
92
    nSensors = search_sensors();
94
    nSensors = search_sensors();
93
    printf( "%i DS18X20 Sensor(s) available:\n", (int) nSensors );
95
    printf( "%i DS18X20 Sensor(s) available:\n", (int) nSensors );