16f84a ra4/tock1

Thread Starter

clwhitt

Joined Dec 23, 2009
16
I'm working on teaching myself how to program the PIC family of microcontrollers and have run across a simple question that the datasheet is not answering for me.
On the 16F84A, RA4/TOCK1 is not going high when I send it the signal (no problem with RA0-RA3). Given that this is a TTL/ST multiplexed pin, do I need to setup another register (OPTION_REG?) so that this can be used as a true output (TRISA is already set as 00h)? Or is this an input only pin?

Thanks,
Chuck

"Prayers for Sgt. Wookie"
 

Markd77

Joined Sep 7, 2009
2,806
RA4 on the 16F84A is an open drain output. It can sink current but not source it, so if you want to test it, put a 1K resistor from the pin to 5V and then measure.
 

atferrari

Joined Jan 6, 2004
4,764
Or put a LED with a 270 Ohms limiting resistor and you could see what is going on.

Anode of the LED to +5V and cathode to resistor. Resitor to pin.
 
Last edited:

Thread Starter

clwhitt

Joined Dec 23, 2009
16
OK, I do remember seeing somewhere that it was a source drain, but I didn't quite understand what that meant. Now I do.
So I did hook it up as atferrari suggested, and the result is that it is an inverted output to the LED. Cool. A slight modification to the code, and PortA is sequencing as intended.
One other question, why aren't my friends and family impressed? Don't they understand what I just accomplished? :)

Thanks again,
Chuck

"Prayers to Sgt. Wookie."
 

atferrari

Joined Jan 6, 2004
4,764
RA4 is "open drain". Reread the manual.

One other question, why aren't my friends and family impressed? Don't they understand what I just accomplished? :)
As far as I know there is no glamour in this hobby, just intimate satisfaction. A long way with that, but nothing that could help in picking up girls.

Be ready to hear (if not answer) the question: what is that good for?

My most impressive achievements I always celebrated them alone.

The next to know: when you post about them here, be prepared to people just finding the wrong side of what you say and eventually "I did that before".

We call that locally "pinchar el globo", something like "explode the balloon".

It is your hobby. Just enjoy and forget the public.
 
Last edited:

Thread Starter

clwhitt

Joined Dec 23, 2009
16
RA4 is "open drain". Reread the manual.

RTFM, yup, I've heard that before. And I actually did read it again after you guys set me straight. The clearest thing I found in doing so? I've got a lot to learn (the nomenclature is the first barrier to cross).

...be prepared to people just finding the wrong side of what you say...
I've been posting online since way before there was a World Wide Web, I've found more ways than you can imagine to convey the wrong message, and have taken my share of the heat over those misunderstandings.

Reason for editing: wrogn spelling
Now that's funny.
Not laughing at you, though, su ingles es mucho mejor de mi espanol. Pero me gusto mucho a hablar en espanol.

Gracias,
Chuck
 

spinnaker

Joined Oct 29, 2009
7,830
RA4 is "open drain". Reread the manual.



As far as I know there is no glamour in this hobby, just intimate satisfaction. A long way with that, but nothing that could help in picking up girls.
I don't know where you have been hanging out but I have developed a whole stable of beautiful female electronic groupies. You should see them swoon when I talk about the 18F family of Pics! To the Op, move on up to the 18F family of Pics and the ladies will be breaking down your door. I think there is a guarantee on the Microchip somewhere. I'll see if I can post a link if I find time to look for it. But got to go now one of my women is knocking at the door.
 
Top