Em 8/6/2010 09:08, Olin Lathrop escreveu: > Yigit Turgut wrote: > = >> You say the values are correct and then you say the circuit is really >> bad, which one? >> = > Both, since they are not mutually exclusive of course. I said the values > you reported from the A/D seemed correct given what you were driving it > with. That doesn't mean the way you were driving it was a good idea, and= in > fact it wasn't. > > = >> It is basicly " >> >> = > http://www.best-microcontroller-projects.com/support-files/lcd-volt-meter= .pdf" > = >> this circuit, I just ported it to usart. >> = > First, just because someone wrote up a circuit doesn't make it a good one. > Any idiot can put up a web page. However in this case the circuit looks > reasonable enough at first glance. Second, most of that circuit is not > relevant to the discussion, which is about how to drive the PIC A/D input. > That circuit merely shows the A/D input coming from elsewhere. Note that= it > specifically states "Input 0-5V", which is correct. Your circuit does not > adhere to that, which is the "really bad" part I was referring to above. > > The reason I said "really bad" instead of merely "bad" is that not only > can't the A/D measure values below ground, but strange and possibly damag= ing > things can happen to the PIC when you cause enough current to be conducted > thru a pin protection diode, especially if that happens during powerup. > = The reset circuitry in the PDF seems not correct. I couldn't find decoupling caps also. And where is the most important circuit, the current sense itself? Isaac __________________________________________________ Fale com seus amigos de gra=E7a com o novo Yahoo! Messenger = http://br.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist