SlideShare ist ein Scribd-Unternehmen logo
1 von 12
• Atmega16 have total of 40 pins
32 I/O pins..
PORT “A” = 8 Pins
PORT “B” = 8 Pins
PORT “C” = 8 Pins
PORT “D” = 8 Pins
Port “X”
DDRX PORTX PINX
NOTE:- X is the name of port and it can
be A, B, C or D .
• DDRX – For setting the direction i.e. Input
or output.
• PORTX – For setting output value of port.
• PINX – For reading data available in port.
NOTE:- X is the name of port and it can be A,
B, C or D .
Click here to visit -ROBO INDIA
DDRX= 0xFF; (O/P-Port)
DDRX= 0x00; (I/P-Port)
or
DDRX = 0b 1 1 1 1 1 1 1 1 ; (O/P-Port)
DDRX = 0b 0 0 0 0 0 0 0 0 ; (I/P-Port)
NOTE:- X is the name of port and it can
be A, B, C or D .
Click here to visit -ROBO INDIA
1. PORTX= 0xF0 ;
PORTX = 0b 1 1 1 1 0 0 0 0 ;
2. PORTX= 0xFF ;
PORTX = 0b 1 1 1 1 1 1 1 1;
3. PORTX= 0x00 ;
PORTX = 0b 0 0 0 0 0 0 0 0;
Click here to visit -ROBO INDIA
1.If
if ( conditions )
{ code to be executed }
2.For loop
for(start ; condition ; step)
{code to be executed}
3.While loop
while( Condition)
{ code to be executed }
Click here to visit -ROBO INDIA
bit_is_clear(PINX,0)) //No input
bit_is_set(PINX,0)) //Detecting input
Click here to visit -ROBO INDIA
if (bit_is_set(PINX,0)))
{ code to be executed }
if (bit_is_clear(PINX,0)))
{ code to be executed }
Click here to visit -ROBO INDIA
while(bit_is_set(PINX,0)))
{ code to be executed }
while(bit_is_clear(PINX,0)))
{ code to be executed }
Click here to visit -ROBO INDIA
• #include <avr/io.h>
• #include <util/delay.h>
Click here to visit -ROBO INDIA
In case of queries please write us-
info@roboindia.com
www.roboindia.com
Click here to visit -ROBO INDIA

Weitere ähnliche Inhalte

Was ist angesagt?

INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
 INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER   INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER SIRILsam
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoderAbid Ali
 
Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Jay Patel
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller Gaurav Verma
 
Pin diagram 8085 microprocessor(For College Seminars)
Pin diagram 8085 microprocessor(For College Seminars)Pin diagram 8085 microprocessor(For College Seminars)
Pin diagram 8085 microprocessor(For College Seminars)Naman Joshi
 
Timer programming for 8051 using embedded c
Timer programming for 8051 using embedded cTimer programming for 8051 using embedded c
Timer programming for 8051 using embedded cVikas Dongre
 
3.programmable interrupt controller 8259
3.programmable interrupt controller 82593.programmable interrupt controller 8259
3.programmable interrupt controller 8259MdFazleRabbi18
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Urvashi Singh
 
8051 Addressing Modes
8051 Addressing Modes8051 Addressing Modes
8051 Addressing ModesSenthil Kumar
 
AVR programming - BASICS
AVR programming - BASICSAVR programming - BASICS
AVR programming - BASICSRobotix 2011
 
8051 addressing modes &amp; instruction set
8051 addressing modes &amp; instruction set8051 addressing modes &amp; instruction set
8051 addressing modes &amp; instruction setManoj Babar
 

Was ist angesagt? (20)

INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
 INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER   INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
INTERFACING ANALAOG TO DIGITAL CONVERTER (ADC0808/09) TO 8051 MICROCONTROLLER
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
 
Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051Arithmetic & logical operations in 8051
Arithmetic & logical operations in 8051
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
 
Pin diagram 8085 microprocessor(For College Seminars)
Pin diagram 8085 microprocessor(For College Seminars)Pin diagram 8085 microprocessor(For College Seminars)
Pin diagram 8085 microprocessor(For College Seminars)
 
Timer programming for 8051 using embedded c
Timer programming for 8051 using embedded cTimer programming for 8051 using embedded c
Timer programming for 8051 using embedded c
 
memory 8051
memory  8051memory  8051
memory 8051
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
 
