Blame | Last modification | View Log | RSS feed
//******************************************************************************// MSP430x2xx Demo - Software Toggle P1.0//// Description; Toggle P1.0 by xor'ing P1.0 inside of a software loop.// ACLK = n/a, MCLK = SMCLK = default DCO//// MSP430x2xx// -----------------// /|\| XIN|-// | | |// --|RST XOUT|-// | |// | P1.0|-->LED//// A. Dannenberg// Texas Instruments, Inc// January 2006// Built with CCE for MSP430 Version: 3.0//******************************************************************************#include "msp430f2101.h"int main(void){WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timerP1DIR |= 0x01; // Set P1.0 to output directionfor (;;){volatile unsigned int i; // volatile to prevent optimizationP1OUT ^= 0x01; // Toggle P1.0 using exclusive-ORi = 10000; // SW Delaydo i--;while (i != 0);}}