Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!
#2856

Bitahwa Bindu
Keymaster

You clearly did not follow the instructions.

  1. Set correctly the oscillator frequency as explained. You are still setting it to 160MHz instead of 16MHz.
  2.  make sure the low voltage programming is set to false as you had it in your first project: #pragma config LVP = OFF // Low-Voltage ICSP Enable bit (Low-Voltage ICSP disabled)
  3.  Your delays, change  void DelayFor18TCY( void ) //18 cycles delay
    {
    //Delay10TCYx(20);
    Nop( ); Nop( ); Nop( ); Nop( ); // 18 cycle delay
    Nop( ); Nop( ); Nop( ); Nop( );
    Nop( ); Nop( ); Nop( ); Nop( );
    Nop( ); Nop( );
    return;
    }

to

void DelayFor18TCY( void ) //18 cycles delay
{
Delay10TCYx(20);
}

You can see we commented out all the nop statements.