RB0 interrupt and toggle issue


Results 1 to 36 of 36

Threaded View

  1. #30
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Well it has to go to the ISR, but probably you want to refresh the Payload value with the PushButton?

    In this case...
    Code:
    keys2: ; Called by Interrupt update relay
    
            pause 20 ' small debounce delay
            if !PORTB.0 then GetOut ' button up?
                                    ' If so, getout of here... no need for noise call
    
            PayLoad = PORTD ' read PushButtons and update Payload Value
    UpdatePort:
    You could also use a timer interrupt and poll PORTD, this will allow you to remove all those diodes, and leave RB0 for something else. As it is user push-button, you'll probably never feel the latency of the Timer interrupt.
    Last edited by mister_e; - 5th May 2009 at 16:42.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. TMR0 interrupt and HSERIN
    By boban in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd September 2008, 11:48
  3. I have problem with interrupt RB0
    By chai98a in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th July 2008, 09:55
  4. tmr2 interrupt problem
    By ADCON in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 2nd January 2008, 18:49
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

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