Rev. 1.20
94
�an�a�� 2�� 201�
Rev. 1.20
9�
�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
Single Pulse Mode
To select this mode, bits PT0M1 and PT0M0 in the PTM0C1 register should be set to 10
respectively and also the PT0IO1 and PT0IO0 bits should be set to 11 respectively. The Single Pulse
Output Mode, as the name suggests, will generate a single shot pulse on the PTM0 output pin.
The trigger for the pulse output leading edge is a low to high transition of the PT0ON bit, which can
be implemented using the application program. However in the Single Pulse Mode, the PT0ON bit
can also be made to automatically change from low to high using the external TCK
1
pin, which will
in turn initiate the Single Pulse output. When the PT0ON bit transitions to a high level, the counter
will start running and the pulse leading edge will be generated. The PT0ON bit should remain high
when the pulse is in its active state. The generated pulse trailing edge will be generated when the
PT
0ON bit is cleared to zero, which can be implemented using the application program or when a
compare match occurs from Comparator A.
However a compare match from Comparator A will also automatically clear the PT0ON bit and thus
generate the Single Pulse output trailing edge. In this way the CCRA value can be used to control the
pulse width. A compare match from Comparator A will also generate a PTM0 interrupt. The counter
can only be reset back to zero when the PT0ON bit changes from low to high when the counter
restarts. In the Single Pulse Mode CCRP is not used. The PT0CCLR bit is not used in this Mode.
Single Pulse Generation