The 80C51 microcontroller has two 16-bit programmable timer / counters . Programmable means that its functions (such as working mode, timing time, range, start mode, etc.) can be determined and changed by instructions. In addition to two 16-bit counters, the timer/counter also has two special function registers (control register and mode register).
The structure of the timer/counter:
Picture 1
From the structure diagram of the timer/counter above, we can see that the 16-bit timer/counter is composed of two 8-bit dedicated registers, namely: T0 is composed of TH0 and TL0; T1 is composed of TH1 and TL1. Its access address is 8AH-8DH. Each register can be accessed separately. These registers are used to store the initial value of timing or counting. In addition, there is an 8-bit timer mode register TMOD and an 8-bit timing control register TCON inside it. These registers are connected through the internal bus and control logic circuit. TMOD is mainly used to select the working mode of the timer; TCON is mainly used to control the start and stop of the timer. In addition, TCON can also save the overflow and interrupt flags of T0 and T1. When the timer works in counting mode, external events are input through pins T0 (P3.4) and T1 (P3.5).
Previous article:The Principle of Single Chip Microcomputer Music Programming
Next article:Principle of timing counter Calculation of counting period
- 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
- 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
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- Why software-defined vehicles transform cars from tools into living spaces
- About C2000 program transfer from flash to RAM
- Prize-giving event | NI helps you design a more reliable data acquisition system
- MSP430 clock system
- Op amp biasing
- 【Homemade】OLED ultra-thin downloader
- LED Dimming Power Supply
- 【BK7231N】Tuya Development Board Evaluation 1-System Development Environment Construction
- Touch MCU YS65F805 Data Sheet
- The simplest air purifier
- Wireless Charging Technology