All Exams Test series for 1 year @ ₹349 only
Question

How many counter/timer does the 8051 microcontroller have?

This question was previously asked in
RRB ALP 2018 CBT 2 Fitter Question Paper (21-Jan-2019) (Shift 3)
The correct answer is

2

Understanding 8051 Microcontroller Timers and Counters

The 8051 is a popular 8-bit microcontroller widely used in embedded systems. One of its essential built-in peripherals is the timer/counter. These units can be used for various tasks, such as creating time delays, measuring pulse widths, counting external events, and generating baud rates for serial communication.

Function of Timers and Counters in 8051

In the 8051 microcontroller context, the timer/counter peripheral is quite versatile. It operates in two main modes:

  • Timer Mode: In this mode, the unit increments its internal register based on the internal system clock (specifically, the machine cycle frequency, which is 1/12th of the crystal frequency). It is used for generating precise time delays or intervals.
  • Counter Mode: In this mode, the unit increments its internal register based on external events applied to specific input pins (T0 or T1 pins). It is used for counting occurrences of external pulses or events.

Both modes utilize the same hardware register, but their clock source for incrementing the register differs.

The Number of Timers/Counters in 8051

The standard 8051 microcontroller architecture includes a specific number of these timer/counter units. Knowing this number is crucial for programming and utilizing the microcontroller's capabilities effectively.

The 8051 microcontroller is equipped with two such units, designated as Timer 0 and Timer 1.

Key Features of 8051 Timers (Timer 0 and Timer 1)

  • Each timer/counter is a 16-bit register. This means it can count from 0 to 65535 (\(2^{16}-1\)).
  • Both Timer 0 and Timer 1 can be configured independently via control registers (TMOD and TCON).
  • They can operate in different modes (Mode 0, Mode 1, Mode 2, and Mode 3), offering flexibility in operation size (8-bit or 16-bit) and auto-reloading features.
  • They can be used either as timers (clocked by the internal system clock) or as counters (clocked by external events).
  • They can generate interrupts upon overflowing, allowing the microcontroller to execute specific routines when a timing interval or event count is reached.

Therefore, the 8051 microcontroller has a total of two counter/timer units.

Summary of 8051 Timers/Counters
Feature Description
Number of Units 2
Names Timer 0, Timer 1
Size 16-bit each
Operating Modes Timer Mode, Counter Mode
Configuration Independent via TMOD and TCON registers

Revision Table: 8051 Timers Counter Facts

Component Count Notes
Counter/Timer Units 2 Timer 0 and Timer 1
Timer/Counter Size 16 bits Both are 16-bit registers

Additional Information: 8051 Timer Control

The operation of the 8051 timers/counters is controlled and monitored by special function registers (SFRs).

  • TMOD (Timer Mode) Register: This register is used to configure the operating mode (Mode 0, 1, 2, or 3) and the type of operation (timer or counter) for both Timer 0 and Timer 1. It is not bit-addressable.
  • TCON (Timer Control) Register: This register contains the control bits for starting/stopping the timers/counters and includes flags to indicate timer overflow and external interrupt events. It is bit-addressable, allowing individual control bits to be manipulated.

Understanding these registers is key to programming the 8051 timers/counters effectively.

Was this answer helpful?

Similar Questions

  1. How many 16 bit registers are there in 8051?

  2. The size of internal RAM of 8051 Microcontroller is _______.

  3. In 8051, Pin number 30 is used:

  4. 16-bit registers consist of:

  5. What is the internal general purpose memory of 8051 micro controller?

  6. The Size of internal RAM of 8051 Microcontroller is?

  7. For pulse generation, the IC used is:

  8. While designing a system using an 8051 microcontroller, the lower address byte and data are multiplexed on the same lines. Which hardware component is required to hold the lower address byte temporarily for correct memory access?

  9. In an 8051 microcontroller, during a debugging session, several PUSH instructions are executed, and the stack pointer reaches address 31H. Which memory area is now being used for stack storage?

  10. Which component in a PLC architecture is primarily responsible for executing control instructions and managing logic operations?


Important Questions from Microprocessors and Microcontrollers

  1. Cycle stealing mode of DMA operation involves

  2. The period of machine cycle of an 8051 system with crystal frequency 16 MHz is

  3. Which of the following instructions will move the contents of register 3 to the accumulator ?

  4. In 8086, which instruction at the end of a sub-routine takes the execution back to the main program?

  5. Which one of the following is not the feature of 8051?

Need Expert Advice?
Upcoming Exams
RRB NTPC
September 27, 2026
Test Series
RRB ALP img
Railways
RRB ALP 2026 Mock Test series
1035 Tests 1 Tests Free
893 Attempts
4.3(235)
English, Hindi

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App