TIMERS and TIMER/COUNTERSKS57C2308/P2308/C2316/P2316

TC0 COMPONENT SUMMARY

 

Mode register (TMOD0)

Activates the timer/counter and selects the internal clock frequency or the

 

external clock source at the TCL0 pin.

Reference register (TREF0)

Stores the reference value for the desired number of clock pulses between

 

interrupt requests.

Counter register (TCNT0)

Counts internal or external clock pulses based on the bit settings in TMOD0

 

and TREF0.

Clock selector circuit

Together with the mode register (TMOD0), 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 (TCNT0) with the reference value previously programmed

 

into the reference register (TREF0).

Output latch (TOL0)

Where a clock pulse is stored pending output to the serial I/O circuit or to the

 

TC0 output pin, TCLO0.

 

When the contents of the TCNT0 and TREF0 registers coincide, the

 

timer/counter interrupt request flag (IRQT0) is set to "1", the status of TOL0 is

 

inverted, and an interrupt is generated.

Output enable flag (TOE0)

Must be set to logic one before the contents of the TOL0 latch can be output to

 

TCLO0.

Interrupt request flag (IRQT0)

Cleared when TC0 operation starts and the TC0 interrupt service routine is

 

executed and set to 1 whenever the counter value and reference value

 

coincide.

Interrupt enable flag (IET0)

Must be set to logic one before the interrupt requests generated by

 

timer/counter 0 can be processed.

11-10

Page 232
Image 232
Samsung KS57C2308 manual TC0 Component Summary, TCLO0