SlideShare a Scribd company logo
I/O port programming (PIC)
PIC 18 – I/O ports
PIC18F458
Alternative functions of Ports
• ADC
• Timers
• Interrupts
• Serial communication
PORT SFRs
• Each port has three (3) SFRs associated with it.
• PORTx
• TRISx (TRIState)
• LATx (LATch)
TRIS register role
• This makes a given port an input or output port.
• Output  write 0s to TRISx (0 stands for Out)
• Input  write 1s to TRISx (1 stands for In)
• Unless we activate TRISx bits (set to 0s), the data will not go from port
register to the pins of PIC.
• Ex:
TRIS register role
• Get data from PORTC and send it to PORTB
Different ways to do same things
Read followed by write I/O operation
Alternative Method
Ports status upon reset
Bit addressability
• Single-Bit (Bit oriented) instruction
Bit addressability
Bit addressability
Bit addressability
Bit addressability
Summary

More Related Content

Similar to lecture05picioportprogramming-190107152342.pptx

Peripherals and interfacing
Peripherals  and interfacingPeripherals  and interfacing
Peripherals and interfacing
RAMPRAKASHT1
 
Computer organization prashant odhavani- 160920107003
Computer organization   prashant odhavani- 160920107003Computer organization   prashant odhavani- 160920107003
Computer organization prashant odhavani- 160920107003
Prashant odhavani
 
amba.ppt
amba.pptamba.ppt
amba.ppt
Rahul534035
 
UNIT 3 mp (1).ppt
UNIT 3 mp (1).pptUNIT 3 mp (1).ppt
UNIT 3 mp (1).ppt
BalasubramanianGurun1
 
set de instrucciones primera parte de atmel
set de instrucciones primera parte de atmelset de instrucciones primera parte de atmel
set de instrucciones primera parte de atmel
Tecnomaquinados de Queretaro
 
AVR programming - BASICS
AVR programming - BASICSAVR programming - BASICS
AVR programming - BASICS
Robotix 2011
 
AN INTRODUCTION TO SERIAL PORT INTERFACING
AN INTRODUCTION TO SERIAL PORT INTERFACINGAN INTRODUCTION TO SERIAL PORT INTERFACING
AN INTRODUCTION TO SERIAL PORT INTERFACING
Total Project Solutions
 
amba.ppt
amba.pptamba.ppt
amba.ppt
DivyaDewkathe
 
amba.ppt
amba.pptamba.ppt
amba.ppt
VediAshutosh
 
amba (1).ppt
amba (1).pptamba (1).ppt
amba (1).ppt
ssallu0727
 
UART
UARTUART
Micro
MicroMicro
Micro
Moaz Zahid
 
Chp 2 and 3.pptx
Chp 2 and 3.pptxChp 2 and 3.pptx
Chp 2 and 3.pptx
SangeetaTripathi8
 
1.1.2 - Concept of Network and TCP_IP Model (2).pptx
1.1.2 - Concept of Network and TCP_IP Model (2).pptx1.1.2 - Concept of Network and TCP_IP Model (2).pptx
1.1.2 - Concept of Network and TCP_IP Model (2).pptx
VINAYTANWAR18
 
coa
coacoa
ES UNIT3.pptx
ES UNIT3.pptxES UNIT3.pptx
ES UNIT3.pptx
ravibabukancharla1
 
Robotix Tutorial 8
Robotix Tutorial 8Robotix Tutorial 8
Robotix Tutorial 8
ankuredkie
 
The microprocessor and it's architecture
The microprocessor and it's architectureThe microprocessor and it's architecture
The microprocessor and it's architecture
samaa ali
 
Interfacingiodevice
InterfacingiodeviceInterfacingiodevice
Interfacingiodevice
Praneeth Kannegolla
 
Switching units
Switching unitsSwitching units
Switching units
Syed Zaid Irshad
 

Similar to lecture05picioportprogramming-190107152342.pptx (20)

Peripherals and interfacing
Peripherals  and interfacingPeripherals  and interfacing
Peripherals and interfacing
 
