The 8051 Microcontroller and Embedded

(lily) #1
Department of Computer Scien

ce and Information Engineering

National Cheng Kung University, TAIWAN
HANEL
PROGRAMMING

TIMERSTMODRegister(cont’)


Split timer mode
3

(^11)
8-bit auto reload8-bit auto reload timer/counter; THx holds a value which is to be reloaded TLx each time it overfolws
2
(^01)
16-bit timer mode16-bit timer/counter THx and TLx are cascaded; there is no prescaler
1
(^10)
13-bit timer mode8-bit timer/counter THx with TLx as 5-bit prescaler
0
(^00)
Operating Mode
Mode
M0M1
Timer1
GATE
C/T
M1
M0
(MSB)
Timer0
GATE
C/T
M1
(LSB)M0
Timer or counter selectedCleared for timer operation (input from internal system clock)Set for counter operation (input from Tx input pin)
Gating control when set. Timer/counter is enable only while the INTx pin is high and the TRx control pin is setWhen cleared,
the timer is
enabled whenever the TRxcontrol bit is set

Free download pdf