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.

TMS320F28377D: 关于2837XD 16位差分ADC配置问题

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

未找到datasheet 和TI例程中关于16位差分ADC的配置,利用SOC软件启动,自己配置的软件转换结果与实际相差很大,求助。

A0和AI为一对输入

    AdcSetMode(ADC_ADCA, ADC_RESOLUTION_16BIT, ADC_SIGNALMODE_DIFFERENTIAL);

AdcaRegs.ADCSOC0CTL.bit.CHSEL = 0; //SOC0 will convert pin A0
AdcaRegs.ADCSOC0CTL.bit.ACQPS = acqps; //sample window is acqps +
//1 SYSCLK cycles
AdcaRegs.ADCSOC1CTL.bit.CHSEL = 0; //SOC0 will convert pin A1
AdcaRegs.ADCSOC1CTL.bit.ACQPS = acqps; //sample window is acqps +
//1 SYSCLK cycles

  AdcaRegs.ADCSOCFRC1.all = 0x0001; //SOC0

感觉结果相差很大,请问有相关资料或者例程否?求解

  • AdcaRegs.ADCSOC0CTL.bit.CHSEL = 0; //SOC0 will convert pin A0
    AdcaRegs.ADCSOC0CTL.bit.ACQPS = acqps; //sample window is acqps +
    //1 SYSCLK cycles
    AdcaRegs.ADCSOC1CTL.bit.CHSEL = 1; //SOC0 will convert pin A1
    AdcaRegs.ADCSOC1CTL.bit.ACQPS = acqps; //sample window is acqps +
    //1 SYSCLK cycles

       AdcaRegs.ADCSOCFRC1.all = 0x0003; //SOC0 and SOC1

    这么设置,结果正确,但不明白为什么?

  • 相关资料的话,都在数据手册和用户指南中。您可以看一下下面帖子内的注意事项

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/737601/ccs-tms320f28377d-loop-current-in-adc 

    您现在的输入是怎样的?

  • 我的输入是电位器,纯阻性负载

  • 还想问一下,这个ADC是否有转换完成标志位,想用查询的方式完成ADC数据的读取

  • 您可以看一下例程adc_soc_software

    默认路径:C2000Ware_3_04_00_00\device_support\f2837xd\examples\cpu1\adc_soc_software

  • 这里面是12位ADC的配置,我想找一下有没有16位的配置

  • 抱歉,目前没有直接16位差分的程序,但E2E上有一个讨论详细的帖子,您可以看一下

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/846826/tms320f28377d-configure-28377d-16bit-differential-adc-to-uniploar