Processor Expert ADC configuration question...

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

Processor Expert ADC configuration question...

ソリューションへジャンプ
2,592件の閲覧回数
mike1974
Contributor III

Hello everyone,

 

I'm using the ADC component in Processor Expert (found in "CPU Internal Peripherals --> Converter --> ADC").  I don't see any way to configure the ADC to do continuous conversions (instead of just a single conversion) and also hardware averaging.

 

Anyone know how to do this? 

 

Right now I'm having to circumvent P.E, and do my own manual config in the code.  It works, but it's a rather ugly way of doing it because I had to duplicate some P.E. struct definitions in my code.

 

Thank you,

 

--Michael

ラベル(1)
0 件の賞賛
返信
1 解決策
1,875件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Michael,

Thanks for the information, I would recommend you to better use the ADC_LDD component:

pastedImage_0.png

You can use the "StartLoopMeasurement" method of this component for a continuous conversion and depending on the number of conversions selected the Hardware Average is enabled/disabled.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
1,875件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Michael,

Could you tell us which KDS version and MCU are you using?

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 件の賞賛
返信
1,875件の閲覧回数
mike1974
Contributor III

Hi Carlos I am using KDS 2.0.0 and MK22FN1MOVLQ12

0 件の賞賛
返信
1,876件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Michael,

Thanks for the information, I would recommend you to better use the ADC_LDD component:

pastedImage_0.png

You can use the "StartLoopMeasurement" method of this component for a continuous conversion and depending on the number of conversions selected the Hardware Average is enabled/disabled.

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,875件の閲覧回数
mike1974
Contributor III

Great thank you Carlos

0 件の賞賛
返信
1,875件の閲覧回数
rabbitz
Contributor I

Hi Carlos,

If I need do continuous sampling at 20Khz, how can I achieve it?

Use "StartLoopMeasurement" method and timer interrupt at 50uS interval to read the ADC value?

Regards

Sam

0 件の賞賛
返信
1,875件の閲覧回数
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Rabbitz,

In your case it would be better to use the "StartLoopTriggeredMeasurement" method and configure the ADC to be triggered by the timer, you can use as reference the "HW triggered conversion of a selected sample group, with interrupt service" example included on the component help:

pastedImage_0.png

pastedImage_2.png

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 件の賞賛
返信