At 07:50 AM 4/18/2004 -0500, you wrote: >I am contemplating using a 16F873A for a project. The circuit needs to have >one channel of A/D and one comparator and a bunch of digital I/O. After a >lot of RTFM'ing of the Data Sheet and the Mid-Range reference, I haven't >been able to devine if it is possible to use port A for A/D, comparator, and >some digital I/ >O at the same time (different lines of Port A of course). Do the comparator >inputs have to be designated as A/D inputs in ADCON? How are these functions >multiplexed? I don't see any reason you can't use comparators simultaneously with the ADC and regular port pins. Where a pin goes to both a comparator and an ADC input you should be able to both compare and read the input with the ADC simultaneously. As far as setup goes, you'd set the TRIS bit for inputs, but from there.. perhaps there is an "OR" function disabling the digital input buffers for either ADC or comparator use, it's not clear from the data sheet. Perhaps you should verify that it is disabled by monitoring Idd on a test unit and changing the input voltage over the full range. Any substantial increase would indicated that the digital input buffer is not properly disabled. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.