Micro Sad
Micro Sad
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
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
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
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
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
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
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