Bjt amplifiers
Bjt amplifiersBjt amplifiers
Bjt amplifiers
 
8086 microprocessor
8086 microprocessor8086 microprocessor
8086 microprocessor
 
3.programmable interrupt controller 8259
3.programmable interrupt controller 82593.programmable interrupt controller 8259
3.programmable interrupt controller 8259
 
Intel 8051 Programming in C
Intel 8051 Programming in CIntel 8051 Programming in C
Intel 8051 Programming in C
 
Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086Assembler directives and basic steps ALP of 8086
Assembler directives and basic steps ALP of 8086
 
8051 Addressing Modes
8051 Addressing Modes8051 Addressing Modes
8051 Addressing Modes
 
8051 block diagram
8051 block diagram8051 block diagram
8051 block diagram
 
AVR programming - BASICS
AVR programming - BASICSAVR programming - BASICS
AVR programming - BASICS
 
Interfacing 8255
Interfacing 8255Interfacing 8255
Interfacing 8255
 
8051 addressing modes &amp; instruction set
8051 addressing modes &amp; instruction set8051 addressing modes &amp; instruction set
8051 addressing modes &amp; instruction set
 
8051 i/o port circuit
8051 i/o port circuit8051 i/o port circuit
8051 i/o port circuit
 

Andere mochten auch

Serial Communication In Atmega 16
Serial Communication In Atmega 16Serial Communication In Atmega 16
Serial Communication In Atmega 16Suren Kumar
 
Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Mahmoud Sadat
 
Projects based on atmega controlleer
Projects based on atmega  controlleerProjects based on atmega  controlleer
Projects based on atmega controlleersumit tiwari
 
Basic electronics.rtf
Basic electronics.rtfBasic electronics.rtf
Basic electronics.rtfsagarpiet16
 
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...Robo India
 
L12 c-language-programming-of-atmega328 p
L12 c-language-programming-of-atmega328 pL12 c-language-programming-of-atmega328 p
L12 c-language-programming-of-atmega328 prsamurti
 
Basic Electronic Components used in PCB Designing
Basic Electronic Components used in PCB DesigningBasic Electronic Components used in PCB Designing
Basic Electronic Components used in PCB DesigningSharan kumar
 
Applications of communication system
Applications of communication systemApplications of communication system
Applications of communication systemAmi Goswami
 
Fundamentals of embedded system and electronics
Fundamentals of embedded system and electronicsFundamentals of embedded system and electronics
Fundamentals of embedded system and electronicsRobo India
 
Scsi express overview
Scsi express overviewScsi express overview
Scsi express overviewrbeetle
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 prsamurti
 
Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16Robo India
 
Microprocessors-based systems (under graduate course) Lecture 9 of 9
Microprocessors-based systems (under graduate course) Lecture 9 of 9 Microprocessors-based systems (under graduate course) Lecture 9 of 9
Microprocessors-based systems (under graduate course) Lecture 9 of 9 Randa Elanwar
 
Led Theory and Working Principles
Led Theory and Working PrinciplesLed Theory and Working Principles
Led Theory and Working PrinciplesRobo India
 

Andere mochten auch (20)

Serial Communication In Atmega 16
Serial Communication In Atmega 16Serial Communication In Atmega 16
Serial Communication In Atmega 16
 
Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Introduction to AVR Microcontroller
Introduction to AVR Microcontroller
 
Uart
UartUart
Uart
 
Basics of ATmega32
Basics of ATmega32Basics of ATmega32
Basics of ATmega32
 
Projects based on atmega controlleer
Projects based on atmega  controlleerProjects based on atmega  controlleer
Projects based on atmega controlleer
 
Robot Motions
Robot MotionsRobot Motions
Robot Motions
 
Basic electronics.rtf
Basic electronics.rtfBasic electronics.rtf
Basic electronics.rtf
 
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
Evaluation of dynamics | Gyroscope, Accelerometer, Inertia Measuring Unit and...
 
L12 c-language-programming-of-atmega328 p
L12 c-language-programming-of-atmega328 pL12 c-language-programming-of-atmega328 p
L12 c-language-programming-of-atmega328 p
 
Basic Electronic Components used in PCB Designing
Basic Electronic Components used in PCB DesigningBasic Electronic Components used in PCB Designing
Basic Electronic Components used in PCB Designing
 
Applications of communication system
Applications of communication systemApplications of communication system
Applications of communication system
 
