Page 80 - CITS - Electronic Mechanic - TT - 2024
P. 80

ELECTRONICS MECHANIC - CITS




















































           Timer/Counter Registers
           The 8051 has two 16-bit Programmable timers / counters (Timer 0 – Timer 1).
           Which can be used either as timer to generate a time delay or as counter to count events happening outside the
           microcontroller.
           The Counters and Timers in 8051 microcontrollers contain two special function registers: TMOD (Timer Mode
           Register) and TCON (Timer Control Register).
           TMODE Registers
           TMODE register is an 8-bit register
           Gate: when Gate control is set. The Timer/counter is enabled only while the IN TX pin is high and the TRX control
           pin is set. When it is cleared, the timer is enabled whenever the TRX control bit is set.
           C/T: The Timer or counter selection. When cleared for timer operation (input from internal system clock). Set for
           counter operation (input from Tx input pin).

           Mode selects bits of TMODE register: The M1 and M0 are mode select bits, which are used to select the timer
           operations. There are four modes to operate the timers.














                                                           65

                                    CITS : E & H - Electronics Mechanic - Lesson 34 - 42
   75   76   77   78   79   80   81   82   83   84   85