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.
Analog I/Ps on 18F26K22 don't work
Moderator: Benj
-
- Posts: 29
- Joined: Thu Jan 14, 2010 10:43 pm
- Has thanked: 3 times
Analog I/Ps on 18F26K22 don't work
- Attachments
-
- adctest_2525.fcf
- (7 KiB) Downloaded 377 times
-
- adctest_26K22.fcf
- (7 KiB) Downloaded 379 times
-
- Posts: 29
- Joined: Thu Jan 14, 2010 10:43 pm
- Has thanked: 3 times
Re: Analog I/Ps on 18F26K22 don't work
Thanks Steve. That worked. I'll look there in future before cluttering the list.
Brian.
Brian.