Hi All


Firstly thanks for all the suggestions, I think I have something to go on here. To clarify the points raised:

Its approx 1 reading every seconds, actually I`m making two readings of an X and Y output of an accelerometer but for these purposes lets treat it as a single reading as its just generating two data readings which its easy to store as pairs.

The readings are a value between 0 and 1024 as expected from 10 bit A/d. The zero output is 512, and +/- 1G approximates to either 532 or 492 stored in a word variable.

So I read and store these values until its less than 492or greater than 532 (this range can alter but for the moment lets assume its this). At that point I trigger an output and then to send serially the 10 prior readings and 10 post readings from the trigger. Nothing is ever sent serially unless the limit condition fails. I am however also writing the readings once a second to a display regardless of limits but thats a separate process.

After this I wait for a period, around a minute before I start the process again.


Cheers Pete