File Downloaded From www.Bustudymate.
in
Chapter 1
Block diagram of a computer system
Basic components of a computer system using block diagrams:
Cpu
Memory
Input and output unit
Evolution of microprocessor : 4,8,16,32 dan 64 byte
Nibble, byte, word dan longword
Fecthing and execution cycles.
Internal structure and basic operation of a microprocessor (arithmetic and logic unit,
control unit, register sets, accumulator, condition code register, program counter, stack
pointer)
Bus system: data bus, address bus and control bus.
Microprocessor clock system
Examples of microprocessor: 8085,8086.
File Downloaded From www.Bustudymate.in 1
File Downloaded From www.Bustudymate.in
1.1 BLOCK DIAGRAM OF A BASIC COMPUTER
SYSTEM
Basic computer system consist of a Central processing unit (CPU),
memory (RAM and ROM), input/output (I/O) unit.
Address bus
ROM RAM I/O I/O
CPU interface devices
Data bus Control
bus
Block diagram of a basic computer system
File Downloaded From www.Bustudymate.in 2
File Downloaded From www.Bustudymate.in
Basic component of microcomputer
1. CPU - Central Processing Unit
• the portion of a computer system that carries out the
instructions of a computer program
• the primary element carrying out the computer's functions.
It is the unit that reads and executes program instructions.
• The data in the instruction tells the processor what to do.
Pentium D dual core processors
File Downloaded From www.Bustudymate.in 3
File Downloaded From www.Bustudymate.in
2. Memory
• physical devices used to store data or programs (sequences of
instructions) on a temporary or permanent basis for use in an
electronic digital computer.
• Computer main memory comes in two principal varieties: random-
access memory (RAM) and read-only memory (ROM).
• RAM can be read and written to anytime the CPU commands it, but
ROM is pre-loaded with data and software that never changes, so the
CPU can only read from it.
• ROM is typically used to store the computer's initial start-up
instructions.
• In general, the contents of RAM are erased when the power to the
computer is turned off, but ROM retains its data indefinitely.
• In a PC, the ROM contains a specialized program called the BIOS that
orchestrates loading the computer's operating system from the hard
disk drive into RAM whenever the computer is turned on or reset.
File Downloaded From www.Bustudymate.in 4
File Downloaded From www.Bustudymate.in
3. I/O Unit
• Input/output (I/O), refers to the communication between an
information processing system (such as a computer), and the outside
world possibly a human, or another information processing system.
• Inputs are the signals or data received by the system, and outputs are
the signals or data sent from it
• Devices that provide input or output to the computer are called
peripherals
• On a typical personal computer, peripherals include input devices like
the keyboard and mouse, and output devices such as the display and
printer. Hard disk drives, floppy disk drives and optical disc drives serve
as both input and output devices. Computer networking is another
form of I/O.
File Downloaded From www.Bustudymate.in 5
File Downloaded From www.Bustudymate.in
DATA SIZE
Nibble 4 bit
Byte 8 bit
Word 16 bit
Long word 32 bit
File Downloaded From www.Bustudymate.in 6
File Downloaded From www.Bustudymate.in
Fetching & Execution Cycles
• Fetching Cycles
• The fetch cycle takes the instruction required from memory, stores it in the
instruction register, and
• moves the program counter on one so that it points to the next instruction.
• Execute cycle
• The actual actions which occur during the execute cycle of an instruction.
• depend on both the instruction itself and the addressing mode specified to be
used to access the data that may be required.
File Downloaded From www.Bustudymate.in 7
File Downloaded From www.Bustudymate.in
Fetching an instruction
• Step 1
Instruction pointer (program counter) hold the address
of the next instruction to be fetch.
File Downloaded From www.Bustudymate.in 8
File Downloaded From www.Bustudymate.in
FETCHING AN INSTRUCTION (cont.)
• Step 2
File Downloaded From www.Bustudymate.in 9
File Downloaded From www.Bustudymate.in
FETCHING AN INSTRUCTION (cont.)
• Step 3
File Downloaded From www.Bustudymate.in 10
File Downloaded From www.Bustudymate.in
FETCHING AN INSTRUCTION (cont.)
• Step 4
File Downloaded From www.Bustudymate.in 11
File Downloaded From www.Bustudymate.in
FETCHING AN INSTRUCTION (cont.)
• Step 5
File Downloaded From www.Bustudymate.in 12
File Downloaded From www.Bustudymate.in
FETCHING AN INSTRUCTION (cont.)
• Step 6
File Downloaded From www.Bustudymate.in 13
File Downloaded From www.Bustudymate.in
Internal structure and basic operation of
microprocessor
Address bus
ALU Register
Section
Data bus
Control and timing
section Control bus
Block diagram of a microprocessor
File Downloaded From www.Bustudymate.in 14
File Downloaded From www.Bustudymate.in
Arithmetic and logic unit (ALU)
• The component that performs the arithmetic and
logical operations
• the most important components in a
microprocessor, and is typically the part of the
processor that is designed first.
• able to perform the basic logical operations (AND,
OR), including the addition operation.
• The inclusion of inverters on the inputs enables
the same ALU hardware to perform the
subtraction operation (adding an inverted
operand), and the operations NAND and NOR.
File Downloaded From www.Bustudymate.in 15
File Downloaded From www.Bustudymate.in
Control unit
• The circuitry that controls the flow of information through the
processor, and coordinates the activities of the other units within it.
• In a way, it is the "brain within the brain", as it controls what happens
inside the processor, which in turn controls the rest of the PC.
• On a regular processor, the control unit performs the tasks of
fetching, decoding, managing execution and then storing results.
File Downloaded From www.Bustudymate.in 16
File Downloaded From www.Bustudymate.in
REGISTER STRUCTURE OF 8085 MICROPROCESSOR
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
Register sets
• The register section/array consists completely of
circuitry used to temporarily store data or
program codes until they are sent to the ALU or
to the control section or to memory.
• The number of registers are different for any
particular CPU and the more register a CPU have
will result in easier programming tasks.
• Registers are normally measured by the number
of bits they can hold, for example, an "8-bit
register" or a "32-bit register".
File Downloaded From www.Bustudymate.in 18
File Downloaded From www.Bustudymate.in
Program counter (PC)
• a 16 bit register, used to store the next address of the operation code
to be fetched by the CPU.
• Not much use in programming, but as an indicator to user only.
• Purpose of PC in a Microprocessor
• to store address of tos (top of stack)
• to store address of next instruction to be executed.
• count the number of instructions.
• to store base address of the stack.
File Downloaded From www.Bustudymate.in 19
File Downloaded From www.Bustudymate.in
Stack pointer (SP)
• The stack is configured as a data structure that grows downward from
high memory to low memory.
• At any given time, the SP holds the 16-bit address of the next free
location in the stack.
• The stack acts like any other stack when there is a subroutine call or
on an interrupt. ie. pushing the return address on a jump, and
retrieving it after the operation is complete to come back to its
original location.
File Downloaded From www.Bustudymate.in 20
File Downloaded From www.Bustudymate.in
accumulator
• a register in which intermediate arithmetic and logic results are
stored.
• example for accumulator use is summing a list of numbers.
• The accumulator is initially set to zero, then each number in turn is added to
the value in the accumulator.
• Only when all numbers have been added is the result held in the accumulator
written to main memory or to another, non-accumulator, CPU register.
File Downloaded From www.Bustudymate.in 21
File Downloaded From www.Bustudymate.in
FLAG REGISTER
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
Flag Name Description
Z Zero flag Indicates that the result of a mathematical or logical operation was zero.
Indicates that the result of an operation produced an answer greater than the
C Carry flag number of available bits. (This flag may also be set before a mathematical
operation as an extra operand to certain instructions, e.g. "add with carry".)
Masks the XIRQ request when set. It is set by the hardware and cleared by the
X Extend flag
software as well is set by unmaskable XIRQ.
Indicates that the result of a mathematical operation is negative. In some
processors, the N and S flags have different meanings: the S flag indicates
N Negative/ Sign flag
whether a subtraction or addition has taken place, whereas the N flag
indicates whether the last operation result is positive or negative.
Indicates that the result of an operation has overflowed according to the
V Overflow Flag
CPU's word representation, similar to the carry flag but for signed operations.
Interrupts can be enabled or disabled by respectively setting or clearing this
I interrupts flag. Modifying this flag may be restricted to programs executing in supervisor
mode
File Downloaded From www.Bustudymate.in 23
File Downloaded From www.Bustudymate.in
Bus system connection
File Downloaded From www.Bustudymate.in 24
File Downloaded From www.Bustudymate.in
Data bus
• The data bus is 'bi-directional'
• data or instruction codes from memory or
input/output.are transferred into the microprocessor
• the result of an operation or computation is sent out
from the microprocessor to the memory or
input/output.
• Depending on the particular microprocessor, the
data bus can handle 8 bit or 16 bit data.
File Downloaded From www.Bustudymate.in 25
File Downloaded From www.Bustudymate.in
Address bus
• The address bus is 'unidirectional', over which the microprocessor
sends an address code to the memory or input/output.
• The size (width) of the address bus is specified by the number of bits
it can handle.
• The more bits there are in the address bus, the more memory
locations a microprocessor can access.
• A 16 bit address bus is capable of addressing 65,536 (64K) addresses.
File Downloaded From www.Bustudymate.in 26
File Downloaded From www.Bustudymate.in
Control bus
• The control bus is used by the microprocessor to send out or receive
timing and control signals in order to coordinate and regulate its
operation and to communicate with other devices, i.e. memory or
input/output.
File Downloaded From www.Bustudymate.in 27
File Downloaded From www.Bustudymate.in
8085 MICROPROCESSOR PINOUT
Intel 8085 is 8bit Microprocessor has 40 pins in it, 20 each
side.
All the pins carry certain signals.
It requires +5v power supply, for its operation.
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
1. Vcc +5v power supply
File Downloaded From www.Bustudymate.in
Vss ground reference
2. Address bus and data bus together
ie, multiplexed address and data bus
its bidirectional
3. Interrupt : 5 types of interrupts are
TRAP (highest priority and its non maskable interrupt)
RST 7.5 2nd highest, transfer the program control
RST 6.5 to specific m/y location
RST 5.5
INTR (input) interrupt Request
INTA (output) interrupt acknowledge
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
4. ALE : Address latch enable, AD0 to AD7 to go that address and
get data. Which should b performed.
5. IO/M when signal is HIGH ---- It indicates I/O operation
when signal is low ------ it indicates M/y operation
RD
WR whether read or write operation to be performed from m/y
I/o device
S0
S1 this status signals can identify various operations.
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
CONTROL AND STATUS SIGNALS
IO/M S0 S1 STATUS
0 0 0 Halt
0 0 1 M - write
0 1 0 M - read
0 1 1 Opcode fetch
1 1 0 I/O read
1 0 1 I/O write
1 1 1 Interrupt acknowledge
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
6. CLK (out)--- it maintains internal frequency ie, 3MHz.
It actually obtained 6MHz crystal oscillator btw the clocks x1
and x2, so 6MHz is divided by 2 for internal frequency
7. HOLD
HLDA
8. SOD --- serial input output ports. ( transmission of serial bits, bit by bit)
SID
READY (input)
9. RESET out --- reset all the devices to which MP is connected
RESET in ---- active on low signal, it resets the MP.
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
Signals are classified into six groups:-
• Power supply
• Address bus
• Multiplexed address and data
• Control and status signals
• Externally Initiated Signals
• Serial I/O ports
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
Demultiplexing Bus AD7 to AD0
1. AD7 to AD0 is multiplexing, bidirectional lines.
This Bus need to be Demultiplexed.
2. ALE a positive going pulse generated every time the 8085 begins an
operation.
3.It indicates that the bits on AD7 – AD0 are address bits, This signal is
used primarily to latch the low order address from the multiplexed bus
and generate a separate set of 8 address lines A7 – A0
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
Microprocessor communication and Bus Timing
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
Timing Diagram for opcode Fetch operation
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
ARCHITECTURE OF 8085
MICROPROCESSOR SYSTEM
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in
File Downloaded From www.Bustudymate.in