View previous topic :: View next topic |
Author |
Message |
Nick Guest
|
using port A4 as digital output. |
Posted: Fri Jan 21, 2005 11:49 am |
|
|
I have one analog port setup A0 and I'm trying to using A4 as digital output. Is there anything that I have to do special to make it a digital output?
Thanks,
Nick |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Fri Jan 21, 2005 12:45 pm |
|
|
You don't specify what PIC you are using, but RA4 on most pics can only sink current. It is an open drain pin. That means that it cannot output a voltage but can pull the voltage to 0 volts. If you want to use it as an output, then you will have to add a pullup to 5V through a resistor. |
|
|
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Fri Jan 21, 2005 1:13 pm |
|
|
Nick -
Google for "open drain" and also consult the data sheet for the PIC you are using. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
Nick Guest
|
|
Posted: Fri Jan 21, 2005 7:05 pm |
|
|
yall are correct, thanks guys!
Nick |
|
|
|