But at the end the LED did not blink, I performed the following steps,
1. Generate Hex file from MPLAB X IDE v2.05
2. Flash the PIC16F877A with this hex file using a PIC programmer.
3. Connect a LED to PIC16F877A on breadboard to test my work
Please have a look to the detailed steps of the work..........
https://drive.google.com/file/d/0B5NYQC ... sp=sharing
My code is as (not that given in above link),
Code: Select all
#include <xc.h>
void delay( unsigned int );
void main()
{
unsigned int DELAY = 100;
TRISC=0x00;
while(1)
{
PORTC = 0x00; //led off
delay(DELAY);
PORTC = 0x01; //led on
delay(DELAY);
}
}
//DELAY FUNCTION ( mS )
void delay( unsigned int time )
{
unsigned int i;
unsigned int j;
for( i=0; i<time; i++ )
for( j=0; j<1275; j++ ) {;}
}

But at the end I could not get the LED blinking.
So where I was wrong? Does the PIC16F877A not have an on chip clock? Whether I have to connect an external crystal?? Or my program is incorrect/incomplete?? Or anything I am missing….??
Please help me I am in a great need of it. Please help.
Thanks in advance.