III PERIPHERAL BLOCK:
Setting preset data (initial counter value)
Each timer has an
Timer 0 reload data: RLD0[7:0] (D[7:0]) /
Timer 1 reload data: RLD1[7:0] (D[7:0]) /
Timer 2 reload data: RLD2[7:0] (D[7:0]) /
Timer 3 reload data: RLD3[7:0] (D[7:0]) /
Timer 4 reload data: RLD4[7:0] (D[7:0]) /
Timer 5 reload data: RLD5[7:0] (D[7:0]) /
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
Data is thus preset in the
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
Timer 0 preset: PSET0 (D1) /
Timer 1 preset: PSET1 (D1) /
Timer 2 preset: PSET2 (D1) /
Timer 3 preset: PSET3 (D1) /
Timer 4 preset: PSET4 (D1) /
Timer 5 preset: PSET5 (D1) /
2.When the
Since the reload data is preset in the
Before starting the
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:
RLDx + 1
Under flow cycle =
fPSCIN: 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) /
Timer 1 RUN/STOP control: PTRUN1 (D0) /
Timer 2 RUN/STOP control: PTRUN2 (D0) /
Timer 3 RUN/STOP control: PTRUN3 (D0) /
Timer 4 RUN/STOP control: PTRUN4 (D0) /
Timer 5 RUN/STOP control: PTRUN5 (D0) /
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.
8TM
S1C33L03 FUNCTION PART | EPSON |