Hi guys, I'm having real trouble getting this pic16f88 to work. I am new to this things. I have never worked with this model before but i have had little experience with pic16f877/a.
I wanted to test UART communication with pic16f88, but i didn't get any output. so, as i said, since i have never worked with pic16f88 before, i went to the basics and tried a simple LED blinking program. I wrote the following simple code on mikroC:
void main() {
ANSEL = 0;
TRISA = 0;
TRISB = 0;
do {
PORTA = 0x00;
PORTB = 0x00;
Delay_ms(1000);
PORTA = 0xFF;
PORTB = 0xFF;
Delay_ms(1000);
} while(1);
}
and programmed the pic using pickit 3. The program loads successfully onto the target device but the weird part is that when i connect an LED and a resistor(200 ohm) to any port, the LED stays on with a dim intensity(doesn't blink at all). I have checked and rechecked my circuit and i can't figure out my problem. I have connected pin 5 to ground, pin 14 to vdd and 11MHz oscillator with 22pf caps to pin 15 and 16. I have tried leaving MCLR to float and i have tried pulling it up to vdd by a 4.7k resistor, but still with no luck.
I took out the external oscillator and the LED stays on. so i guesed that there must be a problem with the oscillator so I tried using the internal oscillator of the PIC (but adding OSCCON = 0b01101000; above the line ANSEL = 0; ) with the necessary project property arrangement, and still no sign of luck. so please i any one has got a suggestion, help me out