Update for 03-11-21 16:15

This commit is contained in:
Tyler Perkins 2021-11-03 16:15:01 -04:00
parent 1bf25e48d5
commit b627ba15e0

View File

@ -191,3 +191,15 @@ set when The input capture set by WGM to be used as the TOP value. Bits 2-0 are
set when TCNT1 matches the value in OCR1B, OCR1A, when when TCNT1 overflows,
respectivly.
To make the clock useful, the following will be an example of how to use Timer
1 to delay a certain amount of time. You will need the following information
* CPU freq (16MHz)
* Max timer value (0xFFFF or 65536)
* Chosen Prescaler (See above for prescaler values)
Divide the CPU freq by the chosen prescaler. Then divide that result through
the desired freqency. Be sure that the value is smaller than the max timer
value. If it is to large, choose a larger prescaler. Then place this in the
OCR** Register and enable the desired interrupt.