Can any PIC wake up from UART interruption?

Author
Twistx77
New Member
  • Total Posts : 25
  • Reward points : 0
  • Joined: 2011/03/13 15:36:06
  • Location: 0
  • Status: offline
2011/03/23 04:46:27 (permalink)
0

Can any PIC wake up from UART interruption?


Hi, 

I want to develop a low power network of PICs connected to a RS485 Bus, but I need a PIC that wakes up from sleep when data is recieved but the UART in the PICs I worked with, doesn't wake up the device. 

I thought of using an external interrupt conected to the RX line to wake up the PIC but I've read that using that method you loose the first couple of bytes recieved.

So, is there a PIC that can wake up from a UART Rx interrupt without loosing that?

Thanks!
#1

3 Replies Related Threads

    zilym
    Super Member
    • Total Posts : 225
    • Reward points : 0
    • Joined: 2003/11/07 12:43:37
    • Location: Mesa, AZ
    • Status: offline
    Re:Can any PIC wake up from UART interruption? 2011/03/23 08:00:00 (permalink)
    0
    I think some PICs have an option to wake from UART, but they will not normally capture the first byte during wake-up.

    I have previously implemented your idea of using external interrupt connected to RX line to wake up the PIC. Despite what you may have read, I was able to successfully capture even the first byte! The trick is, you must wake up into a clock source that has very fast start up time. In other words, no crystals and no PLLs. EC is the fastest, but generally not very useful because leaving an EC running during sleep kind of defeats the purpose (the EC will draw too much current).

    For me, I had the PIC wake up on INT0 falling edge (start bit) and used 8MHz INTOSC. The INTOSC started up fast enough that the PIC was up and running with the RX line still in the Start Bit state. That allowed me to capture the very first byte of data on the UART, no problem.

    #2
    Twistx77
    New Member
    • Total Posts : 25
    • Reward points : 0
    • Joined: 2011/03/13 15:36:06
    • Location: 0
    • Status: offline
    Re:Can any PIC wake up from UART interruption? 2011/03/23 09:25:48 (permalink)
    0
    zilym

    I think some PICs have an option to wake from UART, but they will not normally capture the first byte during wake-up.

    I have previously implemented your idea of using external interrupt connected to RX line to wake up the PIC. Despite what you may have read, I was able to successfully capture even the first byte! The trick is, you must wake up into a clock source that has very fast start up time. In other words, no crystals and no PLLs. EC is the fastest, but generally not very useful because leaving an EC running during sleep kind of defeats the purpose (the EC will draw too much current).

    For me, I had the PIC wake up on INT0 falling edge (start bit) and used 8MHz INTOSC. The INTOSC started up fast enough that the PIC was up and running with the RX line still in the Start Bit state. That allowed me to capture the very first byte of data on the UART, no problem.





    I haven't tried, I read that you miss the first byte. I'll have to give it a try. I'm using the 8 Mhz INTOSC. By the way, what UART speed were you using in your application?


    Thanks for your answer
    #3
    zilym
    Super Member
    • Total Posts : 225
    • Reward points : 0
    • Joined: 2003/11/07 12:43:37
    • Location: Mesa, AZ
    • Status: offline
    Re:Can any PIC wake up from UART interruption? 2011/03/23 10:39:48 (permalink)
    0
    I was using 9600bps.
    #4
    Jump to:
    © 2018 APG vNext Trial Version 4.5