Saturday, February 27, 2016

8051 TMOD Register

Timer Mode Control Register

  • Address: 0x89
  • Size: 8 bit.
  • Byte addressable.
  • Used to configure Timer mode of operation.

8051 TMOD Register

M0Timer mode selection bit (see below)
M1Timer mode selection bit (see below)
C/TTimer or Counter selector. Cleared for Timer operation (input from internal system clock). Set for counter operation (input from Tx input pin). If 0, timer is used as delay generator. If 1, timer is used as event counter. If 1, timer x is clocked from Tx pin. If 0, timer x is clocked from oscillator/12
GateThis bit is used to start/stop timers by hardware. If 1, the timers can be started/stopped by the external sources. If 1, timer x is enabled when intx is high and TRx is high. When TRx (in TCON) is set and GATE = 1, TIMER/COUNTERx will run only while INTx pin is high (hardware control). If 0, the timers can be started/stopped by software instructions. If 0, timer x is enabled when TRx is high. When GATE = 0, TIMER/COUNTERx will run only while TRx = 1 (software control).

00013-bit timer mode. THX with TLx as 5-bit prescalar
01116-bit timer mode. 16-bit timer/counter without prescalar
1028-bit auto reload. THx contains a value that is to be loaded in to TLx each time it overflows
113Split timer mode. (Timer 0) TL0 is an 8-bit timer/counter controlled by the standard Timer 0 control bits, TH0 is an 8-bit timer and controlled by Timer 1 control bits. (Timer 1) Timer/counter 1 stopped

Related topics:
8051 Registers   |   8051 Program Counter   |   8051 R Registers   |   8051 SFR   |   8051 P Registers   |   8051 Stack   |   8051 Stack Pointer   |   8051 Data Pointer   |   8051 PCON Register   |   8051 TCON Register   |   8051 Timer Registers   |   8051 SCON Register   |   8051 SBUF Register   |   8051 IE Register   |   8051 IP Register   |   8051 PSW Register   |   8051 A Register   |   8051 B Register

List of topics: 8051

No comments:

Post a Comment