PIC microcontroller input-output ports are named PORTA, PORTB, PORTC, etc. depending on the type of microcontroller you are using. Port…