I guess my question is twofold. I have written a program for a phase and frequency correct timer1 with an ADC input from PA0 pin (attiny 261A). The single input 10 bit value is placed in OCR1C to change the top value which changes the frequency. I would like to then switch to another ADC potentiometer on PA1 and use it to change the OCR1D value which would change the value of the ON time (duty cycle).
Question 1.) in Free running mode do I need to use the ADC interrupt to read the value into the timer. Will the 10 bit value get jumbled up or will it get written before advancing to the next command? Should I put a delay between changing inputs so as to give it time to think....so to speak?
Question 2.) Can I switch from one ADC input to the other by just changing the value in ADMUX?
Thanks in advance for any help you can give.
Question 1.) in Free running mode do I need to use the ADC interrupt to read the value into the timer. Will the 10 bit value get jumbled up or will it get written before advancing to the next command? Should I put a delay between changing inputs so as to give it time to think....so to speak?
Question 2.) Can I switch from one ADC input to the other by just changing the value in ADMUX?
Thanks in advance for any help you can give.