
APPLICATION
2.10 Oscillation circuit
3825 GROUP USER’S MANUAL
2–198
(2) Clock output function
sSwitching between I/O port function and clock output function
The internal clock
φ is output from the pins P40 / f(XIN) / f(XIN)/2 and P41 / f(XIN)/5 / f(XIN)/10 by
setting P40/P41 clock output control bits (bits 0 and 1) of the clock output control register (address
002A16) to “1.”
To output clock, set bits 0 and 1 of port P4 direction register to “1” (output mode).
The pin P40 / f(XIN) / f(XIN)/2 functions as the clock output pin at
φ cycle immediately after the P40
clock output control bit is set to “1.”
The pin P41 / f(XIN)/5 / f(XIN)/10 functions as the clock output pin in synchronization with a rising
edge of clock (XIN/5) immediately after the P41 clock output control bit is set to “1.”
sSelection of output clock frequency
The output clock frequency is selected by setting the output clock frequency selection bit (bit 2) of
the clock output control register.
When the clock output frequency selection bit is “0,” f(XIN) clock is output from the P40 / f(XIN) /
f(XIN)/2 pin, f(XIN)/5 clock is output from the P41 / f(XIN)/5 / f(XIN)/10 pin. At this time, a duty ratio
of output waveform from the P40 / f(XIN) / f(XIN)/2 pin depends on XIN input waveform. A duty ratio
of output waveform from the P41 / f(XIN)/5 / f(XIN)/10 is approximately 40%.
When the clock output frequency selection bit is “1,” f(XIN)/2 clock is output from the P40 /
f(XIN) / f(XIN)/2 pin, f(XIN)/10 clock is output from the P41 / f(XIN)/5 / f(XIN)/10 pin. At this time, both
duty ratio of output waveform from the pins P40 / f(XIN) / f(XIN)/2 and P41 / f(XIN)/5 / f(XIN)/10 is
approximately 50%.
Figure 2.10.4 shows the structure of the clock output control register.
Fig. 2.10.4 Structure of clock output control register
0: P40
←f(XIN),
P41
←f(XIN)/5
1: P40
←f(XIN)/2,
P41
←f(XIN)/10
b7 b6 b5 b4 b3 b2 b1 b0
Clock output control register (TCON) [Address 2A16]
B
Name
Functions
At reset R W
Clock output control register
0
3
to
7
P40 clock output
control bit
0: Port function
1: Clock output
(Port direction register
= “1”)
0
Nothing is allocated. These bits cannot be
written to and are fixed to “0” at reading.
×
1
P41 clock output
control bit
0: Port function
1: Clock output
(Port direction register
= “1”)
0
2
Output clock
frequency selection
bit
0