You are on page 1of 14

Fundamentals of Microprocessor and Microcontroller

Unit 1

Chapter 1: Microprocessor 8085 Architecture and Instruction Set

1. What is microprocessor? Explain its components and functions in detail.

Solution:

• Microprocessor is a semiconductor, multipurpose, programmable logic device that


reads binary instruction from storage device called memory, accepts binary data as
input & processes the data according to the instructions & provides result as output.
• It is an integrated circuit, that has processing capabilities of large computers.
Microprocessor comprises of –
• Arithmetic/Logic Unit: Performs arithmetic
operations like addition, subtraction, and logic
operations like AND, OR, EX-OR etc.
• Register Array: Consists of various
registers which store the data temporarily during
the execution.
• Control Unit: Provides the necessary timing
and control signals to all the operations in the
microcomputer. It controls the flow of data
between the microprocessor memory and
peripherals.

Functions of Microprocessor –
• To fetch decode and execute instructions in proper order.
• To transfer the data from one block to another.
• To give proper response to different external interrupts according to their
priority.
• To provide timing and control signals to the overall system.

Amraja Shivkar Page 1


2. What do you mean by Machine level language, Assembly language and High-
level Language? Explain what assembler, compiler and interpreter is.
Solution:
Machine Language:
• Each machine has its own set of instructions based on the design of its CPU or
microprocessor. To communicate with computer, one must give instructions in
binary code known as machine language.
• These instructions are in the form of groups of 0’s and 1’s.
Assembly Language:
• It’s difficult to write programs in Binary, hence programmers can write programs
in low level language also called assembly language.
• This consist of mnemonics (an abbreviation for an operation). Example: MOV,
HLT, ADD, SUB.
High Level Language:
• The programs written in assembly language are not transferable from one machine
to another as they are machine dependent. Hence programmers use high level
language like C, C++, and Java etc.
• It consists of instructions which are more like English statements. High level
language is machine independent.
Assembler: Assembler is a Software that translates an assembly language program from
mnemonics to binary machine code.
Compiler: Compiler is a software that translates a high-level language program into binary
machine code for a computer. The compiler reads the entire program first and translates it
into the object code that is executed by the microprocessor.
Interpreter: Interpreter is a software that translates a high-level language into binary
machine code for a computer. The interpreter reads one instruction at a time, produces its
object code, and executes the instruction before reading the next instruction.

3. Define –
i) Microprocessor ii) Monitor program iii) Assembler
iv) Microcomputer v) Word
Solution:
i) Microprocessor: Microprocessor is a semiconductor, multipurpose, programmable
logic device that reads binary instruction from storage device called memory,
accepts binary data as input & processes the data according to the instructions &
provides result as output

Amraja Shivkar Page 2


ii) Monitor Program: Monitor program is a program that interprets the input from a
keyboard and converts it into its binary equivalent.

iii) Assembler: Assembler is a Software that translates an assembly language program


from mnemonics to binary machine code.

iv) Microcomputer: Microcomputer is a computer system that uses microprocessor as


its CPU.

v) Word: A group of bits that a computer can recognize and process at a time is called
word. Word size may differ from processor to processor. Example: for
microprocessor 8085 words size is 8-bits, for Pentium word size is 64-bits.

4. Define following terms –


i) Machine Language ii) Assembly Language
iii) High Level Language iv) Compiler v) Interpreter.
Solution:
i) Machine Language: Machine language is a low-level programming language
consisting of binary numbers (0s and 1s) that can only be read by machines. These
instructions are executed directly by the CPU without any need for conversion.
ii) Assembly Language: Low level programming language consisting of mnemonics
(an abbreviation of an operation) is called assembly language. Example: MOV,
HLT, ADD, SUB, etc.
iii) High Level Language: A high-level language is much more user friendly in the
programming context as in this instructions are more like English statements.
Example: C, C++, Java, etc.
iv) Compiler: Compiler is a software that translates a high-level language program into
binary machine code for a computer. The compiler reads the entire program first and
translates it into the object code that is executed by the microprocessor.
v) Interpreter: Interpreter is a software that translates a high-level language into
binary machine code for a computer. The interpreter reads one instruction at a time,
produces its object code, and executes the instruction before reading the next
instruction.

