Hi Alain,
I think that would be nice, but I think its a long way off if PBP went that route.
No I think the previous poster understood me a little better. If this helps, let me give you an example.
I have a 28 pin device, want to use port C as output to leds, port B to an LCD and port A to be a mix of digital I/O for switches, and a pot or two. This is where I (and probably most newbies) stumble when it comes to configuring the PIC. Whilst following Mels post would indeed set up port A for digital, if you want to use one of the AN pins, but have switches on the others, then its confusing. Maybe a database is too complicated, I would simply like somehing along the lines of:
"to set PORTA.0 to analogue, PORTA.1-7 Digital use ADCON = X"
"to set PORTA.1 to analogue, PORTA.0 and A.2-7 digital use ADCON = Y
etc
On a current project I've resurrected I want PortA.0, 2 & 3 digital for switches, and Porta.1 analoge to read the value from a 10K pot. But I'm not sure what value I need to set ADCON to get this mix.
EDIT: - I see "bit 3" needs to have a value of 1110 (if I follow the data sheet), but how do I convert that into a statement "ADCON = ???" (Data sheet http://ww1.microchip.com/downloads/e...Doc/39582b.pdf) - I'm using a 16F873A
Bookmarks