ADC measuring max voltage

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

ADC measuring max voltage

1,517 次查看
Shruthi_C
Contributor III

Hi,

For ADC I want to implement code as it measures max voltage instead of average voltage, how can I implement.

Pls support

Thank You,

0 项奖励
回复
3 回复数

1,498 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@Shruthi_C

What does it mean that you want to measure the maximum voltage instead of the average voltage?

for S32K, ADC support hardware average features, but I don't quiet understand what you mean that you

want to measure the maximum voltage.

0 项奖励
回复

1,491 次查看
Shruthi_C
Contributor III

Hi,
If I have a wave with straight line with amplitude of 1v the raw value count from ADC wil be around 183

But if I give wave with 50% duty cycle with same 1v I will get 89 as raw count, 

Shruthi_C_0-1688547232896.png

Now I need to measure the raw count with 50% duty cycle and I m expecting it should be 183 only

 

Pls support

Thank You

0 项奖励
回复

1,483 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@Shrithi_C

If the waveform is a PWM wave generated by the FTM module, then the problem will be easy.

you can try to use FTM->PDB->ADC to achieve this.

Senlent_0-1688548879642.png

 

but If this is a disordered waveform, then by the sampling theorem you need to sample at a frequency that is 2 times the highest frequency of the waveform。The maximum value of sampling is the result you want.

0 项奖励
回复