This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
pic单片机在操作的时候要按字节操作,比如,PORTBbits.RB0=1; PORTBbits.RB1=1;应写成:PORTB=0x01;PORTB=0x03;否则可能会出问题