Department of Computer Scien
ce and Information Engineering
National Cheng Kung University, TAIWAN
HANEL
PROGRAMMING
TIMERSTMODRegister
Both timers 0 and 1 use the same register, called TMOD (timer mode), to set the various timer operation modesTMOD is a 8-bit register
¾The lower 4 bits are for Timer 0 ¾The upper 4 bits are for Timer 1¾In each case,
The lower 2 bits are used
to set the timer mode
The upper 2 bits to
specify the operation
Timer1
GATE
C/T
M1
M0
(MSB)
Timer0
GATE
C/T
M1
(LSB)M0