I have a strange situation here with my atmega32.
I need to set timer1 to output clocks on both pins OC1A and OC1B. I need OC1A to be toggled in normal mode, while OC1B should be toggled by CTC mode.
On OC1B I need no interrupt. It just generates clock signal and makes no change on the program.
The two clock signals must have different frequencies so I have to use OCR1A and OCR1B registers.
This is how I set the timer:
//the fastest freq needed on OC1B
Actually I get both clocks but the rest of my program breaks down. With my debugger I can see some variables taking wrong values so I thought an interrupt was needed for comparing to OCR1B. I placed the ISR but no change.
I found out that the clock on OC1B varies by changing the values in OCR1A.
How can I make TCNT1 compare to OCR1B?