About two years ago I started to play with an inexpensive light detector using a led as sensor. This argument has been discussed sometimes, this is one of the documents about an application related this topic: http://www.merl.com/papers/docs/TR2003-150.pdf In the referenced document the authors speak about a led photocurrent of 1uA (under strong light) and 1pa (in dark) while at normal room illumination is 50pa. These values may be reasonable, the point non very clear is that They say of a leakage at the input pin of 0.002pa (the PIC used is a 16F876). I have seen on the datasheet much higher values (up to a max of +/- 1uA) and also at room temperature a value of 1nA seems to consider. Now I have two questions: Are they in error or there is something true in this document? Eventually, could I obtain better results using a pic with a comparator (instead of measuring Hi/Lo threshold on the pin) ? regards Marco -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist