EasyManua.ls Logo

Holtek BS82B12A-3 - Page 87

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 86 January 23, 2015 Rev. 1.20 87 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
Bit3 PT0ON:PTM0CounterOn/OffControl
0:Off
1:On
Thisbitcontrolstheoverallon/offfunctionofthePTM0.Settingthebithighenables
thecountertorun,clearingthebitdisablesthePTM0.Clearingthisbittozerowill
stopthecounterfromcountingandturnofftheP TM 0whichwillreduceitspower
consumption.Whenthebitchangesstatefromlowtohightheinternalcountervalue
willberesettozero,howeverwhenthebitchangesfromhightolow,theinternal
counterwillretainitsresidualvalueuntilthebitreturnshighagain.
IfthePTM0isintheCompareMatchOutputMode,PWMoutputModeorSingle
PulseOutputModethenthePTMoutputpinwillberesettoitsinitialcondition,as
speciedbythePT0OCbit,whenthePT0ONbitchangesfromlowtohigh.
Bit2~0 Unimplemented,readas"0"
PTM0C1 Register
Bit 7 6 5 4 3 2 1 0
Name PT0M1 PT0M0 PT0IO1 PT0IO0 PT0OC PT0POL PT0CKS PT0CCLR
R/W R/W R/W R/W R/W R/W R/W R/W R/W
POR 0 0 0 0 0 0 0 0
Bit7~6 PT0M1~PT0M0:SelectPTM0OperatingMode
00:CompareMatchOutputMode
01:CaptureInputMode
10:PWMModeorSinglePulseOutputMode
11:Timer/CounterMode
ThesebitssetuptherequiredoperatingmodeforthePTM0.Toensurereliable
operationthePTM0shouldbeswitchedoffbeforeanychangesaremadetothebits.In
theTimer/CounterMode,thePTM0outputpinstateisundened.
B
it5~4 PT0IO1~PT0IO0:SelectTP1outputfunction
CompareMatchOutputMode
00:Nochange
01:Outputlow
10:Outputhigh
11:Toggleoutput
PWMMode/SinglePulseOutputMode
00:PWMoutputinactivestate
01:PWMoutputactivestate
10:PWMoutput
11:Singlepulseoutput
CaptureInputMode
00:InputcaptureatrisingedgeofTP1_0,TP1_1orTCK1
01:InputcaptureatfallingedgeofTP1_0,TP1_1orTCK1
10:Inputcaptureatfalling/risingedgeofTP1_0,TP1_1orTCK1
11:Inputcapturedisabled
Timer/counterMode:
Unused
ThesetwobitsareusedtodeterminehowthePTM0outputpinchangesstatewhena
certainconditionisreached.Thefunctionthatthesebitsselectdependsuponinwhich
modethePTM0isrunning.

Table of Contents

Related product manuals