--- Thilo Klein wrote: > Hello. > > I am using the ADC using Application note AN700 > (http://ww1.microchip.com/downloads/en/AppNotes/00700a.pdf) > with a > 16F628. > > I used the > http://www.sprut.de/electronic/pic/programm/compadc/compadc2.gif > circuitry being similar to the one being included in > the AN. The blue > R3 is missing in my setup on purpose. "Eingang" > means "voltage source > to be measured". I changed R1, R2 and R3 to define a > special area of > voltage and a special value of voltage this area of > voltage is to > surround. So in my case the VS's value is changing > from 0 to 5 volts. > And the resistors force the ADC to subdivide 1,25 V > to 4,56 V (into > 1024 steps). > > Unfortunately it works exactly the other way round. > So values are > measured between 0 and 1,25 V and 4,56 V and 5 V and > not in between. > First you want to measure a range between 1.25 to 4.56? Okay. Why remove R3? It will latch the input to high(Vdd) or low(Vss). From the diagram it is a potential divider but in the AN700 it is not. Why do you want this? Also check the output of the comparator. You can inverse the output of the comparator which might not be this case. John ____________________________________________________________________________________ Sponsored Link Mortgage rates near 39yr lows. $420k for $1,399/mo. Calculate new payment! http://www.LowerMyBills.com/lre -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist