SlideShare a Scribd company logo
SRI KRISHNA COLLEGE OF ENGINEERING AND TECHNOLOGY
Kuniamuthur, Coimbatore, Tamilnadu, India
An Autonomous Institution, Affiliated to Anna University,
Accredited by NAAC with “A” Grade & Accredited by NBA (CSE, ECE, IT, MECH ,EEE, CIVIL& MCT)
18EE502-MICROCONTROLLERS
Module 1: 8051 Microcontroller
by
Mr.V.V.Vineeth
Assistant Professor
Department of Electrical and Electronics Engineering
8051: IO PORTS
Animation by
EnggClasses – YouTube Channel
Mr. Nair Vishal Vijay
Karunya Institute of Technology and
Sciences
Module 1: 8051 Microcontroller 15 Hrs
Overview of Microprocessors - 8051: Functional block diagram - Instruction
set - addressing modes – Interrupt structure - Timer – I/O ports – Serial
Communication, Simple programming - Key board and display interface –
Temperature control system - Stepper motor control.
Module 2: PIC Microcontroller 15 Hrs
PIC18FXXX: Architecture - Data and program memory organization -
Addressing modes - Instruction set - Move / Copy instructions, Arithmetic
instructions, Logic instructions, Branches instructions, Bit Manipulation
instructions, Table Read/Write instructions, Machine Control instructions –
Timers – Interrupt, ISR, priority.
Module 3: ARM Controller 15 Hrs
ARM7TDMI: Features – Block diagram – Architecture – Addressing modes
– Instruction set – Thumb instructions - Data processing instructions, Data
transfer instructions, Branch and control instructions, Register load and
store instructions, Multiple register load and store instructions, Status
register access instructions, Coprocessor instructions.
1. Kenneth Ayala, “The 8051 Microcontroller”, Cengage Learning
Publications, 2nd Edition, 2008.
2. John.B.Peatman , “ Design with PIC Microcontroller , Prentice hall,
2012.
3. Subrata Ghoshal, 8051 Microcontroller Internals, Instructions,
Programming and Interfacing, Second edition, Pearson Education Asia,
2014.
4. Myke Predko, “Programming and customizing the PIC microcontroller”,
Tata McGraw Hill Publishing Company Limited, Third Edition, 2008.
5. Steve Furber, ‟ ARM System –On – Chip architecture“, Addision
Wesley, 2009.
1. Muhammad Ali Mazidi, Janice Gillispie Mazidi, Rolin
McKinlay, ‘The 8051 Microcontroller and Embedded
Systems using Assembly and C’, Prentice Hall
Publications, 2nd Edition, 2008.
2. Krishna Kant, ‘Microprocessor and Microcontrollers’,
Eastern Company Edition, Prentice Hall of India, New
Delhi, 2nd edition,2013.
3. Joseph Yiu , ‘The Definitive Guide to the ARM Cortex-
M0’ Newnes – Elsevier, 2011.
4. Muhammad Tahir and Kashif Javed, ‘ARM
Microprocessor Systems - Cortex-M Architecture,
Programming, and Interfacing’, CRC Press, 2011.
 The 8051 microcontroller has 32 I/O pins configured as four 8 bit
parallel ports and they are denoted as port-0, port-1, port-2 and
port-3.
 All four ports are bidirectional. Used as input or output or for
both.
 Each port can be used as either 8-bit parallel port or 8 numbers
of 1-bit ports.
 All port pins are multiplexed except port-1.
 Port-1 can be used only for I/O operation.
 Each port is having a latch, an input buffer and output driver.
 The structure of a Port-0 pin is
 Port-0 can be used as a normal bidirectional
I/O port or it can be used for address/data
interfacing for accessing external memory.
 When the control is '0', the port can be used
as a bidirectional I/O port.
 When control is '1', the port is used for
address/data interfacing.
PORT 0 as an Input Port:
 Let us assume that control is '0'.
 When the port is used as an input port,
'1' is written to the latch.
 In this situation both the output
MOSFETs are 'off'.
 Hence the output pin have floats hence
whatever data written on pin is directly
read by read pin.
PORT 0 as an Output Port :
 To write 1 on pin of Port 0, a '1' written to
