First try at DT_INT's, I failed! help please!


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: First try at DT_INT's, I failed! help please!

    OK, I have found out that it is returning from the interrupt. However I can not interrupt again for about ten seconds or the interrupt fails. A failure to interrupt forces another ten second delay before I can trigger again. Is there anything I can do to speed this process? On compile the program shows only 255 words long. I don’t understand this time delay before I can re enter the interrupt. Comments please…

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: First try at DT_INT's, I failed! help please!

    I’m using X1 board with 16F877A and pulsing RB0 with a wire lead.
    That's the problem.

    If you are using a wire to +5V, there's nothing to pull it back down.
    The pin will hold a charge, and will slowly drain off, allowing it to re-trigger after a few seconds.

    If you add a pull-down resistor it should work better.

    Or, you can turn on PORTB pull-ups (OPTION_REG.7 = 0), make PORTB.4 LOW so you can use SW1 pushbutton.
    Changing to OPTION_REG.6 = 0 will make it trigger on the falling edge (button press) instead of the rising edge (button release).
    Last edited by Darrel Taylor; - 5th January 2012 at 17:36.
    DT

  3. #3
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: First try at DT_INT's, I failed! help please!

    Thanks Darrel, I'll give it a try!

  4. #4
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Re: First try at DT_INT's, I failed! help please!

    Yep! works great!

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: First try at DT_INT's, I failed! help please!

    Quote Originally Posted by Darrel Taylor View Post
    ...
    Or, you can turn on PORTB pull-ups (OPTION_REG.7 = 0), make PORTB.4 LOW so you can use SW1 pushbutton.
    Changing to OPTION_REG.6 = 0 will make it trigger on the falling edge (button press) instead of the rising edge (button release).
    This is funny, I did this very exercise yesterday and posted it in the Code Examples. LOL

    Robert

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