Quote:
|
Originally Posted by Joel J.
Let's suppose there are four analog signals being sampled and "buffered" by your code. The gyro is running on ADC_CH0 and the other three channels are for other devices. How do we know when the gyro specifically has new data available? I saw the ~update_count~ variable, but it seemed to just indicate when any new sample is available, not when the sample for a specific channel is. Am I going to have to modify your code (maybe add an array of update_counts, with each index correspondent with the channel's freshness of data?) to allow this functionality, or is it already there and I'm just not seeing it?
|
The update flag only gets incremented after all enabled ADC channels have been refreshed. You can get less latency (if that's what you're after) by doing the modification you described, or by just moving the gyro to the last enabled channel and continue using Get_ADC_Result_Count().
-Kevin