the latch which turns 'off' the lower FET
while due to '0' control signal upper FET
also turns off.
 Instead of logic '1' on pin, floating value will
be getting on the pin.
 So to convert that floating value into logic
'1‘, it is need to connect the pull up resistor
parallel to upper FET .
 To write '0' on port 0 pin, when '0' is written to the
latch, the pin is pulled down by the lower FET. Hence
the output becomes zero.
 When the control is '1', address/data bus controls the
output driver FETs.
 If the address/data bus (internal) is '0', the upper FET
is 'off' and the lower FET is 'on'. The output becomes
'0'.
 If the address/data bus is '1', the upper FET is 'on'
and the lower FET is 'off'. Hence the output is '1'.
 Hence for normal address/data interfacing (for
 The structure of a Port-1 pin is
 Port-1 dedicated only for I/O interfacing.
 When used as output port, not needed to
connect additional pull-up resistor like port
0. It have provided internally pull-up
resistor.
 The pin is pulled up or down through
internal pull-up when we want to initialize
as an output port.
 To use port-1 as input port, '1' has to be written
to the latch. In this input mode when '1' is
written to the pin by the external device then it
read fine.
 But when '0' is written to the pin by the external
device then the external source must sink
current due to internal pull-up.
 If the external device is not able to sink the
current the pin voltage may rise, leading to a
 The structure of a Port-2 pin is
 Port-2 we use for higher external address
byte or a normal input/output port.
 The I/O operation is similar to Port-1.
 Port-2 latch remains stable when Port-2 pin
are used for external memory access.
 Here again due to internal pull-up there is
limited current driving capability.
 The structure of a Port-3 pin is
 It work as an IO port same like Port 2.
 Only alternate function of port 3 makes its
architecture different than other ports.
 The alternate functions of port 3m are,
1.7_IO Ports (2).pptx

More Related Content

Similar to 1.7_IO Ports (2).pptx

Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptxUnit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
SamarpitaBakshi
 
Embedded System Microcontroller 8051
Embedded System Microcontroller 8051Embedded System Microcontroller 8051
Embedded System Microcontroller 8051
ShawnIslam20150022
 
Micro controller
Micro controllerMicro controller
Micro controller
Dr. Ashok Kumar K
 
PPT-1.pptx
PPT-1.pptxPPT-1.pptx
PPT-1.pptx
Ansal Valappil
 
PPT-1.pptx
PPT-1.pptxPPT-1.pptx
PPT-1.pptx
Ansal Valappil
 
Coin based mobile charger project report
Coin based mobile charger project reportCoin based mobile charger project report
Coin based mobile charger project report
kaushal chaubey
 
SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051
KanchanPatil34
 
Speed checker on highway using 8051
Speed checker on highway using 8051Speed checker on highway using 8051
Speed checker on highway using 8051
Rkrishna Mishra
 
8051 dev board guide
8051 dev board guide8051 dev board guide
8051 dev board guide
Murali Krishna
 
8051 io interface
8051 io interface8051 io interface
8051 io interface
Abhinav Shubham
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
anishgoel
 
MPI UNIT 5 - (INTERRUPTS OF 8086, INTRODUCTION TO 8051).pptx
MPI UNIT 5 - (INTERRUPTS OF 8086, INTRODUCTION TO 8051).pptxMPI UNIT 5 - (INTERRUPTS OF 8086, INTRODUCTION TO 8051).pptx
MPI UNIT 5 - (INTERRUPTS OF 8086, INTRODUCTION TO 8051).pptx
RaviKiranVarma4
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
guest70d48b1
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
eceprinter6
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
nitugatkal
 
8051 microcontroller Microcontroller _2024.pptx
8051 microcontroller Microcontroller _2024.pptx8051 microcontroller Microcontroller _2024.pptx
8051 microcontroller Microcontroller _2024.pptx
rohithansaliya2
 
Bidirectional visitor counter & home automation by Jitendra Dhaka
Bidirectional visitor counter & home automation by Jitendra DhakaBidirectional visitor counter & home automation by Jitendra Dhaka
Bidirectional visitor counter & home automation by Jitendra Dhaka
NIT srinagar
 

Similar to 1.7_IO Ports (2).pptx (20)

Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptxUnit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
Unit 01.Lec2 Introduction to 8051 microcontroller (2).pptx
 
Embedded System Microcontroller 8051
Embedded System Microcontroller 8051Embedded System Microcontroller 8051
Embedded System Microcontroller 8051
 
Drivers2
Drivers2Drivers2
Drivers2
 
Drivers2
Drivers2Drivers2
Drivers2
 
Micro controller
Micro controllerMicro controller
Micro controller
 
PPT-1.pptx
PPT-1.pptxPPT-1.pptx
PPT-1.pptx
 
PPT-1.pptx
PPT-1.pptxPPT-1.pptx
PPT-1.pptx
 
Coin based mobile charger project report
Coin based mobile charger project reportCoin based mobile charger project report
Coin based mobile charger project report
 
SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051SE PAI Unit 5_IO programming in 8051
SE PAI Unit 5_IO programming in 8051
 
Speed checker on highway using 8051
Speed checker on highway using 8051Speed checker on highway using 8051
Speed checker on highway using 8051
 
8051 dev board guide
8051 dev board guide8051 dev board guide
8051 dev board guide
 
8051
80518051
8051
 
8051 io interface
8051 io interface8051 io interface
8051 io interface
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
MPI UNIT 5 - (INTERRUPTS OF 8086, INTRODUCTION TO 8051).pptx
MPI UNIT 5 - (INTERRUPTS OF 8086, INTRODUCTION TO 8051).pptxMPI UNIT 5 - (INTERRUPTS OF 8086, INTRODUCTION TO 8051).pptx
MPI UNIT 5 - (INTERRUPTS OF 8086, INTRODUCTION TO 8051).pptx
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering studentsEMBEDDED SYSTEMS AND IOT lab manual for enginnering students
EMBEDDED SYSTEMS AND IOT lab manual for enginnering students
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
8051 microcontroller Microcontroller _2024.pptx
8051 microcontroller Microcontroller _2024.pptx8051 microcontroller Microcontroller _2024.pptx
8051 microcontroller Microcontroller _2024.pptx
 
Bidirectional visitor counter & home automation by Jitendra Dhaka
Bidirectional visitor counter & home automation by Jitendra DhakaBidirectional visitor counter & home automation by Jitendra Dhaka
Bidirectional visitor counter & home automation by Jitendra Dhaka
 

Recently uploaded

Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
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
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
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
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
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
 
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
 

Recently uploaded (20)

Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
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)
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
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
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
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
 
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
 

1.7_IO Ports (2).pptx

  • 1. SRI KRISHNA COLLEGE OF ENGINEERING AND TECHNOLOGY Kuniamuthur, Coimbatore, Tamilnadu, India An Autonomous Institution, Affiliated to Anna University, Accredited by NAAC with “A” Grade & Accredited by NBA (CSE, ECE, IT, MECH ,EEE, CIVIL& MCT) 18EE502-MICROCONTROLLERS Module 1: 8051 Microcontroller by Mr.V.V.Vineeth Assistant Professor Department of Electrical and Electronics Engineering 8051: IO PORTS
  • 2. Animation by EnggClasses – YouTube Channel Mr. Nair Vishal Vijay Karunya Institute of Technology and Sciences
  • 3. Module 1: 8051 Microcontroller 15 Hrs Overview of Microprocessors - 8051: Functional block diagram - Instruction set - addressing modes – Interrupt structure - Timer – I/O ports – Serial Communication, Simple programming - Key board and display interface – Temperature control system - Stepper motor control. Module 2: PIC Microcontroller 15 Hrs PIC18FXXX: Architecture - Data and program memory organization - Addressing modes - Instruction set - Move / Copy instructions, Arithmetic instructions, Logic instructions, Branches instructions, Bit Manipulation instructions, Table Read/Write instructions, Machine Control instructions – Timers – Interrupt, ISR, priority. Module 3: ARM Controller 15 Hrs ARM7TDMI: Features – Block diagram – Architecture – Addressing modes – Instruction set – Thumb instructions - Data processing instructions, Data transfer instructions, Branch and control instructions, Register load and store instructions, Multiple register load and store instructions, Status register access instructions, Coprocessor instructions.
  • 4. 1. Kenneth Ayala, “The 8051 Microcontroller”, Cengage Learning Publications, 2nd Edition, 2008. 2. John.B.Peatman , “ Design with PIC Microcontroller , Prentice hall, 2012. 3. Subrata Ghoshal, 8051 Microcontroller Internals, Instructions, Programming and Interfacing, Second edition, Pearson Education Asia, 2014. 4. Myke Predko, “Programming and customizing the PIC microcontroller”, Tata McGraw Hill Publishing Company Limited, Third Edition, 2008. 5. Steve Furber, ‟ ARM System –On – Chip architecture“, Addision Wesley, 2009.
  • 5. 1. Muhammad Ali Mazidi, Janice Gillispie Mazidi, Rolin McKinlay, ‘The 8051 Microcontroller and Embedded Systems using Assembly and C’, Prentice Hall Publications, 2nd Edition, 2008. 2. Krishna Kant, ‘Microprocessor and Microcontrollers’, Eastern Company Edition, Prentice Hall of India, New Delhi, 2nd edition,2013. 3. Joseph Yiu , ‘The Definitive Guide to the ARM Cortex- M0’ Newnes – Elsevier, 2011. 4. Muhammad Tahir and Kashif Javed, ‘ARM Microprocessor Systems - Cortex-M Architecture, Programming, and Interfacing’, CRC Press, 2011.
  • 6.  The 8051 microcontroller has 32 I/O pins configured as four 8 bit parallel ports and they are denoted as port-0, port-1, port-2 and port-3.  All four ports are bidirectional. Used as input or output or for both.  Each port can be used as either 8-bit parallel port or 8 numbers of 1-bit ports.  All port pins are multiplexed except port-1.  Port-1 can be used only for I/O operation.  Each port is having a latch, an input buffer and output driver.
  • 7.  The structure of a Port-0 pin is
  • 8.  Port-0 can be used as a normal bidirectional I/O port or it can be used for address/data interfacing for accessing external memory.  When the control is '0', the port can be used as a bidirectional I/O port.  When control is '1', the port is used for address/data interfacing.
  • 9. PORT 0 as an Input Port:  Let us assume that control is '0'.  When the port is used as an input port, '1' is written to the latch.  In this situation both the output MOSFETs are 'off'.  Hence the output pin have floats hence whatever data written on pin is directly read by read pin.
  • 10. PORT 0 as an Output Port :  To write 1 on pin of Port 0, a '1' written to the latch which turns 'off' the lower FET while due to '0' control signal upper FET also turns off.  Instead of logic '1' on pin, floating value will be getting on the pin.  So to convert that floating value into logic '1‘, it is need to connect the pull up resistor parallel to upper FET .
  • 11.
  • 12.  To write '0' on port 0 pin, when '0' is written to the latch, the pin is pulled down by the lower FET. Hence the output becomes zero.  When the control is '1', address/data bus controls the output driver FETs.  If the address/data bus (internal) is '0', the upper FET is 'off' and the lower FET is 'on'. The output becomes '0'.  If the address/data bus is '1', the upper FET is 'on' and the lower FET is 'off'. Hence the output is '1'.  Hence for normal address/data interfacing (for
  • 13.  The structure of a Port-1 pin is
  • 14.  Port-1 dedicated only for I/O interfacing.  When used as output port, not needed to connect additional pull-up resistor like port 0. It have provided internally pull-up resistor.  The pin is pulled up or down through internal pull-up when we want to initialize as an output port.
  • 15.  To use port-1 as input port, '1' has to be written to the latch. In this input mode when '1' is written to the pin by the external device then it read fine.  But when '0' is written to the pin by the external device then the external source must sink current due to internal pull-up.  If the external device is not able to sink the current the pin voltage may rise, leading to a
  • 16.  The structure of a Port-2 pin is
  • 17.  Port-2 we use for higher external address byte or a normal input/output port.  The I/O operation is similar to Port-1.  Port-2 latch remains stable when Port-2 pin are used for external memory access.  Here again due to internal pull-up there is limited current driving capability.
  • 18.  The structure of a Port-3 pin is
  • 19.  It work as an IO port same like Port 2.  Only alternate function of port 3 makes its architecture different than other ports.  The alternate functions of port 3m are,