Download Print this page

STC micro STC8A8K64D4 Series Reference Manual page 10

Advertisement

STC8A8K64D4 Series Manual
17.5.3 Format ADC Conversion Result ................................................................................................493
17.5.4 ADC converts multiple times to take average automatically .....................................................495
17.5.6 Using ADC as Capacitive Sensing Touch Keys ........................................................................501
17.5.7 Key-scan Application Circuit Diagram using ADC ...................................................................514
17.5.8 Reference circuit diagram for detecting negative voltage .........................................................515
17.5.9 The application of common addition circuit in ADC .................................................................516
18 Application of PCA/CCP/PWM ................................................................................................................517
18.1 PCA function pin switch .....................................................................................................................517
18.2 Registers Related to PCA ....................................................................................................................517
18.2.1 PCA control register (CCON) ....................................................................................................518
18.2.2 PCA mode register (CMOD) .....................................................................................................518
18.2.3 PCA counter registers (CL, CH) ................................................................................................518
18.2.4 PCA mode control registers (CCAPMn) ...................................................................................518
18.2.5 PCA capture value/compare value registers (CCAPnL, CCAPnH) ...........................................519
18.2.6 PCA PWM mode control registers (PCA_PWMn)....................................................................519
18.3 PCA Operation Mode ..........................................................................................................................519
18.3.1 Capture Mode ............................................................................................................................520
18.3.2 Software Timer Mode ................................................................................................................520
18.3.3 High Speed Pulse Output Mode ................................................................................................521
18.3.4 Pulse Width Modulation Mode (PWM mode) ...........................................................................521
18.5 Example Routines ...............................................................................................................................526
18.5.1 PCA Output PWM (6/7/8/10 bit) ...............................................................................................526
18.5.2 PCA Capture and Measure Pulse Width ....................................................................................529
18.5.3 PCA Implements 16-bit Software Timing .................................................................................533
18.5.4 PCA Output High-speed Pulse ..................................................................................................536
18.5.5 PCA Extends External Interrupt ................................................................................................539
19 Enhanced PWM with 15-bit Accuracy .....................................................................................................543
19.1 Enhanced PWM output function pin switching ..................................................................................543
19.2 Registers Related to PWM ..................................................................................................................544
19.2.1 Enhanced PWM global configuration register (PWMSET) ......................................................545
19.2.2 Enhanced PWM configuration registers (PWMCFG) ...............................................................545
19.2.3 PWM Interrupt Flag Register (PWMIF) ....................................................................................546
19.2.4 PWM Fault Detection Control Register (PWMFDCR) .............................................................546
19.2.5 PWM Counter Registers (PWMCH, PWMCL) .........................................................................547
19.2.6 PWM Clock Selection Register (PWMCKS) ............................................................................547
19.2.7 PWM Trigger ADC counter Registers (PWMTADC) ...............................................................547
19.2.9 PWM Channel Control Registers (PWMnCR) ..........................................................................549
19.2.10 PWM Channel Level Holding Control Registers (PWMnHLD) .............................................549
19.3 Example Routines ...............................................................................................................................550
19.3.1 Output waveforms with arbitrary period and arbitrary duty ......................................................550
19.3.2 Two-channel PWMs realize complementary symmetrical waveform with dead-time control ..553
- ix -

Advertisement

loading
Need help?

Need help?

Do you have a question about the micro STC8A8K64D4 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Micro stc8a8k64d4-64pinMicro stc8a8k64d4-48pin