ADC measuring max voltage

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC measuring max voltage

523 Views
Shruthi_C
Contributor II

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 Kudos
3 Replies

504 Views
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 Kudos

497 Views
Shruthi_C
Contributor II

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 Kudos

489 Views
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 Kudos