Port RA4 ....16F84A

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

Moderators: Benj, Mods

Post Reply
mel
Posts: 9
Joined: Tue Dec 12, 2006 4:11 pm
Location: UK
Contact:

Port RA4 ....16F84A

Post by mel »

I am quite new to flowcode so excuse me if this is a silly question.
I have programmed this PIC 18F84A, to turn on each port ( ie: RBO to RB7 & RA0 to RA4 a total of 13 ports) in a sequence of..... on for 1 second & off for one second.. next port etc. I have used the Led blocks to show the outputs via the Leds lighting up in sequence. My problem is that, although all of the Leds light up correctly in sequence in the run mode, when I transfer the PIC to an equivalent hand built circuit I constructed, then RA4 does not light the Led. When I connect my multimeter to the RA4 port there is no voltage output from this port. Any ideas?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello

Try connecting a 4.7K <-> 10K pullup resistor between pin RA4 and +5V. It is possible that pin RA4 is missing the internal pullup resistor and therefore cannot drive its output high by itself.

User avatar
Steve
Matrix Staff
Posts: 3427
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

RA4 on the 84a is an "open collector" output. When you use it as an output, you need to use a pull-up resistor as Ben has suggested.

mel
Posts: 9
Joined: Tue Dec 12, 2006 4:11 pm
Location: UK
Contact:

Post by mel »

Thanks for the info, much appreciated!...... having done forther tests , I think I am right in saying, that this pin (RA4) with the pull up resistor, can then only sink an output & not source it, is that correct?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

I think that with the pull up resistor RA4 can source and sink current.

Without the resistor you can only sink current.

Post Reply