With this information I'm not quite sure about what to do except letting the define_clock at 3.
for a pic18f4550 @20mHz the rc clock [3] is a poor choice (see data sheet) if you are using the adcin command . for accuracy the device needs to sleep during the conversion according to the data sheet and adcin will not do that
Thank you again.
Then ADCIN is an instruction nobody should use in order to have precision?
Excuse me but I have another question, If I use the pins dedicated for AN2 and AN3 in another matters, will the ADC have the 5 volts of Vdd as reference as default? (I hope so because I have any pins left) Or I have to use necesarily AN2 and AN3 to specify that reference?
Have a good day or night.
Luis
Then ADCIN is an instruction nobody should use in order to have precision?
why would you say that ?
adcin is only an issue if you use that chip [pic18f4550] with the adc clock option 3 [rc] and fosc > 1mHz
with fosc=20mHz adcin is fine with adc clock option 5
If I use the pins dedicated for AN2 and AN3 in another matters, will the ADC have the 5 volts of Vdd as reference as default? (I hope so because I have any pins left) Or I have to use necesarily AN2 and AN3 to specify that reference?
the default powerup state for vcfg is 00, which defaults to vss/vdd for reference
Bookmarks