Page 1 of 1

Port RA4 ....16F84A

Posted: Wed May 23, 2007 5:05 pm
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?

Posted: Thu May 24, 2007 9:22 am
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.

Posted: Thu May 24, 2007 9:25 am
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.

Posted: Thu May 24, 2007 1:21 pm
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?

Posted: Thu May 24, 2007 5:31 pm
by Benj
I think that with the pull up resistor RA4 can source and sink current.

Without the resistor you can only sink current.