Fundamentals of embedded system and electronics
Fundamentals of embedded system and electronicsFundamentals of embedded system and electronics
Fundamentals of embedded system and electronics
 
Ch6 030702
Ch6 030702Ch6 030702
Ch6 030702
 
Scsi express overview
Scsi express overviewScsi express overview
Scsi express overview
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 p
 
Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16Relay and AVR Atmel Atmega 16
Relay and AVR Atmel Atmega 16
 
Class11
Class11Class11
Class11
 
Lecture4
Lecture4Lecture4
Lecture4
 
Microprocessors-based systems (under graduate course) Lecture 9 of 9
Microprocessors-based systems (under graduate course) Lecture 9 of 9 Microprocessors-based systems (under graduate course) Lecture 9 of 9
Microprocessors-based systems (under graduate course) Lecture 9 of 9
 
Led Theory and Working Principles
Led Theory and Working PrinciplesLed Theory and Working Principles
Led Theory and Working Principles
 

Ähnlich wie Input Output programming in AVR microcontroller

LCD Theory and Working Principles
LCD Theory and Working PrinciplesLCD Theory and Working Principles
LCD Theory and Working PrinciplesRobo India
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64FFRI, Inc.
 
Programming A Robot Using
Programming A Robot UsingProgramming A Robot Using
Programming A Robot UsingSpitiq
 
Hardware interfacing basics using AVR
Hardware interfacing basics using AVRHardware interfacing basics using AVR
Hardware interfacing basics using AVRMohamed Abdallah
 
Microcontroller avr
Microcontroller avrMicrocontroller avr
Microcontroller avrMahmoud Amr
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptablesKernel TLV
 
Lec2.ppt
Lec2.pptLec2.ppt
Lec2.pptfgjf1
 
Microcontroladores: programas de CCS Compiler.docx
Microcontroladores: programas de CCS Compiler.docxMicrocontroladores: programas de CCS Compiler.docx
Microcontroladores: programas de CCS Compiler.docxSANTIAGO PABLO ALBERTO
 
Embedded systems io programming
Embedded systems   io programmingEmbedded systems   io programming
Embedded systems io programmingimtiazalijoono
 
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docx
# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docxmayank272369
 
Arduino for Beginners
Arduino for BeginnersArduino for Beginners
Arduino for BeginnersSarwan Singh
 
Arduino sectionprogramming slides
Arduino sectionprogramming slidesArduino sectionprogramming slides
Arduino sectionprogramming slidesJorge Joens
 
Arduino Section Programming - from Sparkfun
Arduino Section Programming - from SparkfunArduino Section Programming - from Sparkfun
Arduino Section Programming - from SparkfunJhaeZaSangcapGarrido
 
Linux Serial Driver
Linux Serial DriverLinux Serial Driver
Linux Serial Driver艾鍗科技
 
What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfSIGMATAX1
 
Taipei.py 2018 - Control device via ioctl from Python
Taipei.py 2018 - Control device via ioctl from Python Taipei.py 2018 - Control device via ioctl from Python
Taipei.py 2018 - Control device via ioctl from Python Hua Chu
 

Ähnlich wie Input Output programming in AVR microcontroller (20)

LCD Theory and Working Principles
LCD Theory and Working PrinciplesLCD Theory and Working Principles
LCD Theory and Working Principles
 
Exploring the x64
Exploring the x64Exploring the x64
Exploring the x64
 
Programming A Robot Using
Programming A Robot UsingProgramming A Robot Using
Programming A Robot Using
 
Hardware interfacing basics using AVR
Hardware interfacing basics using AVRHardware interfacing basics using AVR
Hardware interfacing basics using AVR
 
Microcontroller avr
Microcontroller avrMicrocontroller avr
Microcontroller avr
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
Lec2.ppt
Lec2.pptLec2.ppt
Lec2.ppt
 
Microcontroladores: programas de CCS Compiler.docx
Microcontroladores: programas de CCS Compiler.docxMicrocontroladores: programas de CCS Compiler.docx
Microcontroladores: programas de CCS Compiler.docx
 
knowledge in daily life.ppt
knowledge in daily life.pptknowledge in daily life.ppt
knowledge in daily life.ppt
 
Embedded systems io programming
Embedded systems   io programmingEmbedded systems   io programming
Embedded systems io programming
 
