
S3C7559/P7559
TIMERS and TIMER/COUNTERS
11-11
TC COMPONENT SUMMARY
Mode register (TMODn)
Activates the timer/counter and selects the internal clock frequency or the
external clock source at the TCLn pin.
Reference register (TREFn)
Stores the reference value for the desired number of clock pulses between in-
terrupt requests.
Counter register (TCNTn)
Counts internal or external clock pulses based on the bit settings in TMODn
and TREFn.
Clock selector circuit
Together with the mode register (TMODn), lets you select one of four internal
clock frequencies or an external clock.
8-bit comparator
Determines when to generate an interrupt by comparing the current value of
the counter register (TCNTn) with the reference value previously programmed
into the reference register (TREFn).
Output latch (TOLn)
Where a TC clock pulse is stored pending output to the serial I/O circuit or to
the TC output pin, TCLOn.
When the contents of the TCNTn and TREFn registers coincide, the
timer/counter interrupt request flag (IRQTn) is set to "1", the status of TOLn is
inverted, and an interrupt is generated.
Output enable flag (TOEn)
Must be set to logic one before the contents of the TOLn latch can be output to
TCLOn.
Interrupt request flag (IRQTn)
Cleared when TC operation starts and the TC interrupt service routine is
executed and set to one whenever the counter value and reference value
coincide.
Interrupt enable flag (IETn)
Must be set to logic one before the interrupt requests generated by
timer/counters can be processed.
Table 11-4. TC Register Overview
Register
Name
Type
Description
Size
RAM
Address
Addressing
Mode
Reset
Value
TMOD0
TMOD1
Control
Controls TC0 and 1 enable/disable
(bit 2); clears and resumes
counting operation (bit 3); sets
input clock and clock frequency
(bits 6–4)
8-bit
F90H–F91H
FA0H–FA1H
8-bit write-
only;
(TMODn.3 is
also 1-bit
writeable)
"0"
TCNT0
TCNT1
Counter
Counts clock pulses matching the
TMODn frequency setting
8-bit
F94H–F95H
FA4H–FA5H
8-bit
read-only
"0"
TREF0
TREF1
Reference
Stores reference value for the
timer/counters interval setting
8-bit
F96H–F97H
FA8H–FA9H
8-bit
write-only
FFH
TOE0
TOE1
Flag
Controls timer/counters output to
the TCLOn pin
1-bit
F92H.2
F92H.3
1/4-bit
read/write
"0"