Dear all,
Please find herebelow a bunch of Noob-baked questions, from a newcomer that want everything to be cristal clear before going on.
I want to do 16bits PWM audio output, using the Timer #1 to do so. First, I set the pin 6 as a PWM output. That's for the sketch setup.
Then, concerning the Timer Setup:
1 - Prescaler : This is the division ratio applied to the timer tick clock, right?
==> What I inderstand : timer.setPrescaleFactor(1) sets the Timer counting clock to 72Mhz? Or maybe the cristal 8Mhz?
2 - Overflow : This is the value at the one you overflow, or the salue that the counter is set to when it overflows?
==> What I understand : timer.setOverflow(65535) sets the counting to its full range, allowing the PWM to be operated in its full scale?
3 - Compare : is it this buffer, in PWM mode, that stores the value to be compared to for PWM output?
==> What I understand : timer.setChannel1Mode(TIMER_PWM)and timer.setCompare(TIMER_CH1, 32768) should generate a square wave at the output of pin 6 of the board?
Thanks in advance for your kind highlights on those foggy points (at least, to me...).
dapoup