CPE/EE 421 Microcomputers: The MSP430 Introduction

Slides:



Advertisements
Similar presentations
S04: MSP430 Microarchitecture
Advertisements

System Overview MTT48 V Motorol a MOTOROLA 68HC08 INTRODUCTION AND SYSTEM OVERVIEW.
MC68HC11 System Overview. System block diagram (A8 version)
Chung-Ta King National Tsing Hua University
ECE 447 Fall 2009 Lecture 9: TI MSP430 Interrupts & Low Power Modes.
Lecture 3: TI MSP430 Introduction
Notes on the ez430-RF2500. Sources
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 29: Microcontroller intro.
1 ECE 263 Embedded System Design Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System.
Chapter 6 – MSP430 Micro-Architecture. BYU CS/ECEn 124Chapter 6 - MSP430 Micro-Architecture2 Concepts to Learn… Computer Architecture MSP430 Micro-Architecture.
ASPPRATECH.
Microcontroller based system design
Chapter 6 – MSP430 Micro-Architecture
MSP430 Mixed Signal Microcontroller – Parte 1
Introduction to the Orbit Edu Board Ahmad Rahmati Teaching Assistant, ELEC424 Rice Efficient Computing Group Sep 12, 2007.
LAB 7: WDT+ and Low-Power Optimization
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
CPE/EE 421 Microcomputers: The MSP430 Introduction Instructor: Dr Aleksandar Milenkovic Lecture Notes.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose:  This training module provides a technical description of Renesas.
CPE 323 Introduction to Embedded Computer Systems: The MSP430 Introduction Instructor: Dr Aleksandar Milenkovic.
MSP430 Mixed Signal Microcontroller – Parte 2 Afonso Ferreira Miguel Source: slau056d – Texas instruments.
Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
IO Subsystem IV Ports and peripherals. IO Subsystem (1) All devices connected to the system buses, other than memory and CPU – Input and output ports.
TI MSP430 MICROCONTROLLERS BY ADITYA PATHAK. THE MSP FAMILY Ultra-low power; mixed signal processors Widely used in battery operated applications Uses.
Network and Systems Laboratory nslab.ee.ntu.edu.tw.
ECE 447 Fall 2009 Lecture 4: TI MSP430 Architecture and Instruction Set.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an introduction to the peripheral functions.
CPE 323 Introduction to Embedded Computer Systems: The MSP430X Architecture Instructor: Dr Aleksandar Milenkovic.
Components of a typical full-featured microcontroller.
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
Introduction to Microcontroller Technology
Embedded Microcontroller Systems
Seminar On 8085 microprocessor
Introduction to MSP430G2553 and MPU6050
Popular Microcontrollers and their Selection by Lachit Dutta
Introduction Why low power?
Lecture 8: TI MSP430 Interrupts, ISRs
COURSE OUTCOMES OF Microprocessor and programming
C. K. Pithawalla College of Engineering and Technology, Surat
CS4101 Introduction to Embedded Systems Lab 6: Low-Power Optimization
PRE-PROGRAMMED DIGITAL SCROLLING MESSAGE
Embedded Microcontroller Systems
Chapter 6 General Purpose Input/Output
Microprocessor Systems Design I
Lecture 3: TI MSP430 Introduction
UNIT – Microcontroller.
Microprocessor Systems Design I
Instructor: Dr Aleksandar Milenkovic Lecture Notes
Introduction of microprocessor
Project Title EVM IN PIC Under the Guidance of Submitted by.
Programming Microcontroller
The Arduino Microcontroller: Atmel AVR Atmega 328
Microcontroller Intel 8051
Subject Name: Microcontroller Subject Code: 10ES42
Introduction to Microprocessors and Microcontrollers
I/O PORTS : MSP430x5xx devices have up to 12 digital I/O ports :
8051 Single Board Computer (SBC) Version 1.0
Getting the Most Out of Low Power MCUs
Lecturer: Reza Arjmandi Autumn 2015
CPE 323 Introduction to Embedded Computer Systems: DMA Controller
8051 Microcontroller.
Lecture 9: TI MSP430 Interrupts & Low Power Modes
AVR – ATmega103(ATMEL) Architecture & Summary
8051 Micro Controller.
EECE.3170 Microprocessor Systems Design I
Compiled by Dr. N.Shanmugasundaram, HOD, ECE Dept, SECE.
MSP430 Clock System and Timer
Computer Operation 6/22/2019.
Presentation transcript:

CPE/EE 421 Microcomputers: The MSP430 Introduction Instructor: Dr Aleksandar Milenkovic Lecture Notes Alex Milenkovich

CPE/EE 421/521 Microcomputers Outline 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 Alex Milenkovich

CPE/EE 421/521 Microcomputers 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 Alex Milenkovich

Part numbering convention MSP430MtFaFbMc 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 Alex Milenkovich

Part numbering convention MSP430MtFaFbMc 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 Alex Milenkovich

CPE/EE 421/521 Microcomputers MSP 430 Roadmap CPE/EE 421/521 Microcomputers Alex Milenkovich

