Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

Similar documents
Microcontroller basics

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Arduino Uno R3 INTRODUCTION

CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview

USER GUIDE EDBG. Description

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

ARDUINO MEGA INTRODUCTION

Basic Components of Digital Computer

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

EDBG. Description. Programmers and Debuggers USER GUIDE

MICROPROCESSOR BASED SYSTEM DESIGN

ECE 471 Embedded Systems Lecture 2

Unlocking the Potential of Your Microcontroller

Embedded Systems. 3. Hardware Software Interface. Lothar Thiele. Computer Engineering and Networks Laboratory

HZX N03 Bluetooth 4.0 Low Energy Module Datasheet

VLSI Design Lab., Konkuk Univ. Yong Beom Cho LSI Design Lab

AVR XMEGA TM. A New Reference for 8/16-bit Microcontrollers. Ingar Fredriksen AVR Product Marketing Director

SPI (Serial & Peripheral Interface)

To be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM).

PIC Microcontroller Introduction

Universität Dortmund. IO and Peripheral Interfaces

Introduction to ARM LPC2148 Microcontroller

Digital Circuits Part 2 - Communication

Interconnects, Memory, GPIO

XMEGA Series Of AVR Processor. Presented by: Manisha Biyani ( ) Shashank Bolia (

Basics of UART Communication

Raspberry Pi - I/O Interfaces

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

CM5000 DATASHEET v0.1

Clock and Fuses. Prof. Prabhat Ranjan Dhirubhai Ambani Institute of Information and Communication Technology, Gandhinagar

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

AT-501 Cortex-A5 System On Module Product Brief

联系人黄生 : QQ: General Description The KN02GxxA series are low-cost 32-bit microcontroller with embedded ARM Cortex -M0 core for i

AVR Training Board-I. VLSI Design Lab., Konkuk Univ. LSI Design Lab

AVR Microcontrollers Architecture

Team 3. By: Miriel Garcia. Microcontrollers/ TI MSP430F5438A. ECE 480 senior Design. Application Note 4/3/15

Microcontroller basics

Serial Peripheral Interface. What is it? Basic SPI. Capabilities. Protocol. Pros and Cons. Uses

Lab 1: I/O, timers, interrupts on the ez430-rf2500

Timers and Clocks CS4101 嵌入式系統概論. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan

2002 Mixed Signal Products SLAU056B

Doc: page 1 of 8

Lecture 1: Introduction to Microprocessors

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

8051 Microcontroller

Figure 1.1: Some embedded device. In this course we shall learn microcontroller and FPGA based embedded system.

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

An Arduino Controlled 1 Hz to 60 MHz Signal Generator

PC87435 Enhanced IPMI Baseboard Management Controller

Product Specification

Ultra Low Power Microcontroller - Design Criteria - June 2017

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

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

Prototyping Module Datasheet

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

CN310 Microprocessor Systems Design

Interfacing Techniques in Embedded Systems

Growing Together Globally Serial Communication Design In Embedded System

Mercury System SB310

ZigBee Compliant Platform 2.4G RF Low Power Transceiver Module for IEEE Standard. DATA SHEET Version B

Introduction to I2C & SPI. Chapter 22

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

3.3V regulator. JA H-bridge. Doc: page 1 of 7

Distributed Real-Time Control Systems. Module 3 Hardware for Real Time Distributed Control Systems

Amarjeet Singh. January 30, 2012

Lecture 1. Course Overview and The 8051 Architecture

AT90SO36 Summary Datasheet

Microcontrollers and Interfacing

STM32 MICROCONTROLLER

More than Compatibility

2-Oct-13. the world s most energy friendly microcontrollers and radios

ELEG3923 Microprocessor Ch.0 & Ch.1 Introduction to Microcontroller

ARDUINO YÚN MINI Code: A000108

Workshop on Microcontroller Based Project Development

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

keyestudio Keyestudio MEGA 2560 R3 Board

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1

or between microcontrollers)

Product Technical Brief S3C2440X Series Rev 2.0, Oct. 2003

Lecture (02) PIC16F84 (I)

Embedded Systems: Architecture

ESPino - Specifications

