title: microchip MPLAB X IDE v2.15 "can't generate code for this expression"
body: <p>I´m trying to compile a simple piece code, but i run into a error "can't generate code for this expression".
  i adapted to code from "<a href="http://www.barrysoft.it/blog/midi-with-pic-ausart.html" rel="nofollow">http://www.barrysoft.it/blog/midi-with-pic-ausart.html</a>"</p>
  
  <p>could someone enlighten me about this problem?</p>
  
  <p>MPLAB X IDE v2.15
  xc8 v1.32</p>
  
  <p>midi.c:</p>
  
  <pre><code> void midi_init(void)
   {
   /* MIDI uses 31250 baud/s serial speed */
   uart_init(19, 1, 0, 0 );        //&lt;--- 
   }
  </code></pre>
  
  <p>midi.c:31: error: (712) can't generate code for this expression</p>
  
  <p>uart.c:</p>
  
  <pre><code> void uart_init(unsigned char spbrg, unsigned bit brgh, unsigned bit sync, unsigned bit parity)
   {
  
      // Setup the baud rate
      SPBRG = spbrg;
  
   // High speed baud rate
   BRGH = brgh;        ////
  
   // Synch or Async
   SYNC = sync;        ////
  
   // 8bit transmission
   TX9 = parity;        ////
  
   // Enable serial output
   SPEN = 1;
  
   // Enable UART out
   TXEN = 1;
   }
  </code></pre>
  
  <p>uart.c:29: error: (712) can't generate code for this expression</p>
  
  <p>uart.c:32: error: (712) can't generate code for this expression</p>
  
  <p>uart.c:35: error: (712) can't generate code for this expression</p>
  
  <p>uart.h:</p>
  
  <pre><code>void uart_init(unsigned char spbrg, unsigned bit brgh,unsigned bit sync,unsigned bit parity);
  </code></pre>
  
  <p>Unable to resolve identifier bit, this seams to be a MPLAB IDE error, witch can be turned off.</p>