s3c72m9 Samsung Semiconductor, Inc., s3c72m9 Datasheet - Page 268

no-image

s3c72m9

Manufacturer Part Number
s3c72m9
Description
The S3c72m5/s3c72m7/s3c72m9 Single-chip Cmos Microcontroller Has Been Designed For High Performance Using Samsung S
Manufacturer
Samsung Semiconductor, Inc.
Datasheet
TIMERS and TIMER/COUNTERS
S3C72M5/C72M7/C72M9/P72M9 (Preliminary Spec)
TC0 REFERENCE REGISTER (TREF0)
The TC0 reference register TREF0 is an 8-bit write-only register. It is addressable by 8-bit RAM control instructions.
RESET initializes the TREF0 value to 'FFH'.
TREF0 is used to store a reference value to be compared to the incrementing TCNT0 register in order to identify an
elapsed time interval. Reference values will differ depending upon the specific function that TC0 is being used to
perform — as a programmable timer/counter, event counter, clock signal divider, or arbitrary frequency output source.
During timer/counter operation, the value loaded into the reference register is compared to the TCNT0 value. When
TCNT0 = TREF0, the TC0 output latch (TOL0) is inverted and an interrupt request is generated to signal the interval
or event. The TREF0 value, together with the TMOD0 clock frequency selection, determines the specific TC0 timer
interval. Use the following formula to calculate the correct value to load to the TREF0 reference register:
1
TC0 timer interval = (TREF0 value + 1)
TMOD0 frequency setting
(TREF0 value
0)
TC0 OUTPUT ENABLE FLAG (TOE0)
The 1-bit timer/counter 0 output enable flag TOE0 controls output from timer/counter 0 to the TCLO0 pin. TOE0 is
addressable by 1-bit read and write instructions.
(MSB)
(LSB)
F92H
TOE1
TOE0
"0"
TOL2
When you set the TOE0 flag to "1", the contents of TOL0 can be output to the TCLO0 pin. Whenever a RESET
occurs, TOE0 is automatically set to logic zero, disabling all TC0 output. Even when the TOE0 flag is disabled,
timer/counter 0 can continue to output an internally-generated clock frequency, via TOL0.
TC0 OUTPUT LATCH (TOL0)
TOL0 is the output latch for timer/counter 0. When the 8-bit comparator detects a correspondence between the value
of the counter register TCNT0 and the reference value stored in the TREF0 register, the TOL0 value is inverted — the
latch toggles high-to-low or low-to-high. Whenever the state of TOL0 is switched, the TC0 signal is output. TC0
output may be directed to the TCLO0 pin, or it can be output directly to the serial I/O clock selector circuit as the
SCK signal.
Assuming TC0 is enabled, when bit 3 of the TMOD0 register is set to "1", the TOL0 latch is cleared to logic zero,
along with the counter register TCNT0 and the interrupt request flag, IRQT0, and counting resumes immediately.
When TC0 is disabled (TMOD0.2 = "0"), the contents of the TOL0 latch are retained and can be read, if necessary.
11-20

Related parts for s3c72m9