1. Timer B module:
TimerB is mostly the same as TimerA, except that a latch is added to the capture/compare unit of Timer B.
The difference between the two:
(1) The count length of Timer B is programmable to 8, 10, 12, or 16 bits, which is configured by the two bits CNTLx in the TBCTL register, while the count length of Timer A is fixed at 16 bits;
(2) Timer B does not implement the SCCI function bit in Timer A;
(3) The capture/compare register function of TimerB in compare mode is different from that of TimerA, and a capture compare latch is added;
(4) In some chip models, TimerB output realizes high impedance output;
(5) The principle of the comparison mode is different: the CCRx register in TimerA stores the data to be compared with TAR, while the CCRx register in TimerB stores the data to be compared, but it is not directly compared with the timer TBR. Instead, the data in CCRx is latched into the corresponding latch, and then compared with TBR by the latch. The time of transmitting data from the capture/compare register to the comparison latch is also programmable. It can be transmitted immediately after writing to the comparison capture register, or a timer can be used to trigger the transmission.
(6) TimerB supports multiple synchronous timing functions, multiple comparison capture functions and multiple waveform output functions (PWM waves). Moreover, through two-level buffering of comparison data, multiple PWM waves can be updated synchronously.
2. Logical structure diagram of TimerB:
The logical structure of Timer B is basically the same as that of Timer A.
3. Registers of timer B:
For the configuration process of the relevant bits of the register, refer to Timer A and the data manual.
4. Comparison function of timer B
When timer B operates in compare mode, the data is written into the capture compare latch TBCCRx. When the load event determined by the CLLDx bit in TBCCTLx occurs, the data in TBCCRx is automatically transferred to the compare register.
5. Routine provided by TI:
//
//
//
//
//
//
//
//
//
//
//
//
/ /
//
//
//
//**************************** *************************************************** *****
#include
void main(void)
{
//System clock initialization
//io port initialization
//Configuration of timer B
}
Previous article:Use of pull-up and pull-down resistors
Next article:MSP430--General IO Port
Recommended ReadingLatest update time:2024-11-16 14:29
- Popular Resources
- Popular amplifiers
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
- CH549EVT Development Board Test——Evaluation Summary
- Familiar Development Tools Support SoC FPGAs
- ADI Analog Dialogue magazine, if you are interested, come and get it~
- Notes and lessons about IAR installation
- [Open Source] Bluetooth module BT401 full set of information based on Bluetooth headset chip development ultra-low cost
- EEWORLD University Hall----Live Replay: ADI's Vital Signs Monitoring Solutions in Wearable Products
- Arrow Electronics' award-winning live broadcast starts at 10:00 this morning: Intel FPGA Deep Learning Acceleration Technology
- stm32f030R8 Chinese reference material
- Recruitment: Executive Vice President of Automotive Electronics (Executive Vice President of New Energy)
- ATmega4809 Curiosity Nano Review + Unboxing and Powering on