Amraja Shivkar Page 3


5. Differentiate between high-level programming language and low-level
programming language.
Solution:

High-level Programming Language Low-level Programming Language


It is Platform independent. It is Platform dependent.
Can run on different hardware Cannot run them on hardware that
with different configuration. has different configuration.
These programs have comparatively These programs have comparatively faster
slower runtime. runtime.
These programs are easy to remember These programs are difficult to write and
and write as they are English-like remember as they are mnemonics or in
statements. binary.
Needs compiler for the translation Assembly language needs assembler for
to machine code. conversion. Binary doesn’t need conversion.

6. Differentiate between Machine language and Assembly language.


Solution:

Machine Language Assembly Language


Consists of binary numbers- i.e., 0s and 1s Consists of mnemonics- example: HLT,
only MOV, ADD
No need for conversion when it runs on Needs assembler for conversion when it
machine. runs on machine.
Understandable by machines. Understandable by humans.
Machine language have comparatively Assembly language have comparatively
faster runtime. slower runtime.
Comparatively complicated to write these Comparatively easier to write these
programs. programs.

Amraja Shivkar Page 4


7. Differentiate between Microprocessor and Microcontroller.
Solution:

Microprocessor Microcontroller
Consists of only a CPU with memory, I/O Contains a CPU, Memory, I/O interface all
interface chips around it. integrated into single chip.
Microprocessor uses an external bus Microcontroller uses an internal
to communicate with memory and controlling bus since memory and I/O are
other peripherals. situated on same chip.
Microprocessor is used in Micro Controller is used in an
Personal Computers. embedded system.
Microprocessors are based on Micro controllers are based on
Von Neumann architecture. Harvard architecture.
It is complicated and expensive, It is inexpensive and straightforward with
with many instructions to process. fewer instructions to process.

8. With a suitable diagram explain Organization of Microprocessor based System.


Solution:

• A system that uses microprocessor as


its CPU is called microprocessor-
based system (microcomputer).
• It includes Microprocessor, Input
(Hex keyboard), output (LCD/Seven
segment display) and Memory (RAM
and ROM).
• These components are organized
around a common path called System
Bus.

Microprocessor:
• Reads instruction from memory and performs computing tasks.
• Communicates with all peripherals (memory and I/O) using the system bus.
• Controls the timing of information flow.

Memory:
• Comprises of RAM (Random Access Memory) or ROM (Read Only Memory).
• ROM contains monitor program. RAM contains user program.
• Stores binary information, called instruction and data.

Amraja Shivkar Page 5


Input / Output devices:
• The input devices such as keyboard, switches etc transfer binary information from
the outside world to the microprocessor.
• The output devices like LED, LCD, CRT etc transfer the information from
microprocessor to outside world.

System Bus:
• It is the communication path between the microprocessor and peripherals.
• It is a group of wires to carry bits.

Amraja Shivkar Page 6


Chapter 2: Memory and Logic Devices

1. Write a short note on classification of memory.


Solution:

Prime Memory:
RAM / RWM
• RWM (Read/Write Memory) also as RAM (Random Access Memory). Information
can be read as well as altered.
• This memory is volatile.
• Stores user programs and instructions. Hence called user memory.
• There are two types of RAM – SRAM (Static RAM) and DRAM (Dynamic RAM)
• SRAM is mostly used as a part of cache memory.
• DRAM comprises 90% of RAM and needs to be refreshed using DRAM controller

ROM
• In ROM (Read Only Memory) information can only be read.
• ROM is non-volatile memory. Stores monitor programs.
• Can be permanent or semi-permanent.
• Permanent group includes – Masked ROM and PROM (Programmable ROM).
• Semi-permanent group includes – EPROM (Erasable Programmable Read Only
Memory), EEPROM (Electrically Erasable Programmable Read Only Memory)
and Flash memory .

Secondary Memory:
• Secondary Memory It includes devices like hard disk, floppy disk, magnetic tape
etc.

Amraja Shivkar Page 7


