Subversion Repositories HomeAutomation

Rev

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

Rev 200 Rev 203
Line 28... Line 28...
28
 * Main Program
28
 * Main Program
29
 *---------------------------------------------------------------------------*/
29
 *---------------------------------------------------------------------------*/
30
int main(void) {
30
int main(void) {
31
    Timebase_Init();
31
    Timebase_Init();
32
    Serial_Init();
32
    Serial_Init();
33
    sei();
-
 
34
   
-
 
35
    #if defined(__AVR_ATmega88__)
33
    #if defined(__AVR_ATmega88__)
36
    // set the clock speed to 8MHz
34
    // set the clock speed to 8MHz
37
    // set the clock prescaler. First write CLKPCE to enable setting of clock the
35
    // set the clock prescaler. First write CLKPCE to enable setting of clock the
38
    // next four instructions.
36
    // next four instructions.
39
    CLKPR=(1<<CLKPCE);
37
    CLKPR=(1<<CLKPCE);
40
    CLKPR=0; // 8 MHZ
38
    CLKPR=0; // 8 MHZ
41
    #endif
39
    #endif
-
 
40
   
-
 
41
    sei();
42
   
42
   
43
    IRDDR &= ~(1<<IRBIT);
43
    IRDDR &= ~(1<<IRBIT);
44
   
44
   
45
    printf("\n------------------------------------------------------------\n");
45
    printf("\n------------------------------------------------------------\n");
46
    printf(  "   CAN Test: Periodic Transmission\n");
46
    printf(  "   CAN Test: Periodic Transmission\n");