Push button on PIC16F887


Closed Thread
Results 1 to 22 of 22

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Well, It must be obvious to one who knows this,.
    Last edited by menta; - 22nd June 2008 at 00:19.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by menta View Post
    Well, It must be obvious to one who knows this,.
    Maybe...but...
    Plugging those words "Source File Exceeds 62 characters" into the SEARCH up top yields answers.
    Amazing isn't it?

  3. #3
    Join Date
    Jun 2008
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    I tried search for "source file path exeeds 62 characters' which didn't return anything.
    I guess I should have search for less words.

  4. #4
    Join Date
    Jun 2008
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    I have managed to use the button as interrupt form this source:
    http://darreltaylor.com/DT_INTS-14/hello.html

    Is it possible also to get another interrupt for the same button while it is pressed for 2 seconds for example ?

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by menta View Post
    I have managed to use the button as interrupt form this source:
    http://darreltaylor.com/DT_INTS-14/hello.html

    Is it possible also to get another interrupt for the same button while it is pressed for 2 seconds for example ?
    IF a timer interrupts every 1/10 second, and you want to look for a button being pressed for 2 seconds, then I'd suggest looking at the button during every interrupt and add 1 to a counter. If the counter hits 20, the button is pressed for 2 seconds. If the button is let up when the counter is below 20, then reset the counter to zero.
    Simple enough...

  6. #6
    Join Date
    Jun 2008
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Ye, I though about it,
    But I use the button as "Rising Edge" so when the button is pressed there is no interrupt yet.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by menta View Post
    Ye, I though about it,
    But I use the button as "Rising Edge" so when the button is pressed there is no interrupt yet.
    I didn't say anything about the button causing the interrupt did I?
    If you re-read my post, you'll see that I said that a timer causes an interrupt and the button input is read during that interrupt. Therefore, it doesn't matter if your button pulls a line high or low, or what, as long as you are able to read the state of that pin during the interrupt.

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by menta View Post
    I tried search for "source file path exeeds 62 characters' which didn't return anything.
    I guess I should have search for less words.
    That's because exeeds is spelled wrong.

Similar Threads

  1. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  2. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 22:43
  3. Button Push within 3 second Window
    By Tissy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd December 2005, 10:06
  4. push button problem
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd June 2005, 19:44
  5. Push Button 'Menu' to Choose Variable.
    By Tissy in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 10th March 2005, 07:00

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