U18EII4202
Digital Fundamentals
and Microprocessor
JEYA DAISY I/ AP - II
Department of E&I
Overview of this Lecture
Flipflop
Shift registers
Evolution of microprocessor
The microprocessor also known as
the central processing unit, is the
brain of all computers and many
household and electronic devices.
Multiple
.
microprocessors, working
together, are the "hearts" of
datacenters, super-computers,
communications products, and
other digital devices.
TIMELINE
1972 1971 1968 1959
8 Bit Microprocessor 4 Bit Microprocessor
Intel 8008 Intel 4004 Intel (Integrated Fairchild Semiconductors
Intel 8080 Intel 4040 Electronics)
Intel 8085
1978 1981 2003
16 Bit Microprocessor 32 Bit Microprocessor 64 Bit Microprocessor
Intel 8086 Intel 80386/80486 Intel core 2
Intel 8088 Intel Pentium I/II/III/IV Intel core i7
Intel 80186 & 80188 Intel core i5
Intel core i3
Processor Architecture
Von Neumann Architecture
Von Neumann Architecture
Execution of Instruction
Harvard Architecture
Harvard architecture
Compare Von Neumann Architecture and Harvard
Architecture
Microprocessor
• A microprocessor is nothing but the Central Processing
Unit of a computer
• It has been constructed on a single chip.
• It is an integrated circuit and is able to implement all the
important functions of the CPU.
• It is built on a silicon chip and is a clock-driven.
• The device is register-based.
• It accepts binary data and produces the necessary output
after processing the data on the basis of the instructions
which are stored in the memory.
Microprocessor (MPU)
8085
• The 8085 is an 8-bit device- memory based CISC .
• Address bus of 16 bits, , can access address space of 2^16=64KB
• data bus of 8 bits,
• stack pointer of 16 bits,
• Program counter of 16 bits
• Registers of 8 bits each.
• clock speed 3 to 5 MHz.(3.2MHz).least frequency is required 1MHz.on-
chip clock generator with external crystal, LC, RC network.
• It has 80 basic instructions,246 op-codes.
• Clock cycle is 200ns
• 40 pin DIP chip , works at +5 V
• 8 bit accumulator,8 bit instruction register.
• One serial port with two lines SOD(serial output data),SID(serial Input data)
• It contains 6200 transistor- N channel depletion load silicon gate
MOS(HMOS)
Architecture of 8085
ALU
• Arithmetic operation- Addition, subtraction, complementing, logical
AND,OR,EX-OR, increment, decrement, rotate, shift and clear.
• Made of logic gates and adders.
• Accumulator(A)
-8bit SFR
-all I/O data transfers
- byte operation
-DAA(decimal adjust accumulator) instruction-BCD
addition
• Temporary register
-8 bit
- not access by the user
- load the second operand during ALU
MVI M, 17H – 17H moved to temp.reg
- final result stored in the accumulator and set/reset the flags
Flag register
8 bit status register-status of the ALU
Flag means one bit
Contains 5 flag remaining for 3 bits for undefined
S flag- sign flag
If bit 7 is set after execution ,sign flag set to 1 for negative ,0 for positive
Z-Zero flag
if the result of the accumulator is zero, it will set otherwise it will reset. used in JUMP
instruction
Ac –Auxiliary carry
-Not used in Jump
P – parity
Odd -0,even=1
JNP instruction,JP
CY-carry flag
JC,JNC instruction
Microprocessor – Basic concept
Microprocessor Architecture
Memory
Input/Output (I/O)
Addressing Modes
The way of specifying data to be operated by an instruction is called
addressing mode
1. Immediate Addressing Mode
MVI B 45 (move the data 45H immediately to register B)
2. Register Addressing Mode
MOV A, B (move the contents of register B to register A)
3. Direct Addressing Mode
Examples:
LDA 2050 (load the contents of memory location into accumulator A)
4. Register Indirect Addressing Mode –
MOV A, M (move the contents of the memory location pointed by the H-L pair to the
accumulator)
5. Implied/Implicit Addressing Mode
CMA (finds and stores the 1’s complement of the contains of accumulator A in A)
Intel 8085 Instructions
1. Data Transfer Group
2. Arithmetic Group
3. Logical Group
4. Branch Control Group
5. Unconditional CALL
6. Conditional CALL
7. Unconditional Return
8. Conditional Return
https://www.javatpoint.com/instruction-set-of-8085
Check all the instruction
Interrupts
• The interrupt is a signal emitted by hardware or software when a process
or an event needs immediate attention. It alerts the processor to a high-
priority process requiring interruption of the current working process.
• S/w interrupt –RST0-7,inserted into the main program
• H/W interrupt-TRAP,RST7.5,RST 6.5,RST5.5,INTR
maskable –interrupt enable/disable by EI,DI,SIM
instruction,INTR,RST7.5,6.5,5.5
Non-maskable- cannot enable/disable, TRAP
Vectored interrupt-ISR address known by 8085,
-TRAP,RST7.5,6.5,5.5(have priority)
Non vectored interrupt –ISR address supplied by the interrupting device
-INTR(assigned)
Interrupt service routine
Add two 8 bit number
2000 LDA2050 A= 2050 data
2003 MOV H,A H=A
2004 LDA 2051 A= 2051 DATA
2007 ADD H A=A+H
2008 MOV L,A L=A
2009 MVIA,00 A=00
200B ADC A A+CY
200C MOV H,A H=A
200D SHLD 3050 H=3051,L=3050
2010 HLT
https://sourceforge.net/projects/simulator8085/
Difference between microprocessor &
microcontroller
Microcontroller
A self-contained system in which a
processor, support, memory, and
input/output (I/O) are all contained
in a single package. A small
computer system on a single IC
History of Microcontroller
First used in 1975(Intel
8048)
The introduction of EEPROM The same year, Atmel
in 1993, allowed introduced the first
microcontrollers to be microcontroller using
electrically erased Flash memory.
Types of Microcontroller
Memory Instruction Memory
BITS Device FAMILY
set Architecture
80C51-8 bit,5 interrupt,1 serial
port
• 4 KB on-chip ROM (Program memory).
• 128 bytes on-chip RAM (Data memory).
• 8 bit data bus (bidirectional).
• 16 bit address bus (unidirectional).
• Two 16-bit timers.
• Instruction cycle of 1 microsecond with 12 MHz crystal.
• Four 8-bit ports.
• 128 user defined flags.
• Four register banks of 8 bit each.
• 16-byte bit-addressable RAM
• 40 pin DIP
Basic microcontroller architecture
Basic microcontroller architecture
Basic microcontroller architecture
Microcontrollers Memory Types
I/O Space
Interrupts
Interrupts are the events that temporarily
suspend the main program, pass the control to
the external sources and execute their task. It
then passes the control to the main program
where it had left off. 8051 has
5 interrupt signals, i.e. INT0, TFO, INT1, TF1,
RI/TI.
Addressing modes
•Immediate addressing mode
MOV A,#DATA
•Indexed addressing mode
MOV A,@A+DPTR
•Direct addressing mode
MOV A,07H
•Register direct addressing mode
MOV A,R4
•Register indirect addressing mode
MOV A,@RO
Instruction set
Data moving or handling Instructions:
Loop and Jump Instructions: