In my application with 18f4550, I need a ADC channel and only pin RE2 is free.
AN0 to AN6 are already in use as digital, input or output and connected to other IC on the board.
Can I set only AN7 in analog mode ? I think not....
Or, can I use SETUP_ADC_PORTS (AN0_TO_AN7) for the time necessary to read the ADC value after changing the TRIS directions and then reset the baseline?
Learn by doing ! You cannot harm the PIC. If the die of the 18F4550 is similar to the 16F88 cut a small program, download into a test PIC on a breadboard and run it for 24hrs.
Don't bother with a 'simulator' ONLY test in the real world !
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
Posted: Thu Feb 10, 2011 9:04 am
If you put digital voltage into an analog pin you won't hurt anything. As long as your digital lines don't mind having the analog input for a short time you should be OK. _________________ The search for better is endless. Instead simply find very good and get the job done.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum