Hi:
Processor Expert introduces a significan overhead to the ATD sampling process, which depending of your code could be 10 to 20 times the sampling rate.
The alternative that I use is not to use the Processor Expert routines to do the ATD Sample. I use the Bean for the configuration, and I have other functions that write directly to the ATD registers in the ATD Module. I know that this breaks the philosophy of the encapsulated Bean and the portability of the code, but it provides the fastest sampling rate.
Using polling, once you have the minimum code required to start a conversion, wait for the sample to be finished and store it in a buffer. I found that is is more efficient (time-wise) to construct the sample's histogram on the fly, rather than storing every sample because of the memory access (based on a HCS08 processor). My application can use better the histogram. The 56F8300E probably has better memory access times.
To obtain constant known sampling rates, you should measure the sampling rate including the overhead of starting the sample, and storing the result. This would give you the real sampling rate that you get with your processor. The ATD module still samples at 4us, but the overhead is taken into account.
YOu could have a blocking routine that do all the sampling for a period of time (if your application can use this scheme). This way you get a constant known sampling rate.
Regards,
Alex
Message Edited by alex_spotw on 2006-06-30 02:11 PM