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 #124 background imageLoading...
Page #124 background image
Lab 3
Verify Code
10. Build & Load program.
11. Add the usiButton1 variable to the Watch Expression window.
Hint: select the variable name before you right-click on it and add it to the Watch window.
12. Single-step project. Watch the LED and variable.
Loop thru while{} multiple times with the button pressed (and not pressed), watching the
variable (and LED) change value.
13. Run the program.
Go ahead and click the Run toolbar button and revel in your code, as the LED lights
whenever you push the button.
Note: This is not efficient code. It would be much better to use the push-button input pin as an
interrupt … which we’ll do in Chapter 5.
Optional Exercises
Try this lab without pull-up (or pull-down) resistor.
Without the resistor, is the pushbutton’s value always consistent?
(yes / no) _______________
Try using the other LED on the board
… or the other pushbutton.
3 - 34 MSP430 Workshop - Using GPIO with MSP430ware

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