I need help to configure port and pins of PIC16F877A
Switch 1 connected to Port B0 Pin of PIC16F877A
Switch 2 connected to Port B2 Pin of PIC16F877A
Switch 3 connected to Port B4 Pin of PIC16F877A
LED 1 connected to Port B1 Pin of PIC16F877A
LED 2 connected to Port B3 Pin of PIC16F877A
LED 3 connected to Port B5 Pin of PIC16F877A
Can we configure as following
Please let me know if missing something
Switch 1 connected to Port B0 Pin of PIC16F877A
Switch 2 connected to Port B2 Pin of PIC16F877A
Switch 3 connected to Port B4 Pin of PIC16F877A
LED 1 connected to Port B1 Pin of PIC16F877A
LED 2 connected to Port B3 Pin of PIC16F877A
LED 3 connected to Port B5 Pin of PIC16F877A
Can we configure as following
C:
#include <xc.h>
int main()
{
TRISB = 0b00010101;
TRISD = 0b00000000;
while(1)
{
}
return 0;
}