Introducing STM32 L0x Series. April

Microprocessor (COM 9323)

< W3150A+ / W5100 Application Note for SPI >

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications

Embedded distributed/parallel computing hardware for high school students

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

SPI Universal Serial Communication Interface SPI Mode

Creating Energy Efficient Computers Marius Grannæs

PD215 Mechatronics. Week 3/4 Interfacing Hardware and Communication Systems

ARDUINO MEGA 2560 REV3 Code: A000067

AT91 ARM Thumb Microcontrollers. M63200 M63800 Summary. Features. Description

Lecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Lecture 14 Serial Peripheral Interface

Digital Circuits 7: MCUs... how do they work?

Transcription:

Network Embedded Systems Sensor Networks Fall 2013 Hardware Marcus Chang, mchang@cs.jhu.edu 1

Embedded Systems Designed to do one or a few dedicated and/or specific functions Embedded as part of a complete device often including hardware and mechanical parts By contrast, a general-purpose computer, is designed to be flexible and to meet a wide range of end-user needs - Wikipedia 2

Personal Computers Individual Components CPU Northbridge RAM GPU Southbridge Hard drive WIFI USB 3 Images: Wikipedia

Microcontroller Unit (MCU) Multiple components in same chip CPU Volatile memory (e.g. RAM) Persistent memory (e.g. Flash) Analog-to-Digital Converters Timers (alarms, stop-watches) Peripheral interfaces Radio Think of multiple cores, some with only one purpose but very high efficiency/low power consumption 4 Image: Texas Instruments

System on a Chip (SoC) Microcontrollers are systems on a single chip However, often people think of SoC as more powerful than MCU Qualcomm Snapdragon 5 Image: Qualcomm

Famous Microcontrollers / System on a Chip Home appliances, Auto industry, Industrial systems Intel 8051 billions units shipped per year (2008) Microchip PIC 6 billion in total (2008) Atmel AVR (Arduino) Texas Instruments MSP430 Cell phones, Tablets ARM Cortex Apple A6 Qualcomm Snapdragon Samsung Exynos 6

Telos rev. B, Telosb, Tmote Sky 7 Image: MoteIV

Telos rev. B, Telosb, Tmote Sky 8 Image: MoteIV

Telosb Block Diagram 9 Image: MoteIV

Texas Instruments MSP430F1611 MCU 10 Image: Texas Instruments

MSP430 System Clock Drives everything Inputs: Low-frequency crystal (khz range) High-frequency crystal (MHz range) Digitally-Controlled Oscillator (DCO) Outputs: Master Clock Sub-Main Clock Auxiliary Clock 11 Image: Hubert Hagadorn

Telosb Clock Sources External Sources Crystal (32 khz) Precision: Crystal > DCO Calibrate DCO with crystal Temperature: Crystal, DCO change frequency Store temperature specific calibration parameters 12 Image: Dallas Semiconductors

System Clock Configuration Input-to-Output User configurable with constraints CPU Master System Clock Peripherals Master System Sub-main Clock Auxiliary Clock 13 Image: Texas Instruments

MCU Power Operating Modes 5 Low-Power Modes in total Active Mode: CPU active, all clocks active LPM0: CPU disabled, SMCLK and ACLK active LPM3: CPU disabled, ACLK active LPM4: CPU, all clocks disabled 14 Image: Texas Instruments

System Clock Summary MCU components are driven by MCLK, SMCLK, ACLK Changing one input can affect multiple outputs Changing one output can affect multiple components The relation between the three are limited by hardware Signals are multiplied and/or divided Peripheral components can have different requirements E.g., high-speed timer vs. low speed communication Choosing the clock source wisely can reduce power consumption significantly 15

Timers 16 Image: Texas Instruments

Timer Module 16-bit counter connected to either SMCLK or ACLK Counts number of clock cycles Measure elapsed time Timestamp events Set alarms at specific points Continuous/Up-down mode Overflow Capture/Compare Module Read counter when an event occurs Generate event when counter reaches specific value 17 Image: Texas Instruments

Watchdog Timer Similar to Timer Module, except Microcontroller resets when alarm is triggered Clear counter periodically to avoid it (i.e. feed the watchdog ) Useful to reset microcontroller to a known state The watchdog is enabled by default after reset 18

Analog Signals 19 Image: Texas Instruments

Analog Signals 12-bit Analog-to-Digital Converter (ADC) Measure input voltage as a fraction of the reference voltage Temperature sensor Analog sensors output voltage Comparator Compare voltage between two analog signals Digital-to-Analog Converter Outputs voltage 20 Image: Texas Instruments

External Components 21 Image: MoteIV

General Purpose Input/Output Pins (GPIO) Input Pin High voltage reads 1 low voltage reads 0 High MCU supply voltage minus Δ Low 0V plus Δ Output Pin Write 1 sets voltage high write 0 sets voltage low Interrupt capable Pin Interrupt program flow when input value changes E.g. press button to make voltage go low 22

MCU to External Chip Communication GPIO pin Control signals: Turn peripherals on/off Configure peripherals Data streams: Manually transmit 1 bit at a time bit banging Inefficient, keeps CPU in Active Mode 23 Images: Wikipedia

1-Wire Bus (Timer Module) 1 signal line, multiple devices (master/slaves) Designed for parasitic power 64-bit unique serial number/address Master pulls wire low to transmit Duration determines whether it is a 1 or 0 24 Images: Wikipedia

Universal Synchronous/Asynchronous Receive/Transmit Module (USART) UART mode Universal asynchronous receiver/transmitter (UART) Transfers 1 ASCII character (7 or 8 bit) at a time Self clocked Receiver oversamples Very popular for interfacing with switches and routers 25 Images: Wikipedia

Universal Synchronous/Asynchronous Receive/Transmit Module (USART) Inter-Integrated Circuit (I2C) Mode 2 signal lines, multiple devices (masters/slaves) SCL clock line (for timing) SDA data line Speed: 400 kbit/s (although 3.4 Mbit/s standard exists) Value is read/written on clock boundaries 7-bit or 10-bit address space (1-bit used to signal read or write) 26 Images: Wikipedia

Universal Synchronous/Asynchronous Receive/Transmit Module (USART) Serial Peripheral Interface Bus (SPI) Mode 3+1 signal lines, multiple devices (master/slaves) Clock MISO master in, slave out MOSI master out, slave in Slave select (enable slave when line is low) Value is read/written on clock boundaries Full duplex 27 Images: Wikipedia

Internal MCU Communication 28 Image: Texas Instruments

Memory Map Shared Memory Space Memory Mapped I/O Peripheral modules are accessed as regular variables (pointers) Flash read, extension of RAM Flash write, peripheral module Pros and cons Global variables, no overhead No memory protection 29 Images: Doina Bucur

Recap: GPIO 8 pins on one port one bit per pin = 1 byte per port E.g. set Port 1 pin 3 high: P1OUT = 0x04; // set value before direction to avoid outputting old value P1DIR = 0x04; // high means pin is output 30 Source: Texas Instruments

Recap: Timer Module TACTL: Start free-running timer: TACTL = (0x02 << 4); 31 Image: Texas Instruments

Recap: Timer Module Read free-running timer: TACTL = (0x02 << 4); // start timer localtime = TAR; // read value and store in localtime 32 Image: Texas Instruments

Missing Hardware Components What components are missing from the MCU? Floating Point Unit Only found in high-powered systems Software floating point: time and space overhead 33

Telosb Mote Microcontroller Texas Instruments MSP430F1611 Peripherals 2x light sensors ADC Button interrupt capable GPIO Unique ID 1-Wire Temperature/humidity I 2 C External Flash SPI Radio SPI, int. GPIO USB FTDI UART LEDs GPIO 34

Schedule Week 1: Introduction and Hardware Week 2: Embedded Programming Week 3: Medium Access Control Week 4: Link Estimation and Tree Routing Week 5: IP Networking Week 6: Near Field Communication Week 7: (seminar, no lecture) Week 8: Energy Management Week 9: Review and Midterm Week 10: Time Synchronization Week 11: Localization Week 12: Energy Harvesting Week 13: (seminar, no lecture) Week 14: TBD 35