How about using an inverting amplifer with CMR and output range that supports ground level and feeding to the PIC both the inverted and non inverted signal. The PIC can detect the sign and pick the right channel. It may require some clamping of negative voltages on the PIC input. As for the offset idea, if good accuracy near 0V input is required, a series input switch can be used. This way the PIC can dynamically calibrate the zero level by disconnecting the input and taking a measurment. Tal > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Mike Harrison > Sent: Friday, May 16, 2003 8:45 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [EE]: Analog-Digital Fundamentals > > > On Fri, 16 May 2003 12:35:59 +0000, you wrote: > > >Hi everyone, I am using a microcontroller (M16C) to do > simple analog to > >digital conversion. Due to the rather limited documentation > and support > >for this chip (by mitsubishi), I have some queries on > certain aspect of > >this A-D stuff. > > > >The manual mention that the A-D functionality uses 3 other > pins beside > >the analog input pin(AN0-AN4...). They are: AVcc = Power > source pin of > >the analog section AVss = GND pin of the analog section > >Vref = Input pin of reference voltage > >(These pins can be tied to internal source or externally) > > > >My question is: > >1) If my external analog signal(-5V to 5V) is using a > different power > >supply, how shall I connect these 3 pins? > If you only need a not-too accurate reading, a simple answer > would be to use a 5V reference, connect your input via 10K > to the ADC pin, and add 10K betwen the adc pin and Vref > (assuming source impedance of Vref is not too high) - this > will convert your -5 to +5 input into the range 0..5V. As > it's Friday afternoon I can't immediately think sufficiently > well to say if this will be linear or not, but it may work > for non-critical applications. > > -- > http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads