Page 1 of 1

Analog I/Ps on 18F26K22 don't work

Posted: Wed Oct 12, 2011 6:12 pm
by Brian Walsh
The attached adctest_26K22 simulates ok but doesn't convert properly in hardware. The result for the integer option is a (seemingly) random sequence of the values 0, 128, 256, 512 & 768. I tried another 18F26K22 chip and got the same result.

I then recompiled the flowchart as adctest_2525 (also attached), with different C code register operations to preserve the 16MHz clock, for an 18F2525 and it works as expected.

I suspect there is something wrong with the C code generated to handle the 18F26K22 analogs.

Thanks,

Brian Walsh.

Re: Analog I/Ps on 18F26K22 don't work

Posted: Thu Oct 13, 2011 9:03 am
by Steve

Re: Analog I/Ps on 18F26K22 don't work

Posted: Thu Oct 13, 2011 9:52 pm
by Brian Walsh
Thanks Steve. That worked. I'll look there in future before cluttering the list.

Brian.