This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

delay function

Other Parts Discussed in Thread: MSP430G2553

Hello, I am using msp430g2553 and Im new to using it. I just want to know how is the delay being computed in this code. Can somebody explain the working principle of this delay function?Thanks :)

#include <MSP430G2553.h>
void delay430(void);
void main( void )
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog
P1DIR = 0x41; // Sets P1.0 and 1.6 to output direction
while(1){ //Loop forever (always true)
P1OUT =0x40; //Set 1.6 to high (HEX)
delay430(); //delay function call
P1OUT =0x01; //Set 1.0 to low (HEX)
delay430(); //delay function call
}
}
//Delay function...?????? 
void delay430(void){
unsigned int i;
for(i=0;i<50000;i++); }

**Attention** This is a public forum