Subversion Repositories FlightCtrl

Rev

Rev 173 | Rev 296 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 173 Rev 188
Line 91... Line 91...
91
int main (void)
91
int main (void)
92
//############################################################################
92
//############################################################################
93
{
93
{
94
        unsigned int timer;
94
        unsigned int timer;
95
        unsigned int timer2 = 0;
95
        unsigned int timer2 = 0;
-
 
96
    DDRB  = 0x00;
-
 
97
    PORTB = 0x00;
-
 
98
    for(timer = 0; timer < 1000; timer++); // verzögern
96
    if(PINB & 0x01) PlatinenVersion = 11; else PlatinenVersion = 10;
99
    if(PINB & 0x01) PlatinenVersion = 11; else PlatinenVersion = 10;
97
    DDRC  = 0x81; // SCL
100
    DDRC  = 0x81; // SCL
98
    PORTC = 0xff; // Pullup SDA
101
    PORTC = 0xff; // Pullup SDA
99
    DDRB  = 0x1B; // LEDs und Druckoffset
102
    DDRB  = 0x1B; // LEDs und Druckoffset
100
    PORTB = 0x01; // LED_Rot
103
    PORTB = 0x01; // LED_Rot
101
    DDRD  = 0x3E; // Speaker & TXD & J3 J4 J5
104
    DDRD  = 0x3E; // Speaker & TXD & J3 J4 J5
102
    DDRD  |=0x80; // J7
105
    DDRD  |=0x80; // J7
Line 103... Line 106...
103
   
106
   
104
        PORTD = 0xF7; // LED
107
        PORTD = 0xF7; // LED
Line 105... Line 108...
105
 
108
 
106
   
109
   
107
    MCUSR &=~(1<<WDRF);
110
    MCUSR &=~(1<<WDRF);