amith.srivatsa
Junior Member level 1
Hello everyone,
I am still a beginner in Microcontroller programming. I want to make LED blink using a simple C code - using PIC16F876A, compiled in CCS.
The code is:
My problem is that: The LED is blinking perfectly when I power up using PIC KIT 2. But, when I power up using my circuit, it doesn't blink. I am using 8MHz crystal (HS mode). Also, I have connected MCLR - Pin No. 1 to VDD through a voltage divider.
Is there anything else I have forgotten to do ? Any help/suggestions would be greatly appreciated.
I am still a beginner in Microcontroller programming. I want to make LED blink using a simple C code - using PIC16F876A, compiled in CCS.
The code is:
Code:
##include <16F876A.H>
#fuses HS,NOWDT, NOPROTECT, NOBROWNOUT, PUT,NOCPD,NOPUT
#use delay(clock=1000000)
//====================================
void main(){
while(1)
{
output_high(PIN_C5);
delay_ms(1000);
output_low(PIN_C5);
delay_ms(1000);
}
}
My problem is that: The LED is blinking perfectly when I power up using PIC KIT 2. But, when I power up using my circuit, it doesn't blink. I am using 8MHz crystal (HS mode). Also, I have connected MCLR - Pin No. 1 to VDD through a voltage divider.
Is there anything else I have forgotten to do ? Any help/suggestions would be greatly appreciated.