PIC 16F877A basic led blinking does not work
I solved the problem with the help of @rohat-kılıç.
It seems that some of my LED's were broken. I set the external clock frequency to high speed (HS). This is the updated code.
#include &lt;pic.h&gt;

#ifndef _XTAL_FREQ
// The clock frequency is 16 Mhz
#define _XTAL_FREQ 16000000
#endif

__CONFIG (FOSC_HS &amp; WDTE_OFF &amp; LVP_OFF &amp; CPD_OFF &amp; CP_OFF);

int main()
{
    TRISB = 0; // PORTB is output

    while(1)
    {
        /* RB5 PORTB6 is on */
        PORTB = 0x20;  // b0010 0000

        /* wait for a second */
        __delay_ms(1000);

        /* all leds on PORTB is off */
        PORTB = 0;

        /* wait for a second */
        __delay_ms(1000);
    }
}