#include "scroll_text.h" #include #include "scan_led.h" unsigned char start_col=0; void init_timer1() { TCCR1A = 0x00; TCCR1B = 0x4C; OCR1AH = 0x3D; // 0x3D09 = 15625 ticks * 256 = 4000000 ticks per interrupt (1/2 second) OCR1AL = 0x09; // TIMSK |= 0x40; } unsigned char get_start_col() { return start_col; } ISR(TIMER1_COMPA_vect){ start_col++; if(start_col == COLS) start_col=0; }