SlideShare a Scribd company logo
1 of 50
Download to read offline
Linux For Embedded Systems
ForArabs
Ahmed ElArabawy
Cairo University
Computer Eng. Dept.
CMP445-Embedded Systems
Lecture 9:
The Pi Control Arm
A Quick Look at Model B
A Quick Look at Model B
A Quick Look at Model B
Moving to Model B+
Moving to Model B+
Moving to Model B+
Interfacing the Pi
• The Raspberry Pi can be interfaced to external devices and
peripherals via,
• Existing Connectors
• Ethernet, USB, A/V, HDMI, Power, SDIO
• Signal Header Connectors
• GPIO Header (26 pin in B, 40 Pin in B+)
• CSI (For Camera Interface)
• DSI (For Display Interface)
• Unconnected Signal Headers
• These headers need some soldering to use it
• Mainly the chip RESET signal
GPIO Header in Model B
GPIO Header in Model B+
B Versus B+ Models
GPIO Header
• The GPIO header is the main method for hardware interfacing
• In Model B, it contains 26 pins, and in Model B+ it was
upgraded to 40 Pin
• The GPIO header in Model B+ is backward compatible with the
older model, this means that pins 1-26 in model B+ are
identical to those in model B
• This way, any hardware designed to interface with the Model
B can interface with model B+ with no need for any change
GPIO Header Signals
Power/GND
• The Raspberry Pi requires a 5V power line
• This is normally provided using the
Micro-USB Connector
• You can also power the Raspberry Pi
through the GPIO Header
• This is used when the Pi is powered from another
board that is connected to it
• You can also use the power signal in the GPIO
header to power other boards (as long as they are a
light load)
• The Pi can be used to feed power to other boards connected
to it
• The maximum current you can take from the 5V rail is based
on the used power supply
• The board takes around 700 mA from the 5V power supply,
any extra current the power supply can provide can be used to
external circuits
5V vs. 3.3 V
• Note that although that the Pi is powered using 5V, all of its signaling
is done using 3.3V
• This is a VERY IMPORTANT thing to watch for, NEVER connect the Pi
directly to any circuits using 5V signaling
• Note that Arduino uses 5V signaling, so all Arduino circuits can not
be connected to the Pi
• The Pi does not have a over voltage protection for its pins, hence
you can easily destroy the board by connecting it to 5V circuits
• If you need to use chips that run with 5V logic such as those running
with Arduino boards,
• If the chip only takes output from the Pi, sometimes, the 3.3V of the
Pi is good enough for the external chip to detect logic 1
• If the 3.3V of the Pi is not enough to drive the chip, then you need a
3.3V to 5V Level Shifter
• If the chip provides input to the Pi, then you will always need to use a
5V to 3.3V Level Shifter. Not doing that will damage your Pi Board
GPIO Header Signals
3.3V Line
• These pins can be used to provide power to 3.3V circuits (If
not going to overload the Pi)
• This is NOT an input signal, the Pi only takes 5V line, this is an
output line
GPIO Header Signals
GND Line
• These pins represent common signals between the Pi and
external circuits connected to it
GPIO Header Signals
GPIO Signals
• 26 Pin for GPIO (General Purpose Input Output)
• These pins can be programmed to be either input or output signals
• These signals use 3.3V logic
• Some of the GPIO pins have a dual role (either GPIOs or part of another
interface)
• The default for these pins is to be a GPIO, to switch to the other role, you need
to load the driver for the needed interface
GPIO Header Signals
ID EEPROM Signals
• These two pins are introduced in model B+ to enable a new concept
called Raspberry Pi HATs
• A Pi HAT (Hardware Attached on Top), is a daughter board that can
be connected on top of the Pi
• The Pi uses those two pins to read an ID EEPROM that describes the
attached hardware and the required configuration of the GPIO pins
Raspberry Pi HATs
Interfacing to the GPIO Header
• You can connect wires directly to the Pi Header
• However, it is safer to use a breakout connector (also called Cobbler)
• Before you do any hardware connection, make sure that the cable is connected in the right
direction (test that the signals on the breadboard maps correctly to the pins on the Pi)
• Also make sure that no connection or disconnection is done while the Pi is powered on
(power on the Pi after all connections are made, and power it off before any modification in
the connections)
• Review your connections thoroughly before power up of the board. Any mistake can
destroy the board
How to Damage a Pi
• The following actions may destroy the Pi,
• Touching the chips of the Pi (Statics in your body may damage the
chips)
• Connecting the Pi to the wrong Power supply (It is not protected
against over voltage)
• Making new connections in the circuit while the Pi is connected
and powered up (transient currents may result in damage to the
board)
• Disconnecting a USB while the Pi is powered
• Connecting the Pi GPIO to 5V signal (the Pi uses 3.3V signaling )
• Connecting the output of a device to a Pi GPIO while it is
configured as output
• Connecting an output GPIO directly to GND or Vcc
Basic Concepts for
Electronic Circuits
Current Limiting Resistors
• We use resistance in our electronic circuits to limit the current
running in the circuit
• In our circuits, we need to always calculate the expected
current to make sure we are not overloading the Raspberry
board
• For the GPIO Pins (3.3V signaling), each pin can provide a
maximum of 50 mA. Beyond that you can damage the board
Using LEDs
• LED (Light Emitting Diode) is used to show the status of a signal
• When it is high, the LED emits light, otherwise it remains off
• A LED is some sort of a diode, which means current only goes in one
direction, from anode to Cathode
Interfacing to O/P GPIO
Using a BreadBoard
Making the Connection
Using Multiple LEDs
Using 7 Segment Display
GND
GPIOs
Interfacing to I/P GPIO
• Now we program the GPIO as an input pin
• If the switch is pressed, a logic 0 is sent to the GPIO
• But if the switch is left open, what is the input to the GPIO pin?
• We need to use a pull up resistor
Interfacing to I/P GPIO
• Now we program the GPIO as an input pin
• If the switch is pressed, a logic 0 is sent to the GPIO
• But if the switch is left open, what is the input to the GPIO pin?
• We need to use a pull up resistor
• We can reverse the role of the switch (input signal is high when pressed, and low when not
pressed)
• In this case the resistor is called pull down resistor
• Note that the raspberry pi has internal pull up and pull down resistors for all input GPIOs,
and they can be enabled/disabled through programming
Using Pull Up Resistor
Using Pull down Resistor
Both I/P & O/P GPIOs
3.3V
Both I/P & O/P GPIOs
Both I/P & O/P GPIOs
O
/
P
I
/
P
Handling Bigger loads
• The Pi GPIO can drive a max of 50 mA
• This is suitable for simple logic circuits or a LED
• However this is not enough to drive bigger loads like a motor
• Also, some loads needs higher voltage than 3.3V
• For all of these cases, connecting the Pi GPIO pin directly to
the load will not work, and may damage the Pi
• The solution for these situations is to use a transistor
• The transistor can be used in different modes, but in this case
it is used as a switch controller by the GPIO pin
• The GPIO pin acts a controller for that switch while the
transistor provides the load with the higher current/voltage
Using a Transistor
Using a Transistor
Transistor Form Factor
Connection Types
Point-to-Point
• In point to point connections,
• One side is the output and the other side is the input
• In some cases, the two sides may change roles
• But we always have, one input and one output
Connection Types
Bus Connection
• In Bus connection,
• Multiple entities connected to the same line
• At any point in time, only one chip is enabled as output, and at least one entity
enabled as input
• We can not have multiple output signals connected together
• We need chip select signals to tell which chip should enable its output, and which
one should disable it
Bus Connection
• This means, that for an output signal to work on a bus it should be
able to have 3 states
• High/Low
• Not Connected (High Impedance)
• An output is put in High Impedance, when the chip is not selected,
and the output is driven by a different chip
Open Drain/Collector Output
• Open Drain (or Open Collector) Output can be in one of two states,
• Low
• High Impedance (non-connected)
• This means that, when it is in non-connected state, it should be
interpreted as high
• This means we need a pull up resistor to force that
Clock Signal
• A lot of times we need a clock signal to synchronize different
components in the system (to add a rhythm)
• Sometimes actions are triggered by the rising edge of the clock
• Other times actions are triggered by the falling edge
• Sometimes some action is triggered by the rising edge, while others
are triggered by the falling edge, to make sure that they don’t
overlap
• The frequency of the clock defines the speed of the circuit (number
of actions that can be performed per second)
http://Linux4EmbeddedSystems.com

