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.

graph为什么没有波形出来?graph怎么使用

这是配置,点击ok没有任何反应,我想看看AD转换的结果,程序如下:

Uint16 AdcResult[4] = {0,0,0,0};

void main()
{
  InitSysCtrl();//关闭看门狗,初始化Pll、PeripheralClocks
  InitPieCtrl();//关闭CPU、PIE中断,Clear all PIEIER、PIEIFR registers
  IER = 0x0000;
  IFR = 0x0000;
  adc_init();
  AdcRegs.ADCTRL2.bit.SOC_SEQ1 = 1;//启动AD转换
  while (1)
    {
        Read_AdcResult(AdcResult);
     }
}

void Read_AdcResult(Uint16 *p)
{
* p = AdcMirror.ADCRESULT0;
*(p+1) = AdcMirror.ADCRESULT1;
*(p+2) = AdcMirror.ADCRESULT2;
*(p+3) = AdcMirror.ADCRESULT3;
}

void adc_init()
{
InitAdc();//ADC的带隙、参考电压及其它电路上电。顺序采样模式
AdcRegs.ADCREFSEL.bit.REF_SEL = 0;//选择内部参考电压
AdcRegs.ADCMAXCONV.bit.MAX_CONV1 = 3;//设置最大转换通道为4次
AdcRegs.ADCTRL1.bit.SEQ_CASC = 1;//序列发生器工作在级联模式
AdcRegs.ADCTRL1.bit.CONT_RUN = 1;//ADC工作在连续运行模式
AdcRegs.ADCTRL1.bit.SEQ_OVRD = 0;//序列发生器在完成MAX_CONVn个转换后不覆盖
AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0x1;
AdcRegs.ADCCHSELSEQ1.bit.CONV01 = 0x1;
AdcRegs.ADCCHSELSEQ1.bit.CONV02 = 0x1;
AdcRegs.ADCCHSELSEQ1.bit.CONV03 = 0x1;
}