> -----Original Message----- > From: Derek Cowburn [SMTP:derek@COWBURN.US] > Sent: Friday, August 02, 2002 6:25 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC] RA2 competition when using I2C Slave Mode and A2D > > > -----Original Message----- > > From: Epox [mailto:spowell5@NEO.RR.COM] > > Sent: Thursday, August 01, 2002 11:09 PM > > To: PICLIST@MITVMA.MIT.EDU > > Subject: Re: [PIC] RA2 competition when using I2C Slave Mode and A2D > > > > > > RA2 Competition? Red Alert 2? > > ha ha wizaguy. > > Page 69 of the pic 16f876 datasheet states that ADCON1 must be set so pin > RA5 (not 2, sorry) is configured as digital. The table on page 112 > indicates there are only 6 possible choices that set RA5 to digital. This > only allows access to 3 A/D channels max. > > Is there a better (low pin count) pic to use as an A/D I2C slave device > that > will allow me to use 4-5 A/D? > > -Derek > If current consumption isn't an issue, you can define the pin as a digital pin, set the TRIS bit to make it an input and still be able to use it as an analog input. I have been using this method in a product for some time quite successfully. The manual even states that this will not affect accuracy (Note 1 on page 115 of the 16F87x datasheet PDF. Biasing a digital pin somewhere between the rails will cause an increase in current consumption. Regards Mike -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.