EasyManua.ls Logo

Texas Instruments MSP430

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
Loading...
70
#pragma vector = PORT1_VECTOR
__interrupt void PORT1_ISR_HOOK(void)
{
LPM2_EXIT;
P1OUT |= BIT6;
P1IFG = 0x00;
}
void main(void)
{
unsigned char s = 0;
/* Stop watchdog timer from timing out during initial start-up. */
WDTCTL = WDTPW | WDTHOLD;
/* initialize Config for the MSP430 GPIO */
GPIO_graceInit();
/* initialize Config for the MSP430 2xx family clock systems (BCS) */
BCSplus_graceInit();
/* initialize Config for the MSP430 System Registers */
System_graceInit();
/* initialize Config for the MSP430 WDT+ */
WDTplus_graceInit();
while(1)
{
for(s = 0; s < 9; s++)
{
P1OUT ^= BIT0;
delay_ms(160);
}
P1OUT &= ~BIT6;
LPM2;
};
}
void GPIO_graceInit(void)
{
/* USER CODE START (section: GPIO_graceInit_prologue) */
/* User initialization code */
/* USER CODE END (section: GPIO_graceInit_prologue) */
/* Port 1 Output Register */
P1OUT = BIT3;
/* Port 1 Direction Register */
P1DIR = BIT0 | BIT6;
/* Port 1 Resistor Enable Register */
P1REN = BIT3;
/* Port 1 Interrupt Edge Select Register */

Table of Contents

Other manuals for Texas Instruments MSP430

Related product manuals