![](http://datasheet.mmic.net.cn/230000/7540_datasheet_15567442/7540_69.png)
HARDWARE
7540 Group User
’
s Manual
1-51
I
Timer Z: Programmable One-shot
Generation Mode
Count set value
In the programmable one-shot generation mode, the value of
EXPZP becomes valid by writing to TZP. Even when changing
TZP is not required, write the same value again.
Write timing to TZP
In the programmable one-shot generation mode, when the setting
value is changed while the waveform is output, set by software in
order not to execute the writing to TZP and the timing of timer un-
derflow simultanesously.
Usage of waveform extension function
The waveform extension function by the timer Z waveform exten-
sion control bit can be used only when
“
00
16
”
is set to Prescaler Z.
When the value other than
“
00
16
”
is set to Prescaler Z, be sure to
set
“
0
”
to EXPZP. Also, when the timer Y underflow is selected as
the count source, the waveform extension function cannot be
used.
Timer Z write mode
When using this mode, be sure to set
“
1
”
to the timer Z write con-
trol bit to select
“
write to latch only
”
.
I
Timer Z: Programmable Wait One-shot
Generation Mode
Count set value
In the programmable wait one-shot generation mode, values of
TZS, EXPZP and EXPZS are valid by writing to TZP. Even when
changing TZP is not required, write the same value again.
Write timing to TZP
In the programmable wait one-shot generation mode, when the
setting value is changed while the waveform is output, set by soft-
ware in order not to execute the writing to TZP and the timing of
timer underflow during the secondary interval simultanesously.
Usage of waveform extension function
The waveform extension function by the timer Z waveform exten-
sion control bit can be used only when
“
00
16
”
is set to Prescaler Z.
When the value other than
“
00
16
”
is set to Prescaler Z, be sure to
set
“
0
”
to EXPZP and EXPZS. Also, when the timer Y underflow is
selected as the count source, the waveform extension function
cannot be used.
Timer Z write mode
When using this mode, be sure to set
“
1
”
to the timer Z write con-
trol bit to select
“
write to latch only
”
.
Timer Z can stop counting by setting
“
1
”
to the timer Z count stop
bit in any mode.
Also, when Timer Z underflows, the timer Z interrupt request bit is
set to
“
1
”
.
Timer Z reloads the value of latch when counting is stopped by the
timer Z count stop bit. (When timer is read out while timer is
stopped, the value of latch is read. The value of timer can be read
out only while timer is operating.)
I
Serial I/O
Serial I/O interrupt
When setting the transmit enable bit to
“
1
”
, the serial I/O transmit
interrupt request bit is automatically set to
“
1
”
. When not requiring
the interrupt occurrence synchronized with the transmission en-
abled, take the following sequence.
Set the serial I/O transmit interrupt enable bit to
“
0
”
(disabled).
Set the transmit enable bit to
“
1
”
.
Set the serial I/O transmit interrupt request bit to
“
0
”
after 1 or
more instructions have been executed.
Set the serial I/O transmit interrupt enable bit to
“
1
”
(enabled).
I/O pin function when serial I/O1 is enabled.
The functions of P1
2
and P1
3
are switched with the setting values
of a serial I/O1 mode selection bit and a serial I/O1 synchronous
clock selection bit as follows.
(1) Serial I/O1 mode selection bit
→
“
1
”
:
Clock synchronous type serial I/O is selected.
Setup of a serial I/O1 synchronous clock selection bit
“
0
”
: P1
2
pin turns into an output pin of a synchronous clock.
“
1
”
: P1
2
pin turns into an input pin of a synchronous clock.
Setup of a SRDY1 output enable bit (SRDY)
“
0
”
: P1
3
pin can be used as a normal I/O pin.
“
1
”
: P1
3
pin turns into a SRDY output pin.
(2) Serial I/O1 mode selection bit
→
“
0
”
:
Clock asynchronous (UART) type serial I/O is selected.
Setup of a serial I/O1 synchronous clock selection bit
“
0
”
: P1
2
pin can be used as a normal I/O pin.
“
1
”
: P1
2
pin turns into an input pin of an external clock.
When clock asynchronous (UART) type serial I/O is selected, it is
P1
3
pin. It can be used as a normal I/O pin.
I
A-D Converter
The comparator uses internal capacitors whose charge will be lost
if the clock frequency is too low.
Make sure that f(X
IN
) is 500kHz or more during A-D conversion.
NOTES ON PERIPHERAL FUNCTIONS