Why won't this PIC code light up my LEDs?
问题 The following code won't set any of the pins high on my PIC18F14K50, yet it couldn't be simpler! #include <pic18.h> #include <htc.h> 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); } I'm using MPLAB v8.43 and the Hi-Tech ANSI C Compiler. A logic probe shows none of the pins high except the VUSB and the MCLR. Any ideas? 回答1: At least