39
Fundamental of Microcontrollers Waghmare Rahul G.

Fundamental of Microcontrollers

  • Upload
    edison

  • View
    81

  • Download
    0

Embed Size (px)

DESCRIPTION

Fundamental of Microcontrollers. Waghmare Rahul G. Introduction. Purpose Provides an introduction to microcontrollers including usage and selection Objectives: Describes the functions of a microcontroller Briefly explains the history of microcontrollers - PowerPoint PPT Presentation

Citation preview

Page 1: Fundamental of Microcontrollers

Fundamental of Microcontrollers

Waghmare Rahul G.

Page 2: Fundamental of Microcontrollers

Purpose◦ Provides an introduction to microcontrollers including

usage and selection Objectives:

◦ Describes the functions of a microcontroller◦ Briefly explains the history of microcontrollers◦ Describes the main components of microcontroller◦ Talk about trends seen in the microcontroller industry◦ Describe the current microcontroller offerings◦ Describe the some of the steps in first using a

microcontroller◦ Show usage of an Evaluation kit◦ Provide insight into how to choose a microcontroller for

your application

Introduction

Page 3: Fundamental of Microcontrollers

Microcontroller◦ Single chip device◦ System decision based on external

signals◦ Controls the behavior of a system

Always Contains:◦ Processor Core◦ Memory (RAM, ROM)◦ Input/output (I/O) Capability

Serial I/O interface◦ Various On-Chip Peripherals such as:

Timers Analog to digital converters Pulse width Modulators Many others

What is Microcontroller

MemoryI/O Peri

perals

Processor Core (CPU)

Page 4: Fundamental of Microcontrollers

Everywhere◦ Any application that has real world inputs and

outputs Examples:

◦ Washing Machine◦ ECG Machine◦ Networking equipments◦ PCOs◦ etc..

Where are Microcontrollers?

Page 5: Fundamental of Microcontrollers

What is difference between a Microcontroller and a Microprocessor?

CPU core with memory and peripherals integrated on chip

CPU core connects to external memory and peripherals

Page 6: Fundamental of Microcontrollers

What is difference between a Microcontroller and a DSP?

Page 7: Fundamental of Microcontrollers

History of the Microcontrollers

Page 8: Fundamental of Microcontrollers

History of the Microcontroller:Early Time

Page 9: Fundamental of Microcontrollers

General Instruments:◦ The famous PIC◦ Spun out chip Division - Microchip

Hitachi◦ 6300 line◦ Combined with Mitshibushi Electric to form

Renesas Zilog

◦ First the Z – 80 processor, then Z – 8 MCU

History of the Microcontroller:Other Early Entries

Page 10: Fundamental of Microcontrollers

Architecture

Page 11: Fundamental of Microcontrollers

CPU◦ Reads and Stores

data◦ Performs Basic Math

Operations◦ Performs Logical

functions (OR, AND etc)

◦ Controls flow of program execution

Processor Core

Page 12: Fundamental of Microcontrollers

Microcontroller bit definition

Page 13: Fundamental of Microcontrollers

CISC V/S RISC

Complex Instruction Set Computer

Reduced Instruction Set Computer

Page 14: Fundamental of Microcontrollers

Harvard V/S von Neumann

Page 15: Fundamental of Microcontrollers

Hardware to handle interrupt signals Important in real time system Interrupt latency in important to consider

◦ Hardware and software (OS) determine interrupt latency

◦ Interrupt service routine (ISR) is the part of OS

Interrupt controller

Page 16: Fundamental of Microcontrollers

ROM – Read-only Memory – for program storage◦ Masked ROM

Programmed during manufacture◦ PROM

Programmed by blowing fuse after manufacture◦ EPROM – Erasable ROM

Electrically programmed – Erased by UV light◦ OTP – One Time Programmable

PROM EPROM that is encapsulated

◦ EEPROM – Electrically Erasable ROM Electrically programmed – Erased with higher voltages

◦ FLASH Similar to EEPROM Write/Read/Erase in large blocks

System Memory: ROM

Page 17: Fundamental of Microcontrollers

RAM – Random Access Memory◦ Volatile or Non-permanent memory◦ Can be written to many times◦ Stores Temporary or changeable data◦ “Embedded” in MCUs

Types of RAM◦ SRAM

Static RAM Fast Access times / More Silicon area Common in MCUs

◦ DRAM Dynamic RAM Slower access time / Lesser Silicon area Less common in MCUs

System Memory: RAM

Page 18: Fundamental of Microcontrollers

Allow Communication with other devices◦ USB (Universal Serial Bus)◦ CAN (Controller Area Network)◦ SPI (Serial Peripheral Interface)◦ I2C (Inter Integrated Circuit)◦ UART (Universal Asynchronous

Receiver/Transmitter)◦ LIN (Local Interconnect Network)◦ Ethernet◦ Also Wireless Interfaces

ZigBee Bluetooth

I/O: Serial Interface

Page 19: Fundamental of Microcontrollers

Timers LCD Controllers Touch screen

Controllers Keypad Controllers GPIO pins A/D Converter D/A Converter Analog Comparator Pulse Width Modulator

On chip Peripherals

Page 20: Fundamental of Microcontrollers

Trends andCurrent Offerings

Page 21: Fundamental of Microcontrollers

Low Power◦ Dynamic Power◦ Static Power◦ Low Power Modes◦ Lower Supply Voltage

