Rev 39 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 39 | Rev 127 | ||
---|---|---|---|
Line 68... | Line 68... | ||
68 | tim_main = SetDelay(10); |
68 | tim_main = SetDelay(10); |
69 | TCCR0B = CK8; |
69 | TCCR0B = CK8; |
70 | TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM |
70 | TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM |
71 | OCR0A = 0; |
71 | OCR0A = 0; |
72 | OCR0B = 120; |
72 | OCR0B = 120; |
73 | TCNT0 = (unsigned char)-TIMER_RELOAD_VALUE; // reload |
73 | TCNT0 = -TIMER_RELOAD_VALUE; // reload |
74 | //OCR1 = 0x00; |
74 | //OCR1 = 0x00; |
Line 75... | Line 75... | ||
75 | 75 | ||
76 | TCCR2A=(1<<COM2A1)|(1<<COM2A0)|3; |
76 | TCCR2A=(1<<COM2A1)|(1<<COM2A0)|3; |
Line 77... | Line 77... | ||
77 | TCCR2B=(0<<CS20)|(1<<CS21)|(1<<CS22); |
77 | TCCR2B=(0<<CS20)|(1<<CS21)|(1<<CS22); |
78 | 78 | ||
Line 79... | Line 79... | ||
79 | // TIMSK2 |= _BV(TOIE2); |
79 | // TIMSK2 |= _BV(TOIE2); |
80 | TIMSK2 |= _BV(OCIE2A); |
80 | TIMSK2 |= _BV(OCIE2A); |
81 | 81 |