III PERIPHERAL BLOCK: 8-BIT PROGRAMMABLE TIMERS
S1C33210 FUNCTION PART
EPSON
B-III-3-5
Setting preset data (initial counter value)
Each timer has an 8-bit down-counter and a reload data register. The reload data register RLDx is used to set
the initial value of the down-counter of each timer.
Timer 0 reload data: RLD0[7:0] (D[7:0]) / 8-bit timer 0 reload data register (0x40161)
Timer 1 reload data: RLD1[7:0] (D[7:0]) / 8-bit timer 1 reload data register (0x40165)
Timer 2 reload data: RLD2[7:0] (D[7:0]) / 8-bit timer 2 reload data register (0x40169)
Timer 3 reload data: RLD3[7:0] (D[7:0]) / 8-bit timer 3 reload data register (0x4016D)
Timer 4 reload data: RLD4[7:0] (D[7:0]) / 8-bit timer 4 reload data register (0x40175)
Timer 5 reload data: RLD5[7:0] (D[7:0]) / 8-bit timer 5 reload data register (0x40176)
The reload data registers can be read and written. At initial reset, the reload data registers are not initialized.
The data written to this register is preset in the down-counter, and the counter starts counting down from the
preset value.
Data is thus preset in the down-counter in the following two cases:
1. When it is preset in the software
Presetting in the software is performed using the preset control bit PSETx. When this bit is set to "1", the
content of the reload data register is loaded into the down-counter at that point.
Timer 0 preset: PSET0 (D1) / 8-bit timer 0 control register (0x40160)
Timer 1 preset: PSET1 (D1) / 8-bit timer 1 control register (0x40164)
Timer 2 preset: PSET2 (D1) / 8-bit timer 2 control register (0x40168)
Timer 3 preset: PSET3 (D1) / 8-bit timer 3 control register (0x4016C)
Timer 4 preset: PSET4 (D1) / 8-bit timer 4 control register (0x40174)
Timer 5 preset: PSET5 (D1) / 8-bit timer 5 control register (0x40178)
2. When the down-counter underflown during counting
Since the reload data is preset in the down-counter upon underflow, its underflow cycle is determined by the
value that is set in the reload data register. This underflow signal controls each function described in the
preceding section.
Before starting the 8-bit programmable timer, set the initial value in the reload data register and use the PSETx
bit to preset the data in the down-counter.
The underflow cycle is determined by the prescaler setting and the reload data. The relationship between these
two parameters is expressed by the following equation:
Under flow cycle = RLDx + 1
[sec.]
f
PSCIN
×
pdr
f
PSCIN
:
Prescaler input clock frequency [Hz]
pdr:
Prescaler division ratio set by P8TSx
RLDx:
Set value of the RLDx register (0 to 255)
Timer RUN/STOP control
Each timer has a PTRUNx bit to control RUN/STOP.
Timer 0 RUN/STOP control: PTRUN0 (D0) / 8-bit timer 0 control register (0x40160)
Timer 1 RUN/STOP control: PTRUN1 (D0) / 8-bit timer 1 control register (0x40164)
Timer 2 RUN/STOP control: PTRUN2 (D0) / 8-bit timer 2 control register (0x40168)
Timer 3 RUN/STOP control: PTRUN3 (D0) / 8-bit timer 3 control register (0x4016C)
Timer 4 RUN/STOP control: PTRUN4 (D0) / 8-bit timer 4 control register (0x40174)
Timer 5 RUN/STOP control: PTRUN5 (D0) / 8-bit timer 5 control register (0x40178)
The timer is initiated to start counting down by writing "1" to PTRUNx. Writing "0" to PTRUNx disables the
clock input and causes the timer to stop counting.
This RUN/STOP control does not affect the counter data. Even when the timer has stopped counting, the
counter retains its count so that it can start counting again from that point.
When the terminal count is reached and the counter underflows, the initial value is reloaded from the reload
data register into the counter.
Summary of Contents for S1C33210
Page 4: ......
Page 13: ...S1C33210 PRODUCT PART ...
Page 14: ......
Page 124: ...APPENDIX B PIN CHARACTERISTICS A 110 EPSON S1C33210 PRODUCT PART THIS PAGE IS BLANK ...
Page 125: ...S1C33210 FUNCTION PART ...
Page 126: ......
Page 127: ...S1C33210 FUNCTION PART I OUTLINE ...
Page 128: ......
Page 130: ...I OUTLINE INTRODUCTION B I 1 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 138: ...I OUTLINE LIST OF PINS B I 3 6 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 139: ...S1C33210 FUNCTION PART II CORE BLOCK ...
Page 140: ......
Page 142: ...II CORE BLOCK INTRODUCTION B II 1 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 148: ...II CORE BLOCK CPU AND OPERATING MODE B II 2 6 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 152: ...II CORE BLOCK INITIAL RESET B II 3 4 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 234: ...II CORE BLOCK CLG Clock Generator B II 6 10 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 236: ...II CORE BLOCK DBG Debug Unit B II 7 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 237: ...S1C33210 FUNCTION PART III PERIPHERAL BLOCK ...
Page 238: ......
Page 240: ...III PERIPHERAL BLOCK INTRODUCTION B III 1 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 296: ...III PERIPHERAL BLOCK WATCHDOG TIMER B III 5 4 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 429: ...S1C33210 FUNCTION PART IV ANALOG BLOCK ...
Page 430: ......
Page 432: ...IV ANALOG BLOCK INTRODUCTION B IV 1 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 448: ...IV ANALOG BLOCK A D CONVERTER B IV 2 16 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 449: ...S1C33210 FUNCTION PART V DMA BLOCK ...
Page 450: ......
Page 452: ...V DMA BLOCK INTRODUCTION B V 1 2 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 506: ...V DMA BLOCK IDMA Intelligent DMA B V 3 18 EPSON S1C33210 FUNCTION PART THIS PAGE IS BLANK ...
Page 507: ...S1C33210 FUNCTION PART Appendix I O MAP ...
Page 508: ......
Page 557: ......