Rev. 1.71 68 April 11, 2017 Rev. 1.71 69 April 11, 2017
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
Standard Type TM – STM
TheStandardTypeTMcontainsveoperatingmodes,whichareCompareMatchOutput,Timer/
EventCounter,CaptureInput,SinglePulseOutputandPWMOutputmodes.TheStandardTMcan
becontrolledwithtwoexternalinputpinsandcandrivetwoexternaloutputpins.
Device TM Type TM Name TM Input Pin TM Output Pin
HT66F002
HT66F0025
HT66F003
10-bit STM STM STCK0, STP0I STP0, STP0B
Standard Type TM Block Diagram
Standard TM Operation
Atitscoreisa10-bitcount-upcounterwhichisdrivenbyauserselectableinternalclocksource.
Therearealsotwointernalcomparatorswiththenames,ComparatorAandComparatorP.These
comparatorswillcomparethevalueinthecounterwithCCRPandCCRAregisters.TheCCRPis3-bit
widewhosevalueiscomparedwiththehighest3bitsinthecounterwhiletheCCRAisthe10bits
andthereforecompareswithallcounterbits.
Theonlywayofchangingthevalueofthe10-bitcounterusingtheapplicationprogram,isto
clearthecounterbychangingtheST0ONbitfromlowtohigh.Thecounterwillalsobecleared
automaticallybyacounteroveroworacomparematchwithoneofitsassociatedcomparators.
Whentheseconditionsoccur,aTMinterruptsignalwillalsousuallybegenerated.TheStandard
TypeTMcanoperateinanumberofdifferentoperationalmodes,canbedrivenbydifferentclock
sourcesandcanalsocontrolanoutputpin.Alloperatingsetupconditionsareselectedusingrelevant
internalregisters.