DT_INTS-18 - problem with INT0


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Post

    Remove this one. And reason can be found from here .
    Code:
    INTCON.4 = 1 'enable INT0
    BR,
    -Gusse-

  2. #2
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104


    Did you find this post helpful? Yes | No

    Default

    Okeydokey - so I'll take out the INTCON lines but then where do I tell the D_INTS whether to trigger on a rising or falling edge ?

    Andrew

    ps: I'll add this question to the main D_INTS thread as it might be of interest to others.
    Last edited by AndrewC; - 4th January 2010 at 08:35.

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking RTFDs ....

    Hi, Andrew

    you sure ?

    INTCON2.6 = 0 ' Int 0 on falling edge of C3

    a look to INTCON2 register could help ...

    Darrel's goodie only enables/Disables the interrupts ... it's you to set interrupt conditions.

    Bouncing looks here a more than a valid reason for "false triggering" ...

    Alain
    Last edited by Acetronics2; - 4th January 2010 at 08:51.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Post

    Hi Andrew,

    This is OK, interrupt on falling edge.
    Code:
    INTCON2.6 = 0
    Also add that INT_ENABLE part as Henrik suggested. Then it should work.

    Q: Isn't it so that INT_Handler execution cannot be interrupted (e.g interrupt in interrupt sequence)?
    If yes, then debounce filtering is not needed, because first falling edge trigger INT_Handler. Ringing is ignored during interrupt execution time.

    BR,
    -Gusse-

  5. #5
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Andrew

    you sure ?




    a look to INTCON2 register could help ...

    Darrel's goodie only enables/Disables the interrupts ... it's you to set interrupt conditions.

    Bouncing looks here a more than a valid reason for "false triggering" ...

    Alain
    At first I thought it couldn't be a bounce, but then I was just thinking of a "bounce" as I pressed the button. Obviously, a push button can bounce as you release it as well. Simplest thing is probably to just build a delay into the interrupt routine - timing isn't critical in this application and there is no problem holding in the interrupt routine for a few hundred msecs.

    Andrew

Similar Threads

  1. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  2. Microcode Studio 18f2455 problem?????
    By volkan in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 21st May 2007, 21:04
  3. Real Time Clock & Eeprom
    By smart_storm in forum General
    Replies: 8
    Last Post: - 17th February 2006, 19:03
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. PORTA.PinNo = 1 ' problem
    By frank small in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th May 2004, 14:30

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