You code try posting your code...
You code try posting your code...
Dave
Always wear safety glasses while programming.
i found the problem
i had to set bits 6:4 in ADCON1 to match the setting in the
Define ADC_CLOCK
after that it is working well now
so what about ANSEL ?
does ADCIN handle that automatically ?
it seems to work the same whether or not i explicitly set the ANSEL bits
You can read Analog no matter which state ANSEL is in.
It's Digital that has a problem, and always reads 0 when ANSEL bits = 1.
Frankly, I think they should have called the register ... DIGSEL.
P.S.
But, when Digital is enabled on an analog pin, it adds an extra load, can throw off the analog impedance, and adds switching currents when the analog signal is near the input switching levels.
Especially prevalent on TTL inputs.
Last edited by Darrel Taylor; - 19th June 2010 at 02:35. Reason: P.S.
DT
Bookmarks