Rev. 1.20
88
�an�a�� 2�� 201�
Rev. 1.20
89
�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
In the Compare Match Output Mode, the
PT
0IO1
~PT
0IO0 bits determine how the
PTM
0 output pin changes state when a compare match occurs from the Comparator
A. The
PTM
0 output pin can be setup to switch high, switch low or to toggle its
present state when a compare match occurs from the Comparator A. When the
PT
0IO1~
PT
0IO0 bits are both zero, then no change will take place on the output.
The initial value of the
PTM
0 output pin should be setup using the PT0OC bit in the
PTM0C1 register. Note that the output level requested by the
PT
0IO1
~PT
0IO0 bits
must be different from the initial value setup using the PT0OC bit otherwise no change
will occur on the
PTM1
output pin when a compare match occurs. After the
PTM
0
output pin changes state it can be reset to its initial level by changing the level of the
PT0ON bit from low to high.
In the PWM Mode, the
PT
0IO1 and
PT
0IO0 bits determine how the
PTM
0 output
pin changes state when a certain compare match condition occurs. The PWM
output function is modified by changing these two bits. It is necessary to change the
values of the
PT
0IO1 and
PT
0IO0 bits only after the
PTM
0 has been switched off.
Unpredictable PWM outputs will occur if the
PT
0IO1 and P
T
0IO0 bits are changed
when the
PTM
0 is running
.
Bit 3
PT0OC
: T
P1
Output control bit
Compare Match Output Mode
0: Initial low
1: Initial high
PWM Mode/ Single Pulse Output Mode
0: Active low
1: Active high
This is the output control bit for the
PTM
0 output pin. Its operation depends upon
whether
PTM
0 is being used in the Compare Match Output Mode or in the PWM
Mode/ Single Pulse Output Mode. It has no effect if the
PTM
0 is in the Timer/Counter
Mode. In the Compare Match Output Mode it determines the logic level of the
PTM
0
output pin before a compare match occurs. In the PWM Mode it determines if the
PWM signal is active high or active low.
Bit 2
PT0POL
: T
P1
Output polarity Control
0: Non-invert
1: Invert
This bit controls the polarity of the PTM0 output pin. When the bit is set high the
PTM
0 output pin will be inverted and not inverted when the bit is zero. It has no effect
if the
PTM
0 is in the Timer/Counter Mode.
Bit 1
PT0CKS
:
PTM
0 capture trigger source select
0: From TP1_0, TP1_1
1: From TCK1
Bit 0
PT0CCLR
: Select
PTM
0 Counter clear condition
0:
PTM
0 Comparatror P match
1:
PTM
0 Comparatror A match
This bit is used to select the method which clears the counter. Remember that the
Periodic TM contains two comparators, Comparator A and Comparator P, either of
which can be selected to clear the internal counter. With the
PT
0CCLR bit set high,
the counter will be cleared when a compare match occurs from the Comparator A.
When the bit is low, the counter will be cleared when a compare match occurs from
the Comparator P or with a counter overflow. A counter overflow clearing method can
only be implemented if the CCRP bits are all cleared to zero. The
PT
0CCLR bit is not
used in the PWM, Single Pulse or Input Capture Mode.
Содержание 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 ...