Raspberry Pi. Hans- Petter Halvorsen, M.Sc.



Similar documents
Elettronica dei Sistemi Digitali Costantino Giaconia SERIAL I/O COMMON PROTOCOLS

SPI I2C LIN Ethernet. u Today: Wired embedded networks. u Next lecture: CAN bus u Then: wireless embedded network

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

SABRE Lite Development Kit

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

Banana Pi Open-Source Router Board

Quick Start Guide. The Raspberry Pi Single Board Computer. Source: Raspberry Pi & Wiki

Sam440ep-flex User Guide

USB 2.0 USB 2.0 ETHERNET AUDIO JACK AND RCA VIDEO HDMI MICRO SD CARD MICRO USB POWER

Pmod peripheral modules are powered by the host via the interface s power and ground pins.

USER GUIDE EDBG. Description

Universal EXTension connector (UEXT)

4/2/2014 Linux Dev-Boards. Linux Dev Boards. Tagung Forth Gesellschaft e.v. Maerz file:///home/cas/talk/linux-boards/html/linux-boards.

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

FTDI Chip. VM800P Datasheet Embedded Video Engine Plus Module. VM800P Embedded Video Engine Plus Module Datasheet Version 1.0

Serial Communications

UniPi technical documentation REV 1.1

Video/Cameras, High Bandwidth Data Handling on imx6 Cortex-A9 Single Board Computer

ARM Cortex -A8 SBC with MIPI CSI Camera and Spartan -6 FPGA SBC1654

5inch HDMI LCD User Manual

HARDWARE MANUAL. BrightSign HD120, HD220, HD1020. BrightSign, LLC Lark Ave., Suite 200 Los Gatos, CA

Introduction. Getting familiar with chipkit Pi

HP4000EX Hardware Manual

Embedded Systems Design Course Applying the mbed microcontroller

A DIY Hardware Packet Sniffer

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

WICE-SPI Hardware Operation Manual

Data Transfer between Two USB Flash SCSI Disks using a Touch Screen

PN532 NFC RFID Module User Guide

Camera Sensor Driver Development And Integration

Serial Communications

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

Lab Experiment 1: The LPC 2148 Education Board

LIVE STREAMING MOTION DETECTION CAMERA SECURITY SYSTEM WITH NOTIFICATION USING RASPBERRY PI Angela Antony 1, Prof. G. R.

Chapter 13. PIC Family Microcontroller

SBC8600B Single Board Computer

FLYPORT Wi-Fi G

Live Streaming Motion Detection Camera Security System with Notification using Raspberry Pi

Implementing SPI Communication Between MSP430 G2452 and LTC ADC

Computer Systems Structure Input/Output

Web Site: Forums: forums.parallax.com Sales: Technical:

Using the HT46R46 I/O Ports to Implement Half-Duplex SPI Communication

Serial Communications (Chapter 10) RS232, SPI, I2C

EZmoto V2. Product description Rev. 6 10/01/2014. EZmoto V2 Product description Rev.6 10/01/2014

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

Microtronics technologies Mobile:

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

PolyBot Board. User's Guide V1.11 9/20/08

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Qt on Raspberry Pi. Jeff Tranter Integrated Computer Solutions (ICS) Qt Developer Days

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

for Windows Media Center User's Guide

Modular I/O system Rugged Modular I/O System Solutions EN certified for railway applications

PROGRAMMABLE WIRELESS STAMP (PWS) USER MANUAL

HARDWARE MANUAL HD222, HD1022. BrightSign, LLC Lark Ave., Suite B Los Gatos, CA

Chapter 1 Hardware and Software Introductions of pcduino

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

Operator Touch Panel PC OTP/57V esom2586 / x86

HARDWARE MANUAL. BrightSign XD230, XD1030, XD1230. BrightSign, LLC Lark Ave., Suite B Los Gatos, CA

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

PU-USBX. USB over Ethernet Extender OPERATION MANUAL

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Yun Shield User Manual VERSION: 1.0. Yun Shield User Manual 1 / 22.

The Programming Interface

MicroMag3 3-Axis Magnetic Sensor Module

Future Technology Devices International Ltd

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

Strato Pi Hardware Guide

USB 3.0 to HDMI External Multi Monitor Graphics Adapter with 3-Port USB Hub HDMI and USB 3.0 Mini Dock 1920x1200 / 1080p

+Denotes lead-free and RoHS-compliant. C5 C10, C17, C18

Lecture 2: Computer Hardware and Ports.

