0% found this document useful (0 votes)
9 views7 pages

Micro Sad

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views7 pages

Micro Sad

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Microprocessor Architecture

Microprocessor
- Central Processing Unit (CPU) of a computer; also known as its heart

Intel 8085
- 8-bit, NMOS microprocessor designed by Intel in 1977
- Has the ff. config:
- 40 pin I.C. package on a single LSI chip
- Uses +5Vd.c. supply
- 3MHz clock speed; 320 ns clock cycle
- 8-bit data bus
- 16-bit address bus, which can address up to 64k
- 16-bit stack pointer AND program counter
- Six 8-bit registers arranged in BC, DE, HL

Arithmetic and Logic Unit (ALU)


- Performs the following arithmetic and logical operations:
- Addition and Subtraction
- Logical AND and OR
- Logical EXCLUSIVE OR
- Logical NOT (Complement)
- Increment and Decrement (+- 1)
- Left shift, Rotate left, Rotate right
- Clear, etc.

Timing and Control Unit


- Is a section of the CPU
- Used to generate timing and control signals; and provide status which are necessary
for execution of instructions and operation of memory and I/O devices.
- Used to control data flow between CPU and peripherals (including memory)
- Controls the entire operations of the microprocessor and peripherals connected to it

Registers
- Used for temporary storage and manipulation of data and instructions by the
processors
- Data remains in registers until they are sent to the I/O devices or memory
- An Intel 8085 microprocessor has the following registers
- One 8-bit accumulator (ACC) i.e. register A
- Six General Purpose registers of 8-bit (B,C, D, E, H and L)
- To hold data of 16-bit, a combination of two 8-bit registers can be
employed, which would then be called a register pair.
- D-E and B-C are valid register pairs; while H-L are used as memory
pointers
- One 16-bit stack pointers, SP
- One 16-bit Program Counter, PC
- Instruction register
- Temporary register
- Additional components; 5 flip-flops which serve as status flags
Accumulator (ACC)
- 8-bit register associated with the ALU
- The register ‘A’ is an accumulator in the 8085, used to hold one of the operands of an
arithmetic and logical operation
- The final result of arithmetic or logical operation is also placed in the accumulator

Program Counter (PC)


- 16-bit special purpose register
- Used to hold the address of memory of the next instruction
- Used to keep track of the instruction in a program while they are executed

Stack Pointer (SP)


- 16-bit special function register used as a memory pointer
- A stack is nothing but a portion of RAM
- Within stacks, the contents of only those registers are saved, which are needed in
the later part of the program
- Controls addressing of the stack; contains the address of top element of data in stack

Instruction register
- Holds the opcode of the instruction being decoded and executed

Temporary Register
- 8-bit register associated with the ALU
- Holds data during an arithmetic/logical operation
- Used by the microprocessor, but not accessible to the programmer

Flags
- A flag is a flip-flop indicating the condition which arises after arithmetic or logical
execution
- Flip-flops are reset or set according to the conditions during operation
- Intel 8085 microprocessor contains 5 flip-flops serving as status flags
- Carry Flag (CS)
- Parity Flag (P)
- Auxiliary Carry Flag (AC)
- Zero Flag (Z)
- Sign Flag (S)
Address Bus and Data Bus

- Output (A8-A15), These are address bus and are used for the most significant bits of
the memory address or 8-bits of I/O address.
- Input/Output (AD0-AD7), These are time multiplexed address/data bus i.e. (They are
dual purpose)
- They are used for the least significant 8 bits of the address (memory or I/O)

- ALE (Output)
● Address Latch Enable
● Goes high during first clock cycle of a machine cycle and enables the
lower 8-bits of the address to be latched either into the memory or
external latch
- IO/M (Output)
● It is a status signal
● Distinguishes whether the address is for memory or I/O device

- S0,S1 (Output)
● These are also Status Signals
● Distinguishes the various types of operations given

- RD (Output)
● Is a signal to control READ operation
● When it is low, the selected I/O device or memory is read
- WR (Output)
● Is a signal to control Write operations
● When it is low, the data bus’ data is written into a selected memory or I/O
location
- READY (Input)
● It is used to sense whether a peripheral is ready to transfer data or not
● If HIGH is it READY, if it is LOW the microprocessor waits for it till it is HIGH
Interrupts and Externally Initiated Signals

- HOLD (Input)
● Indicates that another drive is requesting for the use of the address and data
bus
- HLDA (Output)
● Is a signal for HOLD ACKNOWLEDGEMENT, the HOLD has been received
after the
- INTR (INPUT)
● Interrupt Request Signal, Interrupts it has the lowest priority, is enabled or
disabled by Software
- INTA (OUTPUT)
● Interrupt Acknowledgement, sent by the microprocessor after INTR is
received
RST 5.5, 6.5, 7.5 and TRAP: THESE ARE ALL INTERRUPTS

- TRAP (Highest Priority)


