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 Omer YALHI wrote: >Hi, > >I have the following resistors setup, as the magnet around them moves, B1 >and B2 reed switches close or open, and thus the total resistance changes >(B3 is for sensing strong magnets and short circuits the system). I need to >find out different states of the 3 reed switches. I am able to do this by >connecting a capacitor and timing the charge time it takes, thus I can >differentiate different states. I do this every 500ms. I had to use a >special capacitor not to be effected by the temprature changes. > >I am wondering if I can differentiate the switch states by analog reading? >The current changes but not the voltage; how would I do this? Note that >power consumption is extremely important. With current setup I am down to >10uA (averaged). > >Please let me know if this is a stupid question also. > >Thanks in advance. > >Omer > >-- >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