-4
\$\begingroup\$

So I've been trying to program a PIC16F84A Microcontroller with a Pickit 2 for 7 days now and I still can't make it to work. I have an LED attached to pin RB4 and I want to make it blink. Any help will be appreciated. Here are some pictures and the code:

The red wire is powering the negative side of the LED with negative energy (-). The other wires are connected from the Pickit 2 to the microcontroller on the breadboard. And there is an Led with a resistor going to pin RB4. (The picture is inverted so the led looks like it's on pin RB3 but it's not).

Here is the code written in C (mikroC):

\$\endgroup\$
  • \$\begingroup\$ Guys, why are you down voting, I just need help. Have I done something bad or wrong? \$\endgroup\$ – Aproxi Gamer Apr 4 '17 at 8:07
  • \$\begingroup\$ The fact that there's only a single (red) wire between that black whateveritis and your breadboard makes me believe you understand very little about electronics. Find a tutorial on the internet and follow it to the letter. Yes, you did something wrong by not doing your own research. You seem to be stuck in your own way of thinking how it should work (I mean 7 days, come on !) without realizing this is not the proper way to do it and instead of learning from others. Search the internet and see how others do this. \$\endgroup\$ – Bimpelrekkie Apr 4 '17 at 8:08
  • 1
    \$\begingroup\$ @AproxiGamer, you have not read the "Tour" page, which describes specifically what is expected of you when posting questions... electronics.stackexchange.com/tour \$\endgroup\$ – Wossname Apr 4 '17 at 8:34
0
\$\begingroup\$

I notice you have no decoupling capacitor for your chip, it is unlikely to run well without it. Read up on decoupling capacitors (hint: put a capacitor between VCC and GND). Furthermore, you likely need a resistor to pull the reset line high, it might be in perpetual reset mode right now. There are tutorials to help you get these chips running, they need the correct "environment" to run correctly.

Check your ground and power wires for both the chip and the programmer. It will, in addition to the passive components needed, be the first step to get the chip to run in the first place. Afterwards you can start debugging the software once it has started running :)

\$\endgroup\$
  • \$\begingroup\$ I don't know if you're right, or if it'll work but you're the only person who actually tries to help. The others are like: Go and read the 'tour' page or you have to be smart to do that, you're stupid. Thanks for answering without telling me that i'm stupid and lazy. \$\endgroup\$ – Aproxi Gamer Apr 4 '17 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.