BS85B12-3 HOLTEK [Holtek Semiconductor Inc], BS85B12-3 Datasheet - Page 76

no-image

BS85B12-3

Manufacturer Part Number
BS85B12-3
Description
Touch Key Flash Type 8-Bit MCU with LCD/LED Driver
Manufacturer
HOLTEK [Holtek Semiconductor Inc]
Datasheet
Note:
Rev. 1.00
TM O/P Pin
TM O/P Pin
Flag TnAF
Flag TnPF
CCRA Int.
CCRP Int.
PWM Output Mode
TnPAU
TnPOL
CCRP
CCRA
TnON
1. Here TnDPX=0 -- Counter cleared by CCRP
2. A counter clear sets the PWM Period
3. The internal PWM function continues even when TnIO [1:0] = 00 or 01
4. The TnCCLR bit has no influence on PWM operation
Counter Value
(TnOC=1)
(TnOC=0)
PWM Duty Cycle
set by CCRA
To select this mode, bits TnM1 and TnM0 in the TMnC1 register should be set to 10 respectively. The
PWM function within the TM is useful for applications which require functions such as motor control,
heating control, illumination control etc. By providing a signal of fixed frequency but of varying duty
cycle on the TM output pin, a square wave AC waveform can be generated with varying equivalent
DC RMS values.
As both the period and duty cycle of the PWM waveform can be controlled, the choice of generated
waveform is extremely flexible. In the PWM mode, the TnCCLR bit has no effect on the PWM
operation. Both of the CCRA and CCRP registers are used to generate the PWM waveform, one
register is used to clear the internal counter and thus control the PWM waveform frequency, while the
other one is used to control the duty cycle. Which register is used to control either frequency or duty
cycle is determined using the TnDPX bit in the TMnC1 register. The PWM waveform frequency and
duty cycle can therefore be controlled by the values in the CCRA and CCRP registers.
An interrupt flag, one for each of the CCRA and CCRP, will be generated when a compare match
occurs from either Comparator A or Comparator P. The TnOC bit in the TMnC1 register is used to
select the required polarity of the PWM waveform while the two TnIO1 and TnIO0 bits are used to
enable the PWM output or to force the TM output pin to a fixed high or low level. The TnPOL bit is
used to reverse the polarity of the PWM output waveform.
Touch Key Flash MCU with LCD/LED Driver
Counter cleared
by CCRP
PWM Mode -- TnDPX = 0
70
PWM Period
set by CCRP
Pause Resume
BS85B12-3/BS85C20-3
Output controlled by
other pin-shared function
TnDPX = 0; TnM [1:0] = 10
Counter Stop if
TnON bit low
PWM resumes
operation
Counter Reset when
TnON returns high
Output Inverts
when TnPOL = 1
February 1, 2011
Time

Related parts for BS85B12-3