More Related Content

What's hot

Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]Guhan k
 
RF based Wireless Robot using 8051 Microcontroller
RF based Wireless Robot using 8051 MicrocontrollerRF based Wireless Robot using 8051 Microcontroller
RF based Wireless Robot using 8051 MicrocontrollerRahul Kumar
 
Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)Daman Singh
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Aarav Soni
 
8-bit PIC Microcontrollers
8-bit PIC Microcontrollers8-bit PIC Microcontrollers
8-bit PIC MicrocontrollersPremier Farnell
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral InterfaceChirag Parikh
 
Programming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontrollerProgramming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontrollerCorrado Santoro
 
Interfacing to the analog world
Interfacing to the analog worldInterfacing to the analog world
Interfacing to the analog worldIslam Samir
 
Sensor interfacing in 8051
Sensor interfacing in 8051Sensor interfacing in 8051
Sensor interfacing in 8051Irfan Ahmad
 
arm complete detail part 2
arm complete detail part 2arm complete detail part 2
arm complete detail part 2NOWAY
 

What's hot (20)

Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]
 
Digital i o
Digital i oDigital i o
Digital i o
 
Spi
SpiSpi
Spi
 
RF based Wireless Robot using 8051 Microcontroller
RF based Wireless Robot using 8051 MicrocontrollerRF based Wireless Robot using 8051 Microcontroller
RF based Wireless Robot using 8051 Microcontroller
 
Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)Pic ppt 13104022(4th_year)
Pic ppt 13104022(4th_year)
 
