DT interrupts and Pause


Closed Thread
Results 1 to 4 of 4

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    By the time it finishes the PAUSE 1000, the USART buffer has probably overflowed.

    Check the OERR bit (RCSTA.1).
    If it's set, you have to toggle the CREN bit (RCSTA.4) to reset the USART.

    Since you are using HSERIN, you can set ....
    DEFINE HSER_CLROERR 1
    But that way, your program will never know when the overflows happen.

    Or, you could just wait to set-up/enable the USART until after the PAUSE.
    <br>
    DT

  2. #2
    Join Date
    Feb 2009
    Location
    Southern California
    Posts
    86


    Did you find this post helpful? Yes | No

    Default

    So once the interrupt is setup, is the USART running in the background even when not enabled and that would cause the overflow? I assumed if I disabled the interrupt the USART was basically sitting there inactive. I would have expected the problem to show up when the interrupt was enabled and there was a long pause, but that seems to execute just fine. I'll play with clearing CREN shortly

  3. #3
    Join Date
    Feb 2009
    Location
    Southern California
    Posts
    86


    Did you find this post helpful? Yes | No

    Default

    Both solutions worked, it is good to know that everything is running in the background and that the problem is that I'm just not servicing the interrupt to keep the flags clear. I'll have to keep that in mind for next time.

    Thanks, David

Similar Threads

  1. INT2 anomaly in DT_INTS-18??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th February 2010, 20:07
  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. 12F683 and DT Instant Interrupts
    By jderson in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 22nd November 2008, 12:47
  4. Replies: 1
    Last Post: - 1st November 2006, 03:11
  5. too many interrupts
    By trying in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd February 2006, 13:38

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