What is your Vref pin connected to? You have set up your A/D to read the voltage between Vss and Vref. Vss corresponds to 0 A/D counts and Vref corresponds to 1023 A/D counts. I'm not sure if t ...
Thanks PCM, I'll definately experiment with that floating point thing. However, there is a considerable amount of code executed on each pass, so I'm not sure if removing the cast to a float will impr ...