RX - 8581 SA / JE / NB
8.3.2. Related registers for function of time update interrupts.Address | Function | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 |
|
|
|
|
|
|
|
|
|
|
B | Timer Counter 0 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
C | Timer Counter 1 | • | • | • | • | 2048 | 1024 | 512 | 256 |
D | Extension Register | TEST | WADA | USEL | TE | ! | ! | TSEL1 | TSEL0 |
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
E | Flag Register | ! | ! | UF | TF | AF | ! | VLF | ! |
|
|
|
|
|
|
|
|
|
|
F | Control Register | ! | ! | UIE | TIE | AIE | ! | STOP | RESET |
∗1) "o" indicates
∗2) Bits marked with "• " are RAM bits that can contain any value and are
∗Before entering settings for operations, we recommend writing a "0" to the TE and TIE bits to prevent hardware
interrupts from occurring inadvertently while entering settings.∗When the STOP bit or RESET bit value is "1" the time update interrupt function operates only partially. (Operation continues if the source clock setting is 4096 Hz. Otherwise, operation is stopped.)
∗When the
C)can be used as a RAM register. In such cases, stop the
The combination of these two bits is used to set the countdown period (source clock) for the
TSEL0,1 | TSEL1 | TSEL0 | Source clock | Auto reset time | Effects of STOP | |||
(bit 1) | (bit 0) | tRTN | and RESET bits | |||||
|
|
|
| |||||
| 0 | 0 | 4096 | Hz /Once per 244.14 ∝ s | 122 ∝ s | − | ||
Write/Read | 0 | 1 | 64 | Hz | / Once per 15.625 ms | 7.8125 ms | ∗ Does not operate | |
1 | 0 | "Second" update | /Once per second | 7.8125 ms | when the STOP bit | |||
| ||||||||
| 1 | 1 | "Minute" update | /Once per minute | 7.8125 ms | or RESET bit value | ||
| is "1". |
∗1) The /INT pin's auto reset time (tRTN) varies as shown above according to the source clock setting.
∗2) When the source clock has been set to "second update" or "minute update", the timing of both countdown and interrupts is coordinated with the clock update timing.
2)This register is used to set the default (preset) value for the counter. Any count value from 1 (001 h) to
4095 (FFFh) can be set. The counter counts down based on the source clock's period, and when the count value changes from 001h to 000h, the TF bit value becomes "1".
The countdown that starts when the TE bit value changes from "0" to "1" always begins from the preset value. Be sure to write "0" to the TE bit before writing the preset value. If a value is written while TE = "1" the first subsequent event will not be generated correctly.
|
|
|
|
|
|
| Address C |
|
|
|
|
|
|
|
| Address B |
|
|
| ||||
|
|
|
|
|
| Timer Counter 1 |
|
|
|
|
| Timer Counter 0 |
|
|
| ||||||||
| bit 7 | bit 6 |
| bit 5 |
| bit 4 |
| bit 3 | bit 2 |
| bit 1 | bit 0 | bit 7 | bit 6 | bit 5 |
| bit 4 | bit 3 |
| bit 2 | bit 1 | bit 0 | |
| • | • |
|
| • |
| • | 2048 | 1024 |
| 512 | 256 | 128 | 64 | 32 |
| 16 | 8 |
| 4 | 2 | 1 | |
3) TE (Timer Enable) bit |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||||
This bit controls the start/stop setting for the |
|
|
|
|
| ||||||||||||||||||
|
| TE |
|
| Data |
|
|
|
|
|
|
| Description |
|
|
|
|
| |||||
|
|
|
|
|
| 0 |
| Stops |
|
|
|
|
|
|
| ||||||||
| Write/Read |
|
|
|
|
|
|
|
|
|
|
|
|
| |||||||||
|
|
| 1 |
| Starts |
|
|
|
|
|
|
| |||||||||||
|
|
|
|
|
|
| ∗ The countdown that starts when the TE bit value changes from "0" to "1" always begins from the | ||||||||||||||||
|
|
|
|
|
|
|
|
| preset value. |
|
|
|
|
|
|
|
|
|
|
|
|
If set to "0" beforehand, this flag bit's value changes from "0" to 1" when a
TF | Data | Description | |
| 0 | The TF bit is cleared to zero to prepare for the next status detection | |
Write | ∗ Clearing this bit to zero does not enable the /INT low output status to be cleared (to | ||
| |||
| 1 | This bit is invalid after a "1" has been written to it. | |
|
|
| |
| 0 | ||
Read |
|
| |
1 | |||
| |||
| (Result is retained until this bit is cleared to zero.) | ||
|
| ||
|
|
|
Page - 14 |