Samsung S3F80JB Timer 2 Match Interrupt, Simplified Timer 2 Function Diagram Interval Timer Mode

Models: S3F80JB

1 346
Download 346 pages 34.13 Kb
Page 271
Image 271

S3F80JB

TIMER 2

 

 

TIMER 2 MATCH INTERRUPT

Timer 2 can also be used to generate a match interrupt (IRQ3, vector F2H) whenever the 16-bit counter value matches the value that is written to the timer 2 reference data registers, T2DATAH and T2DATAL. When a match condition is detected by the 16-bit comparator, the match interrupt is generated, the counter value is cleared, and up counting resumes from ‘00H’.

In match mode, program software can poll the timer 2 match/capture interrupt pending bit, T2CON.0, to detect when a timer 2 match interrupt pending condition exists (T2CON.0 = “1”). When the interrupt request is acknowledged by the CPU and the service routine starts, the interrupt service routine for vector F2H must clear the interrupt pending condition by writing a “0” to T2CON.0.

 

 

 

 

 

 

 

 

 

 

IRQ3 (T2INT)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Pending

 

 

 

 

 

 

 

 

 

 

 

 

 

(T2CON.0)

 

 

 

 

 

 

Interrupt

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Enable/Disable

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(T2CON.1)

 

R (Clear)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CLK

 

 

16-Bit Up Counter

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Match

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

16-Bit Comparator

 

 

 

CTL

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Timer 2 High/Low

 

 

 

 

 

 

 

T2CON.5

 

 

 

 

Buffer Register

 

 

 

 

 

 

 

T2CON.4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Match Signal

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T2CON.3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Timer 2 Data High/Low

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Buffer Register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

P3.0 or P3.3

Figure 13-2. Simplified Timer 2 Function Diagram: Interval Timer Mode

13-3

Page 271
Image 271
Samsung S3F80JB manual Timer 2 Match Interrupt, Simplified Timer 2 Function Diagram Interval Timer Mode