KS57C2308/P2308/C2316/P2316

TIMERS and TIMER/COUNTERS

 

 

8-BIT TIMER/COUNTER 0 (TC0)

OVERVIEW

Timer/counter 0 (TC0) is used to count system “events” by identifying the transition (high-to-low or low-to-high) of incoming square wave signals. To indicate that an event has occurred, or that a specified time interval has elapsed, TC0 generates an interrupt request. By counting signal transitions and comparing the current counter value with the reference register value, TC0 can be used to measure specific time intervals.

TC0 has a reloadable counter that consists of two parts: an 8-bit reference register (TREF0) into which you write the counter reference value, and an 8-bit counter register (TCNT0) whose value is automatically incremented by counter logic.

An 8-bit mode register, TMOD0, is used to activate the timer/counter and to select the basic clock frequency to be used for timer/counter operations. To dynamically modify the basic frequency, new values can be loaded into the TMOD0 register during program execution.

TC0 FUNCTION SUMMARY

 

8-bit programmable timer

Generates interrupts at specific time intervals based on the selected clock

 

frequency.

External event counter

Counts various system "events" based on edge detection of external clock

 

signals at the TC0 input pin, TCL0. To start the event counting operation,

 

TMOD0.2 is set to "1" and TMOD0.6 is cleared to "0".

Arbitrary frequency output

Outputs selectable clock frequencies to the TC0 output pin, TCLO0.

External signal divider

Divides the frequency of an incoming external clock signal according to a

 

modifiable reference value (TREF0), and outputs the modified frequency to the

 

TCLO0 pin.

Serial I/O clock source

Outputs a modifiable clock signal for use as the SCK clock source.

11-9

Page 231
Image 231
Samsung KS57C2308 manual BIT TIMER/COUNTER 0 TC0, TC0 Function Summary