Op-Amps are really quite easy, once you get beyond thinking they're complicated. Doing an online search in google will give you all the info you would need. I would also recommend the IC Op-Amp cookbook. Awesome book (some 250+ pages) of nothing but op-amp circuits. Shawn Wilton Junior in CpE MicroBiologist Phone: (503) 881-2707 Email: shawn@black9.net http://black9.net Omer YALHI wrote: > Adam, thank you for the reply. However, the circuit I have given is a > "black box", I am only exposed to the pins A and B. I think I can still put > your idea to work by adding another resistor (something smaller than 10K > perhaps?) at point A and measure the voltage at that point. Does this sound > right? Also, I am not familiar with op-amps, so I wouldn't know where to > start; therefore I am trying to avoid using an op-amp (unless it becomes > necessary). > > Regards, > > Omer > > > -----Original Message----- > From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On > Behalf Of M. Adam Davis > Sent: Saturday, April 17, 2004 12:12 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PICLIST] [EE:] Reading different resistor values > > This circuit uses large value resisters, which makes it difficult to read > when directly connected to an analog input pin, but by no means impossible. > > You have a simple resister divider. Hook the analog input pin to the > junction of R1 and R2 (where B1 connects). As the switches open and close > the voltage level at that junction varies. > > If the voltage is one volt, then these are the voltages at that junction you > can expect: > B1, B2 open --> .745 > B1 closed --> .109 > B2 closed --> .647 > B1, B2 closed --> .093 > B3 close --> 0 > > If the voltage going in is higher, then just multiply the above values by > that voltage, so for 5 volts it would be 5 * .745 = 3.72 and so on. > You can measure this directly with a multimeter at that point. > > The PIC may measure slightly different voltages for both open and B2 closed > since there is an impedance limit in the PIC - it doesn't like to measure > voltages through resistors more than 10k (It's a little more complex than > that, but this will get you started). > > However, it will still be able to detect the change and correctly identify > the various states of the switches. If it doesn't work very well adding an > op-amp to buffer the voltage will set it straight. > > I hope this helps! > > -Adam > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads