Alex Milenkovich 1. CPE/EE 421 Microcomputers: The MSP430 Introduction. Outline

Similar documents
CPE/EE 421 Microcomputers

Block diagram of processor (Harvard)

CPE 323 Introduction to Embedded Computer Systems: MSP430 System Architecture An Overview

Alex Milenkovich 1. CPE/EE 421 Microcomputers. Course Administration. Review: Outline. Getting Started with EasyWeb2. Review: MSP bit RISC

CPE/EE 421 Microcomputers

Microcontrollers. vs Microprocessors

CPE 323: MSP430 Timers

Getting Started with the Texas Instruments ez430

MSP430. More on MSP430

CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA)

Chapter 1 MSP430 Microcontroller Family

CPE 325: Embedded Systems Laboratory Laboratory #7 Tutorial MSP430 Timers, Watchdog Timer, Timers A and B

2002 Mixed Signal Products SLAU056B

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -2 1 UNIT 2

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

Lab 1: I/O, timers, interrupts on the ez430-rf2500

ECE2049: Embedded Computing in Engineering Design C Term Spring 2019 Lecture #22: MSP430F5529 Operating Mode & the WDT

CPE/EE 421 Microcomputers: The MSP430 Introduction

CPE/EE 421 Microcomputers

6. General purpose Input/Output

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I.

Advanced Microcontrollers Grzegorz Budzyń Lecture. 4: 16-bit. microcontrollers

MSP430FG4618 Programming Reference Revision 3

Alex Milenkovich 1. CPE/EE 421 Microcomputers. CPE/EE 421 Microcomputers U A H U A H U A H. Instructor: Dr Aleksandar Milenkovic Lecture Notes S01

CPE/EE 323 Introduction to Embedded Computer Systems Homework V

What is an Interrupt?

Texas Instruments Mixed Signal Processor Tutorial Abstract

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

2006 Mixed Signal Products SLAU049F

Micro computer Organization

Wireless Sensor Networks (WSN)

Interconnects, Memory, GPIO

@databasescaling Wednesday, 18 th April 2013

2006 Mixed Signal Products SLAU144B

Team 3. By: Miriel Garcia. Microcontrollers/ TI MSP430F5438A. ECE 480 senior Design. Application Note 4/3/15

CPE/EE 421 Microcomputers

CM5000 DATASHEET v0.1

MSP430 Interrupts. Change value of internal variable (count) Read a data value (sensor, receive) Write a data value (actuator, send)

