Introduction to the four working modes of 51 single-chip microcomputer timer/counter

Publisher:科技探险者Latest update time:2017-10-13 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Working mode 0  When
the timer / counter T0 works in mode 0, only 13 bits of the 16-bit counter are used, namely the upper 8 bits of TH0 and the lower 5 bits of TL0, forming a 13-bit timer /counter. 

1) Working in timing mode 
2) Working in counting mode 
2 Working mode 1 
Timer T0 Working mode 1 is similar to working mode 0, the difference lies in the number of bits of the counter. Working mode 0 uses a 13-bit counter to participate in counting, while working mode 1 uses a 16-bit counter to participate in counting. 

1) Working in timing mode 
2) Working in counting mode 
Working mode 1 is a 16-bit counter. This is the only difference between working mode 1 and working mode 0 in counting mode. 
3 Working mode 2 
When the timer T0 is in working mode 2, the 16-bit counter is divided into two independent 8-bit counters TH0 and TL0. 

1) Working in timing mode 
2) Working in counting mode 
The difference between working mode 2 and working mode 0 and mode 1 is that working mode 2 is an 8-bit counter. 
4 Working mode 3 
Working mode 3 is only valid for timer T0. When timer T0 works in mode 3, the 16-bit counter is divided into two independent 8-bit counters TH0 and TL0. 

When timer T0 works in mode 3, timer T1 can only work in modes 0 to 2 and work in situations where interrupts are not required.

Reference address:Introduction to the four working modes of 51 single-chip microcomputer timer/counter

Previous article:51 MCU timer/counter structure and mode control register TMOD
Next article:Using the P1 port of 89C51 microcontroller to control 8 LED programming

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号