Analysis of the working selection mode of the register TMOD of the MCS-51 single-chip microcomputer

Publisher:sdlg668Latest update time:2020-02-06 Source: elecfansKeywords:MCS-51 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The special function register TMOD is the working mode register of T0 and T1, and its format is as follows:

Analysis of the working selection mode of the register TMOD of the MCS-51 single-chip microcomputer

The lower 4 bits of TMOD are the mode field of T0, and the upper 4 bits are the mode field of T1, and their meanings are exactly the same.


Working mode selection bits M1, M0 (mode 0~3)

Timing mode and external event counting mode selection bit C/T

C/T=1 is the external event counting mode.

Gate bit GATE

When GATE is 1, the timer count is controlled by the external pin input level (INT0 controls the operation of T0, INT1 controls the operation of T1); when GATE is 0, the timer count is not controlled by the external pin input level.

Keywords:MCS-51 Reference address:Analysis of the working selection mode of the register TMOD of the MCS-51 single-chip microcomputer

Previous article:MCU through PCF8574T module driver 1602/2004LCD
Next article:Buttons control the speed and direction of the motor

Recommended ReadingLatest update time:2024-11-16 14:51

Instruction timing of MCS-51 microcontroller
Timing is described using timing units. MCS-51 has four timing units: beat, state, machine cycle, and instruction cycle. We will explain each of them below. Beat and state: We define the period of the oscillation pulse as the beat (represented by P for the convenience of description). After the oscillatio
[Microcontroller]
Instruction timing of MCS-51 microcontroller
An article explaining the interrupt system of MCS-51 microcontroller in detail
MCS-51 interrupt system: 5 interrupt sources (two external interrupts, two timers, one serial port), 2 priorities Interrupt related concepts Interrupt: When the CPU is processing something, an emergency event that occurs outside or inside the microcontroller requires the CPU to handle it immediately. Therefore, the
[Microcontroller]
An article explaining the interrupt system of MCS-51 microcontroller in detail
How many I/O ports does the MCS-51 microcontroller have? What are its components and features?
How many I/O ports does the MCS-51 microcontroller have? Answer: The MCS-51 microcontroller has four bidirectional 8-bit I/O ports, of which P0~P3 are tri-state bidirectional ports. P1, P2, and P3 ports are quasi-bidirectional ports (when used as input, the port line is pulled to a high level, so they are called q
[Microcontroller]
The structure of the MCS-51 interrupt system
The interrupt system of the 8031 ​​microcontroller is simple and practical. Its basic characteristics are: there are 5 fixed maskable interrupt sources, 3 on-chip and 2 off-chip. They each have a fixed interrupt entry address in the program memory, thereby entering the interrupt service program; the 5 interrupt source
[Microcontroller]
The structure of the MCS-51 interrupt system
Hardware Design of Serial Communication between PC and Multiple MCS-51 Single-Chip Microcomputers
1 Introduction In measurement and control systems and engineering applications, it is common to encounter situations where multiple tasks need to be executed simultaneously, so the master-slave multi-machine distributed system has become a widely used model in modern industry. Most of them are composed of IBM-PC micr
[Microcontroller]
Hardware Design of Serial Communication between PC and Multiple MCS-51 Single-Chip Microcomputers
Introduction to the CPU of MCS-51 single-chip microcomputer
The central processing unit (CPU) of the MCS-51 microcontroller is composed of an arithmetic unit and control logic, including several special function registers (SFRs). 1. ALU-centered arithmetic unit The arithmetic logic unit ALU can perform arithmetic operations such as addition, subtraction, multiplication,
[Microcontroller]
Introduction to the CPU of MCS-51 single-chip microcomputer
Introduction to the characteristics of various types of MCS-51 series microcontrollers
MCS is the series symbol for the microcontrollers produced by Intel, for example, Intel's MCS-48, MCS-51, and MCS-96 series of microcontrollers. The MCS-51 series of microcontrollers was developed by Intel in the early 1980s on the basis of the MCS-48 series. It is the first mainstream variety of microcontrollers that
[Microcontroller]
The general format of an MCS-51 assembly language program
Unlike 8086, there is no distinction between code segment and data segment, and all addresses are unified.  A program consists of command lines or comment lines, and each command line can only contain one command. "Label:" can be used before an instruction to indicate the instruction address for easy reference in th
[Microcontroller]
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号