EasyManuals Logo
Home>Texas Instruments>Microcontrollers>MSP430

Texas Instruments MSP430 User Manual

Texas Instruments MSP430
413 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 #412 background imageLoading...
Page #412 background image
412
In the main loop, the Launchpad’s green LED (P4_7) is toggled at a given flash rate. When the onboard
user push button (P2_1) is pressed, the onboard red LED (P1_0) is briefly turned on and the rate of
green LED’s flashing is altered.
if(GPIO_getInputPinValue(GPIO_PORT_P2, GPIO_PIN1) == false)
{
while(GPIO_getInputPinValue(GPIO_PORT_P2, GPIO_PIN1) == false);
GPIO_setOutputHighOnPin(GPIO_PORT_P1, GPIO_PIN0);
delay_ms(100);
GPIO_setOutputLowOnPin(GPIO_PORT_P1, GPIO_PIN0);
s = ~s;
}
P4OUT ^= BIT7;
switch(s)
{
case 0:
{
delay_ms(100);
break;
}
default:
{
delay_ms(600);
break;
}
}
Demo
Demo video: https://youtu.be/ppgQP661JDw.

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