I am nearly at the point of giving up! I had to write my code that was originally intended for a tiny261 for a tiny26 to simulate it and get the code right then alter the registers to compile it for the tiny261 because the 261 isn't simulated other than a power on reset and PORT i/o (almost) and now i have a problem with a Mega88, i don't like to blame the simulator especially in areas that are not in the bug list but it seems when i write code, my first instinct now is to jump through the simulator problem list rather than my code.
If the datasheet and my understanding is correct should generate an interrupt on ICRF when matched, i can't even get the timer to increment in the simulator
ldi r17,$3E ;load 16bit register ICR1 with timer top.
ldi r16,$20 ;set to compare match interrupt enable only
ldi r16,$00 ;set wgm to CTC mode
sts TCNT1H,r16 ;clear timer
ldi r16,$19 ;set WGM to CTC and clock on i/o clk
Can anyone point out errors in the above code and is there another simulator available for ATMEL chips that I can use?
John (got some hair left, just!)