|
Re: Testing and Cause of Failure for Encoders and Hall Effect sensors
have a look at the data sheet for the 18f8520 at the microchip website. it will explain how to configure the adc. eight bits of the output go into one eight bit register and the other two bits have to be extracted from another. whether you get the high order or low order eight bits in the register is configurable. you'll probably want the low order eight bits so you can move them to the low order byte an integer, then mask the high order bits into the two low order bits of the high order byte. wow, what a sentence.
i'll try to formulate a clearer response tomorrow.
g'nite.
|