Configuring ADC to output PWM using Processor Expert.

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

Configuring ADC to output PWM using Processor Expert.

980件の閲覧回数
zoranmilosavlje
Contributor II

Hi all. I am trying to get a PWM signal working using the ADC and PWM components in Processor Expert Kinetis IDE but I am having some troubles. So what I am trying to set up on my FRDM-K22F board is use one of the ADC capable header pins as the analog input to which I will have a 3VDC source connected, and another pin on the header as the digital output from the ADC which will be generated via PWM. I will hook up a logic analyzer to both of these pins and run some tests to make sure that the ADC is working properly.

So in order to actually output the digital signal from the ADC I decided to add a PWM component to my project as well which will create a PWM signal based on the output of the ADC:

pastedImage_2.png

I am having trouble how to set what pin I want to be the input to the ADC and what pin I want to be the output.

Here are my settings for PWM component:

pastedImage_4.png

Here are my settings for ADC component:

rtrtrtrtrtrtrtr.png

Any help with the configuration is much appreciated.

3 返答(返信)

624件の閲覧回数
marek_neuzil
NXP Employee
NXP Employee

Hello,

What I see in your screenshot is OK but you need to have an application code that provides the required functionality. You need to process measuring of the ADC inputs (samples) and convert these data as duty of the PWM. So you need to implement the initialization and also conversions of ADC and duty settings of PWM signals.

There are available examples in CW MCU 10.6 in the folder CW MCU v10.6.4\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\ (there are demo application for different derivatives but the API is the same or similar) The KDS 2.0.0 contains these examples in the folder KDS_2.0.0\eclipse\ProcessorExpert\Projects\Kinetis\ProcessorExpert\.

There is also available typical usage for every LDD component, see the Help of the component - typical usage:

In the Components windows, open the context menu and select Help on Component:

pastedImage_0.png

In the Help window select the typical usage, see below:

pastedImage_1.png

Best Regards,

Marek Neuzil

624件の閲覧回数
zoranmilosavlje
Contributor II

Hi Marek. I am using KDS3.0.0 and I am unable to find the Projects folder in ProcessorExpert​. Do you know where it could be?

0 件の賞賛

624件の閲覧回数
marek_neuzil
NXP Employee
NXP Employee

Hello,

I am sorry these projects are not available in KDS 3.0.0. It seems that it is an issue and I am going to report it.

You can use these projects from KDS 2.0.0 and updated them (you can use the KDS Upgrade Assistant  - see the main menu Projects > KDS Upgrade Assitant in the KDS 3.0.0).

Best Regards,

Marek Neuzil

0 件の賞賛