On 21 Oct 2011 at 10:33, Yigit Turgut wrote: > Hello everyone, >=20 > I have a sub-project where I continuously monitor LDR output and > drive a mini motor according to the algorithm. Motor I drive is > manufactured by NIHON MINI MOTOR CO LTD and is perfectly driven by RB0 > and RB1 digital outputs (no other components, directly PIC-to-Motor). Eyebrows raised as I consider the possible nasty side effects that could ar= ise from a=20 direct motor connection to PIC, no matter how low the current... but you im= ply this is=20 not a problem so will ignore it for now and concentrate on your question. > My concern is ; If I power the LDR from let's say RB4 port, how will > this effect the stability of the system ? By LDR do you mean Light Dependent Resistor? If yes, how do you mean affect= =20 system stability? Are you asking about port RB4 because it may be special e= g: open=20 drain output? > I am not in a position to dedicate a power supply for LDR thus I am > seeking practically effective workarounds.=20 Are you asking how to measure a Light Dependent Resistor using a single PIC= I/O=20 line? It would be possible to drive the port pin to charge/discharge a capa= citor=20 through the varying resistance of the LDR and determine resistance by measu= ring=20 charge or discharge time. Sorry, we can't really see what you're asking just yet... need a few more c= lues. --=20 Brent Brown, Electronic Design Solutions 16 English Street, St Andrews, Hamilton 3200, New Zealand Ph: +64 7 849 0069 Fax: +64 7 849 0071 Cell: +64 27 433 4069 eMail: brent.brown@clear.net.nz --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .