Presentation is loading. Please wait.

Presentation is loading. Please wait.

Networked Embedded Systems Sachin Katti EE107 Spring 2016 Lecture 3 Microcontrollers.

Similar presentations


Presentation on theme: "Networked Embedded Systems Sachin Katti EE107 Spring 2016 Lecture 3 Microcontrollers."— Presentation transcript:

1 Networked Embedded Systems Sachin Katti EE107 Spring 2016 Lecture 3 Microcontrollers

2 Rest of the Quarter Basic Plumbing of Embedded Systems (4 lecs) – Microcontrollers, Timers, Interrupts Talking to the Digital World (3 lecs) – GPIO, Asynchronous & Synchronous Serial Buses Talking to the Analog World (4 lecs) – Sensing circuits, A/D & D/A, Pulse Width Modulation Putting it all together (5 lecs) – Networking, Signal Conditioning & Processing, Power Management, Interaction with the Cloud

3 Introduction to Microcontrollers

4 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

5 Introduction to Microcontrollers Low clock rate ~20 MHz 8-bit – 32-bit architectures Flash memory on-chip for program storage Many peripherals on-chip (ADC, DAC, crypto) Low power ~100 mW active (20 μW idle) Buses for interfacing with external peripherals EEPROM

6 Die shot of a microcontroller

7 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.

8 Microcontroller VS Microprocessor

9 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

10 Types of Microcontrollers

11 Design Choices Made by MCUs Embedded processors typically have a dedicated function. – They are not asked to perform arbitrary functions with user-defined software. Consequently, the processors can be more specialized. Specialization can bring enormous benefits. – consume far less energy, and consequently be usable with small batteries for long periods of time. – are much smaller – Or include specialized hardware to perform operations that would be costly to perform on general-purpose hardware, such as image analysis.

12 Early Microcontrollers

13 ARM Microcontroller

14 Many 32-bit microcontrollers implement some variant of an ARM instruction set, developed by ARM Limited. – ARM originally stood for Advanced RISC Machine, and before that Acorn RISC Machine, Processors that implement the ARM ISA are widely used in mobile phones to realize the user interface functions, as well as in many other embedded systems. Semiconductor vendors license the instruction set from ARM Limited and produce their own chips. – ARM processors are currently made by Alcatel, Apple, Atmel, Broadcom, Cirrus Logic, Freescale, LG, Marvell Technology Group, NEC, NVIDIA, NXP, Samsung, Sharp, ST Microelectronics, Texas Instruments, VLSI Technology, Qualcomm, Yamaha, and others.

15 How to select a microcontroller? The designer must first ask: "What does the MCU need to do in my system?" – The answer to this one simple question dictates the required MCU features for the system and, thus, is the controlling agency in the selection process.

16 How to select a microcontroller? Does it have the required number of I/O (input/output) pins/ports? – For example, too few = can’t do the job, and too many = excessive cost Does it have all the other required peripherals? – Such as serial I/O, random-access memory (RAM), read-only memory (ROM), analog-to-digital (A/D), digital-to-analog (D/A), etc.

17 How to select a microcontroller? Does the CPU (central processor unit) core have the correct throughput? – For example, computer power, to handle the system requirements over the life of the system for the chosen implementation language? Too much is wasteful, and too little will never work. Is the MCU affordable? – If the MCU is not affordable for the project, all the other questions become irrelevant and you must start looking for another MCU.

18 Design Requirements of BattOr 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?

19 Design Requirements of BattOr Inputs: Power measurements from phone or laptop Outputs: Power samples at ~10 ksps Sample rate: CPU/GPU state change interval (~1 msec) Communication: Power samples at ~10 ksps Storage: Power samples at ~10 ksps until experiment is over Processing: Move around power samples between devices Power: Same power supply as phone or laptop Form factor: Carry with the phone or laptop Cost: ~$300

20 How to select a microcontroller? Power/cost IO/speed/etc STM32 MCU 8051 MCU Atmel XMega MCU

21 MCU chosen  Atmel XMega Language: C or assembly Register width: 8-bit Peripheral IO: Memory Mapped IO Clock rate: 32 MHz Programmer and debugger: External USB device (ISP)

22 Four Assignments 1.Memory Mapped IO, Timers & Interrupts – Learn the SDK – LED control via GPIO using the CPU – Timer to drive the LEDs vis interrupts 2.Talking to the digital world – Interface with PC USB via asynchronous serial bus – Interface with digital potentiometers using synchronous serial bus 3.Talking to the analog world – Analog signal capture & filtering – Amplification Putting it together – Synchronization with the PC – Moving the data to the PC & analysis – DMA (for extra credit)


Download ppt "Networked Embedded Systems Sachin Katti EE107 Spring 2016 Lecture 3 Microcontrollers."

Similar presentations


Ads by Google