Microprocessors and Microcontrollers: Unit-I
Microprocessors and Microcontrollers: Unit-I
com
It is a program controlled semiconductor device (IC}, which fetches, decode and executes
instructions.
.c
o
The basic units or blocks of a microprocessor are ALU, an array of registers and control
unit.
ar
en
a
The Software is a set of instructions or commands needed for performing a specific task by
a programmable device or a computing machine.
The Hardware refers to the components or devices used to form computing machine in
which the software can be run and tested. Without software the Hardware is an idle
machine.
rs
pp
e
The language in which the mnemonics (short -hand form of instructions) are used to write a
program is called assembly language. The manufacturers of microprocessor give the
mnemonics.
5. What are machine language and assembly language programs?
The software developed using 1's and 0's are called machine language, programs. The
software developed using mnemonics are called assembly language programs.
.to
The machine language and assembly language programs are machine dependent. The
programs developed using these languages for a particular machine cannot be directly run
on another machine
A digit of the binary number or code is called bit. Also, the bit is the fundamental storage
unit of computer memory.
The 8-bit (8-digit) binary number or code is called byte and 16-bit binary number or code
is called word. (Some microprocessor manufactures refer the basic data size operated by
the processor as word).
8. What is a bus?
The microprocessor has to fetch (read) the data from memory or input device for
processing and after processing, it has to store (write) the data to memory or output device.
Hence the data bus is bi-directional.
10. Why address bus is unidirectional?
ar
en
a
.c
o
The microprocessor is the master in the system, which controls all the activity of the
system. It issues address and control signals and fetches the instruction and data from
memory. Then it executes the instruction to take appropriate action.
12. Write the flags of 8085.
The 8085 has nine flags and they are
pp
e
rs
.to
In pipelined architecture the processor will have number of functional units and the
execution time of functional units are overlapped. Each functional unit works independently
most of the time.
14. What are the functional units available in 8085 architecture?
The bus interface unit and execution unit are the two functional units available in 8085
architecture.
Machine cycle is defined as the time required to complete one operation of accessing
memory, I/O, or acknowledging an external request. This cycle may consist of three to six
T-states.
19. What is the difference between CPU bus and system bus?
.c
o
Generally I/O devices are slow devices. Therefore the speed of I/O devices does not match
with the speed of microprocessor. And so an interface is provided between system bus and
I/O devices.
ar
en
a
The CPU bus has multiplexed lines but the system bus has separate lines for each signal.
(The multiplexed CPU lines are demultiplexed by the CPU interface circuit to form
system bus).
pp
e
rs
The processor cycle or machine cycle is the basic operation performed by the processor. To
execute an instruction, the processor will run one or more machine cycles in a particular
order.
22. What is Instruction cycle?
The sequence of operations that a processor has to carry out while executing the instruction
is called Instruction cycle. Each instruction cycle of a processor indium consists of a
number of machine cycles.
.to
In general, the instruction cycle of an instruction can be divided into fetch and execute
cycles. The fetch cycle is executed to fetch the opcode from memory. The execute cycle is
executed to decode the instruction and to perform the work instructed by the instruction.
25. How many machine cycles constitute one instruction cycle in 8085?
Each instruction of the 8085 processor consists of one to five machine cycles.
identifies a
.c
o
The opcode fetch cycle is a machine cycle executed to fetch the opcode of an instruction
stored in memory. Every instruction starts with opcode fetch machine cycle.
28. What operation is performed during first T -state of every machine cycle in 8085 ?
ar
en
a
In 8085, during the first T -state of every machine cycle the low byte address is latched
into an external latch using ALE signal.
29. Why status signals are provided in microprocessor?
The status signals can be used by the system designer to track the internal operations of
the processor. Also, it can be used for memory expansion (by providing separate memory
banks for program & data and selecting the bank using status signals).
rs
30. How the 8085 processor differentiates a memory access (read/write) and 1/0 access
(read/write)?
pp
e
The memory access and 1/0 access is differentiated using IO/M signal. The 8085 processor
asserts IO/ M low for memory read/write operation and 10 I M is asserted high for 1/0
read/write operation.
31. When the 8085 processor checks for an interrupt?
.to
In the second T -state of the last machine cycle of every instruction, the 8085 processor
checks whether an interrupt request is made or not.
32. What is interrupt acknowledge cycle?
The interrupt acknowledge cycle is a machine cycle executed by 8085 processor to get the
address of the interrupt service routine in-order to service the interrupt device.
Whenever the processor or system is resetted , all the interrupts except TRAP are disabled.
fu order to enable the interrupts, El instruction has to be executed after a reset.
.c
o
In 8085, the Software interrupt cannot be disabled or masked but the Hardware interrupt
except TRAP can be disabled or masked.
ar
en
a
rs
pp
e
.to
The TRAP is non-maskable interrupt of8085. It is not disabled by processor reset or after
reorganization of interrupt.
The interrupts including mAP are recognized only if the HOLD is not valid, hence TRAP
has lower priority than HOLD.
43. When the 8085 processor will disable the interrupt system?
.c
o
The processor keeps on checking the interrupt pins at the second T -state of last
Machine cycle of every instruction. If the processor finds a valid interrupt signal and
if the interrupt is unmasked and enabled then the processor accepts the interrupt. The
acceptance of the interrupt is acknowledged by sending an OOA signal to the
interrupted device.
1. Executing El instruction.
2. System or processor reset.
ar
en
a
The interrupts of 8085 except TRAP are disabled after anyone of the following operations
rs
pp
e
.to
For the interrupt INTR, the interrupting device has to place either RST opcode or CALL
opcode followed by l6-bit address. I~RST opcode is placed then the corresponding vector
address is generated by the processor. In case of CALL opcode the given l6-bit address
will be the vector address.
47. How clock signals are generated in 8085 and what is the frequency of the internal clock?
The 8085 has the clock generation circuit on the chip but an external quartz crystal or L C
circuit or RC circuit should be connected at the pins XI and X2. The maximum internal
clock frequency of 8085A is 3.03 MHz.
.c
o
The hardware interrupts in 8085 are TRAP, RST 7.5, RST 6.5 and RST 5,5. 41.
52. Which interrupt has highest priority in 8085? What is the priority of other interrupts?
The TRAP has the highest priority, followed by RST 7.5, RST 6.5, RST 5.5 and INTR.
ar
en
a
53 .What is an ALE?
The ALE (Address Latch Enable) is a signal used to demultiplex the address and data lines,
using an external latch. It is used to enable the external latch.
54. Explain the function of IO/M in 8085.
The IO/M is used to differentiate memory access and I/O access. For IN and OUT
instruction it is high. For memory reference instructions it is low.
rs
pp
e
READY is an input signal to the processor, used by the memory or I/O devices to get extra
time for data transfer or to introduce wait states in the bus cycles.
PART-B
.to
Instruction format
One byte instruction
Two byte instruction
Three byte instruction
Zero byte instruction
ar
en
a
.c
o
rs
pp
e
Counters
Time delay using processor registers
Delay calculation using register pairs
.to
PART-C
Block Diagram
Registers Available
Function of Accumulator
Function of Flags
Function of Stack pointer
Function of Program counter
.c
o
Tristate Devices
Buffers
Bidirectinal Buffers
Decoder
Encoder
D flipflops
ar
en
a
pp
e
Pin Diagram
Address bus
Data bus
Signals
Interrupts
Control bus
Explanation about all signals
.to
rs
4. Draw the Pin Diagram of 8085 and explain the function of various signals.