EEE - BEE603 - Microprocessor and Microcontroller - Mr. K. Dwarakesh
EEE - BEE603 - Microprocessor and Microcontroller - Mr. K. Dwarakesh
Microcontroller
Compiled by,
Mr.K.Dwarakesh
Assistant Professor
Dept. of EEE
BIHER
Processor System Architecture
Address Bus
Data Bus
Control Bus
The 8085: CPU Internal Structure
The 8085: CPU Internal Structure
The internal architecture of the 8085 CPU is capable of performing the following
operations:
Registers
Used for arithmetic / logic operations – the result is always stored in the
accumulator.
The 8085: CPU Internal Structure
The 8-bit 8085 CPU (or MPU – Micro Processing Unit) communicates with the other units
using a 16-bit address bus, an 8-bit data bus and a control bus.
The Address and Data Busses
•
• The address bus has 8 signal lines A8 – A15 which
• are unidirectional.
• The other 8 address bits are multiplexed (time shared) with
the 8 data bits.
– So, the bits AD0 – AD7 are bi-directional and serve as
A0 – A7 and D0 – D7 at the same time.
• During the execution of the instruction, these
lines carry the address bits during the early part,
then during the late parts of the execution, they
carry the 8 data bits.
– In order to separate the address from the data, we can
use a latch to save the value before the function of the bits
The Control and Status Signals
• There are 4 main control and status signals. These are:
• ALE: Address Latch Enable. This signal is a pulse that
become 1 when the AD0 – AD7 lines have an address on
them. It becomes 0 after that. This signal can be used to
enable a latch to save the address bits from the AD lines.
• RD: Read. Active low.
• WR: Write. Active low.
• IO/M: This signal specifies whether the operation is a
memory operation (IO/M=0) or an I/O operation
(IO/M=1).
• S1 and S0 : Status signals to specify the kind of
operation being performed .Usually un-used in small
systems.
Frequency Control Signals
• There are 3 important pins in the frequency control group.
– X0 and X1 are the inputs from the crystal or clock generating
circuit.
• The frequency is internally divided by 2.
– So, to run the microprocessor at 3 MHz, a clock running
at 6 MHz should be connected to the X0 and X1 pins.
– CLK (OUT): An output clock pin to drive the clock of the rest of the
system.
•
• To understand how the microprocessor operates and uses
these different signals, we should study the process of communication
between the microprocessor and memory during a memory read or write
• operation.
• Lets look at timing and the data flow of an instruction
fetch operation. (Example 3.1)
Steps For Fetching an
•
Instruction
Lets assume that we are trying to fetch the instruction at memory
location 2005. That means that the program counter is now set to that
value.
– The following is the sequence of operations:
• The program counter places the address value on the address
bus and the controller issues a RD signal.
• The memory’s address decoder gets the value and determines
which memory location is being accessed.
• The value in the memory location is placed on the data bus.
• The value on the data bus is read into the instruction decoder
inside the microprocessor.
• After decoding the instruction, the control unit issues the
proper control signals to perform the operation.
Timing Signals For Fetching an Instruction
• Now, lets look at the exact timing of this sequence of events as that is
extremely important. (figure 3.3)
– At T1 , the high order 8 address bits (20H) are placed on the address
lines A8 – A15 and the low order bits are placed on AD7–AD0. The
ALE signal goes high to indicate that AD0 – AD8 are carrying an
address. At exactly the same time, the IO/M signal goes low to indicate
a memory operation.
– At the beginning of the T2 cycle, the low order 8 address bits are
removed from AD7– AD0 and the controller sends the Read (RD)
signal to the memory. The signal remains low (active) for two clock
periods to allow for slow devices. During T2 , memory places the data
from the memory location on the lines AD7– AD0 .
– During T3 the RD signal is Disabled (goes high). This turns off the
output Tri-state buffers in the memory. That makes the AD7– AD0
lines go to high impedence mode.
Demultiplexing AD7-AD0
– From the above description, it becomes obvious that the AD7– AD0
lines are serving a dual purpose and that they need to be
demultiplexed to get all the information.
– The high order bits of the address remain on the bus for three clock
periods. However, the low order bits remain for only one clock
period and they would be lost if they are not saved externally. Also,
notice that the low order bits of the address disappear when they
are needed most.
– To make sure we have the entire address for the full three clock
cycles, we will use an external latch to save the value of AD7– AD0
when it is carrying the address bits. We use the ALE signal to
enable this latch.
Demultiplexing AD7-AD0
8085
A15-A8
ALE
AD7-AD0 Latch
A7- A0
D7- D0