Understanding Digital Components

Microcontrollers in Practice

Java Embedded Applications

IAdea GPIO Extender Application Note

Serial port interface for microcontroller embedded into integrated power meter

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Eureka Technology. Understanding SD, SDIO and MMC Interface. by Eureka Technology Inc. May 26th, Copyright (C) All Rights Reserved

Our innovation, Your Applications. Your Own Custom Embedded Board in 5 weeks!

System Design Issues in Embedded Processing

SNC-VL10P Video Network Camera

ABACOM - netpio.

Future Technology Devices International Ltd. FT311D

UM I 2 C-bus specification and user manual. Document information

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence :

udrive-usd-g1 Embedded DOS micro-drive Module Data Sheet

Chapter 5 Cubix XP4 Blade Server

SafeSPI - Serial Peripheral Interface for Automotive Safety

Cisco MCS 7816-I3 Unified Communications Manager Appliance

System-on-a-Chip with Security Modules for Network Home Electric Appliances

Standardization with ARM on COM Qseven. Zeljko Loncaric, Marketing engineer congatec

TI ARM Lab 7 Accelerometers

SNAPPIN.IO. FWR is a Hardware & Software Factory, which designs and develops digital platforms.

Switch board datasheet EB

Web Site: Forums: forums.parallax.com Sales: Technical:

Design and Functional Verification of A SPI Master Slave Core Using System Verilog

Transcription:

Raspberry Pi Hans- Petter Halvorsen, M.Sc.

Raspberry Pi 2 https://www.raspberrypi.org https://dev.windows.com/iot Hans- Petter Halvorsen, M.Sc.

Raspberry Pi 2 - Overview The Raspberry Pi 2 is a low cost, credit- card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. The Raspberry Pi 2 can run Windows 10 IoT Core. A 900MHz quad- core ARM Cortex- A7 CPU, 1GB RAM Windows 10 IoT Core 3.5mm audio jack/composite video Small- Scale Computer 13x - GPIO pins 2x - SPI buses 1x - I2C bus 2x - 5V power pins 2x - 3.3V power pins 8x - Ground pins

Raspberry Pi 2 - Connectors The Raspberry Pi 2 type B runs a quad- core ARM Cortex- A7 CPU and 1 GB RAM. It offers the following Connectors: 4 x USB 2.0 sockets 10/100 BaseT Ethernet socket HDMI video socket RCA composite video socket microsd card socket Powered from microusb socket 3.5 mm audio out jack Header for GPIO and serial buses (I2C and SPI) Display Serial Interface (DSI) 15 way flat flex cable connector with two data lanes and a clock lane Camera connector 15- pin MIPI Camera Serial Interface (CSI- 2) 4

Raspberry Pi 2 - Pin Mappings

