EasyManua.ls Logo

Holtek BS82B12A-3 - Compact T�Pe TM Ope�Ating Modes; Compa�E Match O�Tp�T Mode

Holtek BS82B12A-3
168 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.20 78 January 23, 2015 Rev. 1.20 79 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 Operating Modes
TheCompactTypeTMcanoperateinoneofthreeoperatingmodes,CompareMatchOutputMode,
PWMOutputModeorTimer/CounterMode.TheoperatingmodeisselectedusingtheCT0M1and
CT0M0bitsintheCTM0C1register.
Compare Match Output Mode
Toselectthismode,bitsCT0M1andCT0M0intheCTM0C1register,shouldbesetto00
respectively.Inthismodeoncethecounterisenabledandrunningitcanbeclearedbythree
methods.Theseareacounteroverow,acomparematchfromComparatorAandacomparematch
fromComparatorP.WhentheCT0CCLRbitislow,therearetwowaysinwhichthecountercanbe
cleared.OneiswhenacomparematchfromComparatorP,theotheriswhentheCCRPbitsareall
zerowhichallowsthecountertooverow.HerebothCTMA0FandCTMP0Finterruptrequestags
forComparatorAandComparatorPrespectively,willbothbegenerated.
IftheCT0CCLRbitintheCTM0C1registerishighthenthecounterwillbeclearedwhenacompare
matchoccursfromComparatorA.However,hereonlytheCTMA0Finterruptrequestagwillbe
generatedevenifthevalueoftheCCRPbitsislessthanthatoftheCCRAregisters.Thereforewhen
CT0CCLRishighnoCTMP0Finterruptrequestagwillbegenerated.IftheCCRAbitsareall
zero,thecounterwilloverowwhenitsreachesitsmaximum10-bit,3FFHex,value,howeverhere
theCTMA0Finterruptrequestagwillnotbegenerated.
Asthenameofthemodesuggests,afteracomparisonismade,theCTM0outputpinwillchange
state.TheCTM0outputpinconditionhoweveronlychangesstatewhenaCTMA0Finterrupt
requestagisgeneratedafteracomparematchoccursfromComparatorA.TheCTMP0Finterrupt
requestag,generatedfromacomparematchoccursfromComparatorP,willhavenoeffecton
theCTM0outputpin.ThewayinwhichtheCTM0outputpinchangesstatearedeterminedby
theconditionoftheCT0IO1andCT0IO0bitsintheCTM0C1register.TheCTM0outputpincan
beselectedusingtheCT0IO1andCT0IO0bitstogohigh,togolowortotogglefromitspresent
conditionwhenacomparematchoccursfromComparatorA.TheinitialconditionoftheCTM0
outputpin,whichissetupaftertheCT0ONbitchangesfromlowtohigh,issetupusingtheCT0OC
bit.NotethatiftheCT0IO1andCT0IO0bitsarezerothennopinchangewilltakeplace.

Table of Contents

Related product manuals