ADC burst mode?

ADC burst mode?

Postby speedracer » Wed Feb 04, 2015 9:30 am

I'm not sure how many folks might need this but I would dearly love to have a burst mode for the INADC command. My ideal command would be:

ARRAY = INADC(<pin#>,<number of samples>,<time between samples>)

The ADC on the LP2138 claims speeds up to 2.4 uSec between samples. I would be happy with multiples of 10 uSec. I'm thinking of an application that would need 128 samples per burst but more would be better, of course.

Calling INADC with only one parameter could operate just as it does now.

Here's hoping...
speedracer
 
Posts: 7
Joined: Wed Jan 21, 2015 9:56 am

Re: ADC burst mode?

Postby Daniel » Wed Feb 04, 2015 9:26 pm

That is reasonable. I'll implement it as soon as I get a chance. I don't think I have a provision for returning an array of results so it may need to be a parameter.
Daniel
Daniel
 
Posts: 91
Joined: Tue Nov 13, 2012 2:10 pm

Re: ADC burst mode?

Postby speedracer » Thu Feb 05, 2015 9:31 am

Even just a pointer into RAM would work. A loop with PEEKS could retrieve the data. When you need a set of evenly-spaced samples of something, usually you have ample time after the event to process the data before the next set of samples are taken.

Or ... could you pass the address of an array to the call? (I know much more about the structure of FORTH than I do about your BASIC; passing addresses in FORTH is very common.)
speedracer
 
Posts: 7
Joined: Wed Jan 21, 2015 9:56 am


Return to EzSBC1

Who is online

Users browsing this forum: No registered users and 1 guest

cron