title: Why won't this PIC code light up my LEDs?
body: <p>The following code won't set any of the pins high on my PIC18F14K50, yet it couldn't be simpler!</p>
  
  <pre><code>#include &lt;pic18.h&gt;
  #include &lt;htc.h&gt;
  
  void main(void)
  {
    // Set ALL pins to output:
    TRISA = 0;
    TRISB = 0;
    TRISC = 0;
  
    // Set ALL pins to high:
    LATA = 0b11111111;
    LATB = 0b11111111;
    LATC = 0b11111111;
  
    // Leave pins high and wait forever:
    while (1);
  }
  </code></pre>
  
  <p>I'm using MPLAB v8.43 and the Hi-Tech ANSI C Compiler.</p>
  
  <p>A logic probe shows none of the pins high except the VUSB and the MCLR.</p>
  
  <p>Any ideas?</p>