Microcontrollers & GPIO

Slides:



Advertisements
Similar presentations
CS-334: Computer Architecture
Advertisements

Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
Embedded Computer ( Sisteme incorporate ) MPU vs. CPU / Alternative Texas Instrument, Freescale, ARM RISC and CISC approaches Single Chip Design System.
The 8051 Microcontroller Architecture
Microcontroller based system design
BLDC MOTOR SPEED CONTROL USING EMBEDDED PROCESSOR
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
MCU – Microcontroller Unit – 1 MCU  1 cip or VLSI core – application-specific.
INTRODUCTION TO MICROCONTROLLER. What is a Microcontroller A microcontroller is a complete microprocessor system, consisting of microprocessor, limited.
EC4012PA PIC 18F Introduction 2  Processor  Input Devices  Output Devices  Memory Devices 3.
ECE 447: Lecture 1 Microcontroller Concepts. ECE 447: Basic Computer System CPU Memory Program + Data I/O Interface Parallel I/O Device Serial I/O Device.
Introduction to Computing: Lecture 4
Input/Output. I/O Initiation & Control  Transfer of data between circuitry external to the microprocessor and the microprocessor itself.  Transfer of.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Typical Microcontroller Purposes
Basic Architecture Lecture 15. In general, if the number of bits is n, then the number of different combinations of 0s and 1s that can be made is 2 n.
ECE Lecture 1 Microcontroller Concepts. Basic Computer System CPU Memory Program + Data I/O Interface Parallel I/O Device Serial I/O Device Data.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
MICROPROCESSOR AND MICRO CONTROLLER
Computer Organization & Assembly Language © by DR. M. Amer.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Embedded Network Interface (ENI). What is ENI? Embedded Network Interface Originally called DPO (Digital Product Option) card Printer without network.
Components of a typical full-featured microcontroller.
Networked Embedded Systems Sachin Katti EE107 Spring 2016 Lecture 3 Microcontrollers.
HOME SECURITY USING WIRELESS SENSOR NETWORK UNDER THE ESTEEMED GUIDANCE OF: P.RAMESH D.SIVOM( ) KANMANI RAVI( ) B.SAI RAJSEKHAR( )
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني The 8085 Microprocessor Architecture.
Case Study #1 Microcontroller System. What is a microcontroller? A microcontroller can be considered a self-contained system with a processor, memory.
Input / Output Chapter 9.
Introduction to Microcontroller Technology
EMBEDDED SYSTEM An embedded system is a special-purpose computer system and a combination of software and hardware designed to perform specific task. It.
Lecture 2. A Computer System for Labs
Unit Microprocessor.
Seminar On 8085 microprocessor
Popular Microcontrollers and their Selection by Lachit Dutta
Computer Components ICS 3U0.
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
COURSE OUTCOMES OF Microprocessor and programming
Microcontrollers, Basics Fundamentals of Designing with Microcontrollers 16 January 2012 Jonathan A. Titus.
Microprocessor or Microcontroller
Microprocessor Systems Design I
Lecture 3: TI MSP430 Introduction
UNIT – Microcontroller.
Chapter 7.2 Computer Architecture
Microprocessor Systems Design I
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Introduction of microprocessor
EE 107 Fall 2017 Lecture 7 Serial Buses – I2C Direct Memory Access
Course Overview and The 8051 Architecture
CS 286 Computer Organization and Architecture
Dr. Michael Nasief Lecture 2
contains 8086 processor and several additional functional chips: clock generator 2 independent DMA channels PIC 3 programmable 16-bit timers.
Microcomputer Architecture
Subject Name: Microcontroller Subject Code: 10ES42
Computer Architecture
Chapter 1: The 8051 Microcontrollers
Introduction to Microprocessors and Microcontrollers
ریز پردازنده. ریز پردازنده مراجع درس میکروکنترلرهای AVR برنامه نویسی اسمبلی و C محمدعلی مزیدی، سپهر نعیمی و سرمد نعیمی مرجع کامل میکروکنترلرهای AVR.
Microprocessor & Assembly Language
Parallel communication interface 8255
Getting the Most Out of Low Power MCUs
Direct Memory Access Disk and Network transfers: awkward timing:
Today’s agenda Hardware architecture and runtime system
#2 Basic of Computer Architecture
8051 Micro Controller.
Overview 1. Inside a PC 2. The Motherboard 3. RAM the 'brains' 4. ROM
EECE.3170 Microprocessor Systems Design I
Wireless Embedded Systems
CHAPTER 1 THE 8051 MICROCONTROLLERS
Course Code 114 Introduction to Computer Science
Presentation transcript:

Microcontrollers & GPIO EE107 Fall 2017 Lecture 2 Microcontrollers & GPIO Networked Embedded Systems Sachin Katti

Introduction to Microcontrollers

Introduction to Microcontrollers A microcontroller (MCU) is a small computer on a single integrated circuit consisting of a relatively simple central processing unit (CPU) combined with peripheral devices such as memories, I/O devices, and timers. By some accounts, more than half of all CPUs sold worldwide are microcontrollers

Die shot of a microcontroller

Microcontroller VS Microprocessor A microcontroller is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. A microprocessor incorporates the functions of a computer’s central processing unit (CPU) on a single integrated circuit.

Microcontroller VS Microprocessor

Types of Processors In general-purpose computing, the variety of instruction set architectures today is limited, with the Intel x86 architecture overwhelmingly dominating all. There is no such dominance in embedded computing. On the contrary, the variety of processors can be daunting to a system designer. Things that matter Peripherals, Concurrency & Timing, Clock Rates, Memory sizes (SRAM & flash), Package sizes

Types of Microcontrollers

How to choose MCU for our project? What metrics we need to consider? Power consumption Clock frequency IO pins Memory Internal functions Others

How to choose MCU for our project? What metrics we need to consider? Power consumption We cannot afford mA MCU because the power budget of the system is 3.47mA. Clock frequency kHz is too slow… 100MHz is over killing... IO pins Lots of peripherals - Image sensor, UART debugger, SD card, DAC, ADC, microphone, LED

How to choose MCU for our project? What metrics we need to consider? Memory We need to have sufficient memory for storing image sensor data Internal functions Migrating data from the image sensor to radio

How to choose MCU for our project? Clock frequency kHz is too slow Image sensor clock rate is ~4MHz 100MHz is too fast Power consumption is high Several MHz would be ideal

How to choose MCU for our project? IO pins Interfacing image sensor, UART debugger, SD card, DAC, ADC, microphone, LED We need a large number of IO pins We need various types of IO pins This is not a problem for FPGA. Why?

How to choose MCU for our project? Memory Store image sensor data 360*240*8=84.3kB=675kbits What types of memory are available on an MCU? Internal memory: RAM, too small 0.5~8kB External memory: Flash, high power consumption, ~5mA for read and ~10mA for erase

The MCU used in our projects Power consumption is low 120uA/MHz in active mode and 0.7uA in sleep mode Clock rate Up to 16MHz IO pins 68 IO pins and various types of IO pins, including I2C, SPI, UART, ADC

The MCU used in our projects Memory 256kB FRAM 8kB RAM for debugging Internal functions DMA

Input and Output (I/O)

I/O Devices Keyboard, mouse, microphone, scanner, video/photo camera, etc. Large diversity Many widely differing device types Devices within each type also differs Speed varying, often slow access & transfer compared to CPU Some device-types require very fast access & transfer Access Sequential VS random read, write, read & write

What operations does software need to perform on peripherals? Get and set parameters Receive and transmit data Enable and disable functions

How can we imagine providing this interface to software? Specialized CPU instructions (x86 in/out)

Port I/O Devices registers mapped onto “ports”; a separate address space Use special I/O instructions to read/write ports Protected by making I/O instructions available only in kernel/supervisor mode Used for example by IBM 360 and successors

How can we imagine providing this interface to software? Specialized CPU instructions (x86 in/out) Accessing devices like they are memory

Memory Mapped IO Device registers mapped into regular address space Use regular move (assignment) instructions to read/ write registers Use memory protection mechanism to protect device registers

Why MMIO for embedded systems? Ports I/O: special I/O instructions are CPU dependent Memory mapped I/O: memory protection mechanism allows greater flexibility than protected instructions may use all memory reference instructions for I/O

Reading and writing with MMIO is not like talking to RAM MMIO reads and writes registers Reads and write to registers can cause peripherals to execute a function By reading data, it may cause the hardware to do something E.g., Clear the interrupt flags, get the next BYTE on UART By writing data, it may cause the hardware to do something with it E.g., Send this data over the UART bus

GPIOs are important in our project GPIOs are not only used for toggling LEDs Passing messages Interrupt the radio for transmitting the data Read pin status to receive configuration messages Debugging Did I execute my interrupt service routine? Is the timer running as expected? Why using GPIO? GPIO ops are lightweight