Need help with 16F676 button press


Results 1 to 6 of 6

Threaded View

  1. #4
    Join Date
    Jan 2007
    Posts
    78


    Did you find this post helpful? Yes | No

    Default Re: Need help with 16F676 button press

    Quote Originally Posted by HenrikOlsson View Post
    I have a hard time believing that was the actual problem. In PBP (unlike, for example, C) = and == are the same thing. And you basically have the proof in your own code sine the WHILE loop works and you have only one = in that comparison.
    Code:
    second_pause:
    While PORTA.0 = 1     ' <--- See, you don't need ==
    wend
    I would try changing it back and see if it really returns to a non working state.

    /Henrik.

    Hi Hentik,
    I added the second = to the While loop when I updated the IF statement.
    I can definitely change the IF statement back to a single = and see if it goes back to not working - just for a validation test.

    Prior to making the change in the IF statement - I also removed the bias resistors and set PortA.0, 1, & 2 with internal pull-ups - and setup the buttons so that they pull to ground.

    I'll change the IF statement and let you know
    Last edited by dw_picbasic; - 2nd January 2021 at 00:37.

Similar Threads

  1. Replies: 5
    Last Post: - 26th February 2011, 05:51
  2. Button press or not
    By lerameur in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th November 2010, 20:37
  3. 4 Bytes one button press
    By Dennis in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 15th January 2010, 22:36
  4. Sleep until button press?
    By kevj in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th October 2007, 03:47
  5. Button press and press & hold how to ?
    By GrandPa in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 22nd August 2007, 03:37

Members who have read this thread : 1

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