SlideShare a Scribd company logo
3
Most read
8
Most read
14
Most read
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

PPTX
Pic microcontroller architecture
PPT
DAC-digital to analog converter
PPTX
ATmega32-AVR microcontrollers-Part I
PPTX
ARM Processors
PPTX
8255 PPI
PPTX
8051 Microcontroller PPT's By Er. Swapnil Kaware
PPT
8255 presentaion.ppt
PPTX
MPMC Microprocessor
Pic microcontroller architecture
DAC-digital to analog converter
ATmega32-AVR microcontrollers-Part I
ARM Processors
8255 PPI
8051 Microcontroller PPT's By Er. Swapnil Kaware
8255 presentaion.ppt
MPMC Microprocessor

What's hot (20)

PPTX
Microcontroller presentation
PPTX
Nyquist-Rate D/A Converters presented by Oveis Dehghantanha
PPT
PIC timer programming
DOCX
ARM7-ARCHITECTURE
PPT
UNIT III PROGRAMMABLE PERIPHERAL INTERFACE
PDF
ADC and DAC interfacing.pdf
PPTX
PDF
Unit 1 Introduction to Embedded computing and ARM processor
PPTX
Microcontroller 8096
PPTX
INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
PDF
Module 1 8086
PPTX
(D/A) and (A/D)conversion
PPTX
Comparsion of M-Ary psk,fsk,qapsk.pptx
PPTX
INTEL 8086 MICROPROCESSOR
PPTX
Addressing modes 8085
PPTX
Arm instruction set
PDF
Introduction to ARM LPC2148
PDF
EE6008 MBSD
PPTX
Ditial to Analog Converter
PPTX
Interfacing Stepper motor with 8051
Microcontroller presentation
Nyquist-Rate D/A Converters presented by Oveis Dehghantanha
PIC timer programming
ARM7-ARCHITECTURE
UNIT III PROGRAMMABLE PERIPHERAL INTERFACE
ADC and DAC interfacing.pdf
Unit 1 Introduction to Embedded computing and ARM processor
Microcontroller 8096
INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
Module 1 8086
(D/A) and (A/D)conversion
Comparsion of M-Ary psk,fsk,qapsk.pptx
INTEL 8086 MICROPROCESSOR
Addressing modes 8085
Arm instruction set
Introduction to ARM LPC2148
EE6008 MBSD
Ditial to Analog Converter
Interfacing Stepper motor with 8051
Ad

Similar to Lecture 05 pic io port programming (20)

PPTX
fdgfgsdfhgdfhdhdgjgjfjdfhsdfharyerygardh.pptx
PPTX
02_Register_Transfer_Language_2025_for_students.pptx
PPTX
PIC18 input output ports specifications with code
PPTX
PIC Presentation_final updated.pptx
PPTX
COA (Unit_1.pptx)
PPTX
Class 4 I/O Ports
PPTX
PPT
LEC 2-register transfer and register transfer language.ppt
PPTX
Pic microcontroller [autosaved] [autosaved]
PDF
Lecture 03 basics of pic
PPTX
CPU ORGANIZATION CHAPTER FIVE COMPUTER ORGANIZATION.pptx
PPTX
UNIT 3 Peripheral Interfacing.pptx
PPT
8051 Microcontroller architecture and operation
PPTX
Peripherals and interfacing
PPT
Computer organization prashant odhavani- 160920107003
PPT
amba.ppt
PPT
UNIT 3 mp (1).ppt
PPT
set de instrucciones primera parte de atmel
PPTX
Unit 4 Introduction to Microcontrollers.pptxUnit-3 IO Interfacing-1.pptximpor...
PPTX
AVR programming - BASICS
fdgfgsdfhgdfhdhdgjgjfjdfhsdfharyerygardh.pptx
02_Register_Transfer_Language_2025_for_students.pptx
PIC18 input output ports specifications with code
PIC Presentation_final updated.pptx
COA (Unit_1.pptx)
Class 4 I/O Ports
LEC 2-register transfer and register transfer language.ppt
Pic microcontroller [autosaved] [autosaved]
Lecture 03 basics of pic
CPU ORGANIZATION CHAPTER FIVE COMPUTER ORGANIZATION.pptx
UNIT 3 Peripheral Interfacing.pptx
8051 Microcontroller architecture and operation
Peripherals and interfacing
Computer organization prashant odhavani- 160920107003
amba.ppt
UNIT 3 mp (1).ppt
set de instrucciones primera parte de atmel
Unit 4 Introduction to Microcontrollers.pptxUnit-3 IO Interfacing-1.pptximpor...
AVR programming - BASICS
Ad

More from Vajira Thambawita (20)

PDF
Lecture 4 principles of parallel algorithm design updated
PDF
Lecture 3 parallel programming platforms
PDF
Lecture 2 more about parallel computing
PDF
Lecture 1 introduction to parallel and distributed computing
PDF
Lecture 12 localization and navigation
PDF
Lecture 11 neural network principles
PDF
Lecture 10 mobile robot design
PDF
Lecture 09 control
PDF
Lecture 08 robots and controllers
PDF
Lecture 07 more about pic
PDF
Lecture 06 pic programming in c
PDF
Lecture 04 branch call and time delay
PDF
Lecture 02 mechatronics systems
PDF
Lecture 1 - Introduction to embedded system and Robotics
PDF
Lec 09 - Registers and Counters
PDF
Lec 08 - DESIGN PROCEDURE
PDF
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
PDF
Lec 06 - Synchronous Sequential Logic
PDF
Lec 05 - Combinational Logic
PDF
Lec 04 - Gate-level Minimization
Lecture 4 principles of parallel algorithm design updated
Lecture 3 parallel programming platforms
Lecture 2 more about parallel computing
Lecture 1 introduction to parallel and distributed computing
Lecture 12 localization and navigation
Lecture 11 neural network principles
Lecture 10 mobile robot design
Lecture 09 control
Lecture 08 robots and controllers
Lecture 07 more about pic
Lecture 06 pic programming in c
Lecture 04 branch call and time delay
Lecture 02 mechatronics systems
Lecture 1 - Introduction to embedded system and Robotics
Lec 09 - Registers and Counters
Lec 08 - DESIGN PROCEDURE
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Lec 06 - Synchronous Sequential Logic
Lec 05 - Combinational Logic
Lec 04 - Gate-level Minimization

Recently uploaded (20)

PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
master seminar digital applications in india
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Classroom Observation Tools for Teachers
PPTX
Institutional Correction lecture only . . .
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Pharma ospi slides which help in ospi learning
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Anesthesia in Laparoscopic Surgery in India
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Final Presentation General Medicine 03-08-2024.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
master seminar digital applications in india
A systematic review of self-coping strategies used by university students to ...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
01-Introduction-to-Information-Management.pdf
Microbial diseases, their pathogenesis and prophylaxis
Classroom Observation Tools for Teachers
Institutional Correction lecture only . . .
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Pharma ospi slides which help in ospi learning
O7-L3 Supply Chain Operations - ICLT Program
102 student loan defaulters named and shamed – Is someone you know on the list?
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx

Lecture 05 pic io port programming