15-1. Methods for realizing timing 15-2. Structure and working principle of timer/counter 15-3. Control of timer/counter 15-4. Working mode of timer/counter 15-5. Application of timer/counter software timing Software delay does not occupy hardware resources, but occupies CPU time and reduces CPU utilization. For example, delay program. Using time base circuit timing For example, using 555 circuit, externally connected necessary components (resistors and capacitors), a hardware timing circuit can be formed. However, after the hardware is connected, the timing value and timing range cannot be controlled and modified by software, that is, it is not programmable, and the timing time is easy to drift. The most convenient way to programmable timer timing is to use the timer/counter inside the microcontroller. It combines the characteristics of software timing accuracy and hardware timing circuit independence. Structure of timer/counter The essence of timer/counter is an add-1 counter (16 bits), which consists of two registers, the high 8 bits and the low 8 bits. TMOD is the working mode register of the timer/counter, which determines the working mode and function; TCON is the control register, which controls the start and stop of T0 and T1 and sets the overflow flag.
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore