SlideShare a Scribd company logo
1 of 26
Vanta Vachhoda
Branch : Electrical 5th sem
Subject : MMI
Name Enrollment No.
1. Parmar Dharmendrasinh G. 131030109029
2. Khant Mukesh B. 131030109018
3. Parmar Ajay R. 131030109027
Outlines
1. Introduction
2. Port ‘0’ circuit
3. Port ‘1’ circuit
4. Port ‘2’ circuit
5. Port ‘3’ circuit
Introduction :
• Number of 8051 ports : The microcontroller 8051
has four ports P0,P1,P2 & P3.The four ports are
require for i/o operations. Out of the 40 pin,32 pins
are set aside for the four ports P0,P1,P2&P3.Each
port takes 8 pins.
• All the ports are configured as input upon Reset.
• When zero is written to a port , it becomes an
output. To configure it as an input port, 1 needs to
be sent to the port.
Port “0”
Port ‘0’
• Port 0 is multi functioned port of microcontroller
8051.Its SFR address is 80H.It is bit addressable port.
• Function and use : It can be used as simple input
/ output mode or for generating data and lower
order address bus for external memory (AD0 –
AD7).
• In order to use the pins of the port 0 as input and
output each pin must be connected to 10KΩ pull up
resistor as shown in figure.
Port 0 as simple input port
• When port 0 is used as an input port, ‘1’ must be
written to the corresponding zero latch that will
cause both the output transistor to switch off and
the pin “floats” in a high impedance state. When
configured input port the microcontroller provides
two facilities :
• 1. Read logic level on physical pin by asserting read
pin signal.
• 2. Read contents of internal latch by asserting the
read latch signal. The latch is read when the
instruction is read-modify-write type instruction. A
read-modify-write signal is one, wherein the
instruction reads the data from the port modifies it
and writes to the port.
Port 0 as simple output
• When port 0 is configured as an output port, the
latch pins that are programmed to 0 will cause the
lower FET to turn ON and pin is grounded.
• If a ‘1’ is written on to the latch pin the FET will turn
off and the pin is pulled HIGH by external pull up
resistors.
Port “1”
Port ‘1’
• Port 1 is a one bit simple i/o port of microcontroller.
Its SFR address is 90H.It does not have any extra /
alternate function like port 0.
Port 1 as simple input port
• When port 1 is used as an input port, ‘1’ must be
written to the corresponding port 1 latch bit.This
causes the lower FET turn off.The pin and input to pin
buffer are pulled to logic HIGH by the internal pull uo
load.
• Port is called as ‘quasi-bidirectional’ port as its
output is pulled high with pull up resister.
Port 1 as simple output port
• When port 1 is used as an output port, the latch pins
that are programmed to 0, will cause the lower FET
turn on, the internal pull up to turn off and input to
the circuit is logic 0.
• If ‘1’ is written onto the latch pin then it will drive the
input of external circuit high through the pull up.The
lower FET turns off.
Port “2”
Port ‘2’
• Port 2 of microcontroller 8051 is 8 bit multifuntional
port. Its SFR address is A0H. It is bit addressable port.
• Function and use : It can be used as simple input /
output or for generating the upper order address bus
for the external memory (A8 –A15).
Port ‘2’as simple input port
• When port 2 is used as an input port,’1’ must be
written to the corresponding latch bit. This cause the
FET turn off. The pin and input to pin buffer are
pulled to logic high by the internal pull up load.
• Port 2 is called as “quasi-bidirectional port” as its
output is pull up resistors.
Port 2 as simple output port
• When port 2 is used as output port, the latch pins
that are programmed to 0, will cause the lower FET
turn off and input to the circuit logic 0.
• If “1” is written onto the latch pin then it will drive
the input of external circuit high through the oull up.
The lower FET turns off.
Port “3”
Port “3”
• It is 8 bit multifunctional port.
• Its SFR address is B0H. It is bit addressable port.
• Use : Port 3 is a multifunctional port it can be used as
simple input / output port.
• The port 3 pins have three special functions.this
functions are listed in table.
Alternate functions of port 3 pins
Port 3 as simple input port
• When port 3 is used as input port, “1” must be
written to the corresponding port 3 latch bit.
• This causes the FET turn off.
• The pin and input to the pin buffer are to
pulled to logic HIGH by internal pull up load.
Port 3 as simple output port
• When port 3 is used as output port, the latched pins
that are programmed to 0, will cause the lower FET
to turn on, the internal pull up to turn off and input
to the circuit is logic 0.
• If ‘1’ is written onto the latch pin that it will drive the
input external circuit high through the pull up. The
lower FET turns off.
Port 3 as one of the alternate function
• For achieving any one of the output function,
another control signal called as “alternate output
function” is available on port 3. Depending on the
logic level present on line “alternate output function”
the FET will turn ON or OFF.
• When the latch bit of port 3 is logic 1, the output is
controlled by the control input.
Port 3 loading and interfacing
• The output buffers of ports 1,2&3 can each drive 4 LS
TTL inputs. Port 0 when used in external bus mode
output buffer can drive 8 LS TTL inputs.
• In order to drive inputs these ports as port pins
require external pull ups to drive any inputs.
8051 i o port circuit

More Related Content

What's hot (20)

Media Access Control (MAC Layer)
Media Access Control (MAC Layer)Media Access Control (MAC Layer)
Media Access Control (MAC Layer)
 
Dc unit iii final ppt
Dc unit iii final pptDc unit iii final ppt
Dc unit iii final ppt
 
8051 i/o port circuit
8051 i/o port circuit8051 i/o port circuit
8051 i/o port circuit
 
Cdma
CdmaCdma
Cdma
 
token bus
 token bus token bus
token bus
 
Ethernet technology
Ethernet technologyEthernet technology
Ethernet technology
 
Ethernet protocol
Ethernet protocolEthernet protocol
Ethernet protocol
 
Swiching
SwichingSwiching
Swiching
 
Framing Protocols
Framing ProtocolsFraming Protocols
Framing Protocols
 
Asynchronous Transfer Mode ATM
Asynchronous Transfer Mode  ATMAsynchronous Transfer Mode  ATM
Asynchronous Transfer Mode ATM
 
I2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacingI2C protocol and DS1307 RTC interfacing
I2C protocol and DS1307 RTC interfacing
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
SDH and TDM telecom
SDH and TDM telecomSDH and TDM telecom
SDH and TDM telecom
 
Data Link Synchronous Protocols - SDLC, HDLC
Data Link Synchronous Protocols - SDLC, HDLCData Link Synchronous Protocols - SDLC, HDLC
Data Link Synchronous Protocols - SDLC, HDLC
 
Ethernet and token ring
Ethernet and token ringEthernet and token ring
Ethernet and token ring
 
USART
USARTUSART
USART
 
WLAN - IEEE 802.11
WLAN - IEEE 802.11WLAN - IEEE 802.11
WLAN - IEEE 802.11
 
information theory
information theoryinformation theory
information theory
 
Parallel Adder and Subtractor
Parallel Adder and SubtractorParallel Adder and Subtractor
Parallel Adder and Subtractor
 

Similar to 8051 i o port circuit

Similar to 8051 i o port circuit (20)

8051 port configuration
8051 port configuration8051 port configuration
8051 port configuration
 
I/O port programming in 8051
I/O port programming in 8051I/O port programming in 8051
I/O port programming in 8051
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
8051 book
8051 book8051 book
8051 book
 
1.7_IO Ports (2).pptx
1.7_IO Ports (2).pptx1.7_IO Ports (2).pptx
1.7_IO Ports (2).pptx
 
I o ports and timers of 8051
I o ports and timers of 8051I o ports and timers of 8051
I o ports and timers of 8051
 
MICROCONTROLLER .pptx
MICROCONTROLLER .pptxMICROCONTROLLER .pptx
MICROCONTROLLER .pptx
 
Hardware View of Intel 8051
Hardware View of Intel 8051Hardware View of Intel 8051
Hardware View of Intel 8051
 
Port Organization of 8051 .pdf
Port Organization of 8051 .pdfPort Organization of 8051 .pdf
Port Organization of 8051 .pdf
 
Microcontroller (1).pptx
Microcontroller (1).pptxMicrocontroller (1).pptx
Microcontroller (1).pptx
 
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
 
At89 s8252
At89 s8252At89 s8252
At89 s8252
 
Datasheet8951
Datasheet8951Datasheet8951
Datasheet8951
 
At89 c51
At89 c51At89 c51
At89 c51
 
Advanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptxAdvanced Microprocessor 6.pptx
Advanced Microprocessor 6.pptx
 
8051 Microcontroller
8051 Microcontroller8051 Microcontroller
8051 Microcontroller
 
Microprocessor 8051
Microprocessor 8051Microprocessor 8051
Microprocessor 8051
 
Embedded System Microcontroller 8051
Embedded System Microcontroller 8051Embedded System Microcontroller 8051
Embedded System Microcontroller 8051
 
K 36 rev-l
K 36 rev-lK 36 rev-l
K 36 rev-l
 
EMBEDDED SYSTEMS 5
EMBEDDED SYSTEMS 5EMBEDDED SYSTEMS 5
EMBEDDED SYSTEMS 5
 

Recently uploaded

power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 

Recently uploaded (20)

power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 

