PIC Microcontroller - __delay_ms() no effect
while(1) {
  LATAbits.LATA5 = 1;  //set pin as high
  __delay_ms(1000); //delay of 1second
  LATAbits.LATA5 = 0;  //set pin as low
}


You don't let the LED stay off long enough for it to be noticed.  You drive the pin low in the last line of the while loop.  As soon as that happens, the execution goes back to the top of the loop.  Immediately, you turn the LED on.  If you can look at the digital output with an oscilloscope, you should see a very brief dip with a duration on the order of a microsecond.  It's too brief for an eye to notice.  So add another delay.

while(1) {
  LATAbits.LATA5 = 1;  //set pin as high
  __delay_ms(1000); //delay of 1second
  LATAbits.LATA5 = 0;  //set pin as low
  __delay_ms(1000);   // &lt;- 
}


p.s. This is a popular bug in "Hello Blinky LED!" programs.