Spi in arm7(lpc2148)
Spi in arm7(lpc2148)Spi in arm7(lpc2148)
Spi in arm7(lpc2148)
 
8-bit PIC Microcontrollers
8-bit PIC Microcontrollers8-bit PIC Microcontrollers
8-bit PIC Microcontrollers
 
SPI Protocol
SPI ProtocolSPI Protocol
SPI Protocol
 
Intrerfacing i
Intrerfacing iIntrerfacing i
Intrerfacing i
 
Lpc2148 i2c
Lpc2148 i2cLpc2148 i2c
Lpc2148 i2c
 
Serial Peripheral Interface
Serial Peripheral InterfaceSerial Peripheral Interface
Serial Peripheral Interface
 
Programming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontrollerProgramming the Digital I/O Interface of a PIC microcontroller
Programming the Digital I/O Interface of a PIC microcontroller
 
Smart home arduino
Smart home   arduinoSmart home   arduino
Smart home arduino
 
Project
ProjectProject
Project
 
Interfacing to the analog world
Interfacing to the analog worldInterfacing to the analog world
Interfacing to the analog world
 
Chapter5 dek3133
Chapter5 dek3133Chapter5 dek3133
Chapter5 dek3133
 
Sensor interfacing in 8051
Sensor interfacing in 8051Sensor interfacing in 8051
Sensor interfacing in 8051
 
arm complete detail part 2
arm complete detail part 2arm complete detail part 2
arm complete detail part 2
 
I o ports.ppt
I o ports.pptI o ports.ppt
I o ports.ppt
 
SPI Protocol in LPC2148
SPI  Protocol in LPC2148SPI  Protocol in LPC2148
SPI Protocol in LPC2148
 

Viewers also liked

Aurdidino1 anurag preetirajesh-sgsits
Aurdidino1  anurag preetirajesh-sgsitsAurdidino1  anurag preetirajesh-sgsits
Aurdidino1 anurag preetirajesh-sgsitsanurag278
 
Microcontroller Programming & Hardware Introduction
Microcontroller Programming & Hardware IntroductionMicrocontroller Programming & Hardware Introduction
Microcontroller Programming & Hardware IntroductionJoseph Sanchez
 
Development platforms for startups by shawn gosh at guru program spring 2014
Development platforms for startups by shawn gosh at guru program spring 2014Development platforms for startups by shawn gosh at guru program spring 2014
Development platforms for startups by shawn gosh at guru program spring 2014TechMeetups
 
Analog, IO Test Chip Validation
Analog,  IO Test Chip  ValidationAnalog,  IO Test Chip  Validation
Analog, IO Test Chip ValidationSMIT A. PATEL
 
Embedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNUEmbedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNUAhmed El-Arabawy
 
Embedded Systems: Lecture 8: The Raspberry Pi as a Linux Box
Embedded Systems: Lecture 8: The Raspberry Pi as a Linux BoxEmbedded Systems: Lecture 8: The Raspberry Pi as a Linux Box
Embedded Systems: Lecture 8: The Raspberry Pi as a Linux BoxAhmed El-Arabawy
 
Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Ahmed El-Arabawy
 
Course 101: Lecture 4: A Tour in RTOS Land
Course 101: Lecture 4: A Tour in RTOS Land Course 101: Lecture 4: A Tour in RTOS Land
Course 101: Lecture 4: A Tour in RTOS Land Ahmed El-Arabawy
 
Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems Ahmed El-Arabawy
 
Course 102: Lecture 6: Seeking Help
Course 102: Lecture 6: Seeking HelpCourse 102: Lecture 6: Seeking Help
Course 102: Lecture 6: Seeking HelpAhmed El-Arabawy
 
Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Ahmed El-Arabawy
 
Course 101: Lecture 6: Installing Ubuntu
Course 101: Lecture 6: Installing Ubuntu Course 101: Lecture 6: Installing Ubuntu
Course 101: Lecture 6: Installing Ubuntu Ahmed El-Arabawy
 
