RB6 and RB7 as inputs on an 16F877a?


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2005
    Posts
    96

    Default RB6 and RB7 as inputs on an 16F877a?

    How should I connect a momentary switch to RB6 and RB7 so I can use them as extra inputs without comprimising the ability of in circuit programing.

    Thanks for any help, I think I saw Melanie post about this awhile ago, but I could not find the post.

  2. #2
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    The simplest way, that I use on all my PCBs is a selector slide switch, DPDT and switch the lines to the input stuff in one position and the programmer connection in the other direction. Works fine, just don't forget to switch back to "RUN" when finished programming.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I normally use a switch like in this schematic http://www.rentron.com/Micro-Bot/Schematic.htm
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    Join Date
    Apr 2005
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    While both of those methods would work well, I seem to remember Melanie having a simple method of connecting a momentary switch using a pull-up or pull-down resistor that would make it automatic. All I need to use RB6 and RB7 for is as an input for two switches.

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    It could be half-way down this thread...

    http://www.picbasic.co.uk/forum/showthread.php?t=516

  6. #6
    Join Date
    Apr 2005
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Melanie
    It could be half-way down this thread...

    http://www.picbasic.co.uk/forum/showthread.php?t=516
    Thanks, that must have been where I saw it. So basically set internal pull-ups on the chip and then take RB6/7 to ground through the normally open switch?

    I've got other pins on portB turning on/off leds and I read on the datasheet that when portB is set as an output that the internal pull-ups are automatically turned off. If this is the case can I turn the pull-ups back on and still use half the pins as outputs and half as inputs?

    Thanks

Similar Threads

  1. Unable to get 2 inputs to work
    By rangerdoc in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st June 2008, 03:16
  2. 16F877A problem: "coupled" digital values
    By Lupo83 in forum General
    Replies: 16
    Last Post: - 4th December 2007, 12:46

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts