![](http://datasheet.mmic.net.cn/110000/M32186F8VFP_datasheet_3496152/M32186F8VFP_890.png)
20
OSCILLATOR CIRCUIT
20-8
32185/32186 Group Hardware Manual
Rev.1.10 REJ09B0235-0110 May 15, 07
The external bus clock can be selected from BCLK and BCLK divided by two by using CLKOUT Select Regis-
ter.
CLKOUT Select Register (CLKOUTSEL)
<Address: H'0080 01A0>
123456
b7
b0
CLKOSEL
00
CLKOSELP
0
<Upon exiting reset: H'00>
b
Bit Name
Function
R
W
0–5
No function assigned. Fix to"0."
0–
6
CLKOSELP
0W
CLKOSEL write control bit
7
CLKOSEL
0: BCLK divided by 2
R
W
CLKOUT select bit
1: BCLK
Notes: At the timing for CLKOUT changes from divided-by-2 BCLK to straight BCLK or vice versa, there will be some indefinite output.
When BCLK is selected as a CLKOUT terminal output, regardless of CS0 to CS3 are used or not, it is prohibition that
selecting 0 wait in WAIT (the number selection of internal wait) bit of a CSx area wait control register.
(1) CLKOSELP (CLKOSEL Write Control) bit (Bit 6)
This bit controls write to the CLKOUT select bit.
(2) CLKOSEL (CLKOUT Select) bit (Bit 7)
This bit selects straight BCLK or divided-by-2 BCLK as outputting of CLKOUT (external bus synchronous
clock) pin. If the CPU clock is 80 MHz, BCLK is 20 MHz. If CLKOSEL is cleared to "0," CLKOUT or the
external bus reference clock is 10 MHz; if CLKOSEL is set to "1," CLKOUT is 20 MHz. The number of wait
states set by the CSn area control register, as well as CS wait, strobe wait, recovery cycles and idle cycles
after read all are synchronized to CLKOUT.
However when "1" is selected in CLKOSEL bit (BCLK is selected as a CLKOUT terminal output), regardless
of CS0 to CS3 are used or not, it is prohibition that selecting 0 wait in WAIT (the number selection of internal
wait) bit of a CSx area wait control register.
The following describes how to set the CLKOSEL (CLKOUT select ) bit (See Figure 17.2.2.)
1. The program in the internal ROM or the internal RAM should be used to set the bits.
2. Write "1" to the CLKOSEL write control bit (CLKOSELP).
3. Subsequent to 2 above, write "0" to the CLKOSEL write control bit (CLKOSELP) and then "0"
or "1" whichever desired to the CLKOUT select bit (CLKOSEL).
4. After writing to the above bits, access any SFR area for read twice.
20.1 Oscillator Circuit