Course 102: Lecture 4: Using Wild Cards
Course 102: Lecture 4: Using Wild CardsCourse 102: Lecture 4: Using Wild Cards
Course 102: Lecture 4: Using Wild CardsAhmed El-Arabawy
 
Course 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded SystemsCourse 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded SystemsAhmed El-Arabawy
 
Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Ahmed El-Arabawy
 
Course 102: Lecture 2: Unwrapping Linux
Course 102: Lecture 2: Unwrapping Linux Course 102: Lecture 2: Unwrapping Linux
Course 102: Lecture 2: Unwrapping Linux Ahmed El-Arabawy
 
Embedded Systems: Lecture 5: A Tour in RTOS Land
Embedded Systems: Lecture 5: A Tour in RTOS LandEmbedded Systems: Lecture 5: A Tour in RTOS Land
Embedded Systems: Lecture 5: A Tour in RTOS LandAhmed El-Arabawy
 
Course 102: Lecture 1: Course Overview
Course 102: Lecture 1: Course Overview Course 102: Lecture 1: Course Overview
Course 102: Lecture 1: Course Overview Ahmed El-Arabawy
 
Embedded Systems: Lecture 7: Lab 1: Preparing the Raspberry Pi
Embedded Systems: Lecture 7: Lab 1: Preparing the Raspberry PiEmbedded Systems: Lecture 7: Lab 1: Preparing the Raspberry Pi
Embedded Systems: Lecture 7: Lab 1: Preparing the Raspberry PiAhmed El-Arabawy
 
Embedded Systems: Lecture 4: Selecting the Proper RTOS
Embedded Systems: Lecture 4: Selecting the Proper RTOSEmbedded Systems: Lecture 4: Selecting the Proper RTOS
Embedded Systems: Lecture 4: Selecting the Proper RTOSAhmed El-Arabawy
 

Viewers also liked (20)

Aurdidino1 anurag preetirajesh-sgsits
Aurdidino1  anurag preetirajesh-sgsitsAurdidino1  anurag preetirajesh-sgsits
Aurdidino1 anurag preetirajesh-sgsits
 
Microcontroller Programming & Hardware Introduction
Microcontroller Programming & Hardware IntroductionMicrocontroller Programming & Hardware Introduction
Microcontroller Programming & Hardware Introduction
 
Development platforms for startups by shawn gosh at guru program spring 2014
Development platforms for startups by shawn gosh at guru program spring 2014Development platforms for startups by shawn gosh at guru program spring 2014
Development platforms for startups by shawn gosh at guru program spring 2014
 
Analog, IO Test Chip Validation
Analog,  IO Test Chip  ValidationAnalog,  IO Test Chip  Validation
Analog, IO Test Chip Validation
 
Embedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNUEmbedded Systems: Lecture 6: Linux & GNU
Embedded Systems: Lecture 6: Linux & GNU
 
Embedded Systems: Lecture 8: The Raspberry Pi as a Linux Box
Embedded Systems: Lecture 8: The Raspberry Pi as a Linux BoxEmbedded Systems: Lecture 8: The Raspberry Pi as a Linux Box
Embedded Systems: Lecture 8: The Raspberry Pi as a Linux Box
 
Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities Course 102: Lecture 7: Simple Utilities
Course 102: Lecture 7: Simple Utilities
 
Course 101: Lecture 4: A Tour in RTOS Land
Course 101: Lecture 4: A Tour in RTOS Land Course 101: Lecture 4: A Tour in RTOS Land
Course 101: Lecture 4: A Tour in RTOS Land
 
Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems
 
Course 102: Lecture 6: Seeking Help
Course 102: Lecture 6: Seeking HelpCourse 102: Lecture 6: Seeking Help
Course 102: Lecture 6: Seeking Help
 
Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands Course 102: Lecture 3: Basic Concepts And Commands
Course 102: Lecture 3: Basic Concepts And Commands
 
Course 101: Lecture 6: Installing Ubuntu
Course 101: Lecture 6: Installing Ubuntu Course 101: Lecture 6: Installing Ubuntu
Course 101: Lecture 6: Installing Ubuntu
 
Course 102: Lecture 4: Using Wild Cards
Course 102: Lecture 4: Using Wild CardsCourse 102: Lecture 4: Using Wild Cards
Course 102: Lecture 4: Using Wild Cards
 
Course 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded SystemsCourse 101: Lecture 1: Introduction to Embedded Systems
Course 101: Lecture 1: Introduction to Embedded Systems
 
Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU
 
Course 102: Lecture 2: Unwrapping Linux
Course 102: Lecture 2: Unwrapping Linux Course 102: Lecture 2: Unwrapping Linux
Course 102: Lecture 2: Unwrapping Linux
 
