Jump to content

PortA question

Recommended Posts


I've a simple question about the porta. I've making six LED's on the porta of a PIC16F876. The code is the follow:




On the output, the LED 1,2,3,4,6 are on, but the LED 5 (RA4) is off, why?


Regards Prefekt

Link to comment
Share on other sites

The RA4 pin has a different output circuit to the other pins on port A. The other pins have a sink/source capability, while RA4 can only sink current.


To turn you led on on RA4, connect it between 5V and the pin, then set the pin output to 0 to turn the LED on, and 1 to turn the LED off.




Link to comment
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...