beaver
Junior Member level 1
msp430 clock
hi guys,
i wrote the following code:
//*************************************
#include <msp430x14x.h>
int main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
P1DIR=0x01;
P1OUT=0;
while (1)
{
P1OUT^=BIT0;
}
return 0;
}
//**************************************
why the frequency of the square wave from P1.0 is 66K? does it operate by aclk which is 32k? when i changed aclk to 16k,however, the frenquency of that wave became 9.7k. can anybody tell me why and how to set that frequency to a desired one? thanks in advance.
hi guys,
i wrote the following code:
//*************************************
#include <msp430x14x.h>
int main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
P1DIR=0x01;
P1OUT=0;
while (1)
{
P1OUT^=BIT0;
}
return 0;
}
//**************************************
why the frequency of the square wave from P1.0 is 66K? does it operate by aclk which is 32k? when i changed aclk to 16k,however, the frenquency of that wave became 9.7k. can anybody tell me why and how to set that frequency to a desired one? thanks in advance.