Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
How does one add ADC channels to the ADC002, and get conversions executed in order?
The example and ADC002 App overview in DAVE3 help do not give a clear explanation on how this should be done.

Example
1.) ADC0 conversion starts when PWM interrupt occures.
2.) ADC1 conversion starts when ADC0 finishes
3.) Convert up to 6 more channels.
3.) ADCn conversion finishes, and ADC group resets to waiting for next PWM interrupt.
0 Likes
1 Reply
P__Yélamos
Employee
Employee
10 sign-ins First like given 5 sign-ins
Hello,

to include new channels in the ADC002 App, it is recommended to go inside the GUI (double click in the App) and increase the number of channels needed. This will request new channel Apps. As you might know, the ADC002 uses one Group of the ADC, so maximal number of channels is 8. For more channels, use addiational instances of ADC002 App to cover your needs. Inside the GUI, you can also configure the initialization of the queue (the FIFO with the channels number to be converted). As emntioned in the App, you will need to call the API: ADC002_InitializeQueue(&ADC002_Handle) in order to initialize the queue as you selected in the "Queue Configuration" tab.
Afterwards you can fill the queue as you want with other available APIs.

For triggering with wxternal events you need first to configure the ADC002 App as trigger enabled (in the tab ""Queue Configuration") and finally connect your PWMSP001 App, for example, to the ADC002 App in order to trigger the conversions. Remember that you can activate the trigger for each of the entries in the queue independently, so entry 0 and 5 for example can request a trigger event for converting and the rest will convert without waiting.

Hope it helps.
0 Likes