Hello everybody ! :smileywink:
I have some trouble with using several analog sensor. In fact I need for my project to get values from 4 analog sensor each 100 ms.
I know that the KL25Z board has only one ADC but I'm sure that the ADC can be shared to different analog component.
Here is what I've done: I've declared two ADC component at PTC2 and PTB3 pins. I've selected the "shared" option but I get the error message "The shared mode is not supported on this version of module". What can I do to share the ADC to each analog component ? and why the shared mode is not supported here ?
When the sharing option is unselected, I get the error message "error in the inherited component" because ADC_LDD is already used by the other ADC component.
I hope you will be able to help me.
Thank you in advance :smileywink:
解決済! 解決策の投稿を見る。
Hello Sebastien,
You needn't two ADC_LDD component in your project to measure two channels. Use one instance of ADC_LDD in your application and add one channel into the ADC_LDD component (so you have two channels in the ADC_LDD component that can be measured), see the following screenshot:
You can also enable static sample groups, define one sample group for each channel and use methods SelectSampleGroup and StartSingleMeasurement for measuring these channels (software triggering). Or you can use (hardware) triggers, see the Trigger group in the Compnent Inspector.
For details see the help of the ADC_LDD component. There is also an example of typical usage.
Best Regards,
Marek Neuzil
Hello Sebastien,
You needn't two ADC_LDD component in your project to measure two channels. Use one instance of ADC_LDD in your application and add one channel into the ADC_LDD component (so you have two channels in the ADC_LDD component that can be measured), see the following screenshot:
You can also enable static sample groups, define one sample group for each channel and use methods SelectSampleGroup and StartSingleMeasurement for measuring these channels (software triggering). Or you can use (hardware) triggers, see the Trigger group in the Compnent Inspector.
For details see the help of the ADC_LDD component. There is also an example of typical usage.
Best Regards,
Marek Neuzil
Thanks Marek, this works fine :smileywink: