Lecture 6: Embedded Systems and Microcontrollers

Similar documents
Introduction to Embedded Systems

Introduction to Arduino. Wilson Wingston Sharon

Introduction to Arduino

Lecture (01) Introducing Embedded Systems and the Microcontrollers By: Dr. Ahmed ElShafee

Electronics Single Board Computers

Lab 01 Arduino 程式設計實驗. Essential Arduino Programming and Digital Signal Process

Overview of Microcontroller and Embedded Systems

Choosing a Micro for an Embedded System Application

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

COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors

Workshop on Microcontroller Based Project Development

Specification. 1.Power Supply direct from Microcontroller Board. 2.The circuit can be used with Microcontroller Board such as Arduino UNO R3.

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

USER MANUAL ARDUINO I/O EXPANSION SHIELD

Alessandra de Vitis. Arduino

3. The circuit is composed of 1 set of Relay circuit.

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

Introduction to Microcontrollers Using Arduino. PhilRobotics

Computer Hardware Requirements for Real-Time Applications

FUNCTIONS For controlling the Arduino board and performing computations.

ARDUINO YÚN Code: A000008

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

ARDUINO LEONARDO ETH Code: A000022

ARDUINO YÚN MINI Code: A000108

Embedded Systems Introduction

ARDUINO INDUSTRIAL 1 01 Code: A000126

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

University of Portland EE 271 Electrical Circuits Laboratory. Experiment: Arduino

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

ARDUINO BOARD LINE UP

Distributed Real- Time Control Systems

Arduino and Matlab for prototyping and manufacturing

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

Prototyping & Engineering Electronics Kits Basic Kit Guide

ELCT 912: Advanced Embedded Systems

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Introduction to 8051 microcontrollers

Physics 364, Fall 2012, Lab #9 (Introduction to microprocessor programming with the Arduino) Lab for Monday, November 5

Lecture 1 Introduction to Microprocessors

IME-100 Interdisciplinary Design and Manufacturing

Organization. 5.1 Semiconductor Main Memory. William Stallings Computer Organization and Architecture 6th Edition

Microprocessors/Microcontrollers

ARDUINO LEONARDO WITH HEADERS Code: A000057

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

How to Use an Arduino

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

ARDUINO M0 PRO Code: A000111

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 1.

EEG 101L INTRODUCTION TO ENGINEERING EXPERIENCE

Arduino 101 AN INTRODUCTION TO ARDUINO BY WOMEN IN ENGINEERING FT T I NA A ND AW E S O ME ME NTO R S

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Introduction to Arduino

Microcontrollers for Ham Radio

The Arduino Briefing. The Arduino Briefing

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

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Blinking an LED 1 PARTS: Circuit 2 LED. Wire. 330Ω Resistor

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

MICROCONTROLLER AND PLC LAB-436 SEMESTER-5

TANGIBLE MEDIA & PHYSICAL COMPUTING INTRODUCTION TO ARDUINO

3.The circuit board is composed of 4 sets which are 16x2 LCD Shield, 3 pieces of Switch, 2

Introduction to Microcontrollers

CS-424/580A Microcontrollers and Robotics

William Stallings Computer Organization and Architecture 6th Edition. Chapter 5 Internal Memory

Robotic Systems ECE 401RB Fall 2006

Introduction to Microprocessors: Arduino

Electronic Brick Starter Kit

INDUSTRIAL TRAINING:6 MONTHS PROGRAM TEVATRON TECHNOLOGIES PVT LTD

More Arduino Programming

Arduino Part 2. Introductory Medical Device Prototyping

keyestudio Keyestudio MEGA 2560 R3 Board

PDF of this portion of workshop notes:

ELCT708 MicroLab Session #1 Introduction to Embedded Systems and Microcontrollers. Eng. Salma Hesham

THE MICROCOMPUTER SYSTEM CHAPTER - 2

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

Arduino Uno R3 INTRODUCTION

Procedure: Determine the polarity of the LED. Use the following image to help:

Counter & LED (LED Blink)

Serial.begin ( ); Serial.println( ); analogread ( ); map ( );

e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Microcontrollers and Embedded Processors Module No: CS/ES/2 Quadrant 1 e-text

ARDUINO PRIMO. Code: A000135

IAS0430 MICROPROCESSOR SYSTEMS

Basic Components of Digital Computer

Grundlagen Microcontroller Memory. Günther Gridling Bettina Weiss

PREPAID ENERGY METER

ECE 471 Embedded Systems Lecture 2

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

Low-Cost Microcontrollers

Summer 2003 Lecture 18 07/09/03

1 Microprocessors 2 Microcontrollers 3 Actuation sensing, process control

Module 003: Introduction to the Arduino/RedBoard

