Prescaler Unit - Mitsubishi Electric M32R Series User Manual

Mitsubishi 32-bit risc single-chip microcomputers
Table of Contents

Advertisement

10

10.2.2 Prescaler Unit

The prescalers PRS0-5 are an 8-bit counter, which generates clocks supplied to each timer (TOP,
TIO, TMS, TML, TID, TOD, and TOM) from the divide-by-2 frequency of the internal peripheral
clock (10.0 MHz when the internal peripheral clock = 20 MHz).
The values of prescaler registers are initialized to H'00 when reset. Also, when you rewrite the set
value of any prescaler register, the device starts operating with the new value simultaneously when
the prescaler underflows.
Values H'00 to H'FF can be set in the counter registers of prescalers. The prescalers' divide-by
ratios are given by the equation below.
Prescaler divide-by ratio = —————
Prescaler Register 0 (PRS0)
Prescaler Register 1 (PRS1)
Prescaler Register 2 (PRS2)
Prescaler Register 3 (PRS3)
Prescaler Register 4 (PRS4)
Prescaler Register 5 (PRS5)
D0
( D8
D
Bit Name
0 - 7
PRS0, 2 - 5
8 - 15
PRS1
Prescaler Registers 0-2 start counting after reset removal. Prescaler Registers 3-5 each are
activated by setting the TID0 Control & Prescaler 3 Enable Register, TID1 Control & Prescaler 4
Enable Register, and TID2 Control & Prescaler 5 Enable Register to 1 (= count start), upon which
they reload the prescaler register value and start counting. For details, refer to Section 10.7, "TID
(Input-related 16-bit Timer)."
Prescaler set value + 1
1
2
3
9
10
11
PRS0 - PRS5
Function
Sets the prescaler's divide-by value
10-12
MULTIJUNCTION TIMERS
10.2 Common Units of Multijunction Timer
1
<Address: H'0080 0202>
<Address: H'0080 0203>
<Address: H'0080 0204>
<Address: H'0080 07D0>
<Address: H'0080 0BD0>
<Address: H'0080 0CD0>
4
5
12
13
6
D7
14
D15 )
<When reset : H'00>
R
W
Ver.0.10

Advertisement

Table of Contents
loading

Table of Contents