Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

TEE 43216:Fundamentals

of Microprocessor
Introduction to microprocessor
 Microprocessor is a tiny programmable integrated electronic device that
has computing and decision making capability. It is similar to the central
processing unit of a computer
 The microprocessor is a digital device that communicates and operates on
binary numbers 0 and 1.
 It processes the information according to a stored program, and output
information in the form of digital signals.
 It is basically single (large scale integration) LSI chip.
Computer
 It is a digital system capable of performing the following functions
 Accept data from the environment (World) and an input
 Process / manipulate/ modify/ condition data
 Save processed data for future use
 Deliver/display the processed data to the environment (World) as an output
EVOLUTION OF MICROPROCESSORS
 The first microprocessor, Intel 4004, a 4-bit PMOS μP was introduced in 1971 by
Intel corporation USA.
 This was a processor on a single chip. It had the capability of performing simple
arithmetic and logical operations such as addition, subtraction, comparison,
AND and OR.
 It also had a control unit which could perform various control functions like
fetching an instruction from the memory, decoding it and generating control
pulses to execute it.
EVOLUTION OF MICROPROCESSORS
ORGANIZATION OF MICROCOMPUTERS
 A microcomputer is one among many microprocessor-based systems, a simplified but
formal structure of a microprocessor based system or a product
Functions of Microcomputer
 A microcomputer is a device which must be capable of:
 receiving input (data and instructions)
 performing computations (arithmetic and logical)
 storing data and instructions
 displaying the results of any computations, and
 Controlling all the devices that perform the above mentioned four tasks (directly or
indirectly)
A Microprocessor Based System
Input Devices
 A device which enables a microcomputer to receive the input is known as
an input device.
 Typical input devices are:
 keyboards,
 mouse
 toggle switches
 Touch screen
 Microphone
 Web Camera
Output devices
 The task of displaying the results computed by the microprocessor is performed
by an output device.
 Typical Output devices are:
 Character printers,
 cathode ray tubes (CRT) displays,
 Light emitting diodes (LEDs)
 Laser printers
 Loudspeakers
Memories
 Storage of data and instructions is accomplished using memories,
 There are two separate memory units in an microprocessor based system:
 Program memory used to store the program (A set of instruction)
 ROM,
 Typical ROM devices include: PROM, EPROM, EEPROM, FLASH

 Data memory used to store the data


 RAM
 Typical RAM devices include: SRAM and DRAM
System Highway Bus
 The microprocessor based system has Three set of buses it uses to communicate
with the other units in the system as well as the external world
 This three buses are sometimes referred to as System highway bus
 Address bus is unidirectional bus used to transmits the addresses of the device (or a
memory location) that needs to be accessed by the microprocessor.
 The data bus is bidirectional bus used by the processor to send and receive data to
and from different devices.
 The control bus bidirectional bus used for transmitting and receiving control signals
between the microprocessor and various devices.
CPU
 The central processing unit (CPU ) can be any of the following devices
 Microcontroller
 Microprocessor
 Digital processing unit (DSP)
 Microprocessor:-
 It is a programmable VLSI chip which includes following units
 ALU
 Registers files (Array)
 Control Unit
ALU
 Arithmetic and logical Unit(ALU): It comprises of two data manipulating units
 Arithmetic Unit involves data manipulation functions such as:
 Addition
 Subtraction
 Division
 Multiplication
 Increment
 Decrement
 Compare
 Logical Unit involves data manipulation functions such as:
 AND
 OR
 XOR
 COMPLIMENT (NOT)
 Rotate
Control Unit
 The control unit controls the flow of data and instructions
within the computer.
 It fetches instructions from memory,
 decodes the fetched instructions
 executes the instruction by enabling the appropriate circuitry
 controls the proper sequence of events performed by ALU and I/O
devices.
Register Files (Array)
 There two sets of registers in the microprocessor (Case study Intel 8085
Microprocessor)
 General Purpose Register (GPR) and Special Purpose Registers (SPR)
 GPR
 General purpose register: (user-accessible)
 B,C,D,E,H,L are 8 bit register.(can be used singly)
 Can also be combined as 16-bit register-pairs-BC,DE&HL.
 Used to store the intermediate data and result
 H & L can be used as a data pointer(holds memory address)
Special Purpose Registers

 Accumulator (A): (user-accessible)


 Is an 8-bit register
 All the ALU operations are performed with reference to the
contents of Accumulator.
 Result of all ALU operations is stored in A as the destination.
 Store 8 bit data during I/O transfer
Instruction Register:
 Instruction Register is not user accessible
 When an instruction is fetched from memory, it is loaded in IR, from
where it is decoded to establish the operation and the associated
operands.
 Operation includes all the ALU operations
 Operands may be:
 Data
 Register holding the data
 Memory Location (Address)
 I/O port address
Status (Flag) Register

 Flag Register(F): (user-accessible)


 Is an 8 bit Register
 It Indicates the status of the result in the accumulator after an ALU
operation.
Status (Flag) Register
Stack Pointer (SP)
 Is a16-bit Register which holds the address of the data present at the top of
the stack memory
 The stack area is a reserved area of the memory in the RAM used to store
and retrieve the temporary information of the current program,as result of
occurrence of an interrupt
 Data is PUSHed to the stack at the beginning of the Interrupt
 Data is POPed out of the stack at the end of the interrupt
 The stack area holds the contents of all associated register current
program prior to the occurrence of the interrupt
Program Counter (PC)

 Sometimes it is referred to as Instruction pointer


 It is a 16-bit register that contains the address of the next instruction to be
fetched after complete execution of the current instruction
 it is automatically incremented by1after every fetch operation.
Intel 8085 Microprocessor Registers
 The register which are programmable and available for the use include six
