S1C88348/317/316/308 TECHNICAL SOFTWARE
EPSON
II-1
PREFACE
PREFACE
In this part, example of a control programs for each peripheral circuit are described. Basic initialization and
control routines are shown in the program examples use a relocatable method and are based on the
assumption that the cross assembler asm88 for the S1C88 Family is being used. When you create an
application program referring to these examples, use them after completion of the program by adding the
necessary functions.
Description
Program examples are shown by each peripheral
circuit or function, according to the following items.
I/O MAP
Indicates the I/O memory map that
controls the peripheral circuit.
See Part I in this manual, "S1C88348/
317/316/308 Technical Hardware",
for details of the control registers and
operation.
Specification
Indicates the purpose, function, etc.,
of the example routine.
Flowchart
Indicates a flowchart of the example.
Note
Indicates matters that require
attention when using the example
routine and for programming of the
peripheral circuit.
Source List
A source code listing using the
relocatable method in assembly
language.
See the "S1C88 Core CPU Manual"
for details of the instructions and the
"S1C88 Family Structured Assembler
Manual" for the assembly language
and the format of the source list.
Notes for Program Example Use
Take the following precautions when reading this
manual and using the described routines:
(1) Each program example has been modularized
as a low-level routine that controls hardware
directly, and examples such as a concrete
application have not been included. For a
routine to be added by the user, an external
declaration with a label such as "user_program"
should be made and the program will branch to
the label. Because the name "user_program" is
not very descriptive, you should modify the
label name to reflect its function.
(2) In the program examples, 8-bit absolute ad-
dressing has been used for I/O memory access.
Consequently, the program loads the upper 8
bits (0FFH) of the I/O memory base address
(00FF00H) into the BR register. This part in the
flowchart is described as (BR setting) and it is
set in each program example. If you use another
addressing mode, rewriting this part is neces-
sary.
(3) These routines do not specify bank or page.
When using in the expanded mode, set the bank
and page if necessary.
(4) Input, output and I/O port terminals of the
S1C88316 are shared the a bus and special
output, and these functions are set by software.
Be aware that the port configuration will be
changed by these setting. Refer to the terminal
configuration tables according to the mode and
special output settings which have been
mentioned in the "Appendix".
(5) Unary operators set in the asm88 cross assem-
bler have been used for the program examples.
These unary operators get the values below
from a constant or a label operand.
low ... Presents the lower 8 bits of the expression.
high .. Returns the upper 8 bits of a 16-bit expres-
sion.
boc ... Calculates a bank value from the physical
address.
loc .... Calculates a logical address in a bank from
the physical address.
pod .. Calculates a page value from the physical
address.
lod .... Calculates a logical address in a page from
the physical address.
(6) Seiko Epson assumes no responsibility for any
consequences arising from the use of the
programs described.
Note: The program examples are created for the
S1C88316. Since there are some differ-
ences in the built-in ROM/RAM capacity,
number of input ports, output ports and LCD
drive segments, and bus authority release
function of the S1C88348/317/308, it is
necessary to modify the settings according
to the model to be used.