Rev. 2.50 144 June 22, 2017 Rev. 2.50 145 June 22, 2017
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
Enhanced TM Operation
Atitscoreisa10-bitcount-up/count-downcounterwhichisdrivenbyauserselectableinternal
orexternalclocksource.Therearethreeinternalcomparatorswiththenames,ComparatorA,
ComparatorBandComparatorP.Thesecomparatorswillcomparethevalueinthecounterwiththe
CCRA,CCRBandCCRPregisters.TheCCRPcomparatoris3-bitswidewhosevalueiscompared
withthehighest3-bitsinthecounterwhileCCRAandCCRBare10-bitswideandtherefore
comparedwithallcounterbits.
Theonlywayofchangingthevalueofthe10-bitcounterusingtheapplicationprogram,isto
clearthecounterbychangingtheTnONbitfromlowtohigh.Thecounterwillalsobecleared
automaticallybyacounteroveroworacomparematchwithoneofitsassociatedcomparators.
Whentheseconditionsoccur,aTMinterruptsignalwillalsousuallybegenerated.TheEnhanced
TypeTMcanoperateinanumberofdifferentoperationalmodes,canbedrivenbydifferentclock
sourcesincludinganinputpinandcanalsocontroloutputpins.Alloperatingsetupconditionsare
selectedusingrelevantinternalregisters.
Enhanced Type TM Register Description
OveralloperationoftheEnhancedTMiscontrolledusingaseriesofregisters.Areadonlyregister
pairexiststostoretheinternalcounter10-bitvalue,whiletworead/writeregisterpairsexisttostore
theinternal10-bitCCRAandCCRBvalue.Theremainingthreeregistersarecontrolregisterswhich
setupthedifferentoperatingandcontrolmodesaswellasthethreeCCRPbits.
Register
Name
Bit
7 6 5 4 3 2 1 0
TM1C0 T1PAU T1CK2 T1CK1 T1CK0 T1ON T1RP2 T1RP1 T1RP0
TM1C1 T1AM1 T1AM0 T1AIO1 T1AIO0 T1AOC T1APOL T1CDN T1CCLR
TM1C2 T1BM1 T1BM0 T1BIO1 T1BIO0 T1BOC T1BPOL T1PWM1 T1PWM0
TM1DL D7 D6 D5 D4 D3 D2 D1 D0
TM1DH — — — — — — D9 D8
TM1AL D7 D6 D5 D4 D3 D2 D1 D0
TM1AH — — — — — — D9 D8
TM1BL D7 D6 D5 D4 D3 D2 D1 D0
TM1BH — — — — — — D9 D8
10-bit Enhanced TM Register List (if ETM is TM1)