CCS6.0 Graph display set 显示波形设置实例
for ( i=0;i<256;i++ )
{
ADCCTL=0x9000; // 启动AD转换,通道1
do
{
uWork=ADCDATA;
} while ( uWork&0x8000 );
nADC1=uWork&0x0fff;
}
asm( " nop"); // break point
}
}
void InitADC()
{
ADCCLKCTL=0x23; // 4MHz ADCLK
ADCCLKDIV=0x4f00;
}
void wait( unsigned int cycles )
{
int i;
for ( i = 0 ; i < cycles ; i++ ){ }
}
void EnableAPLL( )
{
*( ioport volatile unsigned short* )0x1f00 = 4; wait( 25 );