Hi RF,
Since RA4 is not an analog pin you get it as digital at default.
Then, the rest is as you needed. See the table below.
-----------------------------
<img src="http://img4.picsplace.to/img4/26/adc.GIF" alt="Image Hosting by PicsPlace.to" >
-----------------------------
RE0-RE2 meaning that AN5, AN6 and AN7 are needed as digital in your case.
Thus, you endup with
ADCON1.0=0
ADCON1.1=1
ADCON1.2=0
ADCON1.3=0
ADCON1.4=0 'ignore
ADCON1.5=0 'ignore
Then, assuming you want to use RC OSC,
ADCON1.6=0 '(here you should use DEFINE)
Then, you need 10-bit res.,
ADCON1.7=1 'right justified is needed with 10-bit. Left justified is needed with 8-bit.
You are set.
-------------------------------
Edit: Don't forget to set your TRIS registers for input/output thingie.
Last edited by sayzer; - 22nd October 2006 at 00:04.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks