EasyManua.ls Logo

STC micro STC8A8K64D4 Series - Enhanced PWM with 15-Bit Accuracy; Enhanced PWM Output Function Pin Switching

Default Icon
901 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
STC8A8K64D4 Series Manual
- 543 -
19 Enhanced PWM with 15-bit Accuracy
The STC8A8K64D4-64Pin/48Pin series microcontrollers integrate a group enhanced PWM waveform generator
which can generate 8 independent PWMs.The clock source of PWM can be selected. There is a 15-bit PWM counter
in the PWM waveform generator which is used for 8 channel PWMs. The initial level of each PWM can be set. In
addition, two counters T1 and T2 are designed in the PWM waveform generator to control the waveform hopping for
each PWM. The width of high and low level of each PWM can be set very flexibly, so that the PWM duty ratio and
PWM output delay can be controlled. Because the 8 PWMs are independent and the initial state of each PWM can be
set, any two of them can be used together to achieve special applications such as complementary symmetrical output
and dead band control. Note: Enhanced PWM only has output function. If you need to measure pulse width, please use
the PCA/CCP/PWM function of this series microcontroller. The enhanced PWM waveform generators also feature the
ability to monitor external abnormal events, such as external port P3.5 abnormal level and the abnormal comparator
results. It can be used to shutdown PWM outputs immediately. The PWM waveform generator can also be associated
with ADC. Any point in the PWM cycle can be set to trigger the ADC conversion event.
Comparison of STC three kinds of hardware PWM:
Compatible with traditional 8051 PCA/CCP/PWM: It can output PWM waveforms, capture external input signals
and output high-speed pulses. It can output 6-bit/7-bit/8-bit/10-bit PWM waveform externally. The frequency of the 6-
bit PWM waveform is the PCA module clock source frequency/64. The frequency of the 7-bit PWM waveform is the
PCA module clock source frequency/128. The frequency of the 8-bit PWM waveform is the PCA module clock source
frequency/256. The frequency of the 10-bit PWM waveform is the PCA module clock source frequency/1024. For the
external input signal capture, you can capture the rising edge, the falling edge or the rising edge and the falling edge at
the same time.
15-bit enhanced PWM: It can only output PWM waveform externally, without input capture function. The
frequency and duty cycle of PWM output can be set arbitrarily. Through software intervention, multiple
complementary/symmetrical with dead-time PWM waveforms can be realized. There are external abnormality
detection function and real-time trigger ADC conversion function.
The 16-bit advanced PWM timer: It is the PWM with the strongest function in STC products at present, which can
output PWM waveforms of any frequency and any duty. It can output complementary/symmetrical with dead-time
PWM waveform without software intervention. It can capture the external signal for the rising edge, the falling edge or
the rising edge and the falling edge at the same time. When measuring the external waveform, the period value and the
duty ratio value of the waveform can be measured at the same time. There are quadrature encoding function, external
anomaly detection function and real-time trigger ADC conversion function.
19.1 Enhanced PWM output function pin switching
Symbol
Address
B7
B6
B5
B4
B3
B2
B1
B0
PWM0CR
FF14H
ENC0O
C0INI
-
C0_S[1:0]
EC0I
EC0T2SI
EC0T1SI
PWM1CR
FF1CH
ENC1O
C1INI
-
C1_S[1:0]
EC1I
EC1T2SI
EC1T1SI
PWM2CR
FF24H
ENC2O
C2INI
-
C2_S[1:0]
EC2I
EC2T2SI
EC2T1SI
PWM3CR
FF2CH
ENC3O
C3INI
-
C3_S[1:0]
EC3I
EC3T2SI
EC3T1SI
PWM4CR
FF34H
ENC4O
C4INI
-
C4_S[1:0]
EC4I
EC4T2SI
EC4T1SI
PWM5CR
FF3CH
ENC5O
C5INI
-
C5_S[1:0]
EC5I
EC5T2SI
EC5T1SI
PWM6CR
FF44H
ENC6O
C6INI
-
C6_S[1:0]
EC6I
EC6T2SI
EC6T1SI
PWM7CR
FF4CH
ENC7O
C7INI
-
C7_S[1:0]
EC7I
EC7T2SI
EC7T1SI
C0_S[1:0]: Enhanced PWM channel 0 output pin selection bit
C0_S[1:0]
PWM0
00
P2.0
01
P1.0
10
P6.0
11
Reserved

Table of Contents

Related product manuals