ADCON0 controls operation of A/D module
ADCON1 configs functions of port pins
ADCON2 configs A/D clock source
this is page 224 DS39626, page 226 in pdf view
Padawan-78
OK, here is what I do understand,
for ADCON1 control register.....I need...
bit 7 = 0
bit 6 = 0
bit 5 = 1 'I am using Vref- AN2
bit 4 = 1 ' I am using Vref+ AN3
what I still don't understand....from page 224
bit 3 = ?
bit 2 = ?
bit 1 = ?
bit 0 = ?
Padawan-78
Some trick:
If there are analog signals on inputs, they can drive the current through the inputs to an high level, if they are digital inputs !
So,
you can declare all the inputs as analog and switch them to digital in the case of reading a digital input and switch them back to analog after (ADCON1).
You can switch all the AN3... to digital and see what happens ;-)
You can read the analog value without problems!
You can arrange the analog inputs on the first AN-channels !!!!!!
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Duh,
Got It!
I cannot pick and choose around which inputs I want I have to start with AN0 and work my way up or not at all.
thanks for the blunt yet helpful comments!
Just had to figure out how to read the table....had to look at the big picture.
Padawan-78
Great! And believe it or not, that one little table and the way it is written and works, ties into soooo much other PIC stuff...so you didn't learn one thing...you learned a hundred things...just not all at once...YET...
Problem is...now you'll be up until all hours of the morning trying to figure out what to do next with all that new knowledge...
Bookmarks