Page 1 of 1

18F47K40 ADC

Posted: Wed Mar 13, 2019 12:53 pm
by medelec35
ADC only works on AN0.

Select any other channel and it's ignored.

For example changed from AN0 to AN27.
ADC is still being picked up from AN0 and ignoring AN27.

Re: 18F47K40 ADC

Posted: Wed Mar 13, 2019 1:10 pm
by medelec35
Resolved by changed ADC type from 36 to 34 within fcdx file.
Type 36 was not using

Code: Select all

ADPCH
for channel selection.

Re: 18F47K40 ADC

Posted: Wed Mar 13, 2019 2:25 pm
by Benj
Thanks Martin,

Problem should hopefully be solved now. I've added the ADPCH register to the type 36 code.

Re: 18F47K40 ADC

Posted: Wed Mar 13, 2019 3:27 pm
by medelec35
Thanks Ben,
Update working.