SCM20XX: ADC Burst mode

Whatever you all are discussing is accurate; I have worked in embedded software for over 25 years, assembly, hardware, C, etc. Microsoft did a brilliant thing by using C# and expanding the programmer base. All that said, let’s get back to what I wanted.

I intend to use these modules because they are easy to use.

I want to change the sampling rate using this command.

ACH1.SamplingTime = TimeSpan.FromTicks(tk);

If a read in managed code gates this function, it is useless.

The only other way is to give the library an Array with the required length the user wants and let the library collect the samples and return them when it is ready.

I look forward to seeing your solution. :blush:

I believe the M7 can dump the ADC results to DMA. It’s too bad that TinyCLR can’t set up the sample rate and DMA buffer and send the ADC on its way to do its thing and only get an interrupt when the buffer reaches a certain fill level. Managed code could then empty the DMA buffer and process the results all while the ADC is still sampling in the background.

1 Like

Thank you, exactly what I am thinking

@Mike I was talking about SCM20XX modules, Sorry :slight_smile:

I believe the M7 can convert the ADC result to DMA. Unfortunately, TinyCLR can’t set the standard value and DMA parameters, and can’t send the ADC to do its job, only stops when the parameters can’t reach a certain level. The controller can flush the DMA buffer and process the results while the ADC is still sampling in the background.

1 Like