FRDM-K22F AtoD Value passed to PWM

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

FRDM-K22F AtoD Value passed to PWM

911 次查看
briancavanagh
Contributor III

Hi All,

I wrote a program that will take an AtoD measurement that I would like to pass to the PWM to set the duty cycle.

Can someone look at my code (very small) and let me know where I'm going wrong?  Note:  I removed my LED code so it's not so large to read.

Thanks,

Brian

pastedImage_1.png

0 项奖励
回复
2 回复数

781 次查看
briancavanagh
Contributor III

Hi All,

I found the solution to my problem.  I wasn't including AD0_Start();  in my program (see below).

What I left out in my description above was I'm using a Potentiometer that's connected to the AtoD pin.

Now when I adjust the pot the PWM changes as well.

Thanks,

Brian

pastedImage_1.png

0 项奖励
回复

781 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Brian,

Thanks for your sharing .

BR

Alice

0 项奖励
回复