MSP430 Typical Applications 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 Alex Milenkovich

CPE/EE 421/521 Microcomputers LCD Adj. Vol. Regul. RS232 RS232 controller Analog I/O 2-axes joystick Switches LEDs Thermistor mC Keypad An MSP430-Based System CPE/EE 421/521 Microcomputers Alex Milenkovich

Another MSP430-Based System 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 Alex Milenkovich

CPE/EE 421/521 Microcomputers Tmote Sky Platform 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 Alex Milenkovich

CPE/EE 421/521 Microcomputers Tmote Sky Platform http://www.moteiv.com CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers 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 Alex Milenkovich

MSP 430 Modular Architecture CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers 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 Alex Milenkovich

CPE/EE 421/521 Microcomputers MSP430 16-bit RISC 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 Alex Milenkovich

CPE/EE 421/521 Microcomputers CPU Registers CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers 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 CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers 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 Alex Milenkovich

CPE/EE 421/521 Microcomputers Registers: SR (R2) 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 Alex Milenkovich

CPE/EE 421/521 Microcomputers Status bits CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers Constant Generators As – source register addressing mode in the instruction word CPE/EE 421/521 Microcomputers Alex Milenkovich

CISC / RISC Instruction Set CPE/EE 421/521 Microcomputers Alex Milenkovich

27 Core RISC Instructions CPE/EE 421/521 Microcomputers Alex Milenkovich

Emulated Instructions CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers 51 Total Instructions CPE/EE 421/521 Microcomputers Alex Milenkovich

Double operand instructions CPE/EE 421/521 Microcomputers Alex Milenkovich

Single Operand Instruction CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers Jump Instructions CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers 3 Instruction Formats CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers Addressing Modes CPE/EE 421/521 Microcomputers Alex Milenkovich

Register Addressing Mode CPE/EE 421/521 Microcomputers Alex Milenkovich

Register-Indexed Addressing Mode CPE/EE 421/521 Microcomputers Alex Milenkovich

Symbolic Addressing Mode CPE/EE 421/521 Microcomputers Alex Milenkovich

Absolute Addressing Mode CPE/EE 421/521 Microcomputers Alex Milenkovich

Register Indirect Addressing Mode CPE/EE 421/521 Microcomputers Alex Milenkovich

Register Indirect Autoincrement Addressing Mode CPE/EE 421/521 Microcomputers Alex Milenkovich

Immediate Addressing Mode CPE/EE 421/521 Microcomputers Alex Milenkovich

Code Reduction Effect of Constant Generator CPE/EE 421/521 Microcomputers Alex Milenkovich

Machine Cycles for Format I Instructions CPE/EE 421/521 Microcomputers Alex Milenkovich

Machine Cycles for Format II/III Instructions CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers MSP430 Memory Model CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers Memory Organization CPE/EE 421/521 Microcomputers Alex Milenkovich

MSP 430 Architecture: A Closer Look CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers MSPx430x14x Architecture 64 TQFP (The The Thin Quad Flat Pack package CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers Basic Clock System Basic Clock Module provides the clocks for the MSP430 devices CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers 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 Alex Milenkovich

CPE/EE 421/521 Microcomputers 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 CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers 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 Alex Milenkovich

CPE/EE 421/521 Microcomputers Digital I/O Independently programmable individual I/Os 1 2 3 4 5 6 7 P1. P6. P2. Input Register PxIN Output Register PxOUT Direction Register PxDIR Interrupt Flag Register PxIFG Interrupt Enable Register PxIE Interrupt Edge Select Register PxIES Function Select Register PxSEL P3. P5. Port1 Port2 Port3 Port6 yes no P4. … 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 CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers ADC12 High-performance 12-bit analog-to-digital converter More than 200 Ksamples/sec Programmable sample& hold 8 external input channels Internal storage CPE/EE 421/521 Microcomputers Alex Milenkovich

CPE/EE 421/521 Microcomputers USART Serial Port 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 Alex Milenkovich

Getting Started with EasyWeb2 CPE/EE 421/521 Microcomputers Alex Milenkovich

Getting Started with EasyWeb2 //******************************************** // MSP-FET430P140 Demo - Software Toggle P2.1 // // Description; Toggle P2.1 by xor'ing P2.1 // inside of a software loop. // ACLK = n/a, MCLK = SMCLK = default DCO ~ 800k // MSP430F149 // ----------------- // /|\| XIN|- // | | | // --|RST XOUT|- // | | // | P2.1|-->LED // M. Buccini // 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) #include <msp430x14x.h> void main(void) { // Stop watchdog timer WDTCTL = WDTPW + WDTHOLD; P2DIR |= 0x02; // Set P2.1 to output direction for (;;) unsigned int i; // Toggle P2.1 using exclusive-OR P2OUT ^= 0x02; i = 50000; // Delay do (i--); while (i != 0); } CPE/EE 421/521 Microcomputers Alex Milenkovich