Embedded Systems: Architecture

Chapter 5 Internal Memory

Chapter 1 : Introduction

EMBEDDED SYSTEM BASICS AND APPLICATION

Computer chip: A very small pieces of silicon or other semi-conducting material onto which integrated circuits are embedded Circuit board: A thin

Memory classification:- Topics covered:- types,organization and working

CONSUMER ELECTRONICS Microwave Ovens

)8-,768'HY.LW 2YHUYLHZ. )XMLWVX0LNURHOHNWURQLN*PE+ Am Siebenstein Dreieich-Buchschlag, Germany

Arduino Programming. Arduino UNO & Innoesys Educational Shield

Transcription:

Lecture 6: Embedded Systems and Microcontrollers Bo Wang Division of Information & Computing Technology Hamad Bin Khalifa University bwang@hbku.edu.qa 1

What is Embedded System? Embedded System = Computers Inside a Product Device used to control, monitor, or assist the operation of equipment, machinery or plants _UK EEE. 2

Embedded System - Definition An embedded system is a specific-purpose system in which the computer is completely encapsulated by the device it controls. An embedded system performs pre-defined tasks, usually with very specific requirements. A combination of hardware and software, and perhaps additional mechanical or other parts, designed to perform a dedicated function. Mobile phones, Music players, Digital cameras, TVs are very common embedded systems in our life. 3

Embedded System - Characteristics Job Specific: designed for a specific task, has strong correlation with the application. e.g.: ECG can only used for cardio signal acquisition and processing. Complete redesign is needed if using the microcontroller for other purpose. Invisibility: it is a part of the whole system, people mostly will only focus on the system function, performance and usage instead of the embedded system inside it. Real-time: provide response within a limited period of time. strong: us ~ ms; typical: ms ~ s; weak: ~s Limited resources: the available hardware resources of embedded system is limited due to its low-cost, small form factor, low-power, etc. 4

Layered Architecture of Embedded System An embedded system is a tightly coupled Hardware(HW) + Software (SW) system to perform a dedicated system. 5

Embedded System - Application Areas 6

Embedded System - Importance Average car has about 50 MCUs in it. S-class has 63; a 1999 BMW 7- series has 65 [2009]. Average middle-class household has about 40 to 50 MCUs in it. MCU market size: ~$60 Billion by 2020 Potentially driven by Internet of Things Global Microcontroller Market, 2014-2024 (USD Billion) 7

Embedded System - History The first mass-produced embedded system was the guidance computer for the Minuteman missile in 1961, named as Autonetics D-17 guidance computer. The first modern embedded systems was Apollo Guidance Computer, developed by Charles Stark Draper at the MIT Instrumentation Laboratory. Used in real-time by astronaut pilots to collect and provide flight information. Automatically control all of the navigational functions of the Apollo spacecraft. Autonetics D-17 guidance computer from a Minuteman I missile Apollo Guidance Computer 8

Embedded System - Development 60~70 s o Manufacturing -In 1962, one ethylene plant in US achieved direct digital control (DDC) in the facilities. -In 1963, DEC released its DP-11 series of minicomputers. o Aeronautics -In 1963, Gemini3 adopted digital computer control for the first time -In 1968, Apollo IV, Saturn V 70~90 s o In 1973, Microprocessor was developed, e.g. 8085, Z80 single board computer. o In early 80 s, single-chip microcomputer (microcontroller) was developed, e.g. 8051. o In 1982, DSP was developed for high-speed real-time signal processing -X 10 ~ 50 faster than the CPUs in the same era. 9

Embedded System - Development After 90 s o More applications -Billions of microprocessors/microcontrollers sold per year, 95% are for embedded products. - Cars: > 50 embedded processors in a car The computing capability of the devices sold by Ford > IBM. - Airplane: 10 s of embedded systems, > 100 microcontrollers. o 4, 8, 16, 32, 64 bit processors used in different fields o More development references and tools 8b 64b 16b 32b 10

What is a microcontroller? Basically, a device which integrates a number of the components of a microprocessor system onto a single chip Microcontroller combines on the same chip: The CPU core Memory I/O Only need to be supplied power and clocking Micro suggests that the device is small, and controller tells you that the device might be used to control objects, processes, or events. Another term to describe a microcontroller is embedded controller, because the microcontroller and its support circuits are often built into, or embedded in, the devices they control A typical microcontroller topology using Harvard architecture 11

Microcontroller A Processor Instruction Set + memory + accelerators Memory Non-Volatile ROM, EPROM, EEPROM, Flash Volatile RAM (DRAM, SRAM) Interfaces H/W: Ports S/W: Device Driver Parallel, Serial, Analog, Time I/O Memory-mapped vs. I/O-instructions (I/Omapped) A typical microcontroller: the different sub units integrated onto the microcontroller chip. The heart of the microcontroller is the CPU core (traditionally based on an 8-bit microprocessor). 12

