![Samsung S3F80P5X User Manual Download Page 244](http://html.mh-extra.com/html/samsung/s3f80p5x/s3f80p5x_user-manual_349401244.webp)
BASIC TIMER and TIMER 0
S3F80P5_UM_ REV1.00
TIMER 0 CONTROL REGISTER (T0CON)
You use the timer 0 control register, T0CON, to
— Select the timer 0 operating mode (interval timer, capture mode, or PWM mode)
— Select the timer 0 input clock frequency
— Clear the timer 0 counter, T0CNT
— Enable the timer 0 overflow interrupt or timer 0 match/capture interrupt
— Clear timer0 match/capture interrupt pending conditions
T0CON is located in Set 1, Bank0, at address D2H, and is read/write addressable using register addressing
mode.
A reset clears T0CON to '00H'. This sets timer 0 to normal interval timer mode, selects an input clock frequency
of fOSC/4096, and disables all timer 0 interrupts. You can clear the timer 0 counter at any time during normal
operation by writing a "1" to T0CON.3.
The timer 0 overflow interrupt (T0OVF) is interrupt level IRQ0 and has the vector address FAH. When a timer0
overflow interrupt occurs and is serviced by the CPU, the pending condition is cleared automatically by hardware.
To enable the timer 0 mach/capture interrupt (IRQ0, vector FCH), you must write T0CON.1 to "1.” To detect a
match/capture interrupt pending condition, the application program polls T0CON.0. When a “1” is detected, a
timer0 match or capture interrupt is pending. When the interrupt request has been serviced, the pending condition
must be cleared by software by writing a “0” to the timer0 interrupt pending bit, T0CON.0.
10-4
Summary of Contents for S3F80P5X
Page 10: ......
Page 14: ......
Page 48: ...ADDRESS SPACE S3F80P5_UM_ REV1 00 NOTES 2 22 ...
Page 122: ...INTERRUPT STRUCTURE S3F80P5_UM_ REV1 00 NOTES 5 18 ...
Page 210: ...INSTRUCTION SET S3F80P5_UM_ REV1 00 NOTES 6 88 ...
Page 216: ...CLOCK AND POWER CIRCUITS S3F80P5_UM_ REV1 00 NOTES 7 6 ...
Page 266: ...COUNTER A S3F80P5_UM_ REV1 00 NOTES 12 8 ...
Page 290: ...EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1 00 NOTES 14 18 ...
Page 321: ...DEVELOPMENT TOOLS S3F80P5_UM_ REV1 00 NOTES 19 10 ...