Computer organization prashant odhavani- 160920107003
Computer organization   prashant odhavani- 160920107003Computer organization   prashant odhavani- 160920107003
Computer organization prashant odhavani- 160920107003
 
amba.ppt
amba.pptamba.ppt
amba.ppt
 
UNIT 3 mp (1).ppt
UNIT 3 mp (1).pptUNIT 3 mp (1).ppt
UNIT 3 mp (1).ppt
 
set de instrucciones primera parte de atmel
set de instrucciones primera parte de atmelset de instrucciones primera parte de atmel
set de instrucciones primera parte de atmel
 
AVR programming - BASICS
AVR programming - BASICSAVR programming - BASICS
AVR programming - BASICS
 
AN INTRODUCTION TO SERIAL PORT INTERFACING
AN INTRODUCTION TO SERIAL PORT INTERFACINGAN INTRODUCTION TO SERIAL PORT INTERFACING
AN INTRODUCTION TO SERIAL PORT INTERFACING
 
amba.ppt
amba.pptamba.ppt
amba.ppt
 
amba.ppt
amba.pptamba.ppt
amba.ppt
 
amba (1).ppt
amba (1).pptamba (1).ppt
amba (1).ppt
 
UART
UARTUART
UART
 
Micro
MicroMicro
Micro
 
Chp 2 and 3.pptx
Chp 2 and 3.pptxChp 2 and 3.pptx
Chp 2 and 3.pptx
 
1.1.2 - Concept of Network and TCP_IP Model (2).pptx
1.1.2 - Concept of Network and TCP_IP Model (2).pptx1.1.2 - Concept of Network and TCP_IP Model (2).pptx
1.1.2 - Concept of Network and TCP_IP Model (2).pptx
 
coa
coacoa
coa
 
ES UNIT3.pptx
ES UNIT3.pptxES UNIT3.pptx
ES UNIT3.pptx
 
Robotix Tutorial 8
Robotix Tutorial 8Robotix Tutorial 8
Robotix Tutorial 8
 
The microprocessor and it's architecture
The microprocessor and it's architectureThe microprocessor and it's architecture
The microprocessor and it's architecture
 
Interfacingiodevice
InterfacingiodeviceInterfacingiodevice
Interfacingiodevice
 
Switching units
Switching unitsSwitching units
Switching units
 

More from SangeetaTripathi8

Gunn Diodes engineering electronics and communication
Gunn Diodes engineering electronics and communicationGunn Diodes engineering electronics and communication
Gunn Diodes engineering electronics and communication
SangeetaTripathi8
 
lecture05picioportprogramming-190107152342.pptx
lecture05picioportprogramming-190107152342.pptxlecture05picioportprogramming-190107152342.pptx
lecture05picioportprogramming-190107152342.pptx
SangeetaTripathi8
 
chapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptxchapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptx
SangeetaTripathi8
 
softcorecomputing-121025042248-phpapp02.pptx
softcorecomputing-121025042248-phpapp02.pptxsoftcorecomputing-121025042248-phpapp02.pptx
softcorecomputing-121025042248-phpapp02.pptx
SangeetaTripathi8
 
LECT 2.pptx
LECT 2.pptxLECT 2.pptx
LECT 2.pptx
SangeetaTripathi8
 
Dr. Sangeeta PPT fro STTP 18 Jan.pptx
Dr. Sangeeta PPT fro STTP 18 Jan.pptxDr. Sangeeta PPT fro STTP 18 Jan.pptx
Dr. Sangeeta PPT fro STTP 18 Jan.pptx
SangeetaTripathi8
 
Lect 1 Into.pptx
Lect 1 Into.pptxLect 1 Into.pptx
Lect 1 Into.pptx
SangeetaTripathi8
 
Ch5_MorrisMano.pptx
Ch5_MorrisMano.pptxCh5_MorrisMano.pptx
Ch5_MorrisMano.pptx
SangeetaTripathi8
 
DC-circuit-theory.ppt
DC-circuit-theory.pptDC-circuit-theory.ppt
DC-circuit-theory.ppt
SangeetaTripathi8
 
