EasyManua.ls Logo

Hitachi AP1 - Page 323

Hitachi AP1
378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
--------------------------------------------------------------------------HMCS404AC
• D-port
O-port
is
I-bit I/O
port,
and it has 16
Input/Output
common
pins.
It
can be set/reset
by
the SED/RED and SEDD/REDD
instructions, and can be tested by the
TO
and TOO instructions.
Table 17 shows
the
classification
of
standard pins, high voltage
pins
and
the
Input/Output
pins circuit types.
• R-port
R-port
is
4-bit
I/O
port. It provides
20
input/output
com-
mon
pins,
16
output-only pins, and 6 input-only pins. Data
input
is
processed using
the
LAR and LBR instructions and data
output
is
processed using
the
LRA and LRB instructions. The
MCU
will
not
be affected
by
writing into
the
input-only
and/or
non-existing ports, invalid data will be read
by
reading from
the
output-only
and/or
non-existing ports .
The
R3~33,
R40,
R41
and
R42
pins are also used
as
the INTo,
INTI,
SCK, SI and SO pins respectively. Table 17 shows the
classification
of
standard pins, high voltage pins and
Input/
Output
pins circuit types.
• RESET
The
MCU
is
reset
by
setting RESET pin
to
"I".
At power
ON
or
recovering from stop mode, apply RESET input more
than
tRe
to
obtain the necessary time for oscillator stabiliza-
tion. In
other
cases,
the
MCU
reset reqUires
at
least
two
instruc-
tions cycle time
of
RESET input.
Table
19
shows initialized items
by
MCU
reset and each
status after reset.
Table
19
Initial Value by
MCU
Reset
Items
Initial
value by
Contents
MCU
reset
Program counter
(PC)
$0000 Execute program from the
top
of
ROM
address.
Status
(ST)
"1"
Enable
to
branch
with
conditional branch instructions.
Stack pointer
(SP)
$3FF Stack level
is
O.
(A) Without pull-
"1"
Enable
to
input.
upMOS
Standard pin
(B)
With pull-up
"1"
Enable
to
input
MOS
(C)
CMOS
"1"
-
I/O
pin
(0)
Without pull-
output
register
"0"
Enable
to
input.
High voltage
down
MOS
pin
(E)
With pull-
"0"
Enable
to
input.
down
MOS
Interrupt Enable
Flag
(I/E)
"0"
Inhibit
all
interrupts.
Interrupt flag
Interrupt Request
Flag
(I
F)
"0"
No interrupt request.
Interrupt
Mask
(1M)
"1"
Mask interrupt request.
Port Mode Register (PMR)
"0000"
See
Item
"Port
Mode Register".
Mode register
Serial Mode Register (SMR)
"0000"
See
Item "Serial Mode Register".
Timer Mode Register A (TMA)
"000"
See
Item
"Timer
Mode Register
A".
Timer Mode Register B (TMB)
"0000"
See
Item
"Timer
Mode Register B".
Prescaler
$000 -
Timer/Counter A (TCA) $00
-
Timer/Counter,
Timer/Event Counter B
(TCB) $00
-
Serial interface
Timer Load Register (TLR)
$00
-
Octal Counter
"000"
-
(Note)
MCU
reset affects
to
the rest
of
registers
as
follows:
Item
After recovering from STOP mode
After
MCU
reset except for
by
MCU
reset the left condition
Carry
(CA)
Accumulator
(A)
(8)
The contents
of
the
items before The contents
of
the
items before
8 Register
MCU
reset are
not
retained.
MCU
reset are
not
retained.
W Register
(W)
It
is
necessary
to
intialize
them
It
is
necessary
to
initialize them
X/SPX Registers
(X/SPX)
by software again. by software again.
Y /SPY Registers
(Y/SPY)
Serial Data Register
(SR)
Same
as
above
Same
as
above
The
contents
of
RAM
before
MCU
RAM
reset (just before
STOP instruction)
Same
as
above
are retained.
321