Timer2 in ATmega48 is set for interrupt every 5msec. Then I create 4 more timers using this interrupt, i.e. at 10ms (counts in r7),50ms (r8),100ms (r9),500ms(r10).
Step1: If main prgm request to use 10ms timer, my case structure do like this:
ldi Temp, 0x07 ;address to register r7 is 0x07 sts TimeUnit_reg, Temp ;store adress to register that holds the timer request ;in sram variabel
Step2: Turn on LED (Temp value*Timer Unit Request)