Chapter4.ppt
Chapter4.pptChapter4.ppt
Chapter4.ppt
SangeetaTripathi8
 
what_is_technology.ppt
what_is_technology.pptwhat_is_technology.ppt
what_is_technology.ppt
SangeetaTripathi8
 
Magzine.pptx
Magzine.pptxMagzine.pptx
Magzine.pptx
SangeetaTripathi8
 
Lecture1-Introduction-Jan18-2021.pptx
Lecture1-Introduction-Jan18-2021.pptxLecture1-Introduction-Jan18-2021.pptx
Lecture1-Introduction-Jan18-2021.pptx
SangeetaTripathi8
 
10-Hot-Data-Analytics-Tre-8904178.ppsx
10-Hot-Data-Analytics-Tre-8904178.ppsx10-Hot-Data-Analytics-Tre-8904178.ppsx
10-Hot-Data-Analytics-Tre-8904178.ppsx
SangeetaTripathi8
 
Presentation on Transformer.pptx
Presentation on Transformer.pptxPresentation on Transformer.pptx
Presentation on Transformer.pptx
SangeetaTripathi8
 
Resonance ppt.ppt
Resonance ppt.pptResonance ppt.ppt
Resonance ppt.ppt
SangeetaTripathi8
 

More from SangeetaTripathi8 (16)

Gunn Diodes engineering electronics and communication
Gunn Diodes engineering electronics and communicationGunn Diodes engineering electronics and communication
Gunn Diodes engineering electronics and communication
 
lecture05picioportprogramming-190107152342.pptx
lecture05picioportprogramming-190107152342.pptxlecture05picioportprogramming-190107152342.pptx
lecture05picioportprogramming-190107152342.pptx
 
chapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptxchapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptx
 
softcorecomputing-121025042248-phpapp02.pptx
softcorecomputing-121025042248-phpapp02.pptxsoftcorecomputing-121025042248-phpapp02.pptx
softcorecomputing-121025042248-phpapp02.pptx
 
LECT 2.pptx
LECT 2.pptxLECT 2.pptx
LECT 2.pptx
 
Dr. Sangeeta PPT fro STTP 18 Jan.pptx
Dr. Sangeeta PPT fro STTP 18 Jan.pptxDr. Sangeeta PPT fro STTP 18 Jan.pptx
Dr. Sangeeta PPT fro STTP 18 Jan.pptx
 
Lect 1 Into.pptx
Lect 1 Into.pptxLect 1 Into.pptx
Lect 1 Into.pptx
 
Ch5_MorrisMano.pptx
Ch5_MorrisMano.pptxCh5_MorrisMano.pptx
Ch5_MorrisMano.pptx
 
DC-circuit-theory.ppt
DC-circuit-theory.pptDC-circuit-theory.ppt
DC-circuit-theory.ppt
 
Chapter4.ppt
Chapter4.pptChapter4.ppt
Chapter4.ppt
 
what_is_technology.ppt
what_is_technology.pptwhat_is_technology.ppt
what_is_technology.ppt
 
Magzine.pptx
Magzine.pptxMagzine.pptx
Magzine.pptx
 
Lecture1-Introduction-Jan18-2021.pptx
Lecture1-Introduction-Jan18-2021.pptxLecture1-Introduction-Jan18-2021.pptx
Lecture1-Introduction-Jan18-2021.pptx
 
10-Hot-Data-Analytics-Tre-8904178.ppsx
10-Hot-Data-Analytics-Tre-8904178.ppsx10-Hot-Data-Analytics-Tre-8904178.ppsx
10-Hot-Data-Analytics-Tre-8904178.ppsx
 
Presentation on Transformer.pptx
Presentation on Transformer.pptxPresentation on Transformer.pptx
Presentation on Transformer.pptx
 
Resonance ppt.ppt
Resonance ppt.pptResonance ppt.ppt
Resonance ppt.ppt
 

Recently uploaded

ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 

Recently uploaded (20)

ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 

lecture05picioportprogramming-190107152342.pptx