Raspberry Pi 2 GPIO GPIO: General Purpose Input/Output These Pins can be used for Digital Input/Output using Windows.Devices.Gpio; public void GPIO() { // Get the default GPIO controller on the system GpioController gpio = GpioController.GetDefault(); if (gpio == null) return; // GPIO not available on this sytem } // Open GPIO 5 using (GpioPin pin = gpio.openpin(5)) { // Latch HIGH value pin.write(gpiopinvalue.high); // Set the IO direction as output pin.setdrivemode(gpiopindrivemode.output); } // Close pin - will revert to its power-on state This Example opens GPIO 5 as an output and writes a digital 1 out on the pin

Raspberry Pi Windows 10 IoT Core for Raspberry Pi 2 Hans- Petter Halvorsen, M.Sc.

Windows 10 IoT Core Windows 10 IoT Core is a small scaled version of Windows running on small devices such as Raspberry Pi 2 https://dev.windows.com/iot IoT Internet of Things

Raspberry Pi Communication Protocols Hans- Petter Halvorsen, M.Sc.

Communication Protocols UART (Universal Asynchronous Receiver/Transmitter,)... http://en.wikipedia.org/wiki/universal_asynchronous_receiver/trans mitter SPI (Serial Peripheral Interface )... http://en.wikipedia.org/wiki/serial_peripheral_interface_bus I2C (Inter- Integrated Circuit)... http://en.wikipedia.org/wiki/i2c http://www.byteparadigm.com/applications/introduction- to- i2c- and- spi- protocols 10

Raspberry Pi 2 SPI Bus Serial Peripheral Interface (SPI) is a synchronous serial data protocol used by microcontrollers for communicating with one or more peripheral devices quickly over short distances. With an SPI connection there is always one master device (usually a microcontroller) which controls the peripheral devices. SPI devices communicate in full duplex mode using a master- slave architecture with a single master. The interface was developed by Motorola and has become a de facto standard. Typical applications include sensors, Secure Digital cards, and liquid crystal displays (LCD). SCLK : Serial Clock (output from master) MOSI : Master Output, Slave Input (output from master) MISO : Master Input, Slave Output (output from slave) SS (or SC) : Slave Select (active low, output from master) http://en.wikipedia.org/wiki/serial_peripheral_interface_bus https://learn.sparkfun.com/tutorials/serial- peripheral- interface- spi

Raspberry Pi 2 SPI Bus There are 2 SPI bus controllers available on the RPi2: SPI0 and SPI1 SPI0: Pin 19 - SPI0 MOSI Pin 21 - SPI0 MISO Pin 23 - SPI0 SCLK Pin 24 - SPI0 CS0 Pin 26 - SPI0 CS1 SPI1: Pin 38 - SPI1 MOSI Pin 35 - SPI1 MISO Pin 40 - SPI1 SCLK Pin 11 - SPI1 CS0 using Windows.Devices.Enumeration; using Windows.Devices.Spi; public async void SPI() { // Get a selector string for bus "SPI0" string aqs = SpiDevice.GetDeviceSelector("SPI0"); } // Find the SPI bus controller device with our selector string var dis = await DeviceInformation.FindAllAsync(aqs); if (dis.count == 0); return; // "SPI0" not found on this system // Use chip select line CS0 var settings = new SpiConnectionSettings(0); // Create an SpiDevice with our bus controller and SPI settings using (SpiDevice device = await SpiDevice.FromIdAsync(dis[0].Id, settings)) { byte[] writebuf = { 0x01, 0x02, 0x03, 0x04 }; device.write(writebuf); }

Raspberry Pi 2 - I2C Bus I²C (Inter- Integrated Circuit), is a multi- master, multi- slave, single- ended, serial computer bus It is typically used for attaching lower- speed peripheral ICs to processors and microcontrollers. I²C is typically spelled I2C (pronounced I- two- C) The I²C bus was developed in 1982 by Philips Semiconductor. The I²C protocol requires only 2 wires for connecting all the peripheral to a microcontroller. http://en.wikipedia.org/wiki/i2c https://learn.sparkfun.com/tutorials/i2c

Raspberry Pi 2 - I2C Bus There is one I2C controller I2C1 exposed on the pin header with two lines SDA and SCL. 1.8KΩ internal pull- up resistors are already installed on the board for this bus. Pin 3 - I2C1 SDA Pin 5 - I2C1 SCL SDA: Serial Data Line SCL: Serial Clock Line using Windows.Devices.Enumeration; using Windows.Devices.I2c; public async void I2C() { // Get a selector string for bus "I2C1" string aqs = I2cDevice.GetDeviceSelector("I2C1"); // Find the I2C bus controller with our selector string var dis = await DeviceInformation.FindAllAsync(aqs); if (dis.count == 0) return; // bus not found // 0x40 is the I2C device address var settings = new I2cConnectionSettings(0x40); } // Create an I2cDevice with our selected bus controller and I2C settings using (I2cDevice device = await I2cDevice.FromIdAsync(dis[0].Id, settings)) { byte[] writebuf = { 0x01, 0x02, 0x03, 0x04 }; device.write(writebuf); }

Digital Temperature Sensor with I²C Interface http://home.hit.no/~hansha/documents/lab/lab%20equipment/iot_sensors.htm 15

Honeywell Humidity Sensor with I²C /SPI Interface Honeywell HIH- 6120-021- 001 4- Pin SIP Temperature & Humidity Sensor http://home.hit.no/~hansha/documents/lab/lab%20equipment/iot_sensors.htm 16

Raspberry Pi Raspberry Pi Camera Hans- Petter Halvorsen, M.Sc.

Raspberry Pi Camera The Raspberry Pi Camera is ideal for Home Security Applications https://www.raspberrypi.org/help/camera- module- setup/ Connect it directly to the Camera Interface on the Raspberry Pi Note! This module is only capable of taking pictures and video, not sound 5 megapixel resolution Still images 2592 x 1944 Video: 1080p30

Hans- Petter Halvorsen, M.Sc. Telemark University College Faculty of Technology Department of Electrical Engineering, Information Technology and Cybernetics E- mail: hans.p.halvorsen@hit.no Blog: http://home.hit.no/~hansha/ 19