8051 i o port circuit

  • 1. Vanta Vachhoda Branch : Electrical 5th sem Subject : MMI Name Enrollment No. 1. Parmar Dharmendrasinh G. 131030109029 2. Khant Mukesh B. 131030109018 3. Parmar Ajay R. 131030109027
  • 2.
  • 3. Outlines 1. Introduction 2. Port ‘0’ circuit 3. Port ‘1’ circuit 4. Port ‘2’ circuit 5. Port ‘3’ circuit
  • 4. Introduction : • Number of 8051 ports : The microcontroller 8051 has four ports P0,P1,P2 & P3.The four ports are require for i/o operations. Out of the 40 pin,32 pins are set aside for the four ports P0,P1,P2&P3.Each port takes 8 pins. • All the ports are configured as input upon Reset. • When zero is written to a port , it becomes an output. To configure it as an input port, 1 needs to be sent to the port.
  • 6. Port ‘0’ • Port 0 is multi functioned port of microcontroller 8051.Its SFR address is 80H.It is bit addressable port. • Function and use : It can be used as simple input / output mode or for generating data and lower order address bus for external memory (AD0 – AD7). • In order to use the pins of the port 0 as input and output each pin must be connected to 10KΩ pull up resistor as shown in figure.
  • 7.
  • 8. Port 0 as simple input port • When port 0 is used as an input port, ‘1’ must be written to the corresponding zero latch that will cause both the output transistor to switch off and the pin “floats” in a high impedance state. When configured input port the microcontroller provides two facilities : • 1. Read logic level on physical pin by asserting read pin signal.
  • 9. • 2. Read contents of internal latch by asserting the read latch signal. The latch is read when the instruction is read-modify-write type instruction. A read-modify-write signal is one, wherein the instruction reads the data from the port modifies it and writes to the port.
  • 10. Port 0 as simple output • When port 0 is configured as an output port, the latch pins that are programmed to 0 will cause the lower FET to turn ON and pin is grounded. • If a ‘1’ is written on to the latch pin the FET will turn off and the pin is pulled HIGH by external pull up resistors.
  • 12. Port ‘1’ • Port 1 is a one bit simple i/o port of microcontroller. Its SFR address is 90H.It does not have any extra / alternate function like port 0.
  • 13. Port 1 as simple input port • When port 1 is used as an input port, ‘1’ must be written to the corresponding port 1 latch bit.This causes the lower FET turn off.The pin and input to pin buffer are pulled to logic HIGH by the internal pull uo load. • Port is called as ‘quasi-bidirectional’ port as its output is pulled high with pull up resister.
  • 14. Port 1 as simple output port • When port 1 is used as an output port, the latch pins that are programmed to 0, will cause the lower FET turn on, the internal pull up to turn off and input to the circuit is logic 0. • If ‘1’ is written onto the latch pin then it will drive the input of external circuit high through the pull up.The lower FET turns off.
  • 16. Port ‘2’ • Port 2 of microcontroller 8051 is 8 bit multifuntional port. Its SFR address is A0H. It is bit addressable port. • Function and use : It can be used as simple input / output or for generating the upper order address bus for the external memory (A8 –A15).
  • 17. Port ‘2’as simple input port • When port 2 is used as an input port,’1’ must be written to the corresponding latch bit. This cause the FET turn off. The pin and input to pin buffer are pulled to logic high by the internal pull up load. • Port 2 is called as “quasi-bidirectional port” as its output is pull up resistors.
  • 18. Port 2 as simple output port • When port 2 is used as output port, the latch pins that are programmed to 0, will cause the lower FET turn off and input to the circuit logic 0. • If “1” is written onto the latch pin then it will drive the input of external circuit high through the oull up. The lower FET turns off.
  • 20. Port “3” • It is 8 bit multifunctional port. • Its SFR address is B0H. It is bit addressable port. • Use : Port 3 is a multifunctional port it can be used as simple input / output port. • The port 3 pins have three special functions.this functions are listed in table.
  • 21. Alternate functions of port 3 pins
  • 22. Port 3 as simple input port • When port 3 is used as input port, “1” must be written to the corresponding port 3 latch bit. • This causes the FET turn off. • The pin and input to the pin buffer are to pulled to logic HIGH by internal pull up load.
  • 23. Port 3 as simple output port • When port 3 is used as output port, the latched pins that are programmed to 0, will cause the lower FET to turn on, the internal pull up to turn off and input to the circuit is logic 0. • If ‘1’ is written onto the latch pin that it will drive the input external circuit high through the pull up. The lower FET turns off.
  • 24. Port 3 as one of the alternate function • For achieving any one of the output function, another control signal called as “alternate output function” is available on port 3. Depending on the logic level present on line “alternate output function” the FET will turn ON or OFF. • When the latch bit of port 3 is logic 1, the output is controlled by the control input.
  • 25. Port 3 loading and interfacing • The output buffers of ports 1,2&3 can each drive 4 LS TTL inputs. Port 0 when used in external bus mode output buffer can drive 8 LS TTL inputs. • In order to drive inputs these ports as port pins require external pull ups to drive any inputs.