title: Wake-up PIC with USART RX
body: <p><br><br>
  I'm working with eXtreme Low Power (XLP) Microcontroller PIC 16LF1933.<br>
  For it to consume little battery, I put it to sleep until it receives a Break character (00h) in RX. The documentation explains well how to set the Auto-Wake-up with Break character in RX. I followed it.<br><br>
  I'm using Proteus to simulate the project, with Virtual Terminal to send information. If you press <br><em>CTRL + SHIFT + @</em> it sends de 00h (null/ all 0's), so, this would wake up the PIC, as said in documentation.<br>
  The problem is, when I do this, I receive a warning log saying that<br>
  <code>Wake up event is only 937.500003us wide. Minimum (at current baudrate) expected is 6.656ms. I'm using 9600 baudrate.</code><br>
  How do I make a proper Wake up event with RX?<br><br>
  My <code>while</code> code<br></p>
  
  <pre><code>while (1) {
      BAUDCONbits.WUE = 1;    //Wake-up Enable
      SLEEP();
  
      while (BAUDCONbits.WUE);
  
      msg = Receive_Serial(); //Clear RCIF
      __delay_ms(100);
      msg = '\0';             //Discard
      __delay_ms(100);
      msg = Receive_Serial(); //Receive the next character
      __delay_ms(100);
      RCREG = 0;
      msg = '\0';
      __delay_ms(100);
  }
  </code></pre>
  
  <p><br>And my Receive function<br></p>
  
  <pre><code>unsigned char Receive_Serial() {
      if (OERR) {                 //Overrun error
          RCSTAbits.CREN = 0;     //Fix reset Enable Receive
          RCSTAbits.CREN = 1;
      }
  
      while (!RCIF);
  
      return RCREG;
  }
  </code></pre>
  
  <p><br><br></p>