2. Difference between SRAM and DRAM
Solution:
SRAM DRAM
Stands for Static Random Access Memory. Stands for Dynamic Random Access
Memory.
Delivers Faster access time. Slower performance.
Retains data as long as power supply of Retains the data only for ¼ of a second even
computer is ON. if power supply is ON.
Does not require refreshing to Requires continuous refreshing to retain the
retain the data. data.
Typically used for Computer's cache. Used as Computer's main memory.
More Costly than DRAM. Cheaper than SRAM.

3. Difference between EPROM and EEPROM


Solution:
EPROM EEPROM
Stands for Erasable Programmable Read stands for Electrically Erasable
Only Memory. Programmable Read Only Memory.
Its contents are erased using ultraviolet Its contents are erased by applying small
rays. voltage.
Chip needs to be removed from the Chip need not be removed from the
system, in order to erase. system, in order to erase.
Total erasing time to erase entire chip is 15 Total erasing time to erase entire chip is
to 20 min. 10ns.
Selective erasing is not possible. Selective erasing is possible.

4. Write a short note on tristate buffers.


Solution:
• Normally all the logic devices have only 2 logic states – Logic High (1) and Logic
Low (0)
• Tristate logic devices have 3 logic states – Logic High, Logic Low and High
Impedance.
• Tristate devices have 3 pins – input, output and enable.
• Depending on the type of enable pin this device can be either Active High or
Active Low.

Amraja Shivkar Page 8


5. Write a short note on tristate inverters.
Solution:
• Normally all the logic devices have only 2 logic states – Logic High (1) and Logic
Low (0)
• Tristate logic devices have 3 logic states – Logic High, Logic Low and High
Impedance.
• Tristate devices have 3 pins – input, output and enable.
• Depending on the type of enable pin this device can be either Active High or
Active Low.

Amraja Shivkar Page 9


6. With a suitable diagram explain System bus structure of microprocessor 8085 in
detail.
Solution:

System Bus Structure of microprocessor 8085

• System bus is the communication path between the microprocessor and peripherals.
• It comprises of Address Bus, Data Bus and Control Bus.

Address Bus
• 16-bit, unidirectional bus.
• Address carried by these bus lines tells memory to open the corresponding memory
location.
• It can access total 216 different memory addresses (hence 64K bytes memory)

Data Bus
• 8-bit, bidirectional bus.
• It is used to transmit data, i.e., information, instructions, data, results etc. between
microprocessor and peripherals.
• Size of the data bus limits the number of possible instructions to 28 = 256. i.e., from
00H to FFH.

Control Bus
• Comprises of various lines that carry control and timing signals for synchronization.
• Normally control signals are of following types-
– Memory Read
– Memory Write
– I/O Read
– I/O Write
• When Memory Read or I/O Read is active, data is received by the processor.
• When memory Write or I/O Write is active, data is sent by the processor.

Amraja Shivkar Page 10


Chapter 3: Pin configuration of IC 8085

1. Write the functions of the following pins.


i) Vcc ii) Vss iii) X1, X2 iv) CLK(OUT) v) S0,S1
Solution:
i) Vcc
• Vcc is one of the power pins of microprocessor 8085.
• Vcc supplies +5 Volt DC to microprocessor 8085 IC.

ii) VSS
• Vss is one of the power pins of microprocessor 8085.
• Vss acts as ground (0 Volt) to microprocessor 8085 IC.

iii) X1, X2
• X1, X2 terminals are input pins associated with the external oscillator for
generating reference clock for microprocessor.
• Waveform from X1, X2 is considered as input clock given to the microprocessor.

iv) CLK(OUT)
• It is output pin which gives out clock generated by the microprocessor to operate
entire system.
• Frequency of waveform from CLK (OUT) is half of the frequency of waveform
from X1, X2.

v) S0, S1
• These are status pins which together indicate status of microprocessor operation.

Amraja Shivkar Page 11


2. Write the functions of the following pins.
̅̅̅̅̅̅̅̅̅̅̅̅̅
i) 𝐑𝐄𝐒𝐄𝐓 𝐈𝐍 ii) RESET OUT iii) AD0 to AD7
iv) A8 to A15 v) ALE
Solution:
̅̅̅̅̅̅̅̅̅̅̅̅̅
i) 𝐑𝐄𝐒𝐄𝐓 𝐈𝐍
• This is active low input pin used to reset microprocessor.
• When logic low is given to this pin microprocessor will be reset (Program Counter
will point address 0000H).

