Page 1 of 1

RA5/TOCKI as an output pin

Posted: Thu Nov 04, 2010 3:37 am
by jollybv
Hi all

I am having a problem with the pick 16F877 if I use RA5/TOCKI pin 6 as an output in my program it works fine in the simulation but will not work in real life or on the development board. This problem is not only with the 16F877 but I have the same problem with the 16F876. what I am doing is simple I am using a decision icon if (variable)= to 5 then output 1 on RA4 I then have a one second delay and turn the pin off with another output 0 on RA4. I am using the RS232 function in the chip could this have something to do with it or what??? can anyone please tell me what I am doing wrong

Regards
Brian

Re: RA5/TOCKI as an output pin

Posted: Thu Nov 04, 2010 6:56 am
by medelec35
Hello jollybv.
RA4 is open drain. Which means this o/p cannot source current , it can only sink current.
This means you will either need to connect load between +5V and output
When o/p is then high, FET is off so its effect is an open switch, o/p is pulled up to +5V via load
When o/p is low, FET is on so o/p is shorted to 0V, this sinks load current.
Or you need an external pull-up resistor to pull-up to +5V line. Value could be around 1K

Re: RA5/TOCKI as an output pin

Posted: Thu Nov 04, 2010 9:18 am
by jollybv
Hi Martin

Thank this will help me a lot

Regards
Brian