Unit 1
Unit 1
Unit 1
MICROPROCESSORS AND
MICROCONTROLLERS
SYLLABUS
UNIT I
8085 PROCESSOR
UNIT II
PROGRAMMING OF 8085 PROCESSOR
UNIT V
MICRO CONTROLLER PROGRAMMING & APPLICATIONS
f) DMA Signal
HOLD: This signal indicates that another master is requesting for the
use of address bus, data bus and control bus.
HLDA: This active high signal is used to acknowledge HOLD request.
g) Reset Signals
A low on this pin
Internal sets the program counter to zero (0000H).
Resets the interrupt enable and HLDA flip-flops.
Tri-states the data bus, address bus and control bus
(Note: Only during RESET is active).
Affects the contents of processor's registers
randomly.
RESET OUT: This active high signal indicates that
processor is being reset. This signal is synchronized
to the processor clock and it can be used to reset
other devices connected in the system.
Memory interfacing in 8085
microprocessor
The memory interfacing requires to:
Select the chip
Identify the register
Enable the appropriate buffer.
Microprocessor system includes memory devices and I/O
devices.
It is important to note that microprocessor can communicate
(read/write) with only one device at a time, since the data,
address and control buses are common for all the devices.
In order to communicate with memory or I/O devices, it is
necessary to decode the address from the microprocessor.
Due to this each device (memory or I/O) can be accessed
independently.
The different types of Address decoding
techniques are:
Thus, more compact and more efficient handling of I/O devices can be
achieved if they are interfaced to microprocessor in this way. Since an I/O
device is treated as memory location (identified by memory address), this
interface is called memory mapped I/O.
Data Transfer Schemes of 8085
Parallel Data Transfer
Programmed I/0
In programmed I/O, the data transfer is controlled by the user
program being executed.
Depending on the type of the device, data transfer may be
synchronous or asynchronous. Synchronous data transfer is used
when the I/0 device matches in speed with the microprocessor.
The microprocessor issues the read/write instruction addressing the
device whenever data transfer is required. The actual data transfer
takes place in one clock cycle.
When the I/O device speed and the microprocessor speed do not
match, i.e. when the I/O device is slower than the microprocessor,
asynchronous data transfer is used. In this mode of data transfer, the
microprocessor checks the status of the device.
If the device is not ready, the microprocessor continuously checks the
status of the device till it becomes ready. The data transfer instruction
is then issued by the microprocessor
Interrupt I/O
The data transfer scheme is quite inefficient, since
the microprocessor is kept busy for the slower I/O
device.
The remedy to this problem is to allow the
microprocessor to do its job when the device is
getting ready and when the device is ready, the
microprocessor can transfer the data. This can be
achieved through interrupt.
Followingis the operation sequence for interrupt operation.
Normal program execution by microprocessor.
◦ The microprocessor initiates the device through a code/signal (e.g. start
convert signal to initiate ADC conversion).
◦ The device when ready to send the data sends an interrupt signal on one of
the interrupt pins.
◦ The microprocessor checks the validity of the interrupt request by
checking whether
The interrupt system is enabled.
The particular interrupt is not disabled.
Any higher priority interrupt is not pending or being processed.
If an interrupt request is valid, the microprocessor
Completes the current instruction execution.
Saves the Status Register and Program Counter (PC) in stack.
Issues the interrupt acknowledgement signal.
Determines the address of the interrupt servicing routine and
stores the starting address in PC. The program thus branches to
Interrupt Servicing Routine.
Direct memory access
Followingis the operation sequence in case of
Direct Memory Access.
◦ The microprocessor checks for DMA request signal once
in each machine cycle.
◦ The I/0 device sends the signal on DMA Request pin.
◦ The microprocessor tristates the address, data and control
buses.
◦ The microprocessor sends the acknowledgement signal to
the I/O device on DMA Acknowledgement pin.
◦ The I/O device uses the bus system to perform the data
transfer operation on memory.
◦ On completion of data transfer, the I/O device withdraws
the DMA request signal.
◦ The microprocessor continuously checks the DMA request
signal. When the signal is withdrawn, the microprocessor
regains the control of buses and resumes normal operation.
Serial Data Transfer
The data is transferred bit by bit on a single
line. This minimizes the number of
interconnecting wires.
Timing diagram of 8085 processor
Timing Diagram:
Timing Diagram is a graphical representation. It represents the
execution time taken by each instruction in a graphical format.
The execution time is represented in T-states.
Instruction Cycle:
The time required to execute an instruction
Machine Cycle:
The time required to access the memory or input/output devices
T-State:
The machine cycle and instruction cycle takes multiple clock
periods.
A portion of an operation carried out in one system clock period
is called as T-state.
MACHINE CYCLES OF 8085:
SIM instruction
The 8085 provide additional masking facility
for RST 7.5, RST 6.5 and RST 5.5 using SIM
instruction.
The status of these interrupts can be read by
executing RIM instruction.
RIM instruction
The status of pending interrupts can be read
from accumulator after executing RIM
instruction. When RIM instruction is
executed an 8-bit data is loaded in
accumulator
THANK YOU