Subversion Repositories FlightCtrl

Rev

Rev 270 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 270 Rev 271
Line 88... Line 88...
88
    tim_main = SetDelay(10);
88
    tim_main = SetDelay(10);
89
    TCCR0B = CK8;
89
    TCCR0B = CK8;
90
    TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM
90
    TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM
91
    OCR0A =  0;
91
    OCR0A =  0;
92
    OCR0B = 120;
92
    OCR0B = 120;
93
    TCNT0 = -TIMER_RELOAD_VALUE;  // reload
93
    TCNT0 = (unsigned char)-TIMER_RELOAD_VALUE;  // reload
94
    //OCR1  = 0x00;
94
    //OCR1  = 0x00;
95
 
95
 
96
    TCCR2A=(1<<COM2A1)|(1<<COM2A0)|3;
96
    TCCR2A=(1<<COM2A1)|(1<<COM2A0)|3;
97
    TCCR2B=(0<<CS20)|(1<<CS21)|(1<<CS22);
97
    TCCR2B=(0<<CS20)|(1<<CS21)|(1<<CS22);
98
   
98