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.

matlab 生成代码时 用的28035的dsp adc采样的结果应该怎样处理。

最近用matlab 自动生成代码,遇到了以下问题:

给adc一个0.5V的电压, 通过PWM生成一个占空比为0.5的PWM波

gain1是因为ePWM模块接受占空比输入的时候是需要百分比,所以乘了100.

现在就是想问 前面这个gain 应该是多少? 才能将实际电压0.5V得到。   

或者能不能指导一下应该怎么样更改。

Ps:

之前猜测 AD是12位的,然后接收电压范围是0-3.3v  所以用了3.3/4096这样的数。  

ADC模块里面数据类型设置的是double。