English
Language : 

BS82B12A-3 Datasheet, PDF (96/170 Pages) Holtek Semiconductor Inc – Touch Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch 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 TCK1 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
PT0ON 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.
S /W C o m m a n d
S E T "P T 0 O N "
or
T C K 1 P in T r a n s itio n
L e a d in g E d g e
P T 0 O N b it
0® 1
T r a ilin g E d g e
P T 0 O N b it
1® 0
S /W C o m m a n d
C L R "P T 0 O N "
or
C C R A M a tc h C o m p a re
P T M 0 O u tp u t P in
P u ls e W id th = C C R A V a lu e
Single Pulse Generation
Rev. 1.60
96
December 15, 2016