Hi,
.. the interval between ADC values reaching a particular level (eg. the length of time between two points in a series of readings at which ADC reaches 100)? The intervals are likely to be between 1x and 2x per second.
Could you clarify what determines those intervals? Is it some other part(s) of your program that only "polls" the ADC occasionally, or something else?
It might be possible to add to those "other parts" of the program so that they keep an approximate "record" of the passing of time. The execution time of some/many subroutines (or their individual instructions) is reasonably "predictable", even with a PICaxe. The problem arises if the program is dependent on some "external" event such as SERIN or PULSIN, etc.. They do have a timeout facility (which you might count and then re-enter) but the timeout period may be too long.
As you say, the "time" variable increments too slowly (and sadly doesn't scale with SETFREQ) for some purposes; It actually uses a 20ms "tick" from Timer 1 (which CAN be read with a PEEKSFR .... command) but the intermediate "Pre-Scaler" (i.e. up to a rollover at 50) is not accessible to the programmer/user. Therefore, the only (M2) solution I can think of is for the program to keep track of T1 rollovers (i.e. currentvalue < lastvalue ). I did this recently to indicate the PICaxe's "loading" (by checking T1 whilst waiting for the next 1-second period to complete) when nothing else needed to be processed, with some success, but haven't formally documented it yet.
A solution may be possible by using interrupts, but it depends how amenable your program is to using an interrupt (and how comfortable you are with their use
).
Cheers, Alan.