PIC16F877A problem

Status
Not open for further replies.
Hi im newbie to PICs comming from an 8051 family , i tried to program an led blinking program using mikroC, i connected the circuit as 13,14 as 11Mhz crystal , 12 GND,11 VCC . the output of portd is always 0, nothing happens i still dont know why ?
 
If it work on simulator

Check your Ic and your connections

and check the code (( Try to write your code yourself))

Waiting .....
 
Last edited:
i suspect of the programmer , i posted its options , should i check any box there ?
 

Attachments

  • er.JPG
    110.6 KB · Views: 151
ahmedragia21 said:
Hi im newbie to PICs comming from an 8051 family , i tried to program an led blinking program using mikroC, i connected the circuit as 13,14 as 11Mhz crystal , 12 GND,11 VCC . the output of portd is always 0, nothing happens i still dont know why ?

OK, now you need to place a pullup resistor on pin 1, say 1k to 20k. This is the reset pin and leaving it floating leads to any number of problems.

Also, which pin did you put the LED on, how large a resistor are you using for current limiting on the LED, did you check the LED's polarity, and is the '877A getting a proper 5V? I ask about the pin because pin 6, RA4, is open drain as an output, so needs a pullup resistor (1K-10K) to get a high. BTW, it's a good thing to provide a bypass cap, say 0.1microFarad, between pins 11 and 12.

Have fun with the PIC. They can be tricky to deal with as they have banked memory while the 8051 is a staightforward contiguous memory model, with more memory. Reading posts in numerous forums suggests most experienced PIC users suggest learning how to program in assembly first, thus learning the inner workings in fine detail. I say get a high level compiler and let it sweat the details. This has its downsides, but you can usually add assembler code inline with the code in the better compilers. This allows you to use low level code when you need faster input/output.

Later!
kenjj
 
thanks , i tied pin 1 to VCC also it doesnt work !! , i wonder really where's the problem

are the two caps for the crystal 104 ??
 
ahmedragia21 said:
thanks , i tied pin 1 to VCC also it doesnt work !! , i wonder really where's the problem

are the two caps for the crystal 104 ??

No, much smaller, 10pF to 47pF normally.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…