Intel MCS48 User Manual page 26

Family of single chip microcomputers
Hide thumbs Also See for MCS48:
Table of Contents

Advertisement

INTRODUCTION
processor
to
perform
arithmetic
manipu-
lations
on
the data
it
obtains
from
memory
and
from
its
other
inputs.
Using
only
the
basic
adder
a
capable
programmer
can
write routines
which
will
subtract,
multiply
and
divide,
giving
the
machine complete
arithmetic
capabilities.
In
practice,
however,
most
ALUs
provide
other
built-in
functions, including
boolean
logic
operations,
and
shift
capabilities.
The
ALU
contains Flag
Bits
which
specify
certain
conditions
that arise
in
the
course
of
arithmetic
and
logical
manipulations.
It
is
possible
to
program
jumps
which
are
conditionally
dependent on
the
status of
one
or
more
flags.
Thus,
for
example,
the
program
may
be designed
to
jump
to
a
special routine
if
the carry
bit
is
set
following
an
addition
instruction.
Control
Circuitry
The
control
circuitry
is
the primary functional
unit
within
a
CPU.
Using
clock
inputs,
the
control
circuitry
maintains the proper
se-
quence
of
events required
for
any
processing
task.
After
an
instruction
is
fetched
and
decoded,
the control
circuitry
issues the
appropriate
signals
(to
units
both
internal
and
external to the
CPU)
for
initiating
the
proper processing
action.
Often the
control
circuitry
will
be capable
of
responding
to
external
signals,
such
as
an
interrupt.
An
Interrupt
request
will
cause
the
control
circuitry to
temporarily
interrupt
main
pro-
gram
execution,
jump
to
a
special routine to
service the interrupting device,
then auto-
matically return to
the
main program.
1.1.3
Computer
Operations
There
are
certain
operations
that
are basic
to
almost
any computer.
A
sound
understand-
ing of
these
basic operations
is
a
necessary
prerequisite
to
examining
the
specific
operations
of
a
particular
computer.
Timing
The
activities
of
the
central
processor
are
cyclical.
The
processor
fetches
an
instruc-
tion,
performs
the
operations
required,
fetches the next
instruction,
and
so
on.
This
orderly
sequence
of
events
requires precise
timing,
and
the
CPU
therefore requires
a
free
running
oscillator
clock
which
furnishes the
reference
for
all
processor
actions.
The
combined
fetch
and
execution
of
a single
instruction
is
referred to
as
an
Instruction
Cycle.
The
portion
of
a cycle
identified
with a
clearly
defined
activity
is
called
a
State.
And
the
interval
between
pulses
of
the timing
oscillator
is
referred to
as a
Clock
Period.
As
a general
rule,
one
or
more
clock periods are
necessary
for
the
completion
of
a
state,
and
there are several
states
in
a
cycle.
Instruction
Fetch
The
first
state(s) of
any
instruction
cycle
will
be
dedicated
to
fetching the next
instruction.
The
CPU
issues
a read
signal
and
the
contents
of
the
program
counter
are sent
to
program
memory,
which
responds
by
returning the next instruction
word.
The
first
byte
of
the
instruction
is
placed
in
the
instruction
register.
If
the
instruction
con-
sists
of
more
than
one
byte,
additional states
are required
to fetch
the
second
byte
of
the
instruction.
When
the
entire instruction
is
present
in
the
CPU,
the
program
counter
is
incremented
(in
preparation
for
the next
instruction
fetch)
and
the
instruction
is
decoded.
The
operation
specified
in
the
instruction
will
be executed
in
the
remaining
states of
the
instruction cycle.
The
instruc-
tion
may
call
for
a data
memory
read or
write,
an
input or
output and/or an
internal
CPU
operation,
such
as
a
register-to-register
transfer
or
an
add
operation.
Memory
Read
An
instruction
fetch
is
merely a
special
program
memory
read operation
that
brings
the
instruction
to
the
CPU's
instruction
register.
The
instruction
fetched
may
then
call
for
data
to
be
read
from
data
memory
into
the
CPU. The
CPU
again
issues
a read
signal
and
sends
the
proper
memory
address;
memory
responds by
returning the
requested word.
The
data received
is
placed
in
the
accumulator
or
one
of
the other
general
purpose
registers (not
the
instruc-
tion
register).
1-8

Advertisement

Table of Contents
loading

Table of Contents