Rev. 1.20
86
�an�a�� 2�� 201�
Rev. 1.20
87
�an�a�� 2�� 201�
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
:
PTM
0 Counter On/Off Control
0: Off
1: On
This bit controls the overall on/off function of the
PTM
0. Setting the bit high enables
the counter to run, clearing the bit disables the
PTM
0. Clearing this bit to zero will
stop the counter from counting and turn off the
PTM
0 which 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
PTM
0 is in the Compare Match Output Mode, PWM output Mode or Single
Pulse Output Mode then the
P
TM output pin will be reset to its initial condition, as
specified by the PT0OC bit, when the
PT
0ON 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
PTM
0 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
PTM
0. To ensure reliable
operation the
PTM
0 should be switched off before any changes are made to the bits. In
the Timer/Counter Mode, the
PTM
0 output pin state is undefined
.
Bit 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
PTM
0 output pin changes state when a
certain condition is reached. The function that these bits select depends upon in which
mode the
PTM
0 is running.
Содержание BS82B12A-3
Страница 33: ...Rev 1 20 33 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...
Страница 34: ...Rev 1 20 34 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...
Страница 35: ...Rev 1 20 35 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...