Skip to main content

The future of AI in business and its potential to transform industries

What are the timer and its registers?

What are the timers and its registers?

banner for what is timer

  • As their name suggests, the main purpose of a timer is to measure time and count external events.
  • The 8051 microcontrollers have 2 timer/counters called T0 and T1.
  • Timers can be used for generating clock pulses used for serial communication i.e. Baudrate.

Some Timer registers are

  1. Load registers
  2. TMOD registers
  3. TCON registers

1. Load registers


explanation of load registers

  • Load registers are used to load timer counts.
  • These registers are of 16 bit.
  • The lower bit registers are called TL0/TL1.
  • The higher bit registers are called TH0/TH1.
  • TH0/TL0 is called timer 0.
  • TH1/TL1 is called timer 1.

2. TMOD (Timer mode) register

explanation of TMOD register

  • Both timer 0 and timer 1 use the same register called TMOD (Timer mode) to set the various timer operation modes.
  • TMOD is an 8-bit register.
  • The lower 4 bit for timer 0 and upper 4 bit for timer 1.
  • The upper 2 bits i.e. Gate and C/T are used to specify the operation.
  • The lower 2 bits i.e. M0 and M1 are used to set timer modes.

Different modes of timer

Mode            M1           M2            Operation

0                    0               0               13 bits
1                    0               1               16 bits
2                    1               0                8 bits
3                    1               1                split 

3. TCON ( Timer control ) register

explanation of TCON register


  • The upper 4 bits are used to store the TF and TR bits of both timer 0 and timer 1.
  • The lower 4 bits are used for controlling the interrupt bits.

For Timer 1

  • TF1 = 1 (flag bit is 1 i.e. counting is completed)
  • TF1 = 0 (flag bit is zero)
  • TR1 = 1 (start counting in timer 1)
  • TR1 = 0 (stop counting in timer 1)

For Timer 0

  • TF0 = 1 (flag bit is 1 i.e. counting completed)
  • TF0 = 0 (flag bit is 0)
  • TR0 = 1 (start counting in Timer 0)
  • TR0 = 0 (stop counting in Timer 0)

Popular posts from this blog

Top 7 domains to expertise after learning python

Top 7 domains to expertise after learning python Python is one of the most popular programming languages. It is an object-oriented, dynamic semantics and high-level programming language. It's high-level built-in data structure combined with dynamic binding and dynamic typing makes it attractive for rapid application development. Often programmers fall in love with python because of the increased productivity it provides. Python is one of the most readable languages in the world right now. This language is very popular among developers and is widely used by many programmers to create application and programs. The implementation of this programming language is simple and at the same time, the language has a very clean structure as compared to other languages.  So if you mastered your python concepts and skills, you can dominate these 7 domains. Machine learning / Artificial intelligence Desktop GUI Data analytics and data visualization  Web development Game development Mobile ap...

Different domains of Artificial intelligence(AI)

Artificial intelligence is a computer system that is able to perform tasks that ordinarily require human intelligence. Artificial intelligence systems are critical for companies that wish to extract value from data by automating and optimizing processes or producing actionable insights. There are certain domains of artificial intelligence on which we can create our expertise Machine learning Deep learning Robotics Expert systems Fuzzy logic Natural language processing Computer vision  1. Machine learning Machine learning is a subset of artificial intelligence. Machine learning enables computers or machines to make data-driven decisions rather than being explicitly programmed for a certain task. These programs or algorithms are designed in a way that they learn and improve over time when are exposed to new data. Different types of machine learning models Supervised learning Unsupervised learning Reinforcement learning Use cases Product recommendation on a shopping website. spam fil...

Top 5 free machine learning courses with certificate

In the era of 21st-century artificial intelligence, machine learning and data science became the most demanding and highest paying skills. After the covid-19 pandemic situation, the working style of the corporate sectors and the business had completely changed, now most of the business deals are made on the basis of data analysis, or when it comes to making the businesses automation the people hire a  machine learning engineer.    Hence it becomes really important for those who work in the corporate sector or a student pursuing a degree to get a job should update himself with these skills.  So, I listed you Top 5 machine learning courses from one of the leading organisations with completion certificates at free of cost. 1. Machine learning in the cloud with AWS batch About This course describes how to run and accelerate your machine learning applications in the cloud using AWS batch. AWS Batch is a fully managed service that allows you to easily and efficiently run b...