RA5/TOCKI as an output pin

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

RA5/TOCKI as an output pin

Post 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

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: RA5/TOCKI as an output pin

Post 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
Martin

User avatar
jollybv
Flowcode v5 User
Posts: 374
Joined: Thu Feb 12, 2009 5:20 am
Location: Cape Town
Has thanked: 81 times
Been thanked: 25 times
Contact:

Re: RA5/TOCKI as an output pin

Post by jollybv »

Hi Martin

Thank this will help me a lot

Regards
Brian

Post Reply