Rev. 1.20 74 January 23, 2015 Rev. 1.20 75 January 23, 2015
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
Compact Type TM – CTM0
AlthoughthesimplestformofthetwoTMtypes,theCompactTMtypestillcontainsthreeoperating
modes,whichareCompareMatchOutput,Timer/EventCounterandPWMOutputmodes.The
CompactTMcanalsobecontrolledwithanexternalinputpinandcandrivetwoexternaloutput
pins.
Compact Type TM Block Diagram
Compact TM Operation
Atitscoreisa10-bitcount-upcounterwhichisdrivenbyauserselectableinternalorexternalclock
source.Therearealsotwointernalcomparatorswiththenames,ComparatorAandComparator
P.ThesecomparatorswillcomparethevalueinthecounterwithCCRPandCCRAregisters.The
CCRPisthreebitswidewhosevalueiscomparedwiththehighestthreebitsinthecounterwhilethe
CCRAisthetenbitsandthereforecompareswithallcounterbits.
Theonlywayofchangingthevalueofthe10-bitcounterusingtheapplicationprogram,isto
clearthecounterbychangingtheCT0ONbitfromlowtohigh.Thecounterwillalsobecleared
automaticallybyacounteroveroworacomparematchwithoneofitsassociatedcomparators.
Whentheseconditionsoccur,aCTM0interruptsignalwillalsousuallybegenerated.TheCompact
TypeTMcanoperateinanumberofdifferentoperationalmodes,canbedrivenbydifferentclock
sourcesincludinganinputpinandcanalsocontroloneoutputpin.Alloperatingsetupconditions
areselectedusingrelevantinternalregisters.