Instant Interrupts - Revisited


Closed Thread
Results 1 to 40 of 773

Hybrid View

  1. #1
    Join Date
    Jun 2005
    Location
    West Australia
    Posts
    116


    Did you find this post helpful? Yes | No

    Thumbs up You bewdy!

    Hi Darrel,

    Yes, it helped a lot - thank you.

    It is now fully functional and exactly what I want. Certainly was a case of me trying to over-engineer the requirement and overlooking the obvious, no interrupts needed only a check of the appropriate flag, as you diagnosed.

    I learnt a few things on the way - bonus! I expect your DT_INTS will now be a large part of my projects in future, I see how they can make things so much more efficient.

    Thanks again and best regards,
    Bill

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by wjsmarine View Post
    i learnt a few things on the way - bonus!
    SWEET!

    i expect your dt_ints will now be a large part of my projects in future, i see how they can make things so much more efficient.
     SWEET--ER!

    Cheers,
        DT

  3. #3
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Default

    Darrel,

    What I have is a timer1 servicing an interrupt every 10msec and a Usart RX interrupt when ever data comes in. Problem is that when the pic is off dealing with the usart interrupt, my timer1 is ignored until the usart interrupt is finished.

    Do you have a low priority interrupt version for 14Bit pics? eg ReEnterPBP-14LP.bas
    This could be the answer to my problem...



    Squib
    Last edited by Squibcakes; - 27th May 2010 at 01:02.

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


    Did you find this post helpful? Yes | No

    Default

    Nope.
    The ability to have Low Priority interrupts depends on the hardware, and 14-bit cores don't have it.

    I would suspect that you are using the RX interrupt to start reading a long string of bytes using HSERIN in the handler.
    If so, then it's sitting in the handler doing nothing while waiting for data to come in.

    For best speed, an RX interrupt should only retrieve 1 byte at a time, then exit the handler.
    It only takes a few uS that way.
    DT

  5. #5
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Nope.
    For best speed, an RX interrupt should only retrieve 1 byte at a time, then exit the handler.
    It only takes a few uS that way.
    I'm waiting for a string of NMEA chars to arrive into a huge data array.

    I'm not quite sure how to code the above interrupt process into a [wait(" "),data] style command. This is what I am using at the moment when the RX_INT interrupt fires....

    Code:
    WAIT_GLL:
    HSERIN 100,WAIT_GLL,[WAIT("GLL"), STR DATAIN\40\13]
    If I receive each byte and then do some byte checks to simulate the above syntax will the pic be fast enough to catch the sentance when it actually arrives or is the a better way?
    Squib

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


    Did you find this post helpful? Yes | No

    Default

    Squib,

    Sorry, I was trying to see if I could finish an NMEA sentence parser I've been toying with.
    But there's too much left to do.

    Are you only looking at the GLL sentence?

    My RX_INT handler for it is double buffered, so it can work on one sentence while receiving another.
    If it's only looking for the GLL sentence, it won't need the double buffer.
    DT

  7. #7
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    257


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Squib,
    My RX_INT handler for it is double buffered, so it can work on one sentence while receiving another.
    Hi DT,

    Is that in the current version of inst_ints or the one your working on now?

    I got my progy working by using the @ INT_DISABLE RX_INT command in the handler but is that really kosha or just sloppy programming? ;-)

    Yes I'm just looking for the one nea sentance at this time.

Similar Threads

  1. Clock using Instant Interrupts
    By PICpocket in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th February 2009, 21:43
  2. DT instant interrupts with mister_e keypad
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th November 2008, 20:02
  3. DT's Instant Interrupts trouble
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th November 2008, 20:48
  4. Keypad and DT's Instant Interrupts
    By Homerclese in forum General
    Replies: 11
    Last Post: - 27th April 2007, 06:32
  5. Replies: 1
    Last Post: - 1st November 2006, 03:11

Members who have read this thread : 8

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts