Rev 169 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 169 | Rev 199 | ||
|---|---|---|---|
| Line 78... | Line 78... | ||
| 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 | sei(); |
| - | 83 | ||
| - | 84 | // set the clock speed to 8MHz |
|
| - | 85 | // set the clock prescaler. First write CLKPCE to enable setting of clock the |
|
| - | 86 | // next four instructions. |
|
| - | 87 | CLKPR=(1<<CLKPCE); |
|
| - | 88 | CLKPR=0; // 8 MHZ |
|
| 83 | 89 | ||
| 84 | printf( "\nDS18X20 1-Wire-Reader\n" ); |
90 | printf( "\nDS18X20 1-Wire-Reader\n" ); |
| 85 | printf( "-----------------------" ); |
91 | printf( "-----------------------" ); |
| 86 | nSensors = search_sensors(); |
92 | nSensors = search_sensors(); |
| 87 | printf( "%i DS18X20 Sensor(s) available:\n", (int) nSensors ); |
93 | printf( "%i DS18X20 Sensor(s) available:\n", (int) nSensors ); |