SlideShare a Scribd company logo
Prepared by –
Kaustubha H. Shedbalkar
1
2
3
Microprocessor Introduction Data Bus Address Bus
4004 1971 4 8
8008 1972 8 8
8080 1974 8 16
8085 1977 8 16
8086 1978 16 20
80186 1982 16 20
80286 1983 16 24
80386 1986 32 32
80486 1989 32 32
Pentium 1993 Onwards 32
Core Solo 2006 32
Dual Core 2006 32
Core 2 Duo 2006 32
Core to Quad 2008 32
I3, i5, i7 2010 64
4
A microprocessor is a computer processor where the data
processing logic and control is included on a single integrated
circuit, or a small number of integrated circuits. The
microprocessor contains the arithmetic, logic, and control
circuitry required to perform the functions of a computer's
central processing unit.
A microcontroller is a small computer on a single VLSI
integrated circuit chip. A microcontroller contains one or more
CPUs along with memory and programmable input/output
peripherals
5
Microprocessor Microcontroller
A microprocessor is the heart of a
computer system
A microcontroller is the heart of an
embedded system
All peripherals need to be connected
separately
All peripherals are embedded into a
single chip
The circuit is complex and bulky The circuit can be simple and compact
High power consumption Low power consumption
Uses external RAM to execute programs Uses flash memory to execute programs
Can not be used in a compact system and
hence not efficient
Can be used in a compact system and
hence efficient
The input and output is not defined The input and output is defined
Cost of the system is higher than
microcontrollers
Cost of the system is low
Used in personal computers, mobile
phones
Used in refrigerators, washing machines
6
Type of Number System Numbers used
Binary 0,1
Octal 0,1,2,3,4,5,6,7
Decimal 0,1,2,3,4,5,6,7,8,9
Hexadecimal 0,1,2,3,4,5,6,7,8,9,A,B,C,
D,E,F
7
8
9
General Purpose Temporary Data Special Purpose Sixteen Bit
B, C Temp. Data A PC
D,E W, Z Flag SP
H,L Instruction
Address Bus A0 – A7 & A8 – A15
Data Bus D0 – D7
Control Bus
10
D7 D6 D5 D4 D3 D2 D1 D0
S Z AY P CY
S SIGN
Z ZERO
AY AUXILIARY CARRY
P PARITY
CY CARRY/BORROW
11
OP CODE OPERAND BINARY
CODE
HEX
CODE
TASK
MOV C,A 0100 1111 4F H Move the contents of register
A into register C
MVI A,02 H 0011 1110 3E H Move immediate data 02 into
register A
12
Type Example
Immediate Addressing Mode MVI A, 20H
MVI M,30H
LXI SP 2000H
Register Addressing Mode MOV A, B
SPHL
ADD C
Direct Addressing Mode LDA 2000H
SHLD 3000H
Indirect Addressing Mode LDAX B
MOV M, A
Implied Addressing Mode CMA
RAL
13
Interrupt Type Trigger Priority Makeable Vector Address
TRAP (RST 4.5) Edge & Level 1st – Highest No 0024 H
RST 7.5 Edge 2nd Yes 003C H
RST 6.5 Level 3rd Yes 0034 H
RST 5.5 Level 4th Yes 002C H
INTR Level 5th - Lowest Yes Decided by
hardware
14
15
16
17
NO Flags are affected
1 MOV R1,R2
2 MOV M,R
3 MOV R,M
4 MVI R, DATA
5 MVI M,DATA
6 LXI RP,DATA
7 STAADDR
8 LDAADDR
9 STAX RP
10 LDAX RP
11 LHLD ADDR
12 SHLD ADDR
13 XCHG
18
Sr. No. Instruction Flags affected
1 ADD R ALL
2 ADD M ALL
3 ADI DATA ALL
4 ADC R ALL
5 ADC M ALL
6 ACI DATA ALL
7 DAA ALL
8 SUB R ALL
9 SUB M ALL
10 SUI DATA ALL
11 SBB R ALL
12 SBB M ALL
13 SBI DATA ALL
Sr. No. Instruction Flags affected
14 INR R NCY
15 INR M NCY
16 DCR R NCY
17 DCR M NCY
18 INX RP NF
19 DCX RP NF
20 DAD RP CY
19
Sr. No. Instruction Flags affected
1 ANA R ALL
2 ANA M ALL
3 ANI DATA ALL
4 ORA R ALL
5 ORA M ALL
6 ORI DATA ALL
7 XRA R ALL
8 XRA M ALL
9 XRI DATA ALL
10 CMP R ALL
11 CMP M ALL
12 CPI DATA ALL
13 CMA NF
Sr. No. Instruction Flags affected
14 RLC CY
15 RRC CY
16 RAL CY
17 RAR CY
18 STC CY
19 CMC CY
20
NO Flags are affected
1 JMPADDR
2 JMP COND. ADDR
3 CALL ADDR
4 CALL COND. ADDR
5 RET
6 RET COND.
7 PCHL
8 RST n
21
Instruction HEX Code Vector Address
RST 0 C7 0000H
RST 1 CF 0008H
RST 2 D7 0010H
RST 3 DF 0018H
RST 4 E7 0020H
RST 5 EF 0028H
RST 6 F7 0030H
RST 7 FF 0038H
22
NO Flags are affected
1 IN PORT
2 OUT PORT
3 XTHL
4 SPHL
5 PUSH RP
6 PUSH PSW
7 POP RP
8 POP PSW (ALL FLAGS)
9 NOP
10 HLT
11 EI
12 DI
13 RIM
14 SIM
23
Controls of DYNA 85L
A C000 Assembly language programme
C000: Program
COON: End of program
ESC Come out of the program
GO C000
4 sec
Space Bar
Execute the program
D C050 Display 8 bits of memory
location starting form C050
Rest
Button
Reset everything and display
start of the panel
24
Program to add two 8 bit numbers
MVI A,20H
MVI B,03H
MVI C,00H
ADD B
JNC NEXT
INR C
NEXT STA C050H
MOV A,C
STA C051H
RST 1/HLT
25
Program to subtract two 8 bit
numbers
MVI A,20H
MVI B,03H
MVI C,00H
SUB B
JNC NEXT
INR C
NEXT STA C050H
MOV A,C
STA C051H
RST 1/HLT
26
Program to find multiplication of
numbers
LXI H,C050H
MVI B,M
INX H
MOV C,M
MVI A,00H
MVI D,00H
BACK ADD B
JNC NEXT
INR D
NEXT DCR C
JNZ BACK
INX H
MOV M,A
INX H
MOV M,D
RST 1
27
Program to store 8 bit numbers into
memory locations
LXI H,C050H
MVI M,01H
INX H
MVI M,02H
INX H
MVI M,03H
INX H
MVI M,04H
INX H
MVI M,05H
INX H
MVI M,06H
INX H
MVI M,07H
INX H
MVI M,08H
RST 3
28
Program to largest of two numbers
LXI H,C050H
MVI A,05H
MOV M,A
MVI A,08H
CMP M
JNC NEXT
MOV A,M
NEXT INX H
MOV M,A
RST 1
29
Program to largest of given numbers
LXI H,C050H
MVI A,00H
MVI B,08H
BACK CMP M
JNC NEXT
MOV A,M
NEXT INX H
DCR B
JNZ BACK
STA C020H
RST 1
30
Program to smallest of given numbers
LXI H,C050H
MVI A,FFH
MVI B,08H
BACK CMP M
JC NEXT
MOV A,M
NEXT INX H
DCR B
JNZ BACK
STA C020H
RST 1
31
Program to arrange the numbers in
ascending order
MVI C,COUNT
DCR C
REPEAT MOV D,C
LXI H,C050H
LOOP MOV A,M
INX H
CMP M
JC SKIP
MOV B,M
MOV M,A
DCX H
MOV M,B
INX H
SKIP DCR D
JNZ LOOP
DCR C
JNZ REPEAT
RST 3
32
Program to arrange the numbers in
descending order
MVI C,COUNT
DCR C
REPEAT MOV D,C
LXI H,C050H
LOOP MOV A,M
INX H
CMP M
JNC SKIP
MOV B,M
MOV M,A
DCX H
MOV M,B
INX H
SKIP DCR D
JNZ LOOP
DCR C
JNZ REPEAT
RST 3

More Related Content

Similar to MPMC Architecture of 8085 Microprocessor and Programming.pptx

8085_LAB_PROGRAMS.pdf
8085_LAB_PROGRAMS.pdf8085_LAB_PROGRAMS.pdf
8085_LAB_PROGRAMS.pdf
Koteswari Kasireddy
 
MICROCONTROLLER.pptx
MICROCONTROLLER.pptxMICROCONTROLLER.pptx
MICROCONTROLLER.pptx
fiqrie mohd
 
Mpi lab manual eee
Mpi lab manual eeeMpi lab manual eee
Mpi lab manual eee
Vivek Kumar Sinha
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
Sayan Chakraborty
 
15CS44 MP & MC Module 1
15CS44 MP & MC Module 115CS44 MP & MC Module 1
15CS44 MP & MC Module 1
RLJIT
 
microprocessor 8085
microprocessor 8085microprocessor 8085
microprocessor 8085
Shivanshu Purwar
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
vipinkmenon1
 
Microprocessor Part 3
Microprocessor    Part  3Microprocessor    Part  3
Microprocessor Part 3
Sajan Agrawal
 
8155 GPPI
8155 GPPI8155 GPPI
8155 GPPI
deval patel
 
Applications of microcontroller(8051)
Applications of microcontroller(8051) Applications of microcontroller(8051)
Applications of microcontroller(8051) vijaydeepakg
 
1st experiment ee 3214
1st experiment ee 32141st experiment ee 3214
1st experiment ee 3214
AponShafiul
 
Embedded Systems,Embedded Systems Project,Winter training,
Embedded Systems,Embedded Systems Project,Winter training,Embedded Systems,Embedded Systems Project,Winter training,
Embedded Systems,Embedded Systems Project,Winter training,
Technogroovy
 
Introduction to-microprocessors
Introduction to-microprocessorsIntroduction to-microprocessors
Introduction to-microprocessors
Volodymyr Ushenko
 
Embedded System
Embedded SystemEmbedded System
Embedded System
Richa Arora
 
PIC16F877A C Programming.ppt
PIC16F877A C Programming.pptPIC16F877A C Programming.ppt
PIC16F877A C Programming.ppt
IlaiyarajaS1
 
8051.pdf
8051.pdf8051.pdf
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
Sumit Swain
 
2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptx2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptx
ISMT College
 
Microprocessor Instructions
Microprocessor InstructionsMicroprocessor Instructions
Microprocessor Instructions
Chinmoy Ghorai
 
PCF8583.pdf
PCF8583.pdfPCF8583.pdf
PCF8583.pdf
EFran9
 

Similar to MPMC Architecture of 8085 Microprocessor and Programming.pptx (20)

8085_LAB_PROGRAMS.pdf
8085_LAB_PROGRAMS.pdf8085_LAB_PROGRAMS.pdf
8085_LAB_PROGRAMS.pdf
 
MICROCONTROLLER.pptx
MICROCONTROLLER.pptxMICROCONTROLLER.pptx
MICROCONTROLLER.pptx
 
Mpi lab manual eee
Mpi lab manual eeeMpi lab manual eee
Mpi lab manual eee
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
15CS44 MP & MC Module 1
15CS44 MP & MC Module 115CS44 MP & MC Module 1
15CS44 MP & MC Module 1
 
microprocessor 8085
microprocessor 8085microprocessor 8085
microprocessor 8085
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Microprocessor Part 3
Microprocessor    Part  3Microprocessor    Part  3
Microprocessor Part 3
 
8155 GPPI
8155 GPPI8155 GPPI
8155 GPPI
 
Applications of microcontroller(8051)
Applications of microcontroller(8051) Applications of microcontroller(8051)
Applications of microcontroller(8051)
 
1st experiment ee 3214
1st experiment ee 32141st experiment ee 3214
1st experiment ee 3214
 
Embedded Systems,Embedded Systems Project,Winter training,
Embedded Systems,Embedded Systems Project,Winter training,Embedded Systems,Embedded Systems Project,Winter training,
Embedded Systems,Embedded Systems Project,Winter training,
 
Introduction to-microprocessors
Introduction to-microprocessorsIntroduction to-microprocessors
Introduction to-microprocessors
 
Embedded System
Embedded SystemEmbedded System
Embedded System
 
PIC16F877A C Programming.ppt
PIC16F877A C Programming.pptPIC16F877A C Programming.ppt
PIC16F877A C Programming.ppt
 
8051.pdf
8051.pdf8051.pdf
8051.pdf
 
Architecture of 8085
Architecture of 8085Architecture of 8085
Architecture of 8085
 
2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptx2. 8085-Microprocessor.pptx
2. 8085-Microprocessor.pptx
 
Microprocessor Instructions
Microprocessor InstructionsMicroprocessor Instructions
Microprocessor Instructions
 
PCF8583.pdf
PCF8583.pdfPCF8583.pdf
PCF8583.pdf
 

Recently uploaded

Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 

Recently uploaded (20)

Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 

MPMC Architecture of 8085 Microprocessor and Programming.pptx

  • 1. Prepared by – Kaustubha H. Shedbalkar 1
  • 2. 2
  • 3. 3 Microprocessor Introduction Data Bus Address Bus 4004 1971 4 8 8008 1972 8 8 8080 1974 8 16 8085 1977 8 16 8086 1978 16 20 80186 1982 16 20 80286 1983 16 24 80386 1986 32 32 80486 1989 32 32 Pentium 1993 Onwards 32 Core Solo 2006 32 Dual Core 2006 32 Core 2 Duo 2006 32 Core to Quad 2008 32 I3, i5, i7 2010 64
  • 4. 4 A microprocessor is a computer processor where the data processing logic and control is included on a single integrated circuit, or a small number of integrated circuits. The microprocessor contains the arithmetic, logic, and control circuitry required to perform the functions of a computer's central processing unit. A microcontroller is a small computer on a single VLSI integrated circuit chip. A microcontroller contains one or more CPUs along with memory and programmable input/output peripherals
  • 5. 5 Microprocessor Microcontroller A microprocessor is the heart of a computer system A microcontroller is the heart of an embedded system All peripherals need to be connected separately All peripherals are embedded into a single chip The circuit is complex and bulky The circuit can be simple and compact High power consumption Low power consumption Uses external RAM to execute programs Uses flash memory to execute programs Can not be used in a compact system and hence not efficient Can be used in a compact system and hence efficient The input and output is not defined The input and output is defined Cost of the system is higher than microcontrollers Cost of the system is low Used in personal computers, mobile phones Used in refrigerators, washing machines
  • 6. 6 Type of Number System Numbers used Binary 0,1 Octal 0,1,2,3,4,5,6,7 Decimal 0,1,2,3,4,5,6,7,8,9 Hexadecimal 0,1,2,3,4,5,6,7,8,9,A,B,C, D,E,F
  • 7. 7
  • 8. 8
  • 9. 9 General Purpose Temporary Data Special Purpose Sixteen Bit B, C Temp. Data A PC D,E W, Z Flag SP H,L Instruction Address Bus A0 – A7 & A8 – A15 Data Bus D0 – D7 Control Bus
  • 10. 10 D7 D6 D5 D4 D3 D2 D1 D0 S Z AY P CY S SIGN Z ZERO AY AUXILIARY CARRY P PARITY CY CARRY/BORROW
  • 11. 11 OP CODE OPERAND BINARY CODE HEX CODE TASK MOV C,A 0100 1111 4F H Move the contents of register A into register C MVI A,02 H 0011 1110 3E H Move immediate data 02 into register A
  • 12. 12 Type Example Immediate Addressing Mode MVI A, 20H MVI M,30H LXI SP 2000H Register Addressing Mode MOV A, B SPHL ADD C Direct Addressing Mode LDA 2000H SHLD 3000H Indirect Addressing Mode LDAX B MOV M, A Implied Addressing Mode CMA RAL
  • 13. 13 Interrupt Type Trigger Priority Makeable Vector Address TRAP (RST 4.5) Edge & Level 1st – Highest No 0024 H RST 7.5 Edge 2nd Yes 003C H RST 6.5 Level 3rd Yes 0034 H RST 5.5 Level 4th Yes 002C H INTR Level 5th - Lowest Yes Decided by hardware
  • 14. 14
  • 15. 15
  • 16. 16
  • 17. 17 NO Flags are affected 1 MOV R1,R2 2 MOV M,R 3 MOV R,M 4 MVI R, DATA 5 MVI M,DATA 6 LXI RP,DATA 7 STAADDR 8 LDAADDR 9 STAX RP 10 LDAX RP 11 LHLD ADDR 12 SHLD ADDR 13 XCHG
  • 18. 18 Sr. No. Instruction Flags affected 1 ADD R ALL 2 ADD M ALL 3 ADI DATA ALL 4 ADC R ALL 5 ADC M ALL 6 ACI DATA ALL 7 DAA ALL 8 SUB R ALL 9 SUB M ALL 10 SUI DATA ALL 11 SBB R ALL 12 SBB M ALL 13 SBI DATA ALL Sr. No. Instruction Flags affected 14 INR R NCY 15 INR M NCY 16 DCR R NCY 17 DCR M NCY 18 INX RP NF 19 DCX RP NF 20 DAD RP CY
  • 19. 19 Sr. No. Instruction Flags affected 1 ANA R ALL 2 ANA M ALL 3 ANI DATA ALL 4 ORA R ALL 5 ORA M ALL 6 ORI DATA ALL 7 XRA R ALL 8 XRA M ALL 9 XRI DATA ALL 10 CMP R ALL 11 CMP M ALL 12 CPI DATA ALL 13 CMA NF Sr. No. Instruction Flags affected 14 RLC CY 15 RRC CY 16 RAL CY 17 RAR CY 18 STC CY 19 CMC CY
  • 20. 20 NO Flags are affected 1 JMPADDR 2 JMP COND. ADDR 3 CALL ADDR 4 CALL COND. ADDR 5 RET 6 RET COND. 7 PCHL 8 RST n
  • 21. 21 Instruction HEX Code Vector Address RST 0 C7 0000H RST 1 CF 0008H RST 2 D7 0010H RST 3 DF 0018H RST 4 E7 0020H RST 5 EF 0028H RST 6 F7 0030H RST 7 FF 0038H
  • 22. 22 NO Flags are affected 1 IN PORT 2 OUT PORT 3 XTHL 4 SPHL 5 PUSH RP 6 PUSH PSW 7 POP RP 8 POP PSW (ALL FLAGS) 9 NOP 10 HLT 11 EI 12 DI 13 RIM 14 SIM
  • 23. 23 Controls of DYNA 85L A C000 Assembly language programme C000: Program COON: End of program ESC Come out of the program GO C000 4 sec Space Bar Execute the program D C050 Display 8 bits of memory location starting form C050 Rest Button Reset everything and display start of the panel
  • 24. 24 Program to add two 8 bit numbers MVI A,20H MVI B,03H MVI C,00H ADD B JNC NEXT INR C NEXT STA C050H MOV A,C STA C051H RST 1/HLT
  • 25. 25 Program to subtract two 8 bit numbers MVI A,20H MVI B,03H MVI C,00H SUB B JNC NEXT INR C NEXT STA C050H MOV A,C STA C051H RST 1/HLT
  • 26. 26 Program to find multiplication of numbers LXI H,C050H MVI B,M INX H MOV C,M MVI A,00H MVI D,00H BACK ADD B JNC NEXT INR D NEXT DCR C JNZ BACK INX H MOV M,A INX H MOV M,D RST 1
  • 27. 27 Program to store 8 bit numbers into memory locations LXI H,C050H MVI M,01H INX H MVI M,02H INX H MVI M,03H INX H MVI M,04H INX H MVI M,05H INX H MVI M,06H INX H MVI M,07H INX H MVI M,08H RST 3
  • 28. 28 Program to largest of two numbers LXI H,C050H MVI A,05H MOV M,A MVI A,08H CMP M JNC NEXT MOV A,M NEXT INX H MOV M,A RST 1
  • 29. 29 Program to largest of given numbers LXI H,C050H MVI A,00H MVI B,08H BACK CMP M JNC NEXT MOV A,M NEXT INX H DCR B JNZ BACK STA C020H RST 1
  • 30. 30 Program to smallest of given numbers LXI H,C050H MVI A,FFH MVI B,08H BACK CMP M JC NEXT MOV A,M NEXT INX H DCR B JNZ BACK STA C020H RST 1
  • 31. 31 Program to arrange the numbers in ascending order MVI C,COUNT DCR C REPEAT MOV D,C LXI H,C050H LOOP MOV A,M INX H CMP M JC SKIP MOV B,M MOV M,A DCX H MOV M,B INX H SKIP DCR D JNZ LOOP DCR C JNZ REPEAT RST 3
  • 32. 32 Program to arrange the numbers in descending order MVI C,COUNT DCR C REPEAT MOV D,C LXI H,C050H LOOP MOV A,M INX H CMP M JNC SKIP MOV B,M MOV M,A DCX H MOV M,B INX H SKIP DCR D JNZ LOOP DCR C JNZ REPEAT RST 3