interrupt handling faster than if's?


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Jul 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    Thanks for the many responses. I am going to eventually hook it up to a radio link so I will probably need the Pre and Synch values. Using your code previously posted, I should be able to just add those variables in, right? Thanks again (I will test the code right now)...

    -Mike

  2. #2
    Join Date
    Jul 2006
    Posts
    76


    Did you find this post helpful? Yes | No

    Default

    One last thing. Will the code (your most recent post before this one) work when two or more buttons are pressed at the same time? Thank you for the help.

    -Mike

  3. #3
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mbw123
    One last thing. Will the code (your most recent post before this one) work when two or more buttons are pressed at the same time? Thank you for the help.

    -Mike
    Hi Mike, multiple keypresses shouldnt be a problem as it takes the value of all switches as a 4 bit binary value eg 0110 and sends that to the distant end where you write 1001 (or 0110 if you dont invert) to the output port.

    LASTPORT gets set as 0110 ( or 6 if you prefer) and the next time it looks at the port if the value is any different the new value will be sent and stored.

    It doesnt matter whether it has changed to 0100, 0111, 1010 etc because all of them are different to 0110 and the entire port value will be replicated at the distand end with just a single command string.
    Keith

    www.diyha.co.uk
    www.kat5.tv

Similar Threads

  1. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  2. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 02:35
  3. Help with Analog Interrupt
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 18:14
  4. NEWBIE: Some basic questions using interrupts
    By JackPollack in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th March 2006, 02:59
  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