PIC Micrcontroller

void main(){
trisb=0x00;
trisa=0xFF;
while(1){
if(porta.f0==1){
portb.f0=1;
delay_ms(2000);
portb.f0=0;
portb.f1=1;
}
}
}
Q:I want to stop portb.f0 competely after 2 seconds although the switch on .How?
Thank you

Try disabling all the peripherals associated with that specific pin.

  Joined December 02, 2019      117
Monday at 10:02 PM

you set the port a as input. Stop what? getting data in that port?

  Joined February 12, 2018      696
Monday at 02:11 PM

PIC is a family of microcontrollers made by Microchip Technology, derived from the PIC1650 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to Peripheral Interface Controller, and is currently expanded as Programmable Intelligent Computer.

  Joined February 27, 2020      55
Thursday at 11:08 AM