Hi, I play with Launchpad and I do not know why in the end comes a moment when both LEDs light simultaneously. Thanks.
#include "msp430f2012.h"
#include "MyDelay.h"
#define LED1_OFF P1OUT ^= BIT0
#define LED1_ON P1DIR |= BIT0
#define LED2_OFF P1OUT ^= BIT6
#define LED2_ON P1DIR |= BIT6
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
BCSCTL1 = CALBC1_16MHZ;
DCOCTL = CALDCO_16MHZ;
P1OUT = 1;
for (;;)
{
void Blink(unsigned second);
{
DelayS(1);
LED1_ON;
DelayS(1);
LED1_OFF;
DelayS(1);
LED2_ON;
DelayS(1);
LED2_OFF;
}
}
}