RB6 and RB7 as inputs on an 16F877a?


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    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.

  2. #2
    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

  3. #3
    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