CSE 2301 Microprocessor and Interfacing
CSE 2301 Microprocessor and Interfacing
Class 1
Difference between microprocessor, microcomputer and microcontroller.
[Input] -> [ALU + Control Unit + Register] -> [Output], <-> [Memory]
Class 2 Intro
Microprocessor - the controlling unit of a microcomputer. It is fabricated in small chip and is
able to communicate with other types of devices. The main job is to do ALU operations
It consists of the ALU, Control unit and registers labeled A,B,C,D,E,H,L and is connected with
the memory.
ACC(accumulator): A special register that temporarily holds some data during the ALU
operations.
Working Registers: Storage device used to store the data inside a microprocessor in different
address location.
PC(Program Counter): Queues all the programs that are currently being processed.
Clock Circuit: It is used to generate the clock pulse required as a reference signal for the
microprocessor.
Interrupt Circuit: Interrupting an on-going workflow to give priority to other processes that
need to be served first.
Features of Microprocessor
Cost-effective
Size
Low Power consumption
Versatility
Reliability
Types of Processors
Special
Coprocessor:
A specifically designed independent processor which can handle it's particular function many
times faster than the ordinary microprocessor. Lets say a processor specifically designed to
carry out ALU ops
Input-output processor:
Specifically designed to do communications using ports to either give output or take input from
the processor.
Basically a modem
Data Memory
Compute Engine
Input/Output
Microcontroller
Class 3 Generations
First generation Microprocessor (Intel 4004) 4-bit | in 1971 to 1972
Does fetch-decode-execute
Second generation Microprocessor (Intel 8008 and Intel 8088) 8-bit | in 1973
Bus: set of conductors that transmit data from data, address and control from different
elements of the microprocessors
IPC(Instructions per cycle): Measure of how many instructions a CPU is capable of executing in
a single clock.
Clock Speed: It is the number of operations per second a processor can perform.
Word Length:
RISC vs CISC
| RISC | CISC |
|--|--|
| Simple Processor circuitry (small number of transistors) | Complex processor circuitry (more
number of transistors) |
Types of Microcontrollers
Bit: Based on the bit configuration it is divided into three categories
8-bit
16-bit
32-bit
Memory
Instruction set
RISC
CISC
Applications of Microcontroller
Light sensing
Temperature sensing
When there's only 1 then it's min, if more than 1 then maximum.
BIU : Bus Interface Unit: The segment registers, instruction pointer and 6 byte instruction
queue are associated with BIU.
Fetches instruction codes, stores fetched instruction codes in first-in-first-out register set
called a queue.
Segment register: A segment register contains the address of instructions and data in
memory which are used by the processor to access memory locations. It points to the
starting address o fa memory segment currently begin used.
Code segment register (CS): Used for addressing a memory location in the code segment of
the memory for the given program.
Data Segment Register (DS): Code vars and constants in the given program are stored here.
Stack Segment Register (SS): It handles memory to store data and address during execution.
Also does Push and Pop operations.
Extra Segment Register (EX): Refers to a segment in the memory which is another data
segment in memory. (basically accumulator, holds results of ALU, and also help store data
incase DS is full or not big enough)
EU: Execution Unit : consists of general purpose register, stack pointer, base pointer and
index registers, ALU, flag registers (FALGS), instruction decoder and timing and control unit.
FLAG: Conditional flags and control flags. There are a total of 16 flags, 7 are unused.
Data Transfer
Arithmetic
Logical
Rotate
Shift
Branch
Flag Manipulation and Process Control
String
Segmentation
The process in which the main memory of the computer is logically divided into different
segments and each segment has its own base address. The purpose is to enhance the speed of
the processor fetching and executing the data.
eg: CS,DS,SS,EX
8085 registers have 8 bits, has 16 bit address line; can access faster
8086 register has 16 bits, has 20 bit address line; can access more memory locations.
Types of segmentation:
cw
1.
offset = 3000h
2.
offset: 5578h
physical: 178B8
ES: 7000h + 0h
CS: 3000h + 0h
SS: 5000h+ 0h
DS: 2000h + 0h
CS IP
DS SI
ES DI
SS SP/BP
Class 7 | Pins
if no bar then then active high, will work with a 0. else active low will work with a 1.
DT/R(bar) pin 27: it decides the direction of data flow through transreceiver.
INTR pin 18 and INTA (bar): sends interrupt signal sent by a device. in order to process
additional instructions. The 8086 will stop current instruction processing to tend to the
instructions of the device.
NMI - Non-maskable interrupt. The 8086 may or may not tend to the instructions of the device,
changes based on instruction priority.
DMA (Direct Memory Access): HOLD (min mode) pin 31 and HLDA (min mode) pin 30
LOCK (bar): locks the bus to prevent other processors from asking for bus access.
Test(bar) used to signal the main program to wait as bus is being used by processor.
S0 S1 S2 Characteristics
0 0 0 Interrupt acknowledge
0 1 1 Halt
1 0 0 Code Access
1 0 1 Read memory
1 1 0 Write Memory
1 1 1 Passive (None)
Mid Syllabus
Microprocessor
Block Diagram
Classifications
Features
Architecture of RISC and CISC (vs)
Name of some special purpose Microprocessor
Microcontroller - Types of microcontroller and applications
Difference between microprocessor and microcontroller
Evolution of microprocessor
Basic terms of microprocessor
8086 microprocessors
Functional units of 8086 -> BIU (General purpose Regs, Different Regs, Flags) and EU (ALU,
etc)
Addressing mode of 8086
Instruction set of 8086
Memory Segmentation in 8086 -> types and advantages
Pin Diagram of 8086 -> pin configuration.
8 bit octal latch (8282): connected with ALE and STB. Generally 2 latches are needed to store
the address as each is 8 bit in size.
Transreceiver (8286): used as a intermediate buffer when reading and writing the data from the
memory and registers.
3:8 Decoder (74138): it is a control unit which generates controls signals. Decides what the
processor will be doing, reading to memory or writing to memory, etc.
Class 10 |