I read a couple of posts where people enquired about using the internal vrefs of various PICs and it seemed that it just needs a register appropriately set to take over from the standard ADC macro which is limited to VDD and the external VREF+. I could not find any reference to my PIC (18F25K22) on these forums, so I dug in the datasheet and decided that two registers were affected. I put in what seems like the correct values for 2.048V ref and internal ref enabling:
Code: Select all
vrefcon0 = 11100000;
adcon1 = 00001000;
. On running though it seems Flowcode is still using the VDD or VREF+ options in the ADC macro config. What am I missing here?