***Draw the pin diagram of 8085 MP
and explain each pin
8085
microprocessor pins are classified into seven groups −
Address bus : A8-A15 It carries higher order 8-bit Address.
Data bus: AD0- AD7 it carries lower order8- bit Address and data bus.
Control and status signals: These
signals are used to identify the nature of operation.
There are
3 control signal and 3 status signals.
Three
control signals are RD, WR & ALE.
· RD − This signal indicates
that the selected IO or memory device is to be read and is ready for accepting
data available on the data bus.
· WR − This signal indicates
that the data on the data bus is to be written into a selected memory or IO
location.
· ALE –Address Latch Enable: When the pulse goes high, it indicates
address. When the pulse goes down it indicates data.
Three
status signals are IO/M, S0 & S1.
IO/M : This signal is used to differentiate between IO
and Memory operations, i.e. when it is high it indicates IO operation and when
it is low then it indicates memory operation.
S1 & S0 : These signals are used to
identify the type of current operation.
Power supply : There are 2 power supply
signals − VCC & VSS. VCC indicates +5v power supply and VSS indicates
ground signal.
Clock signals : There are 3 clock signals,
i.e. X1, X2, CLK OUT.
· X1, X2 − A crystal is connected to
these two pins and is used to set frequency of the internal clock generator.
This frequency is internally divided by 2.
· CLK OUT−This signal is used as the
system clock for devices to connect with µp. Interrupts
& externally initiated signals
Interrupts
are the signals generated by external devices to request the microprocessor to
perform a task. There are 5 interrupt signals, i.e. TRAP,
RST 7.5, RST 6.5, RST
5.5, and INTR.
·
INTA − It is an interrupt
acknowledgment signal.
· RESET IN − This signal is used to
reset the µp by setting the program counter to zero.
· RESET OUT −This signal is used to
reset all the connected devices when the µp is reset.
· READY − This signal indicates
that the device is ready to send or receive data. If READY is low, then the CPU
has to wait for READY to go high.
· HOLD −This signal indicates
that another master is requesting to use of the address and data buses.
· HLDA (HOLD Acknowledge) − It
indicates that the CPU has received the HOLD request and it will relinquish the
bus in the next clock cycle. HLDA is set to low after the HOLD signal is
removed.
Serial I/O signals : There are 2 serial signals,
i.e. SID and SOD and these signals are used for serial communication.
· SOD (Serial output data line)
− The output SOD is set/reset as specified by the SIM instruction.
· SID (Serial input data line) −
The data on this line is loaded into accumulator whenever a RIM instruction is
executed.
***Write a short note on 8085 Interrupts.
Interrupts in 8085
Interrupts
are the signals generated by the external devices to request the microprocessor
to perform a task. There are 5 interrupt signals, i.e. TRAP, RST 7.5, RST 6.5,
RST 5.5, and INTR.
Interrupt
are classified into groups based on their parameter −
·
Vector interrupt − In
this type of interrupt, each interrupt contains particular address. For example: RST7.5 (003CH), RST6.5
(0034H), RST5.5 (002CH),TRAP (0024H).
·
Non-Vector interrupt − In
this type of interrupt, the interrupt address is not known to the processor so,
the interrupt address needs to be sent externally by the device to perform
interrupts. For example: INTR.
·
Maskable interrupt − In
this type of interrupt, we can disable the interrupt by writing DI instruction
and we can enable the instruction by EI instruction.(OR) by writing some
instructions into the program. For example: RST7.5, RST6.5, RST5.5.
·
Non-Maskable interrupt − In
this type of interrupt, we cannot disable the interrupt by writing some
instructions into the program. For example: TRAP.
·
Software interrupt − In
this type of interrupt, the programmer has to add the instructions into the
program to execute the interrupt. There are 8 software interrupts in 8085, i.e.
RST0, RST1, RST2, RST3, RST4, RST5, RST6, and RST7.
·
Hardware interrupt − There
are 5 interrupt pins in 8085 used as hardware interrupts, i.e. TRAP, RST7.5,
RST6.5, RST5.5, INTA.
Note − NTA is
not an interrupt, it is used by the microprocessor for sending acknowledgement.
TRAP has the highest priority, then RST7.5 and so on.
*** Explain 8085 Architecture (OR) Functional Blocks (OR) Register
Organization.
8085 is
an 8-bit microprocessor designed by Intel in 1977 using NMOS technology.
Features of 8085:
·
8-bit data bus
·
16-bit address bus, which can address upto 64KB
·
A 16-bit program counter
·
A 16-bit stack pointer
·
Six 8-bit registers arranged in pairs: BC, DE, HL
·
Requires +5V supply to operate at 3.125 MHZ single phase clock
It is
used in washing machines, microwave ovens, mobile phones, etc.
8085 Microprocessor – Functional Units :
Accumulator
It is an
8-bit register used to perform any arithmetic, logical, I/O operation one of
the operand must be stored in it and after completing the operation result will
automatically stored in Accumulator. It is connected to internal data bus &
ALU.
Arithmetic
and logic unit
It
performs arithmetic and logical operations like Addition, Subtraction one bit
increment ,decrement, AND, OR, Compare, rotate etc. on 8-bit data.
General
purpose register
There are
6 general purpose registers in 8085 processor, i.e. B, C, D, E, H & L. Each
register can hold 8-bit data.
These
registers can also use as 16-bit pairs to hold 16-bit data. The pairs are B-C,
D-E & H-L.
Program
counter
It is a
16-bit register used to store the memory address location of the next
instruction to be executed. Microprocessor increments the program whenever an
instruction is being executed, so that the program counter increment the memory
address of the next instruction that is going to be executed.
Stack
pointer
It is
also a 16-bit register works like stack, which is always
incremented/decremented by 2 during push & pop operations.
Temporary
register
It is an
8-bit register, which holds the temporary data of arithmetic and logical
operations.
Flag
register
It is an
8-bit register having five 1-bit flip-flops, which holds either 0 or 1
depending upon the result stored in the accumulator.
These are
the set of 5 flip-flops −
·
Sign (S)
·
Zero (Z)
·
Auxiliary Carry (AC)
·
Parity (P)
·
Carry (C)
Its bit
position is shown in the following table −
D7
|
D6
|
D5
|
D4
|
D3
|
D2
|
D1
|
D0
|
S
|
Z
|
AC
|
P
|
CY
|
Instruction
register and decoder
It is an
8-bit register. When an instruction is fetched from memory then it is stored in
the Instruction register. Instruction decoder decodes the information present
in the Instruction register.
Timing
and control unit
It
provides timing and control signal to the microprocessor to perform
·
Control Signals: READY, RD’, WR’, ALE
·
Status Signals: S0, S1, IO/M’
·
DMA Signals: HOLD, HLDA
·
RESET Signals: RESET IN, RESET OUT
Interrupt
control
It
controls the interrupts during a process. When a microprocessor is executing a
main program and whenever an interrupt occurs, the microprocessor shifts the
control from the main program to process the incoming request. After the
request is completed, the control goes back to the main program.
There are
5 interrupt signals in 8085 microprocessor: INTR, RST 7.5, RST 6.5, RST 5.5,
TRAP.
Serial
Input/output control
It
controls the serial data communication by using these two instructions: SID
(Serial input data) and SOD (Serial output data).
Address
buffer and address-data buffer
The
content stored in the stack pointer and program counter is loaded into the
address buffer and address-data buffer to communicate with the CPU. The memory
and I/O chips are connected to these buses; the CPU can exchange the desired
data with the memory and I/O chips.
Address
bus and data bus
Data bus
carries the data to be stored. It is bidirectional, whereas address bus carries
the location to where it should be stored and it is unidirectional. It is used
to transfer the data & Address I/O devices.
***
Explain the 8085 Instruction set
The
8085 Instruction Classification can be categorized into five different groups
based on the nature of function of the instructions
·
Data
transfer operations
·
Arithmetic
operations.
·
Logical
operations
·
Branch
operations
·
Stack, Input/Output
and Machine control operations
1.Data Transfer
Operations: Data transfer instructions copy data from source to
destination. Source can be data or contents of register or contents of memory
location whereas destination can be register or memory location. These
instructions do not affect the flag register of the processor.
2..Arithmetic
Operations 8085 perform addition, subtraction, increment and decrement
operations.
Addition : Any 8-bit number, or the contents of a
register, or the contents of a memory location can be added to the contents of
the accumulator and the resulted sum is stored in the accumulator. The resulted
carry bit is stored in the carry flag.
In
8085, no two other registers can be added directly, i.e. the contents of B and
C registers cannot be added directly. To add two 16-bit numbers the 8085
provides DAD instruction. It adds the data within the register pair to the
contents of the HL register pair and resulted sum is stored in the HL register
pair.
Subtraction : Any 8-bit number, or the
contents of a register, or the contents of a memory location can be subtracted
from the contents of the accumulator and the result is stored in the
accumulator. The resulted borrow bit is stored in the carry flag: In 8085, no
two other registers can be added directly.
Increment/Decrement : The 8085 has the increment
and decrement instructions to increment and decrement the contents of any
register, memory location or register pair by 1.
3.Logical Operations: The
logical instructions provided by 8085 perform logical, rotate, compare and
complement operations.
Logical : Using logical instructions, any 8-bit
number, or the contents of a register, or of a memory location can be logically
ANDed, ORed, or Exclusive-ORed with the contents of the accumulator and the
result is stored in the accumulator. The result also affects the flags
according to definition of For example, the zero result sets the zero flag.
Rotate : These instructions allow shifting of each bit in the
accumulator either left or right by 1 bit position.
Compare : Any 8-bit number, or the contents of a register,
or the contents of a memory location can be compared for equality, greater
than, or less than, with the contents of the accumulator.
Complement : The result of accumulator can be
complemented with this It replaces all 0s by 1s and all 1s by 0s.
4.Branching Operations: These instructions
allow the 8085 to change the sequence of the program, either unconditionally or
under certain test conditions. These instructions include branch instructions,
subroutine call and return instructions and restart instructions.
5.Stack, Input/Output and Machine Control Operations: These
instructions control the stack operations, input/output operations and
machine operations. The stack instructions allow the transfer of data from
register pair to stack memory and from stack memory to the register, pair. The input/output instruction allows the
transfer of 8-bit data to input/output port. On the other hand machine
instructions control the Machine operations such as interrupt, halt, or do
nothing.
*** Explain the Bus organization
of 8085 µp. (OR) Write a short note on system bus
Bus is a group of
conducting wires which carries information, all the peripherals are connected
to microprocessor through Bus.
There are three types
of buses.
1.Address
Bus
2.Data
Bus
1.Address
Bus:-8085
Microprocessor has 16 bit address bus. The address bus carries the address
of memory location to be written or to be read from.
The
address bus is unidirectional, that means bits flowing only in one direction,
only from microprocessor to peripheral devices.
We
can find that how much memory location it can using the formula 2N.
where N is the number of bits used for address lines.
In
8085 µp: 216 = 65,536bytes or 64Kb
So
we can say that it can access upto 64 kb memory location.
2.Data
Bus:-8085
Microprocessor has 8 bit data bus. So it can be used to carry the 8-bit data
starting from 00000000H(00H) to 11111111H(FFH). Here 'H' tells the Hexadecimal
Number. It is bidirectional. These lines are used for data flowing in both
direction means data can be transferred or can be received through these lines.
The
data bus also connects the I/O ports and CPU. The largest number that can
appear on the data bus is 11111111.
It has 8 parallel lines of data bus. So it can access upto 28 = 256 data bus lines.
3.Control
Bus:-The
control bus is used for sending control signals to the memory and I/O devices.
The CPU sends control signal on the control bus to enable the outputs of
addressed memory devices or I/O port devices.
Some of the control bus signals are:
1.Memory
read
2.Memory
write
3.I/O
read
4.I/O write.
Unit-3
Explain the overview of 8051 Micro controller.
1. 8051
microcontroller is designed by Intel in 1981. It is an 8-bit microcontroller.
2. It is
built with 40 pins DIP (dual inline package), 4kb of ROM storage and 128 bytes
of RAM storage. 2 16-bit timers.
3. It consists of four parallel 8-bit ports (
which are programmable as well as addressable as per the requirement). Its crystal
frequency is 12 MHz.
4.The
system bus connects all the support devices to the CPU. The system bus consists
of an 8-bit data bus, a 16-bit address bus and bus control signals.
5.All
other devices like program memory, ports, data memory, serial interface,
interrupt control, timers, and the CPU are all interfaced together through the
system bus.
Draw the pin Diagram of 8051 Microcontroller and explain each pin
The pin
diagram of 8051 microcontroller –
Pins 1 to
8 − These pins are known as Port 1. This port doesn’t serve any
other functions. It is internally pulled up, bi-directional I/O port.
· Pin 9 − It is a RESET pin, it is
used to reset the microcontroller to its initial values.
· Pins 10 to 17 − These pins are known as
Port 3. This port serves some functions like interrupts, timer input, control
signals, serial communication signals RxD and TxD, etc.
· Pins 18 & 19 −These pins
are used to get the system clock.
· Pin 20 & 40 − This
pin is connected to GND. Pin 40 is connected to power supply.
· Pins 21 to 28 − These pins are known as
Port 2. It serves as I/O port. Higher order address bus signals are also
multiplexed on this port.
· Pin 29 − This is PSEN (Program
Store Enable). It is used to read a signal from the external program memory.
· Pin 30 − This is EA pin which
stands for External Access input. It is used to enable/disable the external
memory interfacing.
· Pin 31 − This is ALE pin which
stands for Address Latch Enable. It is used to demultiplex the address-data
signal of port.
· Pins 32 to 39 − These pins are known as
Port 0. It serves as I/O port. Lower order address and data bus signals are
multiplexed using this port.
·
Pin 40 − This pin is used to
provide power supply to the circuit
No comments:
Post a Comment