Analog I/Ps on 18F26K22 don't work
Posted: Wed Oct 12, 2011 6:12 pm
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.
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.