diff --git a/tech/arduino_nano.wiki b/tech/arduino_nano.wiki index 5254c83..a1d9dac 100644 --- a/tech/arduino_nano.wiki +++ b/tech/arduino_nano.wiki @@ -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. +