Dear sir,
I am Using __delay_cycles(); function in my code, I have some questions on it.
1.How __delay_cycles(10000) works internally, And which clock source will select ?
2.The value (10000) is in terms of what ?
3.How to calculate this delay value, means time period ?
Here is the code :
#include <msp430g2231.h>
void main (void)
{
WDTCTL = WDTPW + WDTHOLD ;
for(;;)
{
P1DIR |= BIT0+BIT6;
P1OUT ^= BIT0;
__delay_cycles(10000);
{
P1OUT ^=BIT6;
__delay_cycles(20000);
}
}
}
If any mistakes Sorry.
Thank You.