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.

TMS320F28035: F28035ADC采样问题

Part Number: TMS320F28035
Other Parts Discussed in Thread: C2000WARE, CONTROLSUITE

新手一枚,想请大神看一下我的adc采样配置有没有问题。代码已上传:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "DSP28x_Project.h" // Device Headerfile and Examples Include File
// Prototype statements for functions found within this file.
__interrupt void adc_isr(void);
void Adc_Config(void);
// Global variables used in this example:
Uint16 LoopCount;
Uint16 ConversionCount;
Uint16 Voltage1[10];
Uint16 Voltage2[10];
Uint16 Voltage3[10];
Uint16 Voltage4[10];
main()
{
// Step 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

其中关于adc的设置有疑问的点在于:

Voltage1[ConversionCount] = AdcResult.ADCRESULT1; 
Voltage2[ConversionCount] = AdcResult.ADCRESULT2;
Voltage3[ConversionCount] = AdcResult.ADCRESULT3;
Voltage4[ConversionCount] = AdcResult.ADCRESULT4;
这几行代码里的ADCRESULT1至ADCRESULT4的数字1至4是怎么来的。
//***************************************************************************************************

下面附上程序刷进F28035后,调试时voltage1至voltag4的采样截图和Expressions截图:

voltage1:

voltage2:

voltage3:

voltage4:

Expressions:

问题是:

1.我的adc配置是否有问题。

2.为什么voltage1和voltage2的数值分别在25和17上下浮动,而voltage3和voltage4的数值分别在1255和1830上下浮动。

3.为什么每组adc采样的voltage数值浮动范围都不一样,到底voltage的数值应该是多少。

x 出现错误。请重试或与管理员联系。