The MSP430 is a popular family of microcontrollers from Texas Instruments. In this book we will work with the smallest type, which is the powerful MSP430G2553. We will look at the capabilities of this microcontroller in detail, as it is well-suited for self-made projects because it is available in a P-DIP20 package. We will take a closer look at the microcontroller and then build, step by step, some interesting applications, including a "Hello World" blinking LED and a nice clock application, which can calculate the day of the week based on the date. You also will learn how to create code for the MSP microcontroller in assembler. In addition to that, we will work with the MSP-Arduino IDE, which makes it quite easy to create fast applications without special in-depth knowledge of the microcontrollers. All the code used in the book is available for download from the Elektor website. Search MSP430 Microcontroller Essentials All rights reserved Table of Contents 1 ● Introduction 1.1 ● MSP430 1.1.1 ● Family Overview 1.1.2 ● Part Numbers 1.1.3 ● Flash, EEPROM, RAM, FRAM, or even ROM? 1.1.3.1 ● ROM 1.1.3.2 ● RAM 1.1.3.3 ● PROM and EPROM 1.1.3.4 ● EEPROM 1.1.3.5 ● Flash 1.1.3.6 ● FRAM 1.1.4 ● MSP430x2xx architecture 1.1.5 ● POR vs. PUC 1.1.6 ● MSP430G2553 1.1.6.1 ● Digital Ports 1.1.6.2 ● ADC 1.1.6.3 ● WDT+ 1.1.6.4 ● Comparator A 1.1.6.5 ● Timer_A 1.1.6.6 ● USCI 1.1.7 ● MSP430F2001 1.1.8 ● MSP430F2012 1.2 ● Texas Instruments LaunchPads 1.2.1 ● LP-MSP430FR2476 1.2.2 ● MSP-EXP430FR4133 1.2.3 ● MSP-EXP430FR2355 1.2.4 ● MSP-EXP432P401R 1.2.5 ● MSP-EXP430G2ET 1.2.6 ● BOOSTXL-EDUMKII 2 ● Integrated Development Environment (IDE) 2.1 ● Code Composer Studio (CCS) 2.2 ● Energia (MSP430 Arduino) 3 ● Simple Examples for MSP430G2553 3.1 ● GPIO 3.1.1 ● Hello World 3.1.1.1 ● Hardware 3.1.1.2 ● Energia Firmware 3.1.1.3 ● CCS Firmware 3.1.2 ● Hello World 2 3.1.2.1 ● Hardware 3.1.2.2 ● Energia Firmware 3.1.2.3 ● CCS Firmware 3.1.3 ● Game Cube 3.1.3.1 ● Hardware 3.1.3.2 ● Energia Firmware 3.1.3.3 ● CCS Firmware 3.1.4 ● Connecting an LCD 3.1.4.1 ● Hardware 3.1.4.2 ● Energia Firmware 3.1.4.3 ● CCS Firmware 3.1.4.4 ● CCS Firmware - The Library 3.2 ● ADC10 3.2.1 ● First simple exercise: reading the ADC10 control registers 3.2.1.1 ● Hardware 3.2.1.2 ● Energia Firmware 3.2.2 ● Internal Temperature Sensor 3.2.2.1 ● Hardware 3.2.2.2 ● CCS Firmware 3.2.3 ● Own Voltage 3.2.3.1 ● Hardware 3.2.3.2 ● Energia Firmware / Serial Monitor 3.2.3.3 ● Energia Firmware / LCD 3.2.3.4 ● CCS Firmware 3.2.4 ● Potentiometer 3.2.4.1 ! Hardware 3.2.4.2 ● Energia Firmware - Version 1 3.2.4.3 ● Energia Firmware - Version 2 3.3 ● WDT+ 3.3.1 ● WatchDog Reset 3.3.1.1 ● Specification 3.3.1.2 ● Hardware 3.3.1.3 ● Energia Firmware 3.3.2 ● WatchDog Interrupt Flag 3.3.2.1 ● Hardware 3.3.2.2 ● Energia Firmware 3.3.2.3 ● CCS Firmware 3.4 ● Timer_A module 3.4.1 ● Simple 16-bit counter 3.4.1.1 ● Hardware 3.4.1.2 ● CCS Firmware 3.5 ● USCI 3.5.1 ● I2C communication by software / CCS 3.5.1.1 ● Hardware 3.5.1.2 ● CCS Firmware 3.5.2 ● I2C communication by software / Energia 3.5.2.1 ● Hardware 3.5.2.2 ● Energia Firmware 3.5.3 ● OneWire Thermometer 3.5.3.1 ● Hardware 3.5.3.2 ● Energia Firmware 3.6 ● Comparator_A+ 3.6.1 ● Hit the reference 3.6.1.1 ● Hardware 3.6.1.2 ● Energia Firmware 3.6.1.3 ● CCS Firmware 4 ● MSP430F2001 / MSP430F2012 4.1 ● Flashing Heart 4.1.1 ● Hardware 4.1.2 ● CCS Firmware 4.2 ● Traffic Light 4.2.1 ● Hardware 4.2.2 ● CCS Firmware 4.3 ● Game Cube 4.3.1 ● Hardware 4.3.2 ● CCS Firmware 4.4 ● Game Cube / Demo 4.4.1 ● Hardware 4.4.2 ● CCS Firmware 4.5 ● Temperature measurement 4.5.1 ● Specification 4.5.2 ● Hardware 4.5.2.1 ● Temperature Sensor TMP37 4.5.2.2 ● Schematic 4.5.3 ● Firmware 4.5.3.1 ● Temperature Calculation 4.5.3.2 ● ADC10 settings 4.5.3.3 ● Firmware 5 ● The Application 5.1 ● Specification 5.1.1 ● Behaviour 5.1.2 ● Operation 5.1.2.1 ● Main Application / Main Menu 5.1.2.2 ● AT30TSE754 5.1.2.3 ● Real Time Clock 5.1.2.4 ● Humidity Sensor 5.2 ● Used Components 5.2.1 ● GPIO - PCF8574A 5.2.2 ● RTC - DS1307 5.2.3 ● Temperature Sensor: AT30TSE754 5.2.3.1 ● Registers of the AT30TSE754 5.2.3.2 ● I2C communication - Configuration Register 5.2.3.3 ● I2C communication - Temperature Register 5.2.4 ● Humidity Sensor: HYT939 5.2.4.1 ● I2C communication - Measurement Request 5.2.4.2 ● I2C communication - Data Fetch 5.2.4.3 ● Calculation of humidity and temperature 5.3 ● Hardware 5.3.1 ● Main Module 5.3.2 ● RTC I2C Module 5.3.3 ● Temperature I2C Module 5.3.4 ● Humidity I2C Module 5.4 ● Test-Firmware 5.4.1 ● What we can see? 5.4.2 ● Firmware for keyboard test 5.5 ● Firmware 5.5.1 ● Libraries 5.5.2 ● Setup function 5.5.3 ● Main Loop 5.5.4 ● Function Selection 5.5.5 ● The main application 5.5.6 ● RTC 5.5.6.1 ! RTC LCD-only related functions 5.5.6.2 ! RTC main functions 5.5.6.3 ! RTC I2C communication 5.5.7 ● Calculation of a weekday 5.5.8 ● AT30TSE754 5.5.8.1 ● Changing the I2C address of the temperature sensor 5.5.8.2 ● Search I2C temperature sensor 5.5.8.3 ● Configuration register of the I2C temperature sensor 5.5.9 ● HYT939 5.5.10 ● Keyboard 5.5.10.1 ● I2C communication routine 5.5.10.2 ● Main keyboard driver Index