Microcontroller vs. Microprocessor Microcontroller CPU, RAM, ROM, I/O and timer are all on a single chip Fixed amount of on-chip ROM, RAM, I/O ports For applications in which cost, power and space are critical Single-purpose (control-oriented) Low processing power Low power consumption Bit-level operations Instruction sets focus on control and bit-level operations Typically 8/16/32 bit Microprocessor CPU is stand-alone, RAM, ROM, I/O, timer are separate Designer can decide on the amount of ROM, RAM and I/O ports. Expensive Versatility General-purpose High processing power High power consumption Instruction sets focus on processing-intensive operations Typically 32/64 bit 13

What is an Arduino? Open Source electronic prototyping platform based on flexible easy to use hardware and software. It consists of a circuit board, which can be programmed (referred to as a microcontroller) and a ready-made software called Arduino IDE (Integrated Development Environment), which is used to write and upload the computer code to the physical board. The key features are: Arduino boards are able to read analog or digital input signals from different sensors and turn it into an output such as activating a motor, turning LED on/off, connect to the cloud and many other actions. You can control your board functions by sending a set of instructions to the microcontroller on the board via Arduino IDE (referred to as uploading software). Unlike most previous programmable circuit boards, Arduino does not need an extra piece of hardware (called a programmer) in order to load a new code onto the board. You can simply use a USB cable. Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to program. Finally, Arduino provides a standard form factor that breaks the functions of the micro-controller into a more accessible package. 14

Arduino Types Many different versions Number of input/output channels Form factor Processor Leonardo Due Micro LilyPad Esplora Uno 15

Arduino Uno Pinout Power pin, analog pin, digital pin, etc. 16

How to Start Get an Arduino (starter kit) Download the IDE Connect the device Configure the IDE to match with your device Connect the circuit Write the program Get frustrated/debug/get it to work Get excited and immediately start to improve it 17

Arduino IDE Download current compiler from: arduino.cc/en/main/software Arrogantly refers to itself as an IDE (Ha!). Run the software installer. Written in Java, it is fairly slow. 18

Arduino Program Development Based on C++ without 80% of the instructions. Easy to use the existing functions. A handful of new commands. Programs are called 'sketches'. Sketches need two functions: void setup( ) void loop( ) setup( ) runs first and once. loop( ) runs over and over, until power is lost or a new sketch is loaded. 19

Basic Functions pinmode(pin, mode) Designates the specified pin for input or output digitalwrite(pin, value) Sends a voltage level to the designated pin digitalread(pin) Reads the current voltage level from the designated pin analog versions of above analogread's range is 0 to 1023 serial commands print, println, write 20

Example: LED Blink void setup( ) { pinmode(13, OUTPUT); } //set pin 13 to be an output pin void loop( ) { digitalwrite(13, HIGH); //set pin 13 to be high delay(1000); //wait for 1000 ms digitalwrite(13, LOW); //set pin 13 to be low delay(1000); //wait for 1000 ms } 21

Example LED Dancing void setup( ) { pinmode(1, OUTPUT); pinmode(3, OUTPUT); pinmode(5, OUTPUT); pinmode(7, OUTPUT); } void loop( ) { digitalwrite(1, HIGH); delay (200); digitalwrite(1, LOW); digitalwrite(3, HIGH); delay (200); digitalwrite(3, LOW); digitalwrite(5, HIGH); delay (200); digitalwrite(5, LOW); } digitalwrite(7, HIGH); delay (200); digitalwrite(7, LOW); 22

Inputs Digital inputs will come to the Arduino as either on or off (HIGH or LOW, respectively). HIGH is 5VDC. LOW is 0VDC. Analog inputs will be converted in the Arduino to a range of numbers, based upon the electrical characteristics of the circuit. 0 to 1023 0.0049 V per digit (4.9 mv) Read time is 100 microseconds (10,000 readings per second) Used for most of the sensor applications (sensor outputs are analog) 23

Outputs Digital outputs of the Arduino can either be HIGH or LOW, respectively. HIGH is 5VDC. LOW is 0VDC. Some special pins (with a ~ mark) can generate analog outputs 0 to 255 0.0195 V per digit (19.5 mv step) Only pin 3, 5, 6, 9 can be configured as analog output. 24

Reference http://home.hit.no/~hansha/documents/lab/lab%20equipment/arduino/intr oduction%20to%20arduino.pdf https://www.tutorialspoint.com/arduino/arduino_tutorial.pdf https://playground.arduino.cc/main/resources 25