Analog I/Ps on 18F26K22 don't work

Moderator: Benj

Post Reply
Brian Walsh
Posts: 29
Joined: Thu Jan 14, 2010 10:43 pm
Has thanked: 3 times
Contact:

Analog I/Ps on 18F26K22 don't work

Post 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.
Attachments
adctest_2525.fcf
(7 KiB) Downloaded 341 times
adctest_26K22.fcf
(7 KiB) Downloaded 336 times

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

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

Post by Steve »


Brian Walsh
Posts: 29
Joined: Thu Jan 14, 2010 10:43 pm
Has thanked: 3 times
Contact:

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

Post by Brian Walsh »

Thanks Steve. That worked. I'll look there in future before cluttering the list.

Brian.

Post Reply