Higher Integration◦ More Feature Incorporated

Microcontroller Trends

Page 22: Fundamental of Microcontrollers

32 bits◦ More Processing power

Flash Memory◦ May replace the traditional ROM

DSP Functionality◦ DSP or Microcontroller

Multi-core◦ Not just for PCs

Microcontroller Trends

Page 23: Fundamental of Microcontrollers

8051◦ NXP, Atmel, Silicon Labs, Dallas/Maxim, ST,

Rabbit and others ARM

◦ NXP, ST, Free-scale, Atmel, Samsung, Texas Instruments, OKI, Energy Micro and others

MIPS◦ Microchips

Sampling of Microcontroller offerings:Licensed cores

Page 24: Fundamental of Microcontrollers

NXP Renesas Microchip Free scale Atmel Infineon

Texas Instruments Samsung & ST

Microelectronics NEC Toshiba

Sampling of Microcontroller offerings:Broad range Vendors

Page 25: Fundamental of Microcontrollers

Analog Devices Cyan Maxim / Dallas Zilog Silicon Labs Cypress Energy Micro Rabbit

Sampling of Microcontroller offerings:Broad range Vendors (more..)

Page 26: Fundamental of Microcontrollers

Designing with Microcontrollers

Page 27: Fundamental of Microcontrollers

Editor◦ Text based window for editing high-level language

Compiler◦ Converts source code to object code

Assembler◦ Converts assembly code to binary code

Linker◦ Joins separate object code files for download

Simulator◦ Run linker output on a simulation of the MCU on host PC

Debugger◦ Allows engineer to monitor and halt program execution

Microcontroller Development Tools

Page 28: Fundamental of Microcontrollers

Integrated Development Environment (IDE)◦ Software package that contains all software tools integrated

In-Circuit Emulator◦ Replaces MCU with tool to allow viewing and control of

program as seen within the chip JTAG

◦ Interface for test and debug Evaluation / Development Kits

◦ Low cost Easy-to-use Evaluation and development tool 3rd Party tools

◦ Various tools by Non-MCU vendor that help in all aspects of development including development including kits and JTAG Debugging

Microcontroller Development Tools

Page 29: Fundamental of Microcontrollers

A software platform which manages task created by user◦ Design team may write their own OS

Drivers handle details of using I/O and peripherals◦ Makes programming easier; just call on drivers for I/O◦ Makes program reusable; MCU hidden from designer◦ Drivers control peripherals; simply pass data to them

Real time Operating System (RTOS)◦ Designed to execute multiple tasks with definite time

constraints and priorities

Operating System

Page 30: Fundamental of Microcontrollers

Programming code Compiler Memory Highly Integrated Microcontrollers make circuit design

easy but…◦ Must be programmed in order to perform a function◦ Code development is more than half the product development

A program is a sequence of instructions using the microcontroller’s unique instruction set◦ Families of MCUs may have a common instruction set◦ Typical Instruction includes:

Adding two numbers, and saving the result Comparing two numbers and branching to different subroutines if

equal or not equal Reading the value of an external pins

Code Development

Page 31: Fundamental of Microcontrollers

Compiler

Page 32: Fundamental of Microcontrollers

Evaluation Kit◦ Low cast kits◦ Evaluating the microcontroller

Development Kit◦ More comprehensive◦ For developing the system around the

microcontroller Reference design kits

◦ Application specific reference designs already complete

Evaluation/Development/Reference design kits

Page 33: Fundamental of Microcontrollers

Choosing a Microcontroller

Page 34: Fundamental of Microcontrollers

Marketing analyzes market needs, Drivers & develops new product specification

Environment sensors, motors, LCD Display, Keypad, etc

Engineering determines what functions of microcontrollers are required to meet specifications

Engineering team searches for MCU & other system components that will deliver end system to specification

Basics of Designing a System

Page 35: Fundamental of Microcontrollers

Up Front Design System◦ Spreadsheets◦ Feature Requirements◦ Tool Requirements◦ Evaluation boards

Hardware V/S Software◦ Complexity of MCU

Choosing a microcontroller:General Tips

Page 36: Fundamental of Microcontrollers

Features / On chip Peripherals◦ ADC◦ DAC◦ Analog Comparator◦ PWM◦ LCD Control◦ Timers◦ JTAG◦ I/Os

Communication Interface◦ USB◦ CAN◦ UART◦ SPI◦ Others…

Packages◦ Size◦ Pins

Choosing a microcontroller:Parametric aspects

Page 37: Fundamental of Microcontrollers

Power◦ Sleep Mode◦ Voltage◦ Current

Speed◦ Clock frequency◦ Critical Instruments◦ Interrupt latency

Reliability◦ Application demand

Memory◦ Size◦ Type

Familiarity◦ Personal experience◦ Senior Engineer

Choosing a microcontroller:Parametric aspects

Page 38: Fundamental of Microcontrollers

Price◦ Device◦ Volume◦ Software tools

IDEs Debug Compiler OS

Available Kits◦ Evaluation Kit◦ Development Kit◦ Reference design kits

Support◦ Documentation

White Papers Reference design Example code User Guide Errata

◦ Application Engineers Response time

◦ Community Portability

◦ Roadmap◦ Large Family◦ Abstraction Layer

Choosing a microcontroller:Parametric aspects

Page 39: Fundamental of Microcontrollers

Thank You