TMOD Register
TMOD(Timer Mode) is an SFR. The address of this register is 89H. This is not bit-addressable.
Timer | Timer1 Mode | Timer0 Mode | ||||||
---|---|---|---|---|---|---|---|---|
Bit Details | Gate (G) | C/T | M1 | M0 | Gate (G) | C/T | M1 | M0 |
the following table, we will see the bit details and their different operations for high or low value.
Bit Details | High Value(1) | Low Value(0) |
---|---|---|
C/T | Configure for the Counter operations | Configure for the Timer operations |
Gate (G) | Timer0 or Timer1 will be in RunMode when TRX bit of TCON register is high. | Timer0 or Timer1 will be in RunMode when TRX bit of TCON register is high and INT0 or INT1 is high. |
Bit Details | 00 | 01 | 10 | 11 |
---|---|---|---|---|
M1 M0 | This is for Mode 0. (8-bit timer/counter, with 5-bit pre-scaler) | This is Mode 1. (16-bit timer/counter) | This is Mode 3 (8-bit auto reload-timer/counter) | This is Mode 3 (The function depends on Timer0 or Timer1) |
The Gate bit will be high when the timer or counter is in mode 0 to 2.
Comments
Post a Comment