11 16-BIT TIMERS (T16)
11-6
EPSON
S1C17704 TECHNICAL MANUAL
11.4 16-bit Timer Reload Register and Underflow Period
The Reload Data (T16_TR
x
) Register (0x4222/0x4242/0x4262) is used to set the initial value to the down counter.
The counter initial value set in the reload data register is preset to the down counter when the 16-bit timer is reset or
when the counter underflows. When starting the 16-bit timer after resetting, the timer counts down from the reload
value. So the reload value and the input clock frequency determine the period of time from starting the timer until
an underflow occurs (and between underflows). This makes it possible to obtain a desired wait time, a periodical
interrupt interval, or programmable transfer clock for the serial interface.
One-shot mode
Counter
Repeat mode
Counter
0
1
n-1
n
n
Preset by resetting the timer
Preset by resetting the timer
Preset automatically
Underflow
Preset automatically
(n = Reload data)
0
1
n-1
n
n
Underflow
Timer starts
Timer starts
Preset automatically
0
1
n-1
n
Underflow
Figure 11.4.1 Preset Timing
The underflow period is calculated by the expression below.
TR + 1
clk_in
Underflow period = ———— [s]
Underflow cycle = ———— [Hz]
clk_in
TR + 1
clk_in: Count clock (prescaler output clock) frequency [Hz]
TR:
Reload data (0–65535)
Summary of Contents for S1C17704
Page 1: ...TECHNICAL MANUAL S1C17704 CMOS 16 BIT SINGLE CHIP MICROCOMPUTER ...
Page 22: ...1 OVERVIEW 1 10 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 42: ...3 MEMORY MAP BUS CONTROL 3 12 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 82: ...6 INTERRUPT CONTROLLER ITC 6 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 108: ...8 CLOCK GENERATOR CLG 8 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 112: ...9 PRESCALER PSC 9 4 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 138: ...10 I O PORTS P 10 26 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 156: ...11 16 BIT TIMERS T16 11 18 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 208: ...14 8 BIT OSC1 TIMER T8OSC1 14 16 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 234: ...16 STOPWATCH TIMER SWT 16 14 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 242: ...17 WATCHDOG TIMER WDT 17 8 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 264: ...18 UART 18 22 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 300: ...20 I2C 20 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 320: ...21 REMOTE CONTROLLER REMC 21 20 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 360: ...24 ON CHIP DEBUGGER DBG 24 6 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...
Page 362: ...25 BASIC EXTERNAL WIRING DIAGRAM 25 2 EPSON S1C17704 TECHNICAL MANUAL THIS PAGE IS BLANK ...