Sorry if this is a dumb question but if I wish to use AN12 (RB0) and I set ADCON1 (PCFG3CFG0) = 0010 as shown below this doesn't preclude me from using the other pins which will be set as analogue channels as digital i/o?
Pins that are configured as analogue work fine as digital outputs but always read zero when read. This can cause huge problems with RMW type instructions.
You can use it it just not easy Is that not right Mike ?
You just cant do a (bcf or a bsf) but can set it High with portB or latb = b'11111110'
Or am I crazy Lol
This from the datasheet
On a Power-on Reset, RB4:RB0 are
configured as analog inputs by default and
read as ‘0’; RB7:RB5 are configured as
digital inputs.
By programming the Configuration bit,
PBADEN, RB4:RB0 will alternatively be
configured as digital inputs on POR.
I want 7 dedicated pins on a port for a RTCC. I can modify my cct so that my RTC is on portC, my lcd on portB thus I can put my analogue input back on RA0 where it was before I connected the RTC chip.
I'd not heard of a PCF8535 until you mentioned it. Just looked at the pdf. It looks a bit complicated for my level of understanding and I haven't dabbled with I2C yet. Something for the future.
Thanks for the advice though. Thanks Bert, kpatz, pommie.