Samsung S3F80JB manual Timer

Models: S3F80JB

1 346
Download 346 pages 34.13 Kb
Page 256
Image 256

S3F80JB

TIMER 1

 

 

11 TIMER 1

OVERVIEW

The S3F80JB microcontroller has a 16-bit timer/counter called Timer 1 (T1). For universal remote controller applications, Timer 1 can be used to generate the envelope pattern for the remote controller signal. Timer 1 has the following components:

One control register, T1CON (FAH, Set 1, Bank0, R/W)

Two 8-bit counter registers, T1CNTH and T1CNTL (F6H and F7H, Set 1, Bank0, Read-only)

Two 8-bit reference data registers, T1DATAH and T1DATAL (F8H and F9H, Set 1, Bank0, R/W)

One 16-bit comparator

You can select one of the following clock sources as the Timer 1 clock:

Oscillator frequency (fOSC) divided by 4, 8, or 16

Internal clock input from the counter A module (counter A flip/flop output)

You can use Timer 1 in three ways:

As a normal free run counter, generating a Timer 1 overflow interrupt (IRQ1, vector F4H) at programmed time intervals.

To generate a Timer 1 match interrupt (IRQ1, vector F6H) when the 16-bit Timer 1 count value matches the 16-bit value written to the reference data registers.

To generate a Timer 1 capture interrupt (IRQ1, vector F6H) when a triggering condition exists at the P3.2 pin for 44 package; at the P3.0 for 32 package (You can select a rising edge, a falling edge, or both edges as the trigger).

In the S3F80JB interrupt structure, the Timer 1 overflow interrupt has higher priority than the Timer 1 match or capture interrupt.

NOTE

The CPU clock should be faster than timer 1 clock.

11-1

Page 256
Image 256
Samsung S3F80JB manual Timer