EasyManua.ls Logo

Texas Instruments MSP430

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
Loading...
Chapter 3 Appendix
Chapter 3 Appendix
Lab3a Worksheet
1. Where is your MSP430ware folder located?
________________________________________________
2. To use the MSP430ware GPIO and Watchdog API, what header
file needs to be included in your source file?
#include < ________________________ >
3. How do we turn off the Watchdog timer?
________________________________________________ ;
4. We need to initialize our GPIO output pin. What two GPIO
driverlib functions setup Port 1, Pin 0 (P1.0) as an output and
set its value to “1”?
________________________________________________ ;
________________________________________________ ;
driverlib.h
Most likely: C:\ti\msp430\MSP430ware_1_60_01_11\
WDT_A_hold( WDT_A_BASE )
GPIO_setAsOutputPin( GPIO_PORT_P1, GPIO_PIN0 )
GPIO_setOutputHighOnPin( GPIO_PORT_P1, GPIO_PIN0 )
Lab3a Worksheet
5. Using the _delay_cycles() intrinsic function (from the last chapter),
write the code to blink an LED with a 1 second delay setting the
pin (P1.0) high, then low?
#define ONE_SECOND 800000
while (1) {
//Set pin to “1” (hint, see question 4)
_________________________________________________ ;
_delay_cycles( ONE_SECOND );
// Set pin to “0”
_________________________________________________ ;
_delay_cycles( ONE_SECOND );
}
GPIO_setOutputHighOnPin(GPIO_PORT_P1, GPIO_PIN0)
GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN0)
MSP430 Workshop - Using GPIO with MSP430ware 3 - 35

Table of Contents

Other manuals for Texas Instruments MSP430

Related product manuals