Lampiran 1.programdocx
Lampiran 1.programdocxLampiran 1.programdocx
Lampiran 1.programdocx
 
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docx
# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx# peripheral registers  .equ PWR_BASE0x40007000    .equ PWR_CR0x00  .docx
# peripheral registers .equ PWR_BASE0x40007000 .equ PWR_CR0x00 .docx
 
Arduino for Beginners
Arduino for BeginnersArduino for Beginners
Arduino for Beginners
 
PIC and LCD
PIC and LCDPIC and LCD
PIC and LCD
 
Arduino sectionprogramming slides
Arduino sectionprogramming slidesArduino sectionprogramming slides
Arduino sectionprogramming slides
 
Arduino Section Programming - from Sparkfun
Arduino Section Programming - from SparkfunArduino Section Programming - from Sparkfun
Arduino Section Programming - from Sparkfun
 
Linux Serial Driver
Linux Serial DriverLinux Serial Driver
Linux Serial Driver
 
What will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdfWhat will be quantization step size in numbers and in voltage for th.pdf
What will be quantization step size in numbers and in voltage for th.pdf
 
Fabric robots
Fabric robotsFabric robots
Fabric robots
 
Taipei.py 2018 - Control device via ioctl from Python
Taipei.py 2018 - Control device via ioctl from Python Taipei.py 2018 - Control device via ioctl from Python
Taipei.py 2018 - Control device via ioctl from Python
 

Mehr von Robo India

Servo Based 5 Axis Robotic Arm Project Report
Servo Based 5 Axis Robotic Arm Project ReportServo Based 5 Axis Robotic Arm Project Report
Servo Based 5 Axis Robotic Arm Project ReportRobo India
 
A project report on energy meter monitoring online using wireless transmissio...
A project report on energy meter monitoring online using wireless transmissio...A project report on energy meter monitoring online using wireless transmissio...
A project report on energy meter monitoring online using wireless transmissio...Robo India
 
A project report on wireless energy meter reading using x bee
A project report on wireless energy meter reading using x beeA project report on wireless energy meter reading using x bee
A project report on wireless energy meter reading using x beeRobo India
 
PC Based Industrial Automation With AVR Atmega 16 - Project Report
PC Based Industrial Automation With AVR Atmega 16 - Project ReportPC Based Industrial Automation With AVR Atmega 16 - Project Report
PC Based Industrial Automation With AVR Atmega 16 - Project ReportRobo India
 
Indian Banks Taglines and Punch Lines
Indian Banks Taglines and Punch LinesIndian Banks Taglines and Punch Lines
Indian Banks Taglines and Punch LinesRobo India
 
Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.
Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.
Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.Robo India
 
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...Robo India
 
Servo motor and AVR Atmel Atmega 16
Servo motor and AVR  Atmel Atmega 16Servo motor and AVR  Atmel Atmega 16
Servo motor and AVR Atmel Atmega 16Robo India
 
IR Sensor Working and Concepts
IR Sensor Working and ConceptsIR Sensor Working and Concepts
IR Sensor Working and ConceptsRobo India
 
Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts Robo India
 
ADC - Analog to Digital Conversion on AVR microcontroller Atmega16
ADC - Analog to Digital  Conversion on AVR microcontroller Atmega16ADC - Analog to Digital  Conversion on AVR microcontroller Atmega16
ADC - Analog to Digital Conversion on AVR microcontroller Atmega16Robo India
 
Single bit oprations in avr microcontroller
Single bit oprations in avr microcontrollerSingle bit oprations in avr microcontroller
Single bit oprations in avr microcontrollerRobo India
 
Marketing to youth
Marketing to youthMarketing to youth
Marketing to youthRobo India
 
Concept and algorithm of line follower
Concept and algorithm of line followerConcept and algorithm of line follower
Concept and algorithm of line followerRobo India
 
Robotics and automation
Robotics and automationRobotics and automation
Robotics and automationRobo India
 

Mehr von Robo India (16)

Servo Based 5 Axis Robotic Arm Project Report
Servo Based 5 Axis Robotic Arm Project ReportServo Based 5 Axis Robotic Arm Project Report
Servo Based 5 Axis Robotic Arm Project Report
 
A project report on energy meter monitoring online using wireless transmissio...
A project report on energy meter monitoring online using wireless transmissio...A project report on energy meter monitoring online using wireless transmissio...
A project report on energy meter monitoring online using wireless transmissio...
 
A project report on wireless energy meter reading using x bee
A project report on wireless energy meter reading using x beeA project report on wireless energy meter reading using x bee
A project report on wireless energy meter reading using x bee
 