- RST 7.5
- RST 6.5
- RST 5.5
- INTR (Lowest Priority)

Reset Signals
- RESET IN
● RESET IN (input), Resets Program counter to 0
● Also interrupts enable and HLDA Flip-flops
● CPU is held in reset condition till RESET is not applied
- RESET OUT (OUTPUT)
● Indicates that the cpu is being reset

Clock Signals
- X1, X2 (input)
● Are terminals to be connected to an external crystal oscillator
● It drives the internal circuitry
● Used to produce a suitable clock for the operation of microprocessor
- CLK (output)
● Clock Output
● Its frequency is same at which processor operates

Serial I/O Signals


- SID (Input)
● Serial input, data is loaded into the seventh bit of the accumulator when RIM
instruction is executed
- SOD (output)
● Serial Output, The seventh bit of the accumulator is output on SOD line when
SIM instruction is executed
Vcc :+5Volts Supply, Vss: ground reference
Serial Input And Output
- Refers to methods of transmitting and receiving data one bit at a time, sequentially,
over a single communication channel
1. Serial Input (SID)
- Refers to the process of receiving data bit by bit over a single communication
line
- In the case of the 8085
● The SID is a pin or a flip-flop that represents the input for serial data
● The state of the SID can be read using instructions like RIM (Read
Interrupt Mask) or SIM (Set interrupt Mask)

2. Serial Output (SOD)


- Refers to the process of transmitting data one bit at a time over a single
communication line.
- In the 8085, The SOD is a pin or a flip-flop that represents the output for serial
data. The state of the SOD can be controlled using the SIM instruction
- The microprocessor can send data to external devices or peripherals using a
serial data format
- SERIAL COMMUNICATION is often used in situations where a full parallel
data bus is not practical
- Mostly used when an application needs better data transfer between
microcontrollers or microcontrollers to other embedded devices

Read Interrupt Mask (RIM)


- Used to read/check the status of certain interrupt-related flags and registers
- It is an 8-BIT instruction

● Accumulators are not affected by the RIM instructions


● The Interrupt Enable is placed in bit 7 of the accumulator
If it is 1, interrupts are enabled, if 0 it is disabled
● SOD is placed in bit 6 of the accumulator
● R1 and R0 are bits 5 and 4, it contains the status of R1 and R0
● SID and SOD lines are in bits 3 and 2 and it contains the status of SOD and
SID
● Trap flip-flop is in bit 1 and is not used and will always be 0
● RIM Flip-flop is in bit 0, if it is 1 the instruction has been executed and if it is 0,
it has not been executed

Set Interrupt Mask


- Used to set the status of the interrupt-registers and flags, it is also and 8-bit
instruction
- It is useful for configuring interrupt system and serial comms in the 8085

- After SIM instruction, the following mods are made


1. Bits 7 and 6 are used to set the state of the IE flip-flop, bit 7 is for INTE and 6 is for
SOD flip-flop
2. 5 and 4 are used to set the status of R1 and R0 in the status register
3. 3 and 2 are ignored
4. 1 is used to set the state of the SID Flip-flop
5. 0 is ignored

8085 Instructions
- Instruction of computer is a command given to be performed as a specified operation
on given data
- Some instructions for Intel 8085 are: MOV, MVI, STA, ADD, SUB, RAL, INR, MVI etc.
- Each instruction contains 2 parts: Opcode (operation code) and Operand

Opcode (Operation code)


- Opcode specifies the task to be performed
- Machine-level instructions that are understood by the processor’s instruction set
architecture
- Examples of Opcodes: ADD (addition), SUB (subtraction), MOV (move), JMP (jump)

Operand
- Operand is the data, and may come in forms such as 8-bit or 16-bit
data/address/internal registers/register/memory location
- Source or destination of the data for the instruction
- For instructions like MOV (move), operand might be the data to be moved, and for
instruction like ADD or SUB, operand is the data to be added/subtracted

Example of intel 8085 assembly language:


MVI B, 15H

where:
- MVI is the opcode representing “Move immediate”
- B is the operand, which is where the immediate data will be moved
- 15H is the immediate operand, which is the data that will be moved to address B
Instruction Word Size
- A digital computer understands instruction written in binary codes; However not all
binary code instructions are of the same length
- They are classified according to word size:
- One byte instruction
- Ex: MOV A, B - Move the contents of register B to A
- Ex: ADD B - Add the content of register B to content of accumulator
- Two byte instruction
- The first byte of instruction is its opcode, and second byte is either
data or address
- Ex: MVI B, 05 ; 05 moved to register B
- Ex: 06, 05 ; MVI B, 05 is in code form
- Three byte instruction
- First byte is its opcode, second and third byte are either 16-bit data or
16-bit address
- Ex: LXI H, 2400H ; Load H-L Pair with 2400H
- 21, 00, 24 ; LXI H, 2400H in the code form

You might also like