Embedded Systems: Lecture 5: A Tour in RTOS Land
Embedded Systems: Lecture 5: A Tour in RTOS LandEmbedded Systems: Lecture 5: A Tour in RTOS Land
Embedded Systems: Lecture 5: A Tour in RTOS Land
 
Course 102: Lecture 1: Course Overview
Course 102: Lecture 1: Course Overview Course 102: Lecture 1: Course Overview
Course 102: Lecture 1: Course Overview
 
Embedded Systems: Lecture 7: Lab 1: Preparing the Raspberry Pi
Embedded Systems: Lecture 7: Lab 1: Preparing the Raspberry PiEmbedded Systems: Lecture 7: Lab 1: Preparing the Raspberry Pi
Embedded Systems: Lecture 7: Lab 1: Preparing the Raspberry Pi
 
Embedded Systems: Lecture 4: Selecting the Proper RTOS
Embedded Systems: Lecture 4: Selecting the Proper RTOSEmbedded Systems: Lecture 4: Selecting the Proper RTOS
Embedded Systems: Lecture 4: Selecting the Proper RTOS
 

Similar to Embedded Systems: Lecture 9: The Pi Control ARM

IoT Physical Devices and End Points.pdf
IoT Physical Devices and End Points.pdfIoT Physical Devices and End Points.pdf
IoT Physical Devices and End Points.pdfGVNSK Sravya
 
Building the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry PiBuilding the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry PiNeil Broers
 
Got Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIOGot Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIOAdam Englander
 
Arduino Foundations
Arduino FoundationsArduino Foundations
Arduino FoundationsJohn Breslin
 
teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxethannguyen1618
 
ArduinoSectionI-slides.ppt
ArduinoSectionI-slides.pptArduinoSectionI-slides.ppt
ArduinoSectionI-slides.pptLam Hung
 
Introduction to Arduino Webinar
Introduction to Arduino WebinarIntroduction to Arduino Webinar
Introduction to Arduino WebinarFragiskos Fourlas
 
Sensor and Actuators using Rasberry Pi controller
Sensor and Actuators using Rasberry Pi controllerSensor and Actuators using Rasberry Pi controller
Sensor and Actuators using Rasberry Pi controllerArsalanAthar
 
Arduino windows remote control
Arduino windows remote controlArduino windows remote control
Arduino windows remote controlVilayatAli5
 
Ins and Outs of GPIO Programming
Ins and Outs of GPIO ProgrammingIns and Outs of GPIO Programming
Ins and Outs of GPIO ProgrammingICS
 
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.pptMECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.pptCHANDRA KUMAR S
 
Input-Output Interfacing for LED and Switch
Input-Output Interfacing for LED and SwitchInput-Output Interfacing for LED and Switch
Input-Output Interfacing for LED and SwitchRanaKhizar7
 
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)02 Raspberry Pi GPIO Interface on Node-RED (Some correction)
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)Mr.Nukoon Phimsen
 

Similar to Embedded Systems: Lecture 9: The Pi Control ARM (20)

IoT Physical Devices and End Points.pdf
IoT Physical Devices and End Points.pdfIoT Physical Devices and End Points.pdf
IoT Physical Devices and End Points.pdf
 
Building the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry PiBuilding the Internet of Things with Raspberry Pi
Building the Internet of Things with Raspberry Pi
 
Arduino
ArduinoArduino
Arduino
 
Got Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIOGot Python I/O: IoT Develoment in Python via GPIO
Got Python I/O: IoT Develoment in Python via GPIO
 
intro_mcu.pdf
intro_mcu.pdfintro_mcu.pdf
intro_mcu.pdf
 
IoT Aquarium 2
IoT Aquarium 2IoT Aquarium 2
IoT Aquarium 2
 
Arduino Foundations
Arduino FoundationsArduino Foundations
Arduino Foundations
 
teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptx
 
ArduinoSectionI-slides.ppt
ArduinoSectionI-slides.pptArduinoSectionI-slides.ppt
ArduinoSectionI-slides.ppt
 
Introduction to Arduino Webinar
Introduction to Arduino WebinarIntroduction to Arduino Webinar
Introduction to Arduino Webinar
 
Sensor and Actuators using Rasberry Pi controller
Sensor and Actuators using Rasberry Pi controllerSensor and Actuators using Rasberry Pi controller
Sensor and Actuators using Rasberry Pi controller
 
Arduino windows remote control
Arduino windows remote controlArduino windows remote control
Arduino windows remote control
 
Ins and Outs of GPIO Programming
Ins and Outs of GPIO ProgrammingIns and Outs of GPIO Programming
Ins and Outs of GPIO Programming
 
