K64: ADC input to PWM output

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

K64: ADC input to PWM output

Jump to solution
926 Views
nunyabruh
Contributor I

I'm trying to input an analog sine wave to an ADC input on the FRDM-K64F MCU, which will then convert it to a PWM. Then using a PWM output pin, I want to reproduce the original sine wave. I have all the necessary circuits and filters, but I'm having trouble on how to start coding. Is there any example code for ADC to PWM, and then PWM to sine wave (or any wave) available for this MCU?

Thanks 

Labels (2)
0 Kudos
1 Solution
466 Views
mjbcswitzerland
Specialist V

Hi

You can get some ideas about how to do DMA based ADC->PWM or internally generate signals to the PWM output from http://www.utasker.com/docs/uTasker/uTaskerADC.pdf (in particular appendix C).

Complete working solutions for such are included in the uTasker project for the K64 and all other KL and K parts with DMA.

Regards

Mark

View solution in original post

0 Kudos
1 Reply
467 Views
mjbcswitzerland
Specialist V

Hi

You can get some ideas about how to do DMA based ADC->PWM or internally generate signals to the PWM output from http://www.utasker.com/docs/uTasker/uTaskerADC.pdf (in particular appendix C).

Complete working solutions for such are included in the uTasker project for the K64 and all other KL and K parts with DMA.

Regards

Mark

0 Kudos