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...
ADC burst mode?
-
- Posts: 9
- Joined: Wed Jan 21, 2015 9:56 am
- Location: Seguin, TX
- Contact:
Re: ADC burst mode?
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: 9
- Joined: Wed Jan 21, 2015 9:56 am
- Location: Seguin, TX
- Contact:
Re: ADC burst mode?
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.)
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.)