The STC12C5A60S2 microcontroller integrates a total of four 16-bit timers, two timers/counters compatible with the traditional 8051, 16-bit timers T0 and T1. There is no timer 2, but there is an independent baud rate generator for serial communication. Baud rate generator, coupled with 2-way PCA module, can realize 2 more 16-bit timers;
1. Basic features
The STC12C5A60S2 microcontroller integrates two 16-bit timer/counters.
1) Register
1.1) TMOD timer working mode control register, including 13-bit register, 16-bit register, 8-bit register, etc.;
1.2) TCON timer control register, mainly includes timer start control bits, etc.;
1.3) AUXR auxiliary register, used to set the frequency division; the default frequency division is 12
1.4) TH0/1: high 8-bit register of timer
1.5) TL0/1: lower 8-bit register of timer
Timer calculation
The STC12C5A60S2 series is a 1T 8051 microcontroller. In order to be compatible with the traditional 8051, timer 0 and timer 1 are reset to the speed of the traditional 8051, which is divided by 12. This is to be compatible with the traditional 8051. But it is also possible to achieve true 1T without dividing by 12.
Compile and download the target code, and the LED light flashes at 1s intervals, indicating that our code is correct. Now we modify the code to turn off the 12-frequency divider of timer T0, and the pink field is the newly added code.
Previous article:51 microcontroller timers and counters
Next article:71M6543F/71M6543H smart meter schematic diagram
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Playing with Zynq Serial 44——[ex63] Image smoothing processing of MT9V034 camera
- [2022 Digi-Key Innovation Design Competition] Material Unboxing STM32H745I-DISCO
- Supplementary chapter of motor PID control - Introduction to the serial port protocol of the Wildfire host computer
- 485 interface EMC circuit design scheme!
- Help! CCS7.3 enters the exit.c file after entering debug mode. I don't know how to solve it
- Share Gigabit Ethernet port circuit design
- [RVB2601 creative application development] 2. CH2601 serial port receiving
- How to draw this shape in Protel 99se
- A summary of the most downloaded electronic technical materials this week (2020.5.1~9), each one is a classic
- [i.MX6UL development problem] How to use tftp to burn program in uboot