Another way of handling bipolar inputs is to just bias them up with a couple resistors. I don't recall the output resistance of the LM35 chip, but if it's relatively low, you could just put a couple 10k resistors on th PIC ADC input pin. The other end of one goes to the reference voltage (often +5V). The other end of the other resistor goes to the LM35. If the LM35 were to output -5V, the ADC would see 0V. If the LM35 were to output 0V, the ADC would see +2.5V. If the LM35 were to output +5V, the ADC would see +5V. While the absolute values of the resistors is not critical, the matching (and tempco) IS critical. You are often best off using a couple resistors on a network, since they are pretty precisely matched in both terms of initial resistance and tempco. Harold > On Mon, Oct 02, 2006 at 12:19:41AM +0800, genome wrote: >> Hello.. >> What happens if a PIC pin configured as a 10bit a\d receives negative >> voltage... I'm interfacing an lm35c temperature sensor to a pic and it >> says >> on the datasheet that lm35 will produce a negative output voltage when >> measuring less than 0 degrees celsius... > > You can do a few things: don't use the full-range application shown in > figure 2 of the datasheet or using a summing op-amp to add a constant > voltage to the lm35 output. I'm sure there are other solutions. > > Take care. > > Matthew > > -- > Have confidence in your decisions. Make them expeditiously, and stay > with them as long as you believe you are correct no matter what others > say. However, when you conclude you were in error, do not hesitate to > announce the error publicly and change course. > -- Edward J. Koch, former mayor of New York City > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist