MIBAM & USART - PIC resets


Closed Thread
Results 1 to 3 of 3

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: MIBAM & USART - PIC resets

    You've set the RCIE bit, which enables interrupts for the USART receive path.
    But there is no interrupt handler for that interrupt source.

    After it receives any data, it will jump to the ISR, which does not handle the interrupt, and does not clear the flag.
    So as soon as it exits the ISR, it generates another interrupt because the RCIF flag is still set.

    This continues for about 2 seconds until the Watch Dog Timer resets the PIC.

    When you are handling the USART receive in the Main loop ... don't set the RCIE bit.
    DT

  2. #2
    Join Date
    Sep 2009
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: MIBAM & USART - PIC resets

    OMG, I'm such an idiot! And what is the best, at first I haven't touched the RCIE bit at all, I thought checking the RCIF would be enough. But as I wasn't able to capture any data (god knows what I've messed up then) I've "brilliantly" concluded that the program is not registering data arrival because the RCIF is not being set due to RCIE off. So I switched it on and fell into something which, until your explanation, I didn't understand enough to even try to mess with... Bah, I must be carrying a vapour instead of a brain in my head to poke with things for which I have no adequate apprehension.

    Thank you very much, I really appreciate you took the time to help me with this.

Similar Threads

  1. Replies: 7
    Last Post: - 23rd November 2011, 16:22
  2. PIC && WiFi suggestions
    By rdxbam in forum General
    Replies: 22
    Last Post: - 26th July 2011, 17:40
  3. Replies: 6
    Last Post: - 9th January 2011, 15:26
  4. 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
  5. PIC resets every now and then
    By passion1 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 12th June 2007, 21:41

Members who have read this thread : 0

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