general purpose register, A, F, PC,SP.IS

8085 PIN DIAGRAM

Pin Configuration Functional Pin diagram


Intel 8085 Microprocessor
 The 8085 is an 8-bit general purpose microprocessor that can address 64K Byte
of memory.
 t has 40 pins and uses +5V for power. It can run at a maximum frequency of
3MHz.
 The pins on the chip can be grouped into 9 groups:
 Address Bus and Data Bus.
 Status Signals.
 Control signal
 Interrupt signal
 Power supply and Clock signal
 Reset Signal
 DMA request Signal
 Serial I/O signal
 Externally Initiated Signals.
The Address and Data Busses
 Address Bus (Pin21-28)
 16 bit address lines A0 toA15
 The address bus has 8 signal lines A8 –A15 which are unidirectional.
 The other 8 address lines A0 to A7 are multiplexed (time shared) with the 8 data bits.

 Data Bus (Pin19-12)


 To save the number of pins lower order address pin are multiplexed with 8- bit data bus
(bidirectional)
 So, the bits AD0–AD7are 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 (T1state), then during the late parts (T2 state) of the execution, they carry the 8 data
bits.
STATUS SIGNALS
 Status Pins –ALE, S1,S0
 1.ALE(Address Latch Enable): (Pin30)
 Used to DE-multiplex the address and data bus
 ALE = 1 when the AD0 –AD7 lines have an address
 ALE=0 When it is low it indicates that the contents are data.
 This signal can be used to enable a latch to save the address bits from the AD
lines.
 S1 and S0 (Status Signal): (Pin 33 and29)
 Status signals to specify the kind of operation being performed.
 Usually un-used in small systems.
S1 S0 Operation
0 0 HALT
0 1 READ
1 0 WRITE
1 1 FETCH
CONTROL SIGNALS
 Control Pins –RD, WR, IO/M(active low)
 1.RD: Read(Active low) (Pin32)
 Read Memory or I/O device
 Indicates that data is to be read either from memory or I/P device and data bus is
ready or accepting data from the memory or I/O device.
 2.WR: Write(Active low) (Pin31)
 Write Memory or I/O device
 Indicates that data on the data bus are to be written into selected memory or I/P
device.
 3.IO/M: (Input Output/Memory-Active low) (Pin34)
 Signal specifies that the read/write operation relates to whether memory or I/O

IO/M (active low) RD WR Control Signal Operation


0 0 1 MEMR M/M Read
0 1 0 MEMW M/M Write
1 0 1 IOR I/O Read
1 1 0 IOW I/O Write
CONTROL AND STATUS SIGNALS
 When S0,S1iscombined with IO/M(active low),we get status of machine cycle

 Z=Tristate, X=don’t care condition


INTERRUPT SIGNALS
 They are the signals initiated by an external device to request the microprocessor
to do a particular task or work.
 There are five hardware interrupts called,(Pin6-11)

 On receipt of an interrupt, the microprocessor acknowledges the interrupt by the


active low INTA (Interrupt Acknowledge)signal.
Power supply and Clock Signal
 Vcc (Pin 40) : single +5 volt power supply Vss (Pin20):Ground
 There are 3 important pins in this group.
 X0 and X1 :((Pin1-2)
 Crystal or R/C network or LC-network connections to set the frequency of internal clock
generator.
 The frequency is internally divided by two.
 Since the basic operating timing frequency is 3 MHz, a 6 MHz crystal is connected to the X0 and
X1 pins.
 CLK (output): (Pin37)
 Clock Output is used as the system clock for peripheral and devices interfaced with the
microprocessor.
RESET SIGNALS
 Reset In (input, active low) (Pin36)
 This signal is used to reset the microprocessor.
 The program counter inside the microprocessor is set to
zero(0000H)
 The buses are tri-stated.
 Reset Out (Output, Active High) (Pin3)
 It indicates MP is being reset.
 Used to reset all the connected microprocessor is reset.
DMA REQUEST SIGNALS
 DMA:
 When 2 or more devices are connected to a common bus, to prevent the devices from
interfering with each other, the tristate gates are used to disconnect all devices except
the one that is communicating at a given instant.
 The CPU controls the data transfer operation between memory and I/O device.
 DMA operation is used for large volume data transfer between memory and an I/O
device directly.
 The CPUis disabled by tri stating its buses and the transfer is effected directly by external
control circuits.
 HOLD (Pin38)
 This signal indicates that another device is requesting the use of address and data bus.
 So it relinquish the use of buses as soon as the current machine cycle is completed.
 MP regains the bus after the removal of a HOLD signal
 HLDA (Pin39)
 On receipt of HOLD signal, the MP acknowledges the request by sending out HLDA signal
and leaves out the control of the buses.
 After the HLDA signal the DMA controller starts the direct transfer of data.
 After the removal of HOLD request HLDA goes low.
Serial I/O Signals
 These pins are used for serial data communication
 SID (input) Serial input data (Pin4)
 It is a data line for serial input
 Used to accept serial data bit by bit from external device
 The data on this line is loaded into accumulator bit 7 whenever a RIM instruction
is executed.
 SOD (output) Serial output data (Pin5)
 It is a data line for serial output
 Used to transmit serial data bit by bit to the external device
 The 7th bit of the accumulator is outputted on SOD line when SIM instruction is
executed.
Externally Initiated Signals
Ready (input) (Pin35)
Memory and I/O devices will have slower response compared
to microprocessors.
Before completing the present job such as low peripheral may
not be able to handle further data or control signal from CPU.
The processor sets the READY signal after completing the
present job to access the data.
It synchronizes slower peripheral to the processor speed.
The microprocessor enters into WAIT state while the READY pin
is disabled.

You might also like