Distributed Real- Time Control Systems

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

ARDUINO YÚN MINI Code: A000108

ARDUINO MICRO WITHOUT HEADERS Code: A000093

keyestudio Keyestudio MEGA 2560 R3 Board

Sanguino TSB. Introduction: Features:

AVR Microcontrollers Architecture

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

Lesson 5 Arduino Prototype Development Platforms. Chapter-8 L05: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

ARDUINO MEGA 2560 REV3 Code: A000067

ARDUINO LEONARDO ETH Code: A000022

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

ARDUINO LEONARDO WITH HEADERS Code: A000057

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

ARDUINO MEGA ADK REV3 Code: A000069

ARDUINO UNO REV3 Code: A000066

ARDUINO YÚN Code: A000008

Farklı Arduino Boardlar

Arduino Uno R3 INTRODUCTION

ARDUINO M0 PRO Code: A000111

Arduino ADK Rev.3 Board A000069

ARDUINO BOARD LINE UP

ESPino - Specifications

Alessandra de Vitis. Arduino

ARDUINO INDUSTRIAL 1 01 Code: A000126

ARDUINO PRIMO. Code: A000135

IDUINO for maker s life. User Manual. For IDUINO development Board.

Introduction to Microcontrollers

Lesson 6 Intel Galileo and Edison Prototype Development Platforms. Chapter-8 L06: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

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

Microprocessors And Microcontrollers (Practical)

Introduction to Arduino. Wilson Wingston Sharon

XNUCLEO-F030R8, Improved STM32 NUCLEO Board

ARDUINO MEGA INTRODUCTION

ATmega128. Introduction

Basic Components of Digital Computer

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP

How to Use an Arduino

IDUINO for maker s life. User Manual. For IDUINO Mega2560 Board(ST1026)

PIC Microcontroller and

Cookie User Manual. For NuMicro Edition 1.0. Rev. 1.0 Release: forum.coocox.org.

PICado Alpha Development Board V1.0

MICROPROCESSOR BASED SYSTEM DESIGN

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

ARDUINO MINI 05 Code: A000087

Microcontroller: CPU and Memory

Arduino Dock 2. The Hardware

Getting to know the Arduino IDE

w w w. b a s e t r a i n i n g i n s t i t u t e. c o

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

Microcontroller basics

Intel Galileo gen 2 Board

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

Diploma in Embedded Systems

Breeze Board. Type A. User Manual.

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Digital Circuits Part 2 - Communication

Ultratronics v1.0 DATASHEET

Chapter 1. Microcontroller Overview

Overview The Microcontroller The Flex Board Expansion boards Multibus board Demo board How to: Compile demo Flash & Run Demos

Goal: We want to build an autonomous vehicle (robot)

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

Choosing a Micro for an Embedded System Application

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual

Microcontroller Basics

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

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

Arduino Ethernet. Arduino Ethernet Rev. 2 board front view with optional PoE module. (

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

EE 308: Microcontrollers

Programming in the MAXQ environment

Lecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

Mega128-Net Mega128-Net Mega128 AVR Boot Loader Mega128-Net

Mega128-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

Embedded Systems Design (630414) Lecture 1 Introduction to Embedded Systems Prof. Kasim M. Al-Aubidy Computer Eng. Dept.

USER GUIDE EDBG. Description

EE 308: Microcontrollers

Adafruit Metro Mini. Created by lady ada. Last updated on :12:28 PM UTC

Atmel Microprocessor Programming With AVRISPmkii

Freedom FRDM-KV31F Development Platform User s Guide

Objective: Additional project details: Code: PSEMBP 100 Category:STEM Level: High School/Community C.

PIC-32MX development board Users Manual

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

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

Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack

COL862 - Low Power Computing

MEXLE. International Educational Platform. International Educational Platform. for Informatics based on Embedded Systems

Somes French translations :

Getting Started with SKPIC32

USER GUIDE ARDBOX ANALOG

ELC4438: Embedded System Design Embedded Processor

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

DFRduino M0 Mainboard (Arduino Compatible) SKU: DFR0392

Breeze Board. Type B. User Manual.

ootbrobotics.com Electronics and Robotics LLC

Hands on Experience with AVR32

Transcription:

Distributed Real- Time Control Systems Lecture 2 Embedded Systems Basics A. Bernardino, C. Silvestre, IST- ACSDC 1

What are embedded systems? Small computers to efficiently address specific purposes, e.g. sensing and control. Advantages: Low cost Small form factor Low energy consumpoon Reliability Hard Real- Time funcoons. Very fast boot Disadvantages: Harder to program and debug. Limited funcoonality (speed, memory, devices). Proprietary souware/hardware, difficult support and maintenance. May require some interface electronics. A. Bernardino, C. Silvestre, IST- ACSDC 2

ApplicaOons of Embedded Systems SCDTR 2013/2014 - Lecture 2 A. Bernardino, C. Silvestre, IST- ACSDC 3

Microcontroller Units (MCU) Microcontrollers (µc) Applied mostly for sensing, control and automaoon. Contain several I/O ports to interface with physical devices (digital and/or analog). Digital Signal Processors (DSP) Applied mostly for signal processing applicaoons. Contain dedicated instrucoons, floaong point units and special architecture to speed up signal processing operaoons. A. Bernardino, C. Silvestre, IST- ACSDC 4

Basic Architecture ROM (FLASH) - Program memory. Store the program to be executed. Non- volaole. RAM - VolaOle memory. Hold temporary variables and stack. EEPROM - For permanent storage. Slow wriong. SFR Special funcoon registers. Memory mapped I/O. Program Counter Controls execuoon I/O Ports - Connect to peripheral devices. Oscillator Setup the Ome base. Timers/Counters Count Ome WDT (Watchdog Timer) Separate Omer to reset the system when it hangs. Serial CommunicaCons To interface with other devices. Interrupts To respond to events (internal or external) A. Bernardino, C. Silvestre, IST- ACSDC 5

More on Architecture Addressing Models Harvard architecture Separate bus for program and data. Programs execute from ROM. Adopted by most classes of MCU s: Intel 8051, Atmel AVR, Microchip PIC, Cypress PSoC. Princeton (Von Neuman) Architecture Unified address space. You can jump to code anywhere (even if it does not make sense ) FloaCng point operacons Some MCU s do not have floaong point unit. Must use fixed point methods. Some manufacturers provide libraries for emulaoon. Peripheral Interface Controllers Some I/O operaoons can be outsourced from the CPU. Specific controllers for reading/wriong output ports, serial communicaoon, direct memory access (DMA). Adopted by Freescale 68HC11 and PC s A. Bernardino, C. Silvestre, IST- ACSDC 6

MCU SelecOon Criteria Core speed Memory size (RAM, ROM, EPROM) Bus architecture Address/Data bus depth (8, 16, 32, 64 bit) Number of digital I/O ports. Number of analog I/O ports (ADC/DAC) I/O resoluoon (8, 12, 16, 24 bit) Timer Units Development Tools Interrupt Lines Serial CommunicaOons (SPI, I2C, USB, IR, GbE) Product Family Peripheral Interface Controllers FloaOng Point units DMA controller Power consumpoon Cost (HW/SW tradeoff) Environmental CondiOons A. Bernardino, C. Silvestre, IST- ACSDC 7

Famous MCU Families Intel 8051 Atmel AVR Microchip PIC Microchip dspic Freescale Zilog Z8 Cypress PSoC TI MSP430 Manufacturer sites provide selecoon tools: A. Bernardino, C. Silvestre, IST- ACSDC 8

Programming MCU s Compilers and interpreters for MCU s C Ada Assembly C++ BASIC Forth PIC Basic Dynamic C Java Python like (Pyastra, PiMite) Programming modes Compile in PC and download to MCU. Some large embedded systems can run compilers or interpreters. Compilers Classically provided by the manufacturers. Several open source versions currently available. A. Bernardino, C. Silvestre, IST- ACSDC 9

Downloading Programs to MCU IC Programmer Plug the chip in the programmer, reprogram, then put the chip back on the embedded system. In Circuit Serial Programmer (ICSP) Plug a cable from the programmer into an header close to the chip in the embedded system. Bootloaders Programs in ROM that manage the downloading process A. Bernardino, C. Silvestre, IST- ACSDC 10

Bootloaders When the MCU powers up, program execuoonstarts at a predefined point in program memory. In development cycle, we may want to change the program very ouen. To facilitate this, a program called bootloader interfaces with the user to load the kernel. The bootloader is acove for a few seconds when the board resets; then it starts whichever program was most recently uploaded to the microcontroller. Disadvantage Occupies (precious) space in Program Memory A. Bernardino, C. Silvestre, IST- ACSDC 11

Debugging MCU s ICE In Circuit Emulator Special processor that emulates the device to debug but allows breakpoints and inspect. Expensive ICD In Circuit Debugger The microcontroller has a small amout of hadware to allow stepping through the code and inspect variables. Increase MCU cost. Simulator A special souware emulates the hardware and allows debugging features. Not good for debugging interrupts. Breakpoint and step based approaches are not good for control because they interrupt the control loop. We must use other methods Serial CommunicaOon Send debug messages via serial communicaoon to a host device. Very simple and efficient but too slow to use in interrupts. LCD Display debug messages in a display arached to I/O ports. Wastes I/O ports LED Blink to communicate status. PIN debugging Send messages via I/O Pins. Check with oscilloscope Logic Analizer Captures the waveform of arached pins. A. Bernardino, C. Silvestre, IST- ACSDC 12

Atmel AVR Family Memory Data memory: Registers, I/O registers, SRAM Program Flash memory (10000 rewrites) EEPROM Fuse Bits Watchdog Timer Resets processor when it Omes out Interrupts External and Internal Timers/Counters GPIO ADC (8-10 bits) PWM USART (RS- 232, RS- 485, MIDI, Linbus, CAN- BUS). TWI (I2C) SPI A. Bernardino, C. Silvestre, IST- ACSDC 13

ATMEL AVR Family OnyAVR 0.5 8KB Flash 6-32 pins Up to 20MHz 1.0 MIPS/MHz megaavr 4-256KB Flash 28-100- pins Up to 20 MHz 1.0 MIPS/MHz XMEGA (8-16 bit) 16-384KB Flash 44-100 pins Up to 32 MHz 1.0 MIPS/MHz UC3 (32 bit) 16-512KB Flash 48-144 pins Up to 66 MHZ 1.5 MIPS/MHz A. Bernardino, C. Silvestre, IST- ACSDC 14

AVR Development Boards Burerfly Demo Board: Self- contained, barery- powered demonstraoon board with a variety of peripherals and ports. STK500 Starter Kit Power Supply, Sockets for Chips, RS232 interface to PC, In- System Serial Programming, Push burons, connectors, etc A. Bernardino, C. Silvestre, IST- ACSDC 15

AVR Third Party Boards Arduino GPMPU40 Futurlec 2313 Board Olimexino Protostack kits A. Bernardino, C. Silvestre, IST- ACSDC 16

ATMEGA 328 CPU (20 MIPS) SRAM (2K) FLASH (32K) EEPROM (1K) 3 TIMERS A/D USART SPI TWI (I2C) Watchdog 4$ (10+units) 1.8V 5V 28 Pin A. Bernardino, C. Silvestre, IST- ACSDC 17

More about ATMEGA 328 The Datasheet is the embedded system s programmer best friend! A. Bernardino, C. Silvestre, IST- ACSDC 18

Arduino Prototype Boards ARDUINO is a family of ATMEL MCU prototype boards: UNO ATMEGA328 LEONARDO ATMEGA32U4 MEGA 2560 ATMEGA2560 DUE SAM3X8E ARM ETHERNET ATMEGA328 MEGA ADK ATMEGA2560 MICRO ATMEGA32U4 NANO ATMEGA328 FIO ATMEGA328 MINI ATMEGA328 PRO MINI ATMEGA168 LILYPAD ATMEGA168/328 PRO ATMEGA168/328 A. Bernardino, C. Silvestre, IST- ACSDC 19

Arduino Uno V3 A. Bernardino, C. Silvestre, IST- ACSDC 20

Arduino Uno V3 Microcontroller OperaCng Voltage Input Voltage (recommended) Input Voltage (limits) Digital I/O Pins ATmega328 5V 7-12V 6-20V 14 (of which 6 provide PWM output) Analog Input Pins 6 Max DC Current per I/O Pin Max DC Current for 3.3V Pin Max Total DC current Flash Memory SRAM EEPROM Clock Speed 40 ma 50 ma 500 ma 32 KB (ATmega328) of which 0.5 KB used by bootloader 2 KB (ATmega328) 1 KB (ATmega328) 16 MHz A. Bernardino, C. Silvestre, IST- ACSDC 21

Arduino Uno V3 Pins Power VIN, 5V, 3V3, GND Control RESET Analog In A0, A1, A2, A3, A4, A5 Digital I/O 0,1,2,3,4,5,6,7,8,9,10,11,12,13 Reference for Shields AREF, IOREF Programmable LED 13 Serial 0 (RX), 1 (TX) External Interrupts 2, 3 PWM 3,5,6,9,10,11 SPI 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK) TWI (I2S) A4 or SDA, A5 or SCL A. Bernardino, C. Silvestre, IST- ACSDC 22

Uno ATmega Pinout Correspondence A. Bernardino, C. Silvestre, IST- ACSDC 23