S1C88348/317/316/308 TECHNICAL SOFTWARE
EPSON
II-43
9 SERIAL INTERFACE 2 (ASYNCHRONOUS INTERFACE)
I/O Map
Specifications
Asynchronous serial interface
<Conditions>
P10: SIN
(Input)
Function and input/output direction of the I/O port are automatically
P11: SOUT
(Output)
decided when setting the serial mode.
P12: Hand shake
(Output)
Unused
P13: Hand shake
(Input)
(In this program example, handshake signals during transmission are ignored.)
Vector address setting for serial interface interrupt
(1) async_init: Initialization for asynchronous serial interface (8-bit mode)
Sets the following in order to transmit/receive in an asynchronous system:
Serial interface function
Normal mode (OSC3 oscillation)
Asynchronous 8-bit mode, even parity
Transmitting/receiving interrupt enable (IRQ2)
Synchronous clock = Programmable timer
Transmission baud rate clock has been set to 9,600 bps (when OSC3 = 4.9152 MHz) using program-
mable timer 1 (8 bits).
(2) asyncrv, asyncrv_intr, asyncerr_intr: Receiving of asynchronous serial interface (8-bit mode)
Performs switching to the OSC3 clock and starting the programmable timer, and stores a total of
256 bytes of received data into the built-in memory receive_buffer one byte at a time, using the
receiving interrupt (IRQ2). At this time, if a receiving error occurs, it suspends receiving processing
at that point.
(3) asynctr, async_intr: Transmitting of asynchronous serial interface (8-bit mode)
Performs switching to the OSC3 clock and starting the programmable timer, outputs a total of 256
bytes of transmitted data from a built-in memory trans_buffer one byte at a time, using the trans-
mitting interrupt (IRQ2).
Address Bit
Name
SR R/W
Function
Comment
10
D7
D6
D5
D4
D3
D2
D1
D0
00FF25 D7
D6
D5
D4
D3
D2
D1
D0
FPT1
FPT0
FK1
FK0H
FK0L
FSERR
FSREC
FSTRA
Programmable timer 1 interrupt factor flag
Programmable timer 0 interrupt factor flag
K10 and K11 interrupt factor flag
K04–K07 interrupt factor flag
K00–K03 interrupt factor flag
Serial I/F (error) interrupt factor flag
Serial I/F (receiving) interrupt factor flag
Serial I/F (transmitting) interrupt factor flag
0
R/W
(R)
Interrupt
factor is
generated
(W)
Reset
(R)
No interrupt
factor is
generated
(W)
No operation
00FF23
EPT1
EPT0
EK1
EK0H
EK0L
ESERR
ESREC
ESTRA
Programmable timer 1 interrupt enable register
Programmable timer 0 interrupt enable register
K10 and K11 interrupt enable register
K04–K07 interrupt enable register
K00–K03 interrupt enable register
Serial I/F (error) interrupt enable register
Serial I/F (receiving) interrupt enable register
Serial I/F (transmitting) interrupt enable register
0
R/W
Interrupt
enable
Interrupt
disable