Enviar pesquisa
Carregar
01 GPIO||General Purpose Input Output.2016
•
0 gostou
•
1,169 visualizações
Mohamed Fawzy
Seguir
Discussing digital input/output module for ATMEGA32
Leia menos
Leia mais
Engenharia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 28
Baixar agora
Baixar para ler offline
Recomendados
General Purpose Input Output - Brief Introduction
General Purpose Input Output - Brief Introduction
NEEVEE Technologies
Introduction to ARM LPC2148
Introduction to ARM LPC2148
Veera Kumar
ARM CORTEX M3 PPT
ARM CORTEX M3 PPT
Gaurav Verma
Microcontroller presentation
Microcontroller presentation
xavierpaulino
Communication Protocols (UART, SPI,I2C)
Communication Protocols (UART, SPI,I2C)
Emertxe Information Technologies Pvt Ltd
Embedded C - Day 1
Embedded C - Day 1
Emertxe Information Technologies Pvt Ltd
Embedded C - Lecture 1
Embedded C - Lecture 1
Mohamed Abdallah
Module 2 ARM CORTEX M3 Instruction Set and Programming
Module 2 ARM CORTEX M3 Instruction Set and Programming
Amogha Bandrikalli
Recomendados
General Purpose Input Output - Brief Introduction
General Purpose Input Output - Brief Introduction
NEEVEE Technologies
Introduction to ARM LPC2148
Introduction to ARM LPC2148
Veera Kumar
ARM CORTEX M3 PPT
ARM CORTEX M3 PPT
Gaurav Verma
Microcontroller presentation
Microcontroller presentation
xavierpaulino
Communication Protocols (UART, SPI,I2C)
Communication Protocols (UART, SPI,I2C)
Emertxe Information Technologies Pvt Ltd
Embedded C - Day 1
Embedded C - Day 1
Emertxe Information Technologies Pvt Ltd
Embedded C - Lecture 1
Embedded C - Lecture 1
Mohamed Abdallah
Module 2 ARM CORTEX M3 Instruction Set and Programming
Module 2 ARM CORTEX M3 Instruction Set and Programming
Amogha Bandrikalli
Communication protocols - Embedded Systems
Communication protocols - Embedded Systems
Emertxe Information Technologies Pvt Ltd
Introduction to the Arduino
Introduction to the Arduino
Wingston
SPI Protocol in LPC2148
SPI Protocol in LPC2148
Dnyanesh P. Joshi
Introduction to Microcontroller
Introduction to Microcontroller
Pantech ProLabs India Pvt Ltd
LPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLER
sravannunna24
ARM - Advance RISC Machine
ARM - Advance RISC Machine
EdutechLearners
8086 pin details
8086 pin details
AJAL A J
Basic interfacing of LEDs
Basic interfacing of LEDs
Varad Manglekar
Arduino- Serial communication
Arduino- Serial communication
Jawaher Abdulwahab Fadhil
8051 microcontroller
8051 microcontroller
Gaurav Verma
I2C introduction
I2C introduction
SUNODH GARLAPATI
PIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC Interfacing
International Institute of Information Technology (I²IT)
I2C Protocol
I2C Protocol
Sudhanshu Janwadkar
Pic microcontroller architecture
Pic microcontroller architecture
Jamia Hamdard
Interfacing 8255
Interfacing 8255
Anuja Bhakuni
Introduction to pic microcontroller
Introduction to pic microcontroller
Siva Kumar
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
abhikalmegh
Interrupts in pic
Interrupts in pic
v Kalairajan
What is JTAG?
What is JTAG?
killerdolton
PIC Microcontrollers.ppt
PIC Microcontrollers.ppt
Dr.YNM
water latching solenoid valve
water latching solenoid valve
XHnotion Pneumatic
04 Interfacing LCD Displays.2016
04 Interfacing LCD Displays.2016
Mohamed Fawzy
Mais conteúdo relacionado
Mais procurados
Communication protocols - Embedded Systems
Communication protocols - Embedded Systems
Emertxe Information Technologies Pvt Ltd
Introduction to the Arduino
Introduction to the Arduino
Wingston
SPI Protocol in LPC2148
SPI Protocol in LPC2148
Dnyanesh P. Joshi
Introduction to Microcontroller
Introduction to Microcontroller
Pantech ProLabs India Pvt Ltd
LPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLER
sravannunna24
ARM - Advance RISC Machine
ARM - Advance RISC Machine
EdutechLearners
8086 pin details
8086 pin details
AJAL A J
Basic interfacing of LEDs
Basic interfacing of LEDs
Varad Manglekar
Arduino- Serial communication
Arduino- Serial communication
Jawaher Abdulwahab Fadhil
8051 microcontroller
8051 microcontroller
Gaurav Verma
I2C introduction
I2C introduction
SUNODH GARLAPATI
PIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC Interfacing
International Institute of Information Technology (I²IT)
I2C Protocol
I2C Protocol
Sudhanshu Janwadkar
Pic microcontroller architecture
Pic microcontroller architecture
Jamia Hamdard
Interfacing 8255
Interfacing 8255
Anuja Bhakuni
Introduction to pic microcontroller
Introduction to pic microcontroller
Siva Kumar
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
abhikalmegh
Interrupts in pic
Interrupts in pic
v Kalairajan
What is JTAG?
What is JTAG?
killerdolton
PIC Microcontrollers.ppt
PIC Microcontrollers.ppt
Dr.YNM
Mais procurados
(20)
Communication protocols - Embedded Systems
Communication protocols - Embedded Systems
Introduction to the Arduino
Introduction to the Arduino
SPI Protocol in LPC2148
SPI Protocol in LPC2148
Introduction to Microcontroller
Introduction to Microcontroller
LPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLER
ARM - Advance RISC Machine
ARM - Advance RISC Machine
8086 pin details
8086 pin details
Basic interfacing of LEDs
Basic interfacing of LEDs
Arduino- Serial communication
Arduino- Serial communication
8051 microcontroller
8051 microcontroller
I2C introduction
I2C introduction
PIC Microcontroller | ADC Interfacing
PIC Microcontroller | ADC Interfacing
I2C Protocol
I2C Protocol
Pic microcontroller architecture
Pic microcontroller architecture
Interfacing 8255
Interfacing 8255
Introduction to pic microcontroller
Introduction to pic microcontroller
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
Interrupts in pic
Interrupts in pic
What is JTAG?
What is JTAG?
PIC Microcontrollers.ppt
PIC Microcontrollers.ppt
Destaque
water latching solenoid valve
water latching solenoid valve
XHnotion Pneumatic
04 Interfacing LCD Displays.2016
04 Interfacing LCD Displays.2016
Mohamed Fawzy
06 Interfacing Keypad 4x4.2016
06 Interfacing Keypad 4x4.2016
Mohamed Fawzy
AVR_Course_Day6 external hardware interrupts and analogue to digital converter
AVR_Course_Day6 external hardware interrupts and analogue to digital converter
Mohamed Ali
Catia introduccionv5
Catia introduccionv5
José Manuel Trujillo Cedillo
AVR_Course_Day7 timers counters and interrupt programming
AVR_Course_Day7 timers counters and interrupt programming
Mohamed Ali
Regis Pneumatic - Solenoid Valve Quality Process Presentation
Regis Pneumatic - Solenoid Valve Quality Process Presentation
Regis-pneumatic
AVR_Course_Day5 avr interfaces
AVR_Course_Day5 avr interfaces
Mohamed Ali
AVR_Course_Day2 what is pcb
AVR_Course_Day2 what is pcb
Mohamed Ali
AVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontroller
Mohamed Ali
AVR_Course_Day8 motor drive and pwm techniques
AVR_Course_Day8 motor drive and pwm techniques
Mohamed Ali
Catia v5 NOTES
Catia v5 NOTES
vipinshelke
Introduction to Basic electronics
Introduction to Basic electronics
Myrna Cabrera
BASIC ELECTRONICS
BASIC ELECTRONICS
Clifford Sugermen
AVR_Course_Day1 basic electronics
AVR_Course_Day1 basic electronics
Mohamed Ali
Z:\catia v5
Z:\catia v5
Shintu Shukla
Electronics ppt
Electronics ppt
Anirudha Kumar
AVR ATmega32
AVR ATmega32
Prashant Tiwari
AVR programming - BASICS
AVR programming - BASICS
Robotix 2011
Destaque
(19)
water latching solenoid valve
water latching solenoid valve
04 Interfacing LCD Displays.2016
04 Interfacing LCD Displays.2016
06 Interfacing Keypad 4x4.2016
06 Interfacing Keypad 4x4.2016
AVR_Course_Day6 external hardware interrupts and analogue to digital converter
AVR_Course_Day6 external hardware interrupts and analogue to digital converter
Catia introduccionv5
Catia introduccionv5
AVR_Course_Day7 timers counters and interrupt programming
AVR_Course_Day7 timers counters and interrupt programming
Regis Pneumatic - Solenoid Valve Quality Process Presentation
Regis Pneumatic - Solenoid Valve Quality Process Presentation
AVR_Course_Day5 avr interfaces
AVR_Course_Day5 avr interfaces
AVR_Course_Day2 what is pcb
AVR_Course_Day2 what is pcb
AVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontroller
AVR_Course_Day8 motor drive and pwm techniques
AVR_Course_Day8 motor drive and pwm techniques
Catia v5 NOTES
Catia v5 NOTES
Introduction to Basic electronics
Introduction to Basic electronics
BASIC ELECTRONICS
BASIC ELECTRONICS
AVR_Course_Day1 basic electronics
AVR_Course_Day1 basic electronics
Z:\catia v5
Z:\catia v5
Electronics ppt
Electronics ppt
AVR ATmega32
AVR ATmega32
AVR programming - BASICS
AVR programming - BASICS
Semelhante a 01 GPIO||General Purpose Input Output.2016
LED HD VIDEO PROCESSOR USER’S MANUAL
LED HD VIDEO PROCESSOR USER’S MANUAL
Max Dan
Etapes fab-venti-v2
Etapes fab-venti-v2
Jonah Marrs
07 Analogue to Digital Converter(ADC).2016
07 Analogue to Digital Converter(ADC).2016
Mohamed Fawzy
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
GIRISH HARMUKH
I made some more expansion board for M5Stack
I made some more expansion board for M5Stack
Masawo Yamazaki
eece237lab2EECE237Lab2.uvproj 1.1 ### uVision .docx
eece237lab2EECE237Lab2.uvproj 1.1 ### uVision .docx
SALU18
Intro2 Robotic With Pic18
Intro2 Robotic With Pic18
Moayadhn
Vlsi es-lab-manual
Vlsi es-lab-manual
twinkleratna
00 let us get started.2016
00 let us get started.2016
Mohamed Fawzy
presentation_28 (1).pptx
presentation_28 (1).pptx
MohammedHaseeb43
Módulo adc 18f4550
Módulo adc 18f4550
David Narváez
Power the world with mbed LPC1768
Power the world with mbed LPC1768
yoonghm
Vista 1600 c epon olt quick start manual(r1.2)
Vista 1600 c epon olt quick start manual(r1.2)
Shanxi Cai
Microcontroller 8051 training
Microcontroller 8051 training
Pradip Bhandari
JVL Servo/Step Motor Indexers SMI30 and SMI31
JVL Servo/Step Motor Indexers SMI30 and SMI31
Electromate
Advanced motion controls dx15co8 src
Advanced motion controls dx15co8 src
Electromate
Advanced motion controls dx15co8
Advanced motion controls dx15co8
Electromate
F5 m instruction manual
F5 m instruction manual
Toàn Huỳnh
5.5 inch Amoled (1080x1920) Datasheet
5.5 inch Amoled (1080x1920) Datasheet
Panox Display
1.39 inch Round Amoled(400x400) Datasheet
1.39 inch Round Amoled(400x400) Datasheet
Panox Display
Semelhante a 01 GPIO||General Purpose Input Output.2016
(20)
LED HD VIDEO PROCESSOR USER’S MANUAL
LED HD VIDEO PROCESSOR USER’S MANUAL
Etapes fab-venti-v2
Etapes fab-venti-v2
07 Analogue to Digital Converter(ADC).2016
07 Analogue to Digital Converter(ADC).2016
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
I made some more expansion board for M5Stack
I made some more expansion board for M5Stack
eece237lab2EECE237Lab2.uvproj 1.1 ### uVision .docx
eece237lab2EECE237Lab2.uvproj 1.1 ### uVision .docx
Intro2 Robotic With Pic18
Intro2 Robotic With Pic18
Vlsi es-lab-manual
Vlsi es-lab-manual
00 let us get started.2016
00 let us get started.2016
presentation_28 (1).pptx
presentation_28 (1).pptx
Módulo adc 18f4550
Módulo adc 18f4550
Power the world with mbed LPC1768
Power the world with mbed LPC1768
Vista 1600 c epon olt quick start manual(r1.2)
Vista 1600 c epon olt quick start manual(r1.2)
Microcontroller 8051 training
Microcontroller 8051 training
JVL Servo/Step Motor Indexers SMI30 and SMI31
JVL Servo/Step Motor Indexers SMI30 and SMI31
Advanced motion controls dx15co8 src
Advanced motion controls dx15co8 src
Advanced motion controls dx15co8
Advanced motion controls dx15co8
F5 m instruction manual
F5 m instruction manual
5.5 inch Amoled (1080x1920) Datasheet
5.5 inch Amoled (1080x1920) Datasheet
1.39 inch Round Amoled(400x400) Datasheet
1.39 inch Round Amoled(400x400) Datasheet
Mais de Mohamed Fawzy
05 EEPROM memory.2016
05 EEPROM memory.2016
Mohamed Fawzy
02 Interfacing High Power Devices.2016
02 Interfacing High Power Devices.2016
Mohamed Fawzy
أزاى تروح فى داهيه !!!
أزاى تروح فى داهيه !!!
Mohamed Fawzy
Ce from a to z
Ce from a to z
Mohamed Fawzy
Taqa
Taqa
Mohamed Fawzy
C programming day#2.
C programming day#2.
Mohamed Fawzy
C programming day#3.
C programming day#3.
Mohamed Fawzy
C programming day#1
C programming day#1
Mohamed Fawzy
Mais de Mohamed Fawzy
(8)
05 EEPROM memory.2016
05 EEPROM memory.2016
02 Interfacing High Power Devices.2016
02 Interfacing High Power Devices.2016
أزاى تروح فى داهيه !!!
أزاى تروح فى داهيه !!!
Ce from a to z
Ce from a to z
Taqa
Taqa
C programming day#2.
C programming day#2.
C programming day#3.
C programming day#3.
C programming day#1
C programming day#1
Último
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Sumanth A
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
sandhya757531
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdf
isabel213075
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
Romil Mishra
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
NainaShrivastava14
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdf
sahilsajad201
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Erbil Polytechnic University
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
HafizMudaserAhmad
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
Erbil Polytechnic University
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
rnrncn29
signals in triangulation .. ...Surveying
signals in triangulation .. ...Surveying
sapna80328
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
Sneha Padhiar
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Deepika Walanjkar
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
jhunlian
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
bim.edu.pl
Engineering Drawing section of solid
Engineering Drawing section of solid
namansinghjarodiya
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
prachaibot
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
BootNeck1
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
karthi keyan
Earthing details of Electrical Substation
Earthing details of Electrical Substation
stephanwindworld
Último
(20)
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdf
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Paper Tube : Shigeru Ban projects and Case Study of Cardboard Cathedral .pdf
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdf
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
signals in triangulation .. ...Surveying
signals in triangulation .. ...Surveying
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
Engineering Drawing section of solid
Engineering Drawing section of solid
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
Earthing details of Electrical Substation
Earthing details of Electrical Substation
01 GPIO||General Purpose Input Output.2016
1.
1 01-General Purpose Input/ Output By
: Mohamed Fawzy Programming AVR Microcontrollers © Mohamed F.A.B 2015
2.
Lecture Notes: 2 © Mohamed
F.A.B 2015 o Set Your Phone To Vibration Mode. o Ask any time. o During labs, Feel Free To Check Any Materials or Internet. o Slides are self content. o Feel Free To Share This Materials With Your Friends. o Work Hard For Achieving Most Benefits Of This Course.
3.
3 Don't Forget !!!! ©
Mohamed F.A.B 2015 Any Expert Was Once A Beginner
4.
4 Agenda. Lesson (4): ATMEGA32 Overview
and Main Hardware Connections. Lesson (5): GPIO (General Purpose Input Output) Module. © Mohamed F.A.B 2015
5.
5 Lesson (4) Topics. ©
Mohamed F.A.B 2015 Lesson (4): ATMEGA32 Overview and Main Hardware Connections. ► Take a look in Datasheet. ► ATMEL Code Decoding. ► Main Hardware Connection.
6.
6 ATMEL Code Decoder
(OLD). © Mohamed F.A.B 2015 AT-MEGA-8L-8PI ATMEL Family Flash Size Low Power(2.7V) FOSC PDIP I:industerial C:comertial M:martial
7.
7 ATMEL Code Decoder
(New). © Mohamed F.A.B 2015 AT-MEGA-32A-Px ATMEL Family Flash Size New Generation PU:PDIP AU:SMD
8.
8 Main Hardware Connections. ©
Mohamed F.A.B 2015 RESET. Power Pins (VCC,GND). FOSC (XTAL1,XTAL2).
9.
9 Lesson (5) © Mohamed
F.A.B 2015 Lesson (5): GPIO (General Purpose Input Output) Module.
10.
10 Lesson (5) Topics. ©
Mohamed F.A.B 2015 Lesson (5): GPIO (General Purpose Input Output) Module. ► GPIO in ATMEGA32. ► Control GPIO in ATMEGA32. ► Interfacing LED with MC. ► Interfacing Switch with MC. ► Project (1) Password. ► Project(2) The Game.
11.
11 ATMEGA32 GPIO. © Mohamed
F.A.B 2015 o ATMEGA32 has 32 GPIO Pin. o ATMEGA32 has PORTs (PORTA,PORTB,PORTC,PORTD).
12.
12 GPIO Characteristics in
ATMEGA32. © Mohamed F.A.B 2015 o General Purpose Input Output (GPIO). o Bi-directional I/O s with internal Pull Up Resistors. o Push Pull Outputs ( Source or Sink for current). o GPIOs are Grouped Into Ports Of Up to 8 Pins. o Each IO Pin Has Two Protection Diodes.
13.
13 I/O Equivalent Schematic. ©
Mohamed F.A.B 2015
14.
14 Control GPIO in
ATMEGA32. © Mohamed F.A.B 2015 o DDRx To define if PIN or PORT is Input or Output. o PINxTo receive output from out world. o PORTxTo set value to be out from MC.
15.
15 Example (PORTA)-Datasheet Page
66 © Mohamed F.A.B 2015
16.
16 Accessing I/O ports
in CodeVision. © Mohamed F.A.B 2015 Controlling All PORT Pins: Controlling Single Pin: DDRC=0xFF; //configure all PORTC as output (Hexadecimal Format). DDRC=0b11111111; //configure all PORTC as output (Binary Format). DDRC=255; //configure all PORTC as output (Decimal Format). PORTC=0xF0; PORTC=0b11110000; PORTC=240; DDRC.0=1; //configure PORTC0 pin as output. DDRC.1=0; //configure PORTC1 pin as input. PORTC.0=1; //outing logic 1 (5V) on PORTC0 Pin.
17.
17 Interfacing LEDs with
µC © Mohamed F.A.B 2015
18.
18 LED (Light Emitting
Diode) . © Mohamed F.A.B 2015 o LED stands for Light Emitting Diode. o LED has a polarity.(Anode & Cathode). o LED need almost 10mA and 3V to work.
19.
19 Source & Sink
Current. © Mohamed F.A.B 2015 Source Current. Sink Current NOTES: Source Current is better. At high current: Source: MC will hung up. Sink: MC will be damaged. See Datasheet page 297 (Electrical Characteristics).
20.
20 Interfacing LED with
µC. © Mohamed F.A.B 2015 Now, We need to design a circuit of interfacing LED with µC. I led=10mA. Vled= 3V. V mc= 5V. 𝑅 = 5−3 10 𝑚𝐴 = 2 10 𝑚𝐴 =200Ω. Typical R Value=220Ω or 330 Ω. We need to connect LED to PORTC0 and blinking it every 500 ms. Exercise (1). Don't forget to include delay library header file. #include <delay.h> NOTE
21.
21 Interfacing Buttons with
µC © Mohamed F.A.B 2015
22.
22 Pull Up and
Pull Down Resistors. © Mohamed F.A.B 2015 Pull Up Resistor. Pull Down Resistor. Why use Pull Up and Pull Down. Why use R1? R1 between 4.7K Ω and 10K Ω. Why R1 10K Ω. ATMEGA32 Has an Internal Pull Up Resistor. NOTE
23.
23 Switch bounce and
de-bounce. © Mohamed F.A.B 2015 o Switch De-Bounce Software Solution. Hardware Solution (RC Filter and schmitt Trigger). We need to connect LED to PORTC0 and control it using switch. Exercise (2). Predicted True
24.
24 Switch Key Click
Vs. Key Press. © Mohamed F.A.B 2015 EX: If (sw is pressed) { delay_ms (250); //debounce delay & press wait //statements } o Key Click: A Function For This Button Doesn't Be Executed Until You Release Your Hand From The Button. EX: If (sw is pressed) { delay_ms (10); //debounce delay //statements while (sw is pressed); //still press do nothing } Key Press: A Function Of This Key will be executed as soon as you press the Button.
25.
25 Projects. © Mohamed F.A.B
2015 We need to connect LED on PORTC0 and three buttons (PORTC1,PORTC2,PORTC3) When I press button1 one time,button2 two times and button3 three times, LED on PORTC0 turn ON for 0.5 second. Project (1) Password. We need to connect 8LEDs on PORTC , 8LEDs on PORTB and two buttons (PORTA0 and PORTA1) [the two players]. Every press on button1 (PORTA0) increment PORTC by 1 and Every press on button2 (PORTA1) increment PORTB by 1 and first one reach 255 is the winner. Project (2) The Game.
26.
26 Motivation. © Mohamed F.A.B
2015 We need to connect 5 LEDs to PORTD0 and Flashing it. Exercise (3). Let's Know what is Wrong Next Lecture. NOTE
27.
27 Questions: © Mohamed F.A.B
2015
28.
Thank You All
28 mo7amed.fawzy33@gmail.com 01006032792 fawzy.fab@gmail.com © Mohamed F.A.B 2015
Baixar agora