PC Based Industrial Automation With AVR Atmega 16 - Project Report
PC Based Industrial Automation With AVR Atmega 16 - Project ReportPC Based Industrial Automation With AVR Atmega 16 - Project Report
PC Based Industrial Automation With AVR Atmega 16 - Project Report
 
Indian Banks Taglines and Punch Lines
Indian Banks Taglines and Punch LinesIndian Banks Taglines and Punch Lines
Indian Banks Taglines and Punch Lines
 
Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.
Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.
Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.
 
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...
DTMF - Dual Tone Multi Frequency Signaling and AVR Atmel Atmega16multi-freque...
 
Servo motor and AVR Atmel Atmega 16
Servo motor and AVR  Atmel Atmega 16Servo motor and AVR  Atmel Atmega 16
Servo motor and AVR Atmel Atmega 16
 
IR Sensor Working and Concepts
IR Sensor Working and ConceptsIR Sensor Working and Concepts
IR Sensor Working and Concepts
 
Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts Digital and Analog IR Sensor Working and Cocepts
Digital and Analog IR Sensor Working and Cocepts
 
ADC - Analog to Digital Conversion on AVR microcontroller Atmega16
ADC - Analog to Digital  Conversion on AVR microcontroller Atmega16ADC - Analog to Digital  Conversion on AVR microcontroller Atmega16
ADC - Analog to Digital Conversion on AVR microcontroller Atmega16
 
Single bit oprations in avr microcontroller
Single bit oprations in avr microcontrollerSingle bit oprations in avr microcontroller
Single bit oprations in avr microcontroller
 
Marketing to youth
Marketing to youthMarketing to youth
Marketing to youth
 
C language
C languageC language
C language
 
Concept and algorithm of line follower
Concept and algorithm of line followerConcept and algorithm of line follower
Concept and algorithm of line follower
 
Robotics and automation
Robotics and automationRobotics and automation
Robotics and automation
 

Kürzlich hochgeladen

Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptxNikhil Raut
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptNarmatha D
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...Amil Baba Dawood bangali
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 

Kürzlich hochgeladen (20)

Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptx
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.ppt
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 

Input Output programming in AVR microcontroller

  • 1.
  • 2. • Atmega16 have total of 40 pins 32 I/O pins.. PORT “A” = 8 Pins PORT “B” = 8 Pins PORT “C” = 8 Pins PORT “D” = 8 Pins
  • 3. Port “X” DDRX PORTX PINX NOTE:- X is the name of port and it can be A, B, C or D .
  • 4. • DDRX – For setting the direction i.e. Input or output. • PORTX – For setting output value of port. • PINX – For reading data available in port. NOTE:- X is the name of port and it can be A, B, C or D . Click here to visit -ROBO INDIA
  • 5. DDRX= 0xFF; (O/P-Port) DDRX= 0x00; (I/P-Port) or DDRX = 0b 1 1 1 1 1 1 1 1 ; (O/P-Port) DDRX = 0b 0 0 0 0 0 0 0 0 ; (I/P-Port) NOTE:- X is the name of port and it can be A, B, C or D . Click here to visit -ROBO INDIA
  • 6. 1. PORTX= 0xF0 ; PORTX = 0b 1 1 1 1 0 0 0 0 ; 2. PORTX= 0xFF ; PORTX = 0b 1 1 1 1 1 1 1 1; 3. PORTX= 0x00 ; PORTX = 0b 0 0 0 0 0 0 0 0; Click here to visit -ROBO INDIA
  • 7. 1.If if ( conditions ) { code to be executed } 2.For loop for(start ; condition ; step) {code to be executed} 3.While loop while( Condition) { code to be executed } Click here to visit -ROBO INDIA
  • 8. bit_is_clear(PINX,0)) //No input bit_is_set(PINX,0)) //Detecting input Click here to visit -ROBO INDIA
  • 9. if (bit_is_set(PINX,0))) { code to be executed } if (bit_is_clear(PINX,0))) { code to be executed } Click here to visit -ROBO INDIA
  • 10. while(bit_is_set(PINX,0))) { code to be executed } while(bit_is_clear(PINX,0))) { code to be executed } Click here to visit -ROBO INDIA
  • 11. • #include <avr/io.h> • #include <util/delay.h> Click here to visit -ROBO INDIA
  • 12. In case of queries please write us- info@roboindia.com www.roboindia.com Click here to visit -ROBO INDIA