ii) RESET OUT


• This is output pin through which microprocessor can reset the entire system.
• RESET OUT is also known as system reset.

iii) AD0 to AD7


• These are input/output pins. Together they are called multiplexed address/data bus.
• These lines carry 8-bit data or lower byte of 16-bit address.

iv) A8 to A15
• These are output pins. Together they are called higher order address bus.
• These lines carry higher byte of 16-bit address.

v) ALE
• This is output pin called Address Latch Enable. It is used to separate the lower order
address and data from the multiplexed address/data bus.
• During 1st clock cycle of any operation this pin goes High, indicating presence of
address bits on multiplexed bus AD0-AD7. While in next clock cycle this pin goes
low indicating presence of data bits on multiplexed bus AD0-AD7.

3. Write the functions of the following pins.


i) READY ii) HOLD iii) HLDA
iv) SID v) SOD
Solution:
i) READY
• It is input pin used as communication protocol between faster processor and slower
peripheral.
• Microprocessor does not send data to peripheral unless it gets READY signal from
peripheral (indicating that peripheral is ready to receive).

Amraja Shivkar Page 12


ii) HOLD
• This is input pin through which outer master device can request for bus-control of
microprocessor.
• When microprocessor receives HOLD signal, it hands over the buses to the outer
device after completing its current cycle.

iii) HLDA
• This is output pin called Hold Acknowledge.
• Through this pin microprocessor gives acknowledgement of receiving HOLD
signal.

iv) SID
• This is input pin called Serial Input Data, used for serial communication.
• Bit received on this pin appears as MSB of accumulator on execution of instruction
RIM.

v) SOD
• This is output pin called Serial Output Data, used for serial communication.
• MSB of accumulator is sent on this pin on execution of instruction SIM.

4. Write the functions of the following pins.


̅̅̅̅
i) 𝐑𝐃 ̅̅̅̅̅
ii) 𝐖𝐑 ̅
iii) 𝐈𝐎/𝐌
Solution:
̅̅̅̅
i) 𝐑𝐃
• It is an output indicator pin known as active low Read control.
• When this pin goes low microprocessor reads information from memory or input.

ii) ̅̅̅̅̅
𝐖𝐑
• It is an output indicator pin known as active low Write control.
• When this pin goes low microprocessor writes information to memory or output

̅
iii) 𝐈𝐎/𝐌
• This output status signal decides whether the address placed on address bus belongs
to memory or input/output.
• When this pin goes high then the address belongs to input/output. When this pin
goes low then the address belongs to memory.

Amraja Shivkar Page 13


5. Write the functions of the following pins.
i) TRAP ii)) RST5.5, RST6.5, RST7.5 iii) INTR
̅̅̅̅̅̅̅
iv) 𝐈𝐍𝐓𝐀
Solution:
i) TRAP
• It is hardware vectored interrupt input pin.
• It is the highest priority, non-maskable interrupt.
• TRAP does not need to be enabled and cannot be disabled by any instruction.

ii) RST5.5, RST6.5, RST7.5


• These are hardware vectored input pins.
• They are maskable and have priority lower than that of TRAP. (RST 7.5 has highest
priority, RST 6.5 has intermediate priority and RST 5.5 has lowest priority among
RST hardware interrupts).
• These are enabled using instruction EI and can be disabled using instruction DI.
They can be masked using instruction SIM.

iii) INTR
• It is hardware non-vectored interrupt input pin called Interrupt Request.
• It is the lowest priority interrupt.
• INTR is enabled using instruction EI and can be disabled using instruction DI.

iv) ̅̅̅̅̅̅̅
𝐈𝐍𝐓𝐀
• It is active low output pin called Interrupt Acknowledge.
• When microprocessor receives Interrupt request on INTR pin, 𝐼𝑁𝑇𝐴
̅̅̅̅̅̅̅ pin goes low
indicating that INTR is received.

Amraja Shivkar Page 14

You might also like