CCS6.0 Graph display set 显示波形设置实例
程序如下:
#include "myapp.h"
#include "csedu.h"
#include "scancode.h"
void InitADC();
void wait( unsigned int cycles );
void EnableAPLL( );
unsigned int nADC0[256],nADC1[256];
main()
{
int i;
unsigned int uWork;
EnableAPLL();
SDRAM_init();
InitADC();
PLL_Init(132);
while ( 1 )
{
for ( i=0;i<256;i++ )
{
ADCCTL=0x8000; // 启动AD转换,通道0
do
{
uWork=ADCDATA;
} while ( uWork&0x8000 );
nADC0=uWork&0x0fff;
}