ece 3561 - lecture 1 1 introduction to microcontrolllers department of electrical and computer...

20
ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Upload: oswald-baker

Post on 12-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

ECE 3561 - Lecture 1 1

Introduction to Microcontrolllers

Department of Electrical and Computer EngineeringThe Ohio State University

ECE 2560

Page 2: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

ECE 3561 - Lecture 1 2

Today

The CourseSyllabusIntro

Page 3: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

ECE 3561 - Lecture 1 3

Course Philosophy and Objective

Familiarize students the architecture, programming and use of a microcontroller.

Learn to use an actual microcontrollerLearn modern design technologies Learn what assembler language is

Page 4: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Embedded Systems

Chapter 1 of textMicrocontrollers are an efficient mean by

which an embedded system can be implemented.

Microcontroller include (on board)ProcessorMemoryClock I/O support and usually A-to-D conversion

ECE 3561 - Lecture 1 4

Page 5: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

An Embedded System?

What is an embedded system? Not a personal computer!!! A cooking timer The burner and oven controller in your stove The ABS controller in you car The landing gear control system on a plane

Features of an embedded system Very focused function Usually part of a larger system

Most systems today rely on digital control

ECE 3561 - Lecture 1 5

Page 6: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Examples

There are about 100 embedded processors in each PC, not just the main processor.

A car today has about 100 embedded processors. (ABS, sound system, engine control, emissions control, …)

Electric tootbrushWashers and Dryers

ECE 3561 - Lecture 1 6

Page 7: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Examples

Washer/Dryer

Others???

ECE 3561 - Lecture 1 7

Page 8: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

A system to design

A possible implementation

ECE 3561 - Lecture 1 8

Page 9: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Salter kitchen scale

An implementation

ECE 3561 - Lecture 1 9

Page 10: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Tradeoff for systems

Could implement the system with discrete gates, an FPGA, microcontroller

ECE 3561 - Lecture 1 10

Page 11: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Microcontrollers

History 101 Early device – Intel 4004 – 4 bit microprocessor

– no onboard memory, timers, I/O supportOver time

On board memory, timers, A-to-D, etc microcontroller

Microcontroller has little if any OS support. Many have development systems.

Microcontroller “OS” is typically a RTOS.

ECE 3561 - Lecture 1 11

Page 12: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Microcontroller

The Core

CPU (ALU, registers)Memory – program and data I/O ports Internal address and data bussesClock

ECE 3561 - Lecture 1 12

Page 13: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Added to core

Watchdog timerCommunication interfacesNonvolatile memory for dataA-to-D converterD-to-A converterReal-time clockMonitor, background debugger,

embedded emulator

ECE 3561 - Lecture 1 13

Page 14: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Memory

Contains the binary information and typically addressed as bytes (words)

The information stored there can be data or instructions

In many microcontrollers instruction memory is stored in one-time or flash programmable memory.

Addresses and contents typically expressed in hexadecimal

ECE 3561 - Lecture 1 14

Page 15: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Volatile and nonvolatile memory

Volatile – content is lost when power is removed – goes to 0’s

Nonvolatile – content is retainedMasked ROM – manufacturedPROM – Programmable Read Only Memory

One time (OTP)Programmable (UV erasable) EPROMFlash – EEPROM – uses a higher voltage to

write contents

ECE 3561 - Lecture 1 15

Page 16: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

von Neumann Architecture

Traditional architecture

Diagram validforHarvard Archtoo

ECE 3561 - Lecture 1 16

Page 17: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Harvard arch

Note diagrams

ECE 3561 - Lecture 1 17

Page 18: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

The MSP430

Introduced in the late 1990s16-bit von Neumann architecture – both

address and dataLow powerRISC type architectureNo pages or banks in memory making it

simple to use.Can be programmed in CHas 16 registers in CPU

ECE 3561 - Lecture 1 18

Page 19: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

ECE 3561 - Lecture 1 19

Assignment

Read Chapter 1 and 2Assignments will be due 2 classes after

assigned to the drop box on Carmen. No paper submissions – all are electronic.

Go to ti.com and get code composer for the MSP430 – when downloaded and installed, run the 10 minutes tutorial.

Also, buy the TI launchpad – $9.99

Page 20: ECE 3561 - Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560

Code composer startup

The startup Screen on Windows

ECE 3561 - Lecture 1 20