EasyManuals Logo

Texas Instruments MSP430 Student Guide

Texas Instruments MSP430
398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #368 background imageLoading...
Page #368 background image
Programming Energia (and Arduino)
8 - 10 MSP430 Workshop - Using Energia (Arduino)
Hardware pinout
Arduino programming refers to Arduino “pins” throughout the language and examples. In the
original implementation, these refer directly to the original hardware platform.
When adapting the Arduino library/language over to other processors, such as the TI
microcontrollers, these pins must be mapped to the available hardware. The following screen
capture from the Energia wiki shows the mapping for the MSP430 (v1.5 ‘G2553) Launchpad
development board. There are similar diagrams for the other supported TI boards; please find
these at wiki page: https://github.com/energia/Energia/wiki/Hardware.
MSP430F5529 Launchpad : Energia Pinout
http://energia.nu/Guide_MSP430F5529LaunchPad.html
Arduino/Energia logical pin #’s
Color Coded Pin Mapping
The wiki authors have color coded the pins to try and make things easier. The Black numbers
represent the Arduino Pin Numbers. Thus, you can write to the pins using the pin numbers:
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);
The Grey values show the hardware elements that are being mapped, such as the LED’s or
PushButton. You can use these alternative names: RED_LED; GREEN_LED; PUSH2; and
TEMPSENSOR. Thus, to turn on the red LED, you could use:
pinMode(RED_LED, OUTPUT);
digitalWrite(RED_LED, HIGH);
Pins can also be address by there alternative names, such as P1_0. These correlate to the GPIO
port (P1) and pin (0) names (P1.0) as defined by the MSP430. (In fact, the Launchpads
conveniently show which I/O pins are mapped to the Boosterpack header connectors.) Using
these symbols, we can write to pins using the following:
pinMode(P1_0, OUTPUT);
digitalWrite(P1_0, HIGH);

Table of Contents

Other manuals for Texas Instruments MSP430

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments MSP430 and is the answer not in the manual?

Texas Instruments MSP430 Specifications

General IconGeneral
BrandTexas Instruments
ModelMSP430
CategoryMicrocontrollers
LanguageEnglish

Related product manuals