What is the TCON Register in the 8051 microcontroller?

What is the TCON Register in the 8051 microcontroller?

Timer Control or TCON Register is used to start or stop the Timers of 8051 Microcontroller. It also contains bits to indicate if the Timers has overflowed. The TCON SFR also consists of Interrupt related bits. The TMOD or Timer Mode register or SFR is used to set the Operating Modes of the Timers T0 and T1.

How are Tmod and TCON registers used in microcontroller?

TMOD and TCON registers are used for setting and using these timers/counters. Both can be configured to operate either as timers or as event counters. In the case of timers, register is incremented once every machine cycle. Hence timer is considered as counter which counts machine cycles. One machine cycle has about 12 oscillator periods.

Where is the SCON Register located on a microcontroller?

It is located as an address of 98H. Using SCON, you can control the Operation Modes of the Serial Port, Baud Rate of the Serial Port and Send or Receive Data using Serial Port. SCON Register also consists of bits that are automatically SET when a byte of data is transmitted or received.

What are the address of the port registers in the 8051?

The addresses of the Port Registers are as follows: P0 – 80H, P1 – 90H, P2 – A0H and P2 – B0H. Each bit in these SFRs corresponds to one physical Pin in the 8051 Microcontroller. All these Port Registers are both Bit Addressable and Byte Addressable.

How to set the control bit in 8051?

8051 Timer Control (TCON) Special Function Register Bit Symbol TCON Bit Function 7 TF1l Timer 1 Overflow flag. Set when timer ro 6 TR1l Timer 1 run control bit. Set to 1 by pro 5 TF0 l Timer 0 Overflow flag. Set when timer ro 4 TR0l Timer 0 run control bit. Set to 1 by pro

What is the function of the TCON Register?

TCON (Timer Control Register) – At the risk of a slight oversimplification that we will address later, we only use half of the TCON register for timing and counting purposes. This register is used to initialize the counting and to indicate when the timers have reached their counting limit. Let’s dive into their functions in more detail.