Selecting Division Ratio And Output Control For Prescaler; Source Clock Output To 8-Bit Programmable Timer - Epson S1C33210 Technical Manual

Cmos 32-bit single chip microcomputer
Table of Contents

Advertisement

III PERIPHERAL BLOCK: PRESCALER

Selecting Division Ratio and Output Control for Prescaler

The prescaler has registers for selecting the division ratio and clock output control separately for each peripheral
circuit described above, allowing each peripheral circuit to be controlled.
The prescaler's division ratio can be selected from among eight ratios set for each peripheral circuit through the use of
the division ratio selection bits. The divided clock is output to the corresponding peripheral circuit by writing "1" to
the clock control bit.
Peripheral circuit
16-bit programmable timer 0
16-bit programmable timer 1
16-bit programmable timer 2
16-bit programmable timer 3
16-bit programmable timer 4
16-bit programmable timer 5
8-bit programmable timer 0
8-bit programmable timer 1
8-bit programmable timer 2
8-bit programmable timer 3
8-bit programmable timer 4
8-bit programmable timer 5
A/D converter
1 to 4: See Table 2.2.
Bit setting
7
1
/4096
2
/256
3
/4096
4
/4096
( = Source clock selected by PSCDT0)
Current consumption can be reduced by turning off the clock output to the peripheral circuits that are unused among
those listed above.
Note: In the following cases, the prescaler output clock may contain a hazard:
• If, when a clock is output, its division ratio is changed
• When the clock output is switched between on and off
• When the oscillation circuit is turned off or the CPU operating clock is switched over
Before performing these operations, make sure the 16-bit and 8-bit programmable timers and the
A/D converter are turned off.

Source Clock Output to 8-Bit Programmable Timer

In addition to the divided clock, the prescaler can output the source clock directly to the 8-bit programmable timer.
This function can be selected for each 8-bit timer using P8TPCKx bit.
8-bit timer 0: P8TPCK0 (D0) / 8-bit timer clock select register (0x40146)
8-bit timer 1: P8TPCK1 (D1) / 8-bit timer clock select register (0x40146)
8-bit timer 2: P8TPCK2 (D2) / 8-bit timer clock select register (0x40146)
8-bit timer 3: P8TPCK3 (D3) / 8-bit timer clock select register (0x40146)
8-bit timer 4: P8TPCK4 (D0) / 8-bit timer 4/5 clock select register (0x40140)
8-bit timer 5: P8TPCK5 (D1) / 8-bit timer 4/5 clock select register (0x40140)
When P8TPCKx is set to "1", the prescaler input clock ( /1) is selected for the 8-bit timer x operating clock.
The clock output is controlled by the P8TONx bit even if P8TPCKx is set to "1".
When P8TPCKx is "0", the divided clock that is selected by P8TSx[2:0] will be output to the 8-bit timer x.
At initial reset, P8TPCKx is set to "0" and P8TSx[2:0] becomes effective.
B-III-2-2
Table 2.1 Control Bits of the Clock Control Registers
Division ratio selection bit
P16TS0[2:0] (D[2:0]/0x40147) 1
P16TS1[2:0] (D[2:0]/0x40148) 1
P16TS2[2:0] (D[2:0]/0x40149) 1
P16TS3[2:0] (D[2:0]/0x4014A) 1
P16TS4[2:0] (D[2:0]/0x4014B) 1
P16TS5[2:0] (D[2:0]/0x4014C) 1
P8TS0[2:0] (D[2:0]/0x4014D) 2
P8TS1[2:0] (D[6:4]/0x4014D) 3
P8TS2[2:0] (D[2:0]/0x4014E) 4
P8TS3[2:0] (D[6:4]/0x4014E) 2
P8TS4[2:0] (D[2:0]/0x40145) 4
P8TS5[2:0] (D[6:4]/0x40145) 2
PSAD[2:0] (D[2:0]/0x4014F) 2
Table 2.2 Division Ratio
6
5
/1024
/256
/128
/64
/2048
/1024
/2048
/64
EPSON
P16TON0 (D3/0x40147)
P16TON1 (D3/0x40148)
P16TON2 (D3/0x40149)
P16TON3 (D3/0x4014A)
P16TON4 (D3/0x4014B)
P16TON5 (D3/0x4014C)
P8TON0 (D3/0x4014D)
P8TON1 (D7/0x4014D)
P8TON2 (D3/0x4014E)
P8TON3 (D7/0x4014E)
P8TON4 (D3/0x40145)
P8TON5 (D7/0x40145)
PSONAD (D3/0x4014F)
4
3
/64
/16
/32
/16
/512
/256
/128
/32
/16
Clock control bit
2
1
0
/4
/2
/1
/8
/4
/2
/64
/32
/8
/4
/2
S1C33210 FUNCTION PART

Advertisement

Table of Contents
loading

Table of Contents