Measurements upload
Measurements uploadMeasurements upload
Measurements upload
 
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.pptMECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
MECHATRONICS-Unit 3-PROGRAMMABLE PERIPERAL INTERFACE.ppt
 
Input-Output Interfacing for LED and Switch
Input-Output Interfacing for LED and SwitchInput-Output Interfacing for LED and Switch
Input-Output Interfacing for LED and Switch
 
Day4
Day4Day4
Day4
 
PPI-MECHATRONICS
PPI-MECHATRONICSPPI-MECHATRONICS
PPI-MECHATRONICS
 
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)02 Raspberry Pi GPIO Interface on Node-RED (Some correction)
02 Raspberry Pi GPIO Interface on Node-RED (Some correction)
 
Port Interfacing
Port InterfacingPort Interfacing
Port Interfacing
 

More from Ahmed El-Arabawy

Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems Ahmed El-Arabawy
 
Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)Ahmed El-Arabawy
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Ahmed El-Arabawy
 
Course 102: Lecture 25: Devices and Device Drivers
Course 102: Lecture 25: Devices and Device Drivers Course 102: Lecture 25: Devices and Device Drivers
Course 102: Lecture 25: Devices and Device Drivers Ahmed El-Arabawy
 
Course 102: Lecture 24: Archiving and Compression of Files
Course 102: Lecture 24: Archiving and Compression of Files Course 102: Lecture 24: Archiving and Compression of Files
Course 102: Lecture 24: Archiving and Compression of Files Ahmed El-Arabawy
 
Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management Ahmed El-Arabawy
 
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts) Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts) Ahmed El-Arabawy
 
Course 102: Lecture 19: Using Signals
Course 102: Lecture 19: Using Signals Course 102: Lecture 19: Using Signals
Course 102: Lecture 19: Using Signals Ahmed El-Arabawy
 
Course 102: Lecture 18: Process Life Cycle
Course 102: Lecture 18: Process Life CycleCourse 102: Lecture 18: Process Life Cycle
Course 102: Lecture 18: Process Life CycleAhmed El-Arabawy
 
Course 102: Lecture 17: Process Monitoring
Course 102: Lecture 17: Process Monitoring Course 102: Lecture 17: Process Monitoring
Course 102: Lecture 17: Process Monitoring Ahmed El-Arabawy
 
Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Ahmed El-Arabawy
 
Course 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsCourse 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsAhmed El-Arabawy
 
Course 102: Lecture 13: Regular Expressions
Course 102: Lecture 13: Regular Expressions Course 102: Lecture 13: Regular Expressions
Course 102: Lecture 13: Regular Expressions Ahmed El-Arabawy
 
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Ahmed El-Arabawy
 
Course 102: Lecture 11: Environment Variables
Course 102: Lecture 11: Environment VariablesCourse 102: Lecture 11: Environment Variables
Course 102: Lecture 11: Environment VariablesAhmed El-Arabawy
 
Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell Ahmed El-Arabawy
 
Course 102: Lecture 9: Input Output Internals
Course 102: Lecture 9: Input Output Internals Course 102: Lecture 9: Input Output Internals
Course 102: Lecture 9: Input Output Internals Ahmed El-Arabawy
 
Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Ahmed El-Arabawy
 
Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Ahmed El-Arabawy
 

More from Ahmed El-Arabawy (20)

C 102 lec_29_what_s_next
C 102 lec_29_what_s_nextC 102 lec_29_what_s_next
C 102 lec_29_what_s_next
 
Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems
 
Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)Course 102: Lecture 27: FileSystems in Linux (Part 2)
Course 102: Lecture 27: FileSystems in Linux (Part 2)
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1)
 
Course 102: Lecture 25: Devices and Device Drivers
Course 102: Lecture 25: Devices and Device Drivers Course 102: Lecture 25: Devices and Device Drivers
Course 102: Lecture 25: Devices and Device Drivers
 
Course 102: Lecture 24: Archiving and Compression of Files
Course 102: Lecture 24: Archiving and Compression of Files Course 102: Lecture 24: Archiving and Compression of Files
Course 102: Lecture 24: Archiving and Compression of Files
 
Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management
 
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts) Course 102: Lecture 20: Networking In Linux (Basic Concepts)
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
 
Course 102: Lecture 19: Using Signals
Course 102: Lecture 19: Using Signals Course 102: Lecture 19: Using Signals
Course 102: Lecture 19: Using Signals
 
Course 102: Lecture 18: Process Life Cycle
Course 102: Lecture 18: Process Life CycleCourse 102: Lecture 18: Process Life Cycle
Course 102: Lecture 18: Process Life Cycle
 
