FRDM-K22F AtoD Value passed to PWM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FRDM-K22F AtoD Value passed to PWM

1,938件の閲覧回数
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 返答(返信)

1,808件の閲覧回数
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 件の賞賛
返信

1,808件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Brian,

Thanks for your sharing .

BR

Alice

0 件の賞賛
返信