Прошу помочь свежим взглядом:
cli();
// Anods on portD DDRD = (1<<4) | (1<<5) | (1<<2) | (1<<3); PORTD = 0x00;
DDRC = 0xFF; // PORTC needs to be inverted due to hardware PORTC = 0xFF;
// init timer0 for LED display *************** // bout 200 times a second, don't miss a blink OCR0 = 77; TCCR0 = (1 << WGM01) | (0 << WGM00) | (1 << CS02) | (0 << CS01) | (0 << CS00); TIMSK |= (1 << TOV0);
// enable interrupts, what else?... sei();
while(1) { mycounter=0; while(1) {
// LED segments showing only when razvertka() is uncommented //razvertka(); Show(mycounter++); if (mycounter>9999) { mycounter=0; } _delay_ms(1000); } } }
razvertka() это тоже что и ISR(SIG_OVERFLOW0) {}
Диоды не загораются по прерыванию, только напрямую, не понимаю почему нет SIG_OVERFLOW0 (в железе тоже нет)
|