1. Program Description:
SST microcontroller has 5-channel PCA module. PCA function provides stronger timing than ordinary microcontrollers, and less CPU intervention. It can reduce software overhead and improve accuracy. PCA pulse width modulation (PWM) mode can generate an 8-bit PWM, which is generated by comparing the low bit (CL) of the PCA timer and the low bit (CCAPnL) of the compare register. When CL
In PWM mode, the frequency of the output is determined by the source of the PCA timer. Since there is only one pair of CH and CL registers, all modules share the PCA timer and frequency. The duty cycle of the output is controlled by the value loaded into the high bit CCAPnH. Since writing to the CCAPnH register is not synchronous, the value written to the high bit will not be immediately loaded into CCAPnL for comparison until another cycle of the output (when CL flips from 255 to 0). Use the following formula to calculate any duty cycle CCAPnH value:
CCAPnH=256 (1-duty cycle)
CCAPnH is an 8-bit integer and the duty cycle is a fraction.
Pulse Width Modulation Frequency
2. Introduction to related registers:
PCA Timer/Counter Mode Register (CMOD)
Flag function
CIDL counter idle control, when CIDL=0, PCA continues to work in idle mode. When CIDL=1, PCA shuts down in idle mode.
WDTE Watchdog timer enable: When WDTE=0, the watchdog function of PCA module 4 is disabled. When WDTE=1, it is enabled.
CPS1 PCA count pulse width selection bit 1
CPS0 PCA count pulse width selection bit 0
Previous article:Design of AC induction motor drive circuit based on Renesas microcontroller
Next article:The basic structure of a single chip microcomputer
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- SensorTile.box emulates STEVAL-MKI109V3
- TI.com live broadcast: Interpretation of popular smart electronic locks, visual doorbells, smart sensors and network camera solutions
- 【TI Recommended Course】#What can universal fast charging bring?#
- Prize-giving Event | Tektronix High Precision Power Supply Test Knowledge Planet
- Post-COVID-19 Era: What important experiences and gains should we have? Check out these ten!
- BMA400 triaxial accelerometer development
- Principle of Sense Amplifier in SRAM
- Inverted state of transistor
- Reference topics for the 2019 TI Cup National Undergraduate Electronic Design Competition
- AMO reprinted about dsp burning and external RAM