063[[[0LFURFRQWUROOHUV /RZ3RZHU0RGHV &3($GYDQFHG0LFURFRPSXWHU7HFKQLTXHV 'U(PLO-RYDQRY /RZ3RZHU. Power: A First-Class Architectural Design Constraint

MICROPROCESSOR BASED SYSTEM DESIGN

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

Hacettepe University

Lecture 5: MSP430 Interrupt

Alex Milenkovich 1 CPE 323. CPE 323 Introduction to Embedded Computer Systems: Introduction. Instructor: Dr Aleksandar Milenkovic Lecture Notes

Copyright 2009 Texas Instruments All Rights Reserved

CPE/EE 421 Microcomputers

Department of Electronics and Instrumentation Engineering Question Bank

ECE PRACTICE EXAM #2 Clocks, Timers, and Digital I/O

2006 Mixed Signal Products SLAU049F

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

CONTENTS: Program 1 in C:

Timers and Clocks CS4101 嵌入式系統概論. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan

ATmega128. Introduction

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

DERTS Design Requirements (1): Microcontroller Architecture & Programming

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

Microcontrollers. Microcontroller

8051 microcontrollers

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

Automation Engineers AB Pvt Ltd, NOIDA Job-Oriented Course on Embedded Microcontrollers & Related Software Stack

AVR Microcontrollers Architecture

Lecture test next week

8051 Microcontroller

BHARATHIDASAN ENGINEERING COLLEGE. III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013)

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -1 1 UNIT 1

Computer Hardware Requirements for ERTSs: Microprocessors & Microcontrollers

MSP430 Microcontroller Basics

Hacettepe University

ARDUINO MEGA INTRODUCTION

Application Report. 1 Hardware Description. John Fahrenbruch... MSP430 Applications

Microprocessors/Microcontrollers

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Lab 4: Interrupt. CS4101 Introduction to Embedded Systems. Prof. Chung-Ta King. Department of Computer Science National Tsing Hua University, Taiwan

CPE 325: Embedded Systems Laboratory Laboratory #11 Tutorial Analog-to-Digital Converter and Digital-to-Analog Converter

MB95260H/MB95270H. MB95280H Series. MB95260H Series/MB95270H Series/

ECE2049 Homework #2 The MSP430 Architecture & Basic Digital IO (DUE Friday 9/8/17 at 4 pm in class)

Create and Add the Source File

Getting Started with the MSP430 IAR Assembly

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

CPE 323 Introduction to Embedded Computer Systems: ADC12 and DAC12. Instructor: Dr Aleksandar Milenkovic Lecture Notes

The Microcontroller. Lecture Set 3. Major Microcontroller Families. Example Microcontroller Families Cont. Example Microcontroller Families

VLSI Design Lab., Konkuk Univ. Yong Beom Cho LSI Design Lab

INSTITUTO SUPERIOR TÉCNICO. Architectures for Embedded Computing

Intro. MEB/ Texas Instruments Inc, Slide 1

Designing for Ultra-Low Power with MSP430

FIFTH SEMESTER B.TECH DEGREE EXAMINATION MODEL TEST QUESTION PAPER, NOVEMBER CS 305: Microprocessor and Microcontrollers PART A

Lab 4 Interrupts ReadMeFirst


Interfacing CMA3000-D01 to an MSP430 ultra low-power microcontroller

Question Bank Microprocessor and Microcontroller

BASIC INTERFACING CONCEPTS

TEVATRON TECHNOLOGIES PVT. LTD Embedded! Robotics! IoT! VLSI Design! Projects! Technical Consultancy! Education! STEM! Software!

Lecture 1. Course Overview and The 8051 Architecture

MSP430 Ultra-Low-Power Microcontrollers The Solution for Battery-Powered Measurement

UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

Introducing The MCS 251 Microcontroller -- 8XC251SB

Four Categories Of 8085 Instructions That >>>CLICK HERE<<<

University of Texas at El Paso Electrical and Computer Engineering Department. EE 3176 Laboratory for Microprocessors I.

WHICH MICRO? What does MCU needs to do in my system? What are the tasks? Dr. Adriana Becker-Gomez

AVR Training Board-I. VLSI Design Lab., Konkuk Univ. LSI Design Lab

Transcription:

Outline CPE/EE 421 Microcomputers: The MSP430 Introduction Instructor: Dr Aleksandar Milenkovic Lecture Notes MSP430: An Introduction The MSP430 family Technology Roadmap Typical Applications The MSP430 Documentation MSP430 Architecture MSP430 Devices Getting Started with EasyWeb2 MSP430 RISC core CPE/EE 421/521 Microcomputers 2 The Family Broad family of TI s 16-bit microcontrollers from 1Kbytes ROM, 128 bytes RAM (approx. $1 ) to 60Kbytes ROM, 10Kbytes RAM ( $10) Three subfamilies MSP430x1xx: basic unit MSP430x3xx: more features MSP430x4xx: built-in LCD driver CPE/EE 421/521 Microcomputers 3 Part numbering convention MSP430M t F a F b M c Mt : Memory type C ROM, F Flash, P OTP, E EPROM Fa,Fb 10, 11 basic 12, 13 HW UART 14 HW UART, HW multiplier 31, 32 LCD Controller 33 LCD controller, HW UART, HW multiplier 41 LCD controller 43 - LCD controller, HW UART 44 - LCD controller, HW UART, HW multiplier CPE/EE 421/521 Microcomputers 4 Alex Milenkovich 1

Part numbering convention MSP 430 Roadmap MSP430M t F a F b M c Mc : Memory capacity 0: 1 Kb ROM, 128 b RAM 1: 2 KB ROM, 128 b RAM 2: 4 KB ROM, 256 b RAM... 9: 60 KB ROM, 2 Kb RAM CPE/EE 421/521 Microcomputers 5 CPE/EE 421/521 Microcomputers 6 MSP430 Typical Applications LCD Adj. Vol. Regul. RS232 Handheld Measurement Air Flow measurement Alcohol meter Barometer Data loggers Emission/Gas analyser Humidity measurement Temperature measurement Weight scales Medical Instruments Blood pressure meter Blood sugar meter Breath measurement EKG system Utility Metering Gas Meter Water Meter Heat Volume Counter Heat Cost Allocation Electricity Meter Meter reading system (RF) Sports equipment Altimeter Bike computer Diving watches Security Glass break sensors Door control Smoke/fire/gas detectors Home environment Air conditioning Control unit Thermostat Boiler control Shutter control Irrigation system White goods (Washing machine,..) Misc Smart card reader Taxi meter Smart Batteries CPE/EE 421/521 Microcomputers 7 LEDs RS232 controller Analog I/O 2-axes joystick Switches Thermistor µc Keypad An MSP430-Based System CPE/EE 421/521 Microcomputers 8 Alex Milenkovich 2

Another MSP430-Based System Tmote Sky Platform Basic WISE Battery Microcontroller TI MSP430F149 8-channel 12-bit AD conv. Accelerometer Movement detection Analog Device ADXL202 Transceiver LINX 916 MHz CPE/EE 421/521 Microcomputers 9 Texas Instruments 16-bit MSP430F149 microcontroller (2KB RAM, 60KB ROM) Chipcon 2420, 250kbps, 2.4GHz, IEEE 802.15.4 compliant wireless transceiver with programmable output power Integrated onboard antenna with 50m range indoors and 125m range outdoors Integrated humidity, temperature, and light sensors CPE/EE 421/521 Microcomputers 10 Tmote Sky Platform http://www.moteiv.com CPE/EE 421/521 Microcomputers 11 MSP430 Documentation MSP430 home page (TI) www.ti.com/msp430 User s manual (MSP430x1xx Family) http://www.ece.uah.edu/~milenka/cpe421-06s/docs/msp430/slau049e.pdf Datasheet http://www.ece.uah.edu/~milenka/cpe421-06s/docs/msp430/msp430f149.pdf TI Workshop document http://www.ece.uah.edu/~milenka/cpe421-06s/docs/msp430/430_2002_atc_workshop.pdf IAR Workbench Tutorial http://www.ece.uah.edu/~milenka/cpe421-06s/docs/msp430/iar tut.pdf CPE/EE 421/521 Microcomputers 12 Alex Milenkovich 3

MSP 430 Modular Architecture CPE/EE 421/521 Microcomputers 13 CPU Introduction RISC architecture with 27 instructions and 7 addressing modes. Orthogonal architecture with every instruction usable with every addressing mode. Full register access including program counter, status registers, and stack pointer. Single-cycle register operations. Large 16-bit register file reduces fetches to memory. 16-bit address bus allows direct access and branching throughout entire memory range. 16-bit data bus allows direct manipulation of word-wide arguments. Constant generator provides six most used immediate values and reduces code size. Direct memory-to-memory transfers without intermediate register holding. Word and byte addressing and instruction formats. CPE/EE 421/521 Microcomputers 14 MSP430 16-bit RISC CPU Registers Large 16-bit register file eliminates single accumulator bottleneck High-bandwidth 16-bit data and address bus with no paging RISC architecture with 27 instructions and 7 addressing modes Single-cycle register operations with full-access Direct memory-memory transfer designed for modern programming Compact silicon 30% smaller than an 8051 saves power and cost CPE/EE 421/521 Microcomputers 15 CPE/EE 421/521 Microcomputers 16 Alex Milenkovich 4

Registers: PC (R0) Each instruction uses an even number of bytes (2, 4, or 6) PC is word aligned (the LSB is 0) MOV #LABEL,PC ; Branch to address LABEL MOV LABEL,PC ; Branch to address contained in LABEL MOV @R14,PC ; Branch indirect, indirect R14 Registers: SP (R1) Stack pointer for return addresses of subroutines and interrupts SP is word aligned (the LSB is 0) Pre-decrement/post-increment scheme MOV 2(SP),R6 ; Item I2 > R6 MOV R7,0(SP) ; Overwrite TOS with R7 PUSH #0123h ; Put 0123h onto TOS POP R8 ; R8 = 0123h CPE/EE 421/521 Microcomputers 17 CPE/EE 421/521 Microcomputers 18 Registers: SR (R2) Status bits C: SR(0) Z: SR(1) N: SR(2) GIE (Global interrupt enable): SR(3) CPUOff: SR(4) OSCOff: SR(5) SCG1, SCG0: SR(7), SR(6) V: SR(8) CPE/EE 421/521 Microcomputers 19 CPE/EE 421/521 Microcomputers 20 Alex Milenkovich 5

Constant Generators CISC / RISC Instruction Set As source register addressing mode in the instruction word CPE/EE 421/521 Microcomputers 21 CPE/EE 421/521 Microcomputers 22 27 Core RISC Instructions Emulated Instructions CPE/EE 421/521 Microcomputers 23 CPE/EE 421/521 Microcomputers 24 Alex Milenkovich 6

51 Total Instructions Double operand instructions CPE/EE 421/521 Microcomputers 25 CPE/EE 421/521 Microcomputers 26 Single Operand Instruction Jump Instructions CPE/EE 421/521 Microcomputers 27 CPE/EE 421/521 Microcomputers 28 Alex Milenkovich 7

3 Instruction Formats Addressing Modes CPE/EE 421/521 Microcomputers 29 CPE/EE 421/521 Microcomputers 30 Register Addressing Mode Register-Indexed Addressing Mode CPE/EE 421/521 Microcomputers 31 CPE/EE 421/521 Microcomputers 32 Alex Milenkovich 8

Symbolic Addressing Mode Absolute Addressing Mode CPE/EE 421/521 Microcomputers 33 CPE/EE 421/521 Microcomputers 34 Register Indirect Addressing Mode Register Indirect Autoincrement Addressing Mode CPE/EE 421/521 Microcomputers 35 CPE/EE 421/521 Microcomputers 36 Alex Milenkovich 9

Immediate Addressing Mode Code Reduction Effect of Constant Generator CPE/EE 421/521 Microcomputers 37 CPE/EE 421/521 Microcomputers 38 Machine Cycles for Format I Instructions Machine Cycles for Format II/III Instructions CPE/EE 421/521 Microcomputers 39 CPE/EE 421/521 Microcomputers 40 Alex Milenkovich 10

MSP430 Memory Model Memory Organization CPE/EE 421/521 Microcomputers 41 CPE/EE 421/521 Microcomputers 42 MSP 430 Architecture: A Closer Look MSPx430x14x Architecture 64 TQFP (The The Thin Quad Flat Pack package CPE/EE 421/521 Microcomputers 43 CPE/EE 421/521 Microcomputers 44 Alex Milenkovich 11

Basic Clock System Basic Clock Module provides the clocks for the MSP430 devices Watchdog Timer WDT module performs a controlled system restart after a software problem occurs Can serve as an interval timer (generates interrupts) WDT Control register is password protected Note: Powers-up active CPE/EE 421/521 Microcomputers 45 CPE/EE 421/521 Microcomputers 46 Timer_A Timer_A is a 16-bit timer/counter with three capture/compare registers Capture external signals Compare PWM mode SCCI latch for asynchronous communication Comparator_A Comparator_A is an analog voltage comparator Supports precision slope analog-to-digital conversions Supply voltage supervision, and Monitoring of external analog signals. CPE/EE 421/521 Microcomputers 47 CPE/EE 421/521 Microcomputers 48 Alex Milenkovich 12

Digital I/O ADC12 Independently programmable individual I/Os Port1 Port2 Port3 Port6 High-performance 12-bit analog-to-digital converter Function Select Register PxSEL Up to 6 ports (P1 P6) Each has 8 I/O pins Each pin can be configured as input or output P1 and P2 pins can be configured to assert an interrupt request P1. P2. P3. P4. P5. P6. 7 Interrupt Edge Select Register PxIES Interrupt Enable Register PxIE Interrupt Flag Register PxIFG Direction Register PxDIR Output Register PxOUT Input Register PxIN 6 5 4 3 2 1 0 no no no More than 200 Ksamples/sec Programmable sample& hold 8 external input channels Internal storage CPE/EE 421/521 Microcomputers 49 CPE/EE 421/521 Microcomputers 50 USART Serial Port Getting Started with EasyWeb2 The universal synchronous/ asynchronous receive/transmit (USART) peripheral interface supports two serial modes with one hardware module UART or SPI (Synchronous Peripheral Interface) modes Double-buffered Baud-rate generator CPE/EE 421/521 Microcomputers 51 CPE/EE 421/521 Microcomputers 52 Alex Milenkovich 13

Getting Started with EasyWeb2 //******************************************** #include <msp430x14x.h> // MSP-FET430P140 Demo - Software Toggle P2.1 // // Description; Toggle P2.1 by xor'ing P2.1 void main(void) // inside of a software loop. { // ACLK = n/a, MCLK = SMCLK = default DCO ~ // Stop watchdog timer 800k WDTCTL = WDTPW + WDTHOLD; // P2DIR = 0x02; // Set P2.1 to output direction // MSP430F149 for (;;) // ----------------- { // / \ XIN unsigned int i; // // Toggle P2.1 using exclusive-or // -- RST XOUT - P2OUT ^= 0x02; // // P2.1 -->LED i = 50000; // Delay // do (i--); // M. Buccini while (i!= 0); // Texas Instruments, Inc } // January 2002 } // Built with IAR Embedded Workbench Version: 1.25A // // @Alex Milenkovich, milenkovic@computer.org // The University of Alabama in Huntsville // February 2005 // Modified for easyweb2 board to blink // the Status led (port P2.1) //******************************************** CPE/EE 421/521 Microcomputers 53 Alex Milenkovich 14