Ron Nicholson wrote:

There is actually one other PalmOS "timer" that has a public API which
might give one a resolution time higher than TimGetTicks().  Open a serial
port at the highest allowed baud rate with no handshaking, and then keep
the transmit buffer completely full.  The amount of characters sent may
give you a higher time resolution than 1/100th of a second, depending on
the baud rate, the number of stop/start/data bits, and the transmit buffer
size.

But given that the display is updated and the buttons might be read less
often than every 1/100the of a second, why would one need this time
resolution?



I am aware of that trick but we are using the serial port of talking to hardware so that resource is allocated. It has been my experience that forcing any action within the 10 ms timer period eventually backs up the progress of unlying system threads.


As far as the FFT goes and the "dSampleRate ... dUnderSampleRange ... pPrecision", it was intended as a simple undersampling scale. For example. If you want to keep you FFT pure of frequency assignment, we can have a simple under sampling parameter do fit the FFT points below the actual input frequency.

For example:

Our hardware is sampling at 12.8 kHz. We are doing and 512 point FFT where we want the 512 points to span across 0 Hz to 5000 Hz. Thus we can have a parameter of say, dUnderSamplePercent. For this example that value would be 5000 Hz / 12,800 Hz = 0.390625.

If we wanted 512 points to be across, say 100 Hz, our scale value would be 100 Hz / 12,800 Hz = 0.0078125

Thus how about replacing "dSampleRate ... dUnderSampleRange ... pPrecision" with just "dUnderSamplePercent" or a more proper variable name?

My overall goal is to make sure that we can have a fixed hardware sample rate but keep all the points of an FFT within the frequency range the user desires examine. If you can think of a better way to express this in the API, feel free to suggest.

Steve



--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to