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

RA5/TOCKI as an output pin

Postby jollybv » Thu Nov 04, 2010 3:37 am

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
User avatar
jollybv
Flowcode v5 User
 
Posts: 158
Joined: Thu Feb 12, 2009 5:20 am
Has thanked: 44 times
Have thanks: 5 times

Advertisement

Re: RA5/TOCKI as an output pin

Postby medelec35 » Thu Nov 04, 2010 6:56 am

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
If you're hardware is not working as expected, try looking here first:
viewtopic.php?f=26&t=6936

If you find any posts that are useful, please click on the 'thumbs up' icon next to Quote button on that post.
User avatar
medelec35
Valued Contributor
Valued Contributor
 
Posts: 5083
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire
Has thanked: 1263 times
Have thanks: 1469 times

Re: RA5/TOCKI as an output pin

Postby jollybv » Thu Nov 04, 2010 9:18 am

Hi Martin

Thank this will help me a lot

Regards
Brian
User avatar
jollybv
Flowcode v5 User
 
Posts: 158
Joined: Thu Feb 12, 2009 5:20 am
Has thanked: 44 times
Have thanks: 5 times


Return to Flowcode V2 & V3

Who is online

Users browsing this forum: Bing [Bot] and 1 guest