EasyManua.ls Logo

Holtek HT66F0175 - Timer Modules - TM; Introd�Ction; TM Operation

Default Icon
207 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rev. 1.50 70 August 28, 2017 Rev. 1.50 71 August 28, 2017
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
Timer Modules – TM
Oneofthemostfundamentalfunctionsinanymicrocontrollerdevicesistheabilitytocontroland
measuretime.ToimplementtimerelatedfunctionseachdeviceincludesseveralTimerModules,
generallyabbreviatedtothenameTM.TheTMsaremulti-purposetimingunitsandservetoprovide
operationssuchasTimer/Counter,InputCapture,CompareMatchOutputandSinglePulseOutput
aswellasbeingthefunctionalunitforthegenerationofPWMsignals.EachoftheTMshastwo
interrupts.TheadditionofinputandoutputpinsforeachTMensuresthatusersareprovidedwith
timingunitswithawideandexiblerangeoffeatures.
ThecommonfeaturesofthedifferentTMtypesaredescribedherewithmoredetailedinformation
providedintheindividualCompact,StandardandPeriodicTMsections.
Introduction
ThedevicescontaintwoorthreeTMsdependinguponwhichdeviceisselectedwitheachTM
havingareferencenameofTM0,TM1,andTM2.EachindividualTMcanbecategorisedasa
certaintype,namelyCompactTypeTM,StandardTypeTMorPeriodicTypeTM.Althoughsimilar
innature,thedifferentTMtypesvaryintheirfeaturecomplexity.Thecommonfeaturestoallofthe
Compact,StandardandPeriodicTMswillbedescribedinthissectionandthedetailedoperation
regardingeachoftheTMtypeswillbedescribedinseparatesections.Themainfeaturesand
differencesbetweenthethreetypesofTMsaresummarisedintheaccompanyingtable.
TM Function CTM STM PTM
Timer/Counter
Input Capture
Compare Match Output
PWM Channels 1 1 1
Single Pulse Output 1 1
PWM Alignment Edge Edge Edge
PWM Adjustment Period & Duty Duty or Period Duty or Period Duty or Period
TM Function Summary
EachdeviceintheseriescontainsaspecicnumberofeitherCompactType,StandardTypeand
PeriodicTypeTMunitswhichareshowninthetabletogetherwiththeirindividualreferencename,
TM0~TM2.
Device TM0 TM1 TM2
HT66F0175 10-bit PTM 10-bit PTM
HT66F0185 16-bit STM 10-bit PTM 16-bit CTM
TM Name/Type Reference
TM Operation
ThedifferenttypesofTMofferadiverserangeoffunctions,fromsimpletimingoperationstoPWM
signalgeneration.ThekeytounderstandinghowtheTMoperatesistoseeitintermsofafree
runningcount-upcounterwhosevalueisthencomparedwiththevalueofpre-programmedinternal
comparators.Whenthefreerunningcount-upcounterhasthesamevalueasthepre-programmed
comparator,knownasacomparematchsituation,aTMinterruptsignalwillbegeneratedwhich
canclearthecounterandperhapsalsochangetheconditionoftheTMoutputpin.TheinternalTM
counterisdrivenbyauserselectableclocksource,whichcanbeaninternalclockoranexternalpin.

Table of Contents