Function and structure of the timer/counter of 80C51 single chip microcomputer

Publisher:心愿达成Latest update time:2017-10-12 Source: eefocusKeywords:80C51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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).


Keywords:80C51 Reference address:Function and structure of the timer/counter of 80C51 single chip microcomputer

Previous article:The Principle of Single Chip Microcomputer Music Programming
Next article:Principle of timing counter Calculation of counting period

Latest Microcontroller Articles
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号