From b627ba15e017e93d700100cb13a988e0b707c65b Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Wed, 3 Nov 2021 16:15:01 -0400 Subject: [PATCH] Update for 03-11-21 16:15 --- tech/arduino_nano.wiki | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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. +