On Mon, 2006-10-02 at 00:19 +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... I think you may have misunderstood the datasheet. The lm35 won't "produce" a negative voltage unless you give it one. Look at figure two of the datasheet, you need -Vs for the sensor the deliver the negative voltage. The lm35 is an OLD part designed at a time when dual supplies were basically the only thing in the analog world. These days many analog circuits are single supply, and newer temp sensors have an offset in their reading to remove the need for the -Vs supply. If negative temps don't matter to you, connect the LM35 as indicated in Fig. 1 of the datasheet and you're done. If you do want negative temps, as it is, you can't read negative voltages with the PIC. You could connect the GND pin of the PIC to the -Vs rail, but then you'd have to cobble up a few more supplies to make the PIC and LM35 happy. I would choose a different sensor then. The LM50 has a built in 500mV offset so that you don't need the negative supply. I've used that sensor with success. TTYL -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist