EE 107 Fall 2016 Lecture 3 Micro-controller Networked Embedded Systems Sachin Katti.

Slides:



Advertisements
Similar presentations
TO COMPUTERS WITH BASIC CONCEPTS Lecturer: Mohamed-Nur Hussein Abdullahi Hame WEEK 1 M. Sc in CSE (Daffodil International University)
Advertisements

Embedded System Lab. What is an embedded systems? An embedded system is a computer system designed for specific control functions within a larger system,
1-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL
Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
Engr. M.K.Debnath1 Microcontroller and PLC Eng. ISRAFIL KHAN. DIPLOMA IN ELECTRONIC.
RISC vs CISC CS 3339 Lecture 3.2 Apan Qasem Texas State University Spring 2015 Some slides adopted from Milo Martin at UPenn.
Embedded Systems Programming
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Introduction to Microprocessors Number Systems and Conversions No /6/00 Chapter 1: Introduction to 68HC11 The 68HC11 Microcontroller.
Introduction to ARM Architecture, Programmer’s Model and Assembler Embedded Systems Programming.
ARM programmer’s model and assembler Embedded Systems Programming.
CIS 314 : Computer Organization Lecture 1 – Introduction.
Embedded Systems Programming
ASPPRATECH.
Prardiva Mangilipally
Microcontroller based system design
© 2009 Acehub Vista Sdn. Bhd Introduction to ARM ® Processors.
ARM Core Architecture. Common ARM Cortex Core In the case of ARM-based microcontrollers a company named ARM Holdings designs the core and licenses it.
Computer Organization and Assembly language
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 2.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
C.S. Choy95 COMPUTER ORGANIZATION Logic Design Skill to design digital components JAVA Language Skill to program a computer Computer Organization Skill.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
ECE 353 Introduction to Microprocessor Systems
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Microcontroller Presented by Hasnain Heickal (07), Sabbir Ahmed(08) and Zakia Afroze Abedin(19)
COMPUTER ORGANIZATION & ARCHITECTURE A digital computer solves problems by executing a sequence of instructions called a program Ioan Despi.
Chapter Six Sun SPARC Architecture. SPARC Processor The name SPARC stands for Scalable Processor Architecture SPARC architecture follows the RISC design.
Computer Organization & Assembly Language © by DR. M. Amer.
Computer Organization 1 Instruction Fetch and Execute.
MICROOCESSORS AND MICROCONTROLLER:
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO CS 219 Computer Organization.
Chapter 2.
Instruction Sets: Characteristics and Functions  Software and Hardware interface Machine Instruction Characteristics Types of Operands Types of Operations.
Networked Embedded Systems Sachin Katti EE107 Spring 2016 Lecture 3 Microcontrollers.
CECS 347 Microprocessors and Controllers II Chapter 1 - An Overview of Computing Systems Instructor: Eric Hernandez.
Hardware Architecture
Addressing modes, memory architecture, interrupt and exception handling, and external I/O. An ISA includes a specification of the set of opcodes (machine.
Chapter 2 content Basic organization of computer What is motherboard
COMP2121: Microprocessors and Interfacing
IF I ONLY HAD A BRAIN THE MICROCONTROLLER
Popular Microcontrollers and their Selection by Lachit Dutta
Computer Organization and Assembly Languages Yung-Yu Chuang
Microprocessor and Microcontroller Fundamentals
Microprocessor and Microcontroller Fundamentals
Computer Organization
Microcontrollers & GPIO
ECE354 Embedded Systems Introduction C Andras Moritz.
UNIT – Microcontroller.
INTRODUCTION TO MICROPROCESSORS
Architecture & Organization 1
Course Overview and The 8051 Architecture
Introduction to Microprocessors
INTRODUCTION TO MICROPROCESSORS
Basic Computer Organization
INTRODUCTION TO MICROPROCESSORS
General Architecture of Digital Computer
عمارة الحاسب.
Introduction to Microprocessors and Microcontrollers
EE345: Introduction to Microcontrollers Memory
Central Processing Unit
Tiny Computers, Hidden Control
Architecture & Organization 1
What is Computer Architecture?
Introduction to Microprocessor Programming
What is Computer Architecture?
Wireless Embedded Systems
Course Code 114 Introduction to Computer Science
Presentation transcript:

EE 107 Fall 2016 Lecture 3 Micro-controller Networked Embedded Systems Sachin Katti

Introduction to Microcontrollers A microcontroller (µC) 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 Microcontrollers

Memory Types DRAM: Dynamic Random Access Memory – Upside: very dense (1 transistor per bit) and cheap – Downside: requires refresh and often slow – Used as main memory SRAM: Static Random Access Memory – Upside: fast and no refresh required – Downside: not so dense, not so cheap – Often used for caches EEPROM: Electronically Erasable Programmable Read-only Memory – Used for bootstrapping – Require wear-leveling 7 Slides from CMU course , Anthony Rowe

Big Endian vs. Little Endian How is a word, say, 0x stored in memory? 8 Slides from CMU course , Anthony Rowe

Big Endian vs. Little Endian Big-endian (big end first) – Most significant byte of any multi-byte data field is stored at the lowest memory address – Reading from left to right – SPARC & Motorola Little-endian (little end first) – Least significant byte of any multi-byte data field is stored at the lowest memory address – Reading from right to left instead – Intel processors Bi-endian (ARM, PowerPC, Alpha) 9 Slides from CMU course , Anthony Rowe

CISC vs. RISC RISC – Reduced Instruction Set Computers CISC – Complex Instruction Set Computers Different architectures for doing the same operations Suppose you wanted to multiply two numbers in memory locations mem0 & mem1 and store the results back in mem0 – Same result but the complexity of operations and the number of steps used in the two cases differ 10 Slides from CMU course , Anthony Rowe

CISC vs. RISC (1) 11 CISCRISC Example – Intel x86 chipsExamples – SPARC, PowerPC, ARM Large number of instructions Few instructions, typically less than 100 Variable-length instructions, instructions can range from 1-15 bytes Fixed-length instructions, all instructions have the same number of bytes Some instructions can have long execution times No instruction with a long execution times execution time Slides from CMU course , Anthony Rowe

CISC vs. RISC (2) 12 CISCRISC Arithmetic and logical operations can be applied to memory and register operands Arithmetic and logical operations only use register operands Memory contents have to be loaded into registers first Referred to as load/store architecture Stack-intensive procedure linkage Stack is used for procedure arguments and return values Register-intensive procedure linkage Registers used for procedure arguments and return values Slides from CMU course , Anthony Rowe

CISC vs. RISC (3) 13 CISCRISC Compact code size is typically smallCompiled code size is larger More transistors = more powerFewer transistors = less power Slides from CMU course , Anthony Rowe

ARM, Ltd. Founded in November 1990 – Spun out of Acorn Computers based in U.K. – ARM was originally Acorn RISC Machine; then, Advanced RISC Machine Most widely used 32-bit instruction-set architecture in terms of volume – 6.1 billion ARM processors in 2010 up to 15 billion in 2015 – 95% of all smartphones, 35% of digital TVs and set-top boxes ARM architecture can be licensed, with licensees (former and/or current) – AMD, Apple, Freescale, Microsoft, Nintendo, Xilinx, Qualcomm, TI, etc. Companies design custom CPU cores with ARM instruction set – Qualcomm’s Snapdragon, Apple’s A8, etc. ARM Ltd. does not fabricate processors itself – Also develops technologies to help with the design-in of ARM devices – Software tools, boards, debug hardware, application software, buses, peripherals 14 Slides from CMU course , Anthony Rowe

History of ARM’s Usage 15 Slides from CMU course , Anthony Rowe

SoftBank Acquisition Japanese multinational company July 18 th 2016 Purchased for £23.4 billion Speculating on IoT market 16 Slides from CMU course , Anthony Rowe

ARM Everywhere 17 Slides from CMU course , Anthony Rowe

The ARM Family 18 Slides from CMU course , Anthony Rowe

Different ARM Core Families Cortex-A – Application processors – Single-core or multi-core – Optional multimedia processing – Optional floating-point units – Smartphones, tablets, digital TVs, eBook readers Cortex-R – Deeply embedded real-time applications – Low power, good interrupt behavior with good performance – Automotive braking systems, printers, storage controllers Cortex-M – Cost-sensitive microcontrollers – Fast, deterministic interrupt management – Lowest possible power consumption – Automotive airbags, tire-pressure monitoring, smart meters, sensors 19 Slides from CMU course , Anthony Rowe

Cortex-M Family 20 Slides from CMU course , Anthony Rowe

Beyond Cortex 21 Slides from CMU course , Anthony Rowe

ARM Data Sizes & Instructions The ARM is a 32-bit RISC architecture When used in relation to the ARM – Byte means 8-bits – Halfword means 16 bits (two bytes) – Word means 32 bits (four bytes) Most ARM processors implement two instructions sets – 32-bit ARM Instructions Set – 16-bit Thumb Instruction Set Bi-endian – Can be configured to view words stored in memory as either Big- endian or Little-Endian Format 22 Slides from CMU course , Anthony Rowe

ARM is a RISC Architecture A large array of uniform registers A load/store model, where – Operations operate only on register and not directly on memory – All data must be loaded into registers before being used – Result (in a register) can be further processed or stored to memory A small number of addressing modes – All load / store addresses are determined from register and instruction fields A uniform fixed-length instruction (32-bit) 23 Slides from CMU course , Anthony Rowe

Specifications for an embedded system Inputs: What data will be collected, what are the controls? Outputs: What will be transmitted, displayed, or controlled? Sample rate: What interval does it need to collect data? Communication: What data needs to be sent and received, how? Storage: What data needs to be stored and for how long? Processing: What processing needs to be done on the data? Power: How long does it need to last between charges? Form factor: How will the device fit into the physical world? Cost: How much will the users be willing to pay?

Case study: motion tracking Inputs: IMU sensor data collected by an MCU via serial interface Outputs: Motion trajectory output at 1-60Hz with mm accuracy Sample rate: varies, but around 1KHz Communication: 1KHz*??? Storage: How much buffering do we need on the target device? Processing: Are we computing locally or in the cloud? Power: Powered by battery ideally, but can we? Form factor: Small enough to be mounted on a human body Cost: ~$500

MCU chosen  AtMega 328 Language: C or assembly Register width: 8-bit Peripheral IO: Memory Mapped IO Clock rate: 8 MHz Programmer and debugger: External USB device