Course 102: Lecture 17: Process Monitoring
Course 102: Lecture 17: Process Monitoring Course 102: Lecture 17: Process Monitoring
Course 102: Lecture 17: Process Monitoring
 
Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2) Course 102: Lecture 16: Process Management (Part 2)
Course 102: Lecture 16: Process Management (Part 2)
 
Course 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsCourse 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and Permissions
 
Course 102: Lecture 13: Regular Expressions
Course 102: Lecture 13: Regular Expressions Course 102: Lecture 13: Regular Expressions
Course 102: Lecture 13: Regular Expressions
 
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling
 
Course 102: Lecture 11: Environment Variables
Course 102: Lecture 11: Environment VariablesCourse 102: Lecture 11: Environment Variables
Course 102: Lecture 11: Environment Variables
 
Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell
 
Course 102: Lecture 9: Input Output Internals
Course 102: Lecture 9: Input Output Internals Course 102: Lecture 9: Input Output Internals
Course 102: Lecture 9: Input Output Internals
 
Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands Course 102: Lecture 8: Composite Commands
Course 102: Lecture 8: Composite Commands
 
Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals Course 102: Lecture 5: File Handling Internals
Course 102: Lecture 5: File Handling Internals
 

Recently uploaded

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Embedded Systems: Lecture 9: The Pi Control ARM

  • 1. Linux For Embedded Systems ForArabs Ahmed ElArabawy Cairo University Computer Eng. Dept. CMP445-Embedded Systems
  • 2. Lecture 9: The Pi Control Arm
  • 3. A Quick Look at Model B
  • 4. A Quick Look at Model B
  • 5. A Quick Look at Model B
  • 9. Interfacing the Pi • The Raspberry Pi can be interfaced to external devices and peripherals via, • Existing Connectors • Ethernet, USB, A/V, HDMI, Power, SDIO • Signal Header Connectors • GPIO Header (26 pin in B, 40 Pin in B+) • CSI (For Camera Interface) • DSI (For Display Interface) • Unconnected Signal Headers • These headers need some soldering to use it • Mainly the chip RESET signal
  • 10. GPIO Header in Model B
  • 11. GPIO Header in Model B+
  • 12. B Versus B+ Models
  • 13. GPIO Header • The GPIO header is the main method for hardware interfacing • In Model B, it contains 26 pins, and in Model B+ it was upgraded to 40 Pin • The GPIO header in Model B+ is backward compatible with the older model, this means that pins 1-26 in model B+ are identical to those in model B • This way, any hardware designed to interface with the Model B can interface with model B+ with no need for any change
  • 14. GPIO Header Signals Power/GND • The Raspberry Pi requires a 5V power line • This is normally provided using the Micro-USB Connector • You can also power the Raspberry Pi through the GPIO Header • This is used when the Pi is powered from another board that is connected to it • You can also use the power signal in the GPIO header to power other boards (as long as they are a light load)
  • 15. • The Pi can be used to feed power to other boards connected to it • The maximum current you can take from the 5V rail is based on the used power supply • The board takes around 700 mA from the 5V power supply, any extra current the power supply can provide can be used to external circuits
  • 16. 5V vs. 3.3 V • Note that although that the Pi is powered using 5V, all of its signaling is done using 3.3V • This is a VERY IMPORTANT thing to watch for, NEVER connect the Pi directly to any circuits using 5V signaling • Note that Arduino uses 5V signaling, so all Arduino circuits can not be connected to the Pi • The Pi does not have a over voltage protection for its pins, hence you can easily destroy the board by connecting it to 5V circuits • If you need to use chips that run with 5V logic such as those running with Arduino boards, • If the chip only takes output from the Pi, sometimes, the 3.3V of the Pi is good enough for the external chip to detect logic 1 • If the 3.3V of the Pi is not enough to drive the chip, then you need a 3.3V to 5V Level Shifter • If the chip provides input to the Pi, then you will always need to use a 5V to 3.3V Level Shifter. Not doing that will damage your Pi Board
  • 17. GPIO Header Signals 3.3V Line • These pins can be used to provide power to 3.3V circuits (If not going to overload the Pi) • This is NOT an input signal, the Pi only takes 5V line, this is an output line
  • 18. GPIO Header Signals GND Line • These pins represent common signals between the Pi and external circuits connected to it
  • 19. GPIO Header Signals GPIO Signals • 26 Pin for GPIO (General Purpose Input Output) • These pins can be programmed to be either input or output signals • These signals use 3.3V logic • Some of the GPIO pins have a dual role (either GPIOs or part of another interface) • The default for these pins is to be a GPIO, to switch to the other role, you need to load the driver for the needed interface
  • 20. GPIO Header Signals ID EEPROM Signals • These two pins are introduced in model B+ to enable a new concept called Raspberry Pi HATs • A Pi HAT (Hardware Attached on Top), is a daughter board that can be connected on top of the Pi • The Pi uses those two pins to read an ID EEPROM that describes the attached hardware and the required configuration of the GPIO pins
  • 22. Interfacing to the GPIO Header • You can connect wires directly to the Pi Header • However, it is safer to use a breakout connector (also called Cobbler) • Before you do any hardware connection, make sure that the cable is connected in the right direction (test that the signals on the breadboard maps correctly to the pins on the Pi) • Also make sure that no connection or disconnection is done while the Pi is powered on (power on the Pi after all connections are made, and power it off before any modification in the connections) • Review your connections thoroughly before power up of the board. Any mistake can destroy the board
  • 23. How to Damage a Pi • The following actions may destroy the Pi, • Touching the chips of the Pi (Statics in your body may damage the chips) • Connecting the Pi to the wrong Power supply (It is not protected against over voltage) • Making new connections in the circuit while the Pi is connected and powered up (transient currents may result in damage to the board) • Disconnecting a USB while the Pi is powered • Connecting the Pi GPIO to 5V signal (the Pi uses 3.3V signaling ) • Connecting the output of a device to a Pi GPIO while it is configured as output • Connecting an output GPIO directly to GND or Vcc
  • 25. Current Limiting Resistors • We use resistance in our electronic circuits to limit the current running in the circuit • In our circuits, we need to always calculate the expected current to make sure we are not overloading the Raspberry board • For the GPIO Pins (3.3V signaling), each pin can provide a maximum of 50 mA. Beyond that you can damage the board
  • 26. Using LEDs • LED (Light Emitting Diode) is used to show the status of a signal • When it is high, the LED emits light, otherwise it remains off • A LED is some sort of a diode, which means current only goes in one direction, from anode to Cathode
  • 31. Using 7 Segment Display
  • 33. Interfacing to I/P GPIO • Now we program the GPIO as an input pin • If the switch is pressed, a logic 0 is sent to the GPIO • But if the switch is left open, what is the input to the GPIO pin? • We need to use a pull up resistor
  • 34. Interfacing to I/P GPIO • Now we program the GPIO as an input pin • If the switch is pressed, a logic 0 is sent to the GPIO • But if the switch is left open, what is the input to the GPIO pin? • We need to use a pull up resistor • We can reverse the role of the switch (input signal is high when pressed, and low when not pressed) • In this case the resistor is called pull down resistor • Note that the raspberry pi has internal pull up and pull down resistors for all input GPIOs, and they can be enabled/disabled through programming
  • 35. Using Pull Up Resistor
  • 36. Using Pull down Resistor
  • 37. Both I/P & O/P GPIOs 3.3V
  • 38. Both I/P & O/P GPIOs
  • 39. Both I/P & O/P GPIOs O / P I / P
  • 40. Handling Bigger loads • The Pi GPIO can drive a max of 50 mA • This is suitable for simple logic circuits or a LED • However this is not enough to drive bigger loads like a motor • Also, some loads needs higher voltage than 3.3V • For all of these cases, connecting the Pi GPIO pin directly to the load will not work, and may damage the Pi • The solution for these situations is to use a transistor • The transistor can be used in different modes, but in this case it is used as a switch controller by the GPIO pin • The GPIO pin acts a controller for that switch while the transistor provides the load with the higher current/voltage
  • 43.
  • 45. Connection Types Point-to-Point • In point to point connections, • One side is the output and the other side is the input • In some cases, the two sides may change roles • But we always have, one input and one output
  • 46. Connection Types Bus Connection • In Bus connection, • Multiple entities connected to the same line • At any point in time, only one chip is enabled as output, and at least one entity enabled as input • We can not have multiple output signals connected together • We need chip select signals to tell which chip should enable its output, and which one should disable it
  • 47. Bus Connection • This means, that for an output signal to work on a bus it should be able to have 3 states • High/Low • Not Connected (High Impedance) • An output is put in High Impedance, when the chip is not selected, and the output is driven by a different chip
  • 48. Open Drain/Collector Output • Open Drain (or Open Collector) Output can be in one of two states, • Low • High Impedance (non-connected) • This means that, when it is in non-connected state, it should be interpreted as high • This means we need a pull up resistor to force that
  • 49. Clock Signal • A lot of times we need a clock signal to synchronize different components in the system (to add a rhythm) • Sometimes actions are triggered by the rising edge of the clock • Other times actions are triggered by the falling edge • Sometimes some action is triggered by the rising edge, while others are triggered by the falling edge, to make sure that they don’t overlap • The frequency of the clock defines the speed of the circuit (number of actions that can be performed per second)