Society of Robots - Robot Forum

Software => Software => Topic started by: 123eric on May 21, 2007, 09:34:18 PM

Title: Pull to Ground
Post by: 123eric on May 21, 2007, 09:34:18 PM
I am using a pic16f870 with basic and am tying to get the pins to pull to ground an sink a current but its not working for me.

thanks for any help.
 :-\
Title: Re: Pull to Ground
Post by: Ro-Bot-X on May 21, 2007, 11:49:27 PM
The pins have to be set as output and low. This way you can sink up to 20mA of current on each pin.

If you are trying to read a sensor, you need to disable the internal pull up resistors and add an external 10k resistor between the pin and GND. The sensor will be connected to the pin and the pin will read low if no signal is received and high if the sensor is triggered.