button pullup/down resistor?


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Apr 2008
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    I'd rather code the button to debounce something like below:
    CHECK_PB:
    IF PB = 0 THEN DEBOUNCE_PB
    RETURN

    DEBOUNCE_PB:
    PAUSEUS 200
    IF PB = 0 THEN CHECK_PB

    MENU_CNT = MENU_CNT + 1

    RETURN
    and before that I would prefer to make the pin connected to button as output..

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by abidr View Post
    I'd rather code the button to debounce something like below:
    True...but the thing has to be working halfway in the first place...then all the options can be added...
    No sense in having spanky shiny rims on a car without an engine?

  3. #3
    Join Date
    Apr 2008
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    You need to look at the PIC16F877A data sheet page 51 which says that port D is a parallel Slave Port.
    I think you need to disable the PSP.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by abidr View Post
    You need to look at the PIC16F877A data sheet page 51 which says that port D is a parallel Slave Port.
    I think you need to disable the PSP.
    You mean the Parallel Slave Port that's disabled by default on power up, thereby letting Port D function as normal I/O?

Similar Threads

  1. Sony SIRC IR Issue
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th August 2015, 09:10
  2. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 03:43
  3. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 23:43
  4. Button Push within 3 second Window
    By Tissy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd December 2005, 11:06
  5. Button subfunction 16F628
    By Jųan in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th August 2005, 17:44

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