The AT89C51 is a low-power, high-performance CMOS 8-bit microcontroller from the 8051 family that uses a Harvard architecture. It includes a robust suite of features including 4KB of reprogrammable Flash memory, 128 bytes of RAM, 32 input/output (I/O) lines, two 16-bit timers/counters, five channels for interrupt processing, a full duplex serial port, an on-chip oscillator and clock circuitry.
In this context, we'll be focusing on the two timers/counters that are available in the AT89C51: Timer/Counter 0 and Timer/Counter 1.
Timer or Counter
Whether the timer/counters operate as timers or counters is determined by the C/T bit in the TMOD register. If the C/T bit is cleared (0), the timer mode is selected, in which the register increments every machine cycle.
If the C/T bit is set (1), the counter mode is selected, and the register increments on the falling edge of the pin designated for the timer (T0 for Timer 0 and T1 for Timer 1).