Measure ADC of PWM signal

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

Measure ADC of PWM signal

Jump to solution
1,406 Views
emdev
Contributor III

Hello,

I want to read ADC value of PWM signal.

ADC values are changed.

If read ADC value at lowest value of PWM, it report 0.

But if read ADC value at highest value of PWM, it report Vcc.

I can check MPC5643L_PWM_ADC_concept.pdf and find below image.

emdev_0-1635404275434.png

I want to read ADC at highest value of PWM.

How I can approach it?

Duty cycle of PWM can be changed.

Thanks in advance.

 

 

Labels (1)
0 Kudos
1 Solution
1,403 Views
igorpadykov
NXP Employee
NXP Employee

Hi Andrew

 

one can read several samples (the more number, the better accuracy) then compare them in

software and select one with highest value.

 

Best regards
igor

View solution in original post

0 Kudos
3 Replies
1,393 Views
emdev
Contributor III

Hi igorpadykov,

I used methods which you recommended and it works well.

But I want to check that there are any hardware or chipset level solutions or not?

For example, DMA or automatic method in https://community.nxp.com/t5/MPC5xxx-Knowledge-Base/MPC5643L-PWM-ADC-measurement-concept/ta-p/110265....

If there is no other chipset level methods, I'll use method which you recommended.

Thanks.

0 Kudos
1,391 Views
igorpadykov
NXP Employee
NXP Employee

> I want to check that there are any hardware or chipset level solutions or not?

 

sorry there are no hardware solutions for such task.

 

Best regards
igor

0 Kudos
1,404 Views
igorpadykov
NXP Employee
NXP Employee

Hi Andrew

 

one can read several samples (the more number, the better accuracy) then compare them in

software and select one with highest value.

 

Best regards
igor

0 Kudos