0% found this document useful (0 votes)
34 views13 pages

Embedded Unit 3 Part 2

The document discusses different types of clock sources and timer modes for microcontrollers. It describes external oscillator signals from function generators, crystals, and RC oscillators as common clock sources. It also explains different timer modes like Clear Timer on Compare (CTC), Waveform Generation Modes (WGM), and how timer counter, output comparison, and control registers function in timing applications.

Uploaded by

Harsh Deshwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views13 pages

Embedded Unit 3 Part 2

The document discusses different types of clock sources and timer modes for microcontrollers. It describes external oscillator signals from function generators, crystals, and RC oscillators as common clock sources. It also explains different timer modes like Clear Timer on Compare (CTC), Waveform Generation Modes (WGM), and how timer counter, output comparison, and control registers function in timing applications.

Uploaded by

Harsh Deshwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Clock soucas

clock

Esaunal Btugal Gytbal L0v0-oeency


Cauyctal
Calibwcted
Rc
Rc clock

Jou oik CKSEL3 , CKSEL2


CKSELo CKSÉLI,
he CPU
h tih
chiß RC. ascillatos
ctenal
cytat oncl copacito t chb.
SatunalRc dntiunal
o|0 CKSEL
3.0Osillatox C7SEL30
R
unalRC Vee

NGAt2 RC
*TAL asctlator
3.-3.0-
0 8.0
(2.0O.9-3.0
0.9 DELTAPy No
Datef
Qhnatn

Moclas

Non i)
dimeniand tn
PWm
Phase Modes modylimusAVR
Nasmalhatio TO IimeeAVR
Value
Amega32,iehase
and
leLIet Mocdes
PWm
Mode Teae
outecam,
dLse
cam
PlaiM dins2
-
lount hase 8&t
’ acuu
DELTA Pg
No
Date/

andeset 3
times
ieg
delay
t
ocde
2utile Timul, n
at the
TYPESOFCLOCKSOURCES
EXTERNALOSCI
LLATORSI
GNALFROM FUNCTI
ONGENERATOR
I
NCASEOFCLKUSI NGCRYSTAL,THEFREQUENCYOFTHE
CRYSTALUSEDIS16MHD.THENOISEGENERATEDBECAUSE
OFHIGHFREQUENCYISBYPASSEDTOGNDTHROUGHTHE
CAPACITORS.
TCNT0-
TIMERCOUNTERREGI
STER(
FOREACHCOUNTED
CLOCKPULSE,
THEVALUEOFTHEREGISUPDATED)
OCRn-OUTPUTCOMPARI
SONREF(
USEDFORCTCANDOTHER
MODESOFTI MER)
TCCR-
TIMERCOUNTERCONTROLREGI
STER
TI
FR-TI
MERI
NTERRUPTFLAGREGI
STER.

DI
FFERENTMODESOFOPERATI
ON

TOV-
TIMEROVERFLOW FLAG

CTC-CLEARTI
MERONCOMPARISI
ON,OCR(O/PCOMPREF)
WILLHAVETHEVALUETOBECOMPARED.TCNTWILLCOUNT
THECLKANDGETUPDATED.ONCEI
TSVALUEMATCHEDWI
TH
OCR,
OCFBITOFFLAGREGI
STERWILLBESET.
WGM-
WAVEGENERATI
ONMODECONTROLBI
TS
01- NORMALMODE
02- CTC
10-
PHASECORRECT
11-
FASTPWM

EDGEDETECTORI
NPUTI
SEXTERNALSOURCETOCOUNT.
I
NTHI
STI
MER,
WGM HAS16MODESOFOPERATI
ON.

You might also like