Rev. 1.20 84 January 23, 2015 Rev. 1.20 85 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
Periodic Type TM – PTM0
ThePeriodicTypeTMcontainsveoperatingmodes,whichareCompareMatchOutput,Timer/
EventCounter,CaptureInput,SinglePulseOutputandPWMOutputmodes.ThePeriodicTMcan
becontrolledwithoneexternalinputpinandcandrivetwoexternaloutputpins.
Periodic Type TM Block Diagram
Periodic TM Operation
Atthecoreisa10count-upcounterwhichisdrivenbyauserselectableinternalorexternalclock
source.Therearealsotwointernalcomparatorswiththenames,ComparatorAandComparator
P.ThesecomparatorswillcomparethevalueinthecounterwithCCRPandCCRAregisters.The
CCRPcomparatoris10-bitwide.
Theonlywayofchangingthevalueofthe10-bitcounterusingtheapplicationprogram,isto
clearthecounterbychangingthePT0ONbitfromlowtohigh.Thecounterwillalsobecleared
automaticallybyacounteroveroworacomparematchwithoneofitsassociatedcomparators.
Whentheseconditionsoccur,aPTM0interruptsignalwillalsousuallybegenerated.ThePeriodic
TypeTMcanoperateinanumberofdifferentoperationalmodes,canbedrivenbydifferentclock
sourcesincludinganinputpinandcanalsocontrolmorethanoneoutputpin.Alloperatingsetup
conditionsareselectedusingrelevantinternalregisters.