swapan
Full Member level 4
Hi guys,
While carrying out practical test of toggling an LED built around PIC 12F675, I am not able to make the MCU working. Please see the code alongwith fuse setting.
FUSE Setting:
INTOSC oscillator;
Watch Dog Timer : Disable
Power Up Timer : Disabled
MCLR pin function select : Disabled
Brown Our detect : Enabled
I have been trying for last 2 weeks, but could not get the LED lit. I have tested the same circuit on two separate PCBs. The result is same on both the hardwares.
While carrying out practical test of toggling an LED built around PIC 12F675, I am not able to make the MCU working. Please see the code alongwith fuse setting.
FUSE Setting:
INTOSC oscillator;
Watch Dog Timer : Disable
Power Up Timer : Disabled
MCLR pin function select : Disabled
Brown Our detect : Enabled
I have been trying for last 2 weeks, but could not get the LED lit. I have tested the same circuit on two separate PCBs. The result is same on both the hardwares.
Code:
sbit LED at GP5_bit;
void main() {
GPIO = 0x0;
TRISIO = 0xF; //Only GPIO Bit 5 is output.
CMCON = 0x7; // Comparator off.
ANSEL = 0x21; // AD Conversion Clock FOSC/32, AN0 is input.
do {
LED = ~LED;
delay_ms (1000);
} while (1);
}