Page 1 of 1

18f46k22 and analogue inputs

Posted: Sun Jan 22, 2017 7:17 pm
by Roy Johnston
I have a problem with the 18f46k22 chip and reading an analogue input as a 10 bit resolution ( 0 - 1024).
Microchip specify the analogue inputs a being 10 bit.
However if I read it as an integer, I only get a value of 0 thru to 255. Which is a byte.
I am using an external voltage ref set to 1.5 V.
Any help would be appreciated.

Re: 18f46k22 and analogue inputs

Posted: Sun Jan 22, 2017 7:40 pm
by QMESAR
Hi

Please post the Flowchart you are using it will help people here to help you, when Microchip specify 10 bit it is 10 bit of that you can be sure :D

Re: 18f46k22 and analogue inputs

Posted: Sun Jan 22, 2017 7:48 pm
by Roy Johnston
Thanks for your reply, I was about to post my flow code. when I realized I had a problem with my code elsewhere, it is working.
thank you