II-44
EPSON
S1C88348/317/316/308 TECHNICAL SOFTWARE
9 SERIAL INTERFACE 2 (ASYNCHRONOUS INTERFACE)
Notes
(1) External routines are called for switching to OSC3 and OSC1. (external call: osc1toosc3, osc3toosc1)
(2) Switching the operating mode when the supply voltage is lower than the VD1 setting may cause a
malfunction. Hence, the example routine checks the supply voltage when switching to the normal
mode (OSC3) and terminates as a supply voltage error remains unprocessed if the supply voltage is
lower than the VD1 setting. For this determination, vdd_ngf flag is used. (See "4 OSCILLATION
CIRCUIT".)
(3) When switching from OSC3 to OSC1 (VD1 = 2.2 V
→ 1.3 V), the program example does not perform
special checking of the supply voltage of SVD if the supply voltage is already more than the VD1
setting.
(4) The example routine does not check the handshake signal when transmitting/receiving. If this
routine is used for an actual program, pay attention to the timing of transmitting/receiving, or check
the timing using a handshake signal.
(5) The 9,600 bps baud rate has been set on the condition that the 4.9152 MHz OSC3 oscillation clock is
used.
(6) To reset the interrupt factor flag, write "1" into the corresponding flags alone, using the AND or LD
instruction. When the OR logic operation instruction has been used, "1" is written for the interrupt
factor flags that have been set to "1" within the same address and those flags are then clear.
(7) The interrupt flags (I1 and I0) have not been reset in the interrupt processing routine of this program
example, so an interrupt lower thanIRQ2 level is disabled at the time of generation. When you wish
to accept the next interrupt after an interrupt has been generated, re-setting of the interrupt flags or
resetting the interrupt factor flag is necessary after due consideration for the nesting level.
(8) When you have written "1" for the transmitting/receiving trigger and begin transmitting/receiving,
first read the data and be sure to write "1" only on the necessary bits.
Also, when writing "1" to reset the receive error flag to "0", similar care is necessary.
Another transmitting/receiving status (receiving status during transmitting, transmitting status
during receiving, and receiving error flag) has been allocated for reading to the same address as the
transmitting/receiving triggers. For example, when directly writing to the transmitting trigger, using
the OR instruction during a receiving operation (receiving status = "1"), the receiving status is read
once and it is then written as the receiving trigger.
Also when the receiving error flag has been set to "1", the receiving error flag is written and reset by
an OR instruction. It is the same as setting the receiving trigger or resetting the receiving error flag.
(9) In this program example for serial interface 2 (asynchronous system), the vector address setting and
program have been allocated from 003000H for the sake of convenience.