0
\$\begingroup\$

I'm pretty new to the pic. I've made a really long circuit on proteus, ran my program, things worked out great. I then moved on to the breadboard, nothing really worked.

I made another prpgram that was much simpler. All the registers were set to output and low except for 2 pins which were set to high.

I transferred the circuit to the breadboard and tested the pins that were set to high with an led. They weren't exactly high, I noticed some flickering. Other than that, all the outputs gave the same result even though they were set to low.

The micrcontroller (along with the voltage regulator) itself also overheated within half a minute, to the point that it's really hot to the touch.

5v went to pin 1, pin 11, and pin 32. Gnd went to pin 12, and pin 31. Oscillator went to pin 13, and pin 14 Nothing else connected other than a single led. (and the oscillator circuit)

Did I do something wrong?

EDIT Here are the pics of my breadboard configuration

1

2

\$\endgroup\$
  • 1
    \$\begingroup\$ If the micro-controller and regulator got hot you surely did something wrong. Could you post a pciture? \$\endgroup\$ – Wouter van Ooijen Jan 14 '16 at 14:52
  • 1
    \$\begingroup\$ You did have a resistor in series with that LED didn't you ... ? \$\endgroup\$ – brhans Jan 14 '16 at 15:00
  • 1
    \$\begingroup\$ How about power supply decoupling capacitors? A circuit and a picture is minimum to properly help. \$\endgroup\$ – Andy aka Jan 14 '16 at 15:06
  • \$\begingroup\$ By oscillator circuit, you mean the two caps connected to the crystal and also to ground, right? \$\endgroup\$ – TisteAndii Jan 14 '16 at 17:08
  • 1
    \$\begingroup\$ Your crystal should be located right next to the OSC1 and OSC2 pins. But why are you using a crystal at all? Just to get up and running, you should use the internal RC oscillator mode. See section 14.2.3 in the datasheet. Better yet, switch to the PIC16F1789 which has a 32 MHz internal precision (calibrated to 1%) oscillator. \$\endgroup\$ – tcrosley Jan 15 '16 at 11:10
2
\$\begingroup\$

Try to use another 16F877. Revise your connections against the datasheet for proper pin selections. A proper schematic of your actual circuit wiring will certainly help to spot any incongruencies. The LED diode load should be serialy connected to a resistor. Try verifying the points above. You could be dealing with a shorted unit. The heat is a tell-a-tale sign. Three things: Internal short, incorrect load wiring or incorrect chip wiring. Also, check polarities.

\$\endgroup\$
  • \$\begingroup\$ Agree. Try another IC. OP may have reversed the power and damaged the IC, or touched the MCU pins without proper precaution and caused ESD damage. ESD damage will result in high leakage, high power consumption. \$\endgroup\$ – Vince Patron Jun 15 '16 at 20:31
0
\$\begingroup\$

Those are pretty long leads for an oscillator, even at a relatively slow 8 MHz. Possibly the extra parasitics on those leads are causing an oscillator fault, which could put the PIC in an indeterminate or unstable state and result in odd output behavior and increased power consumption (I've done this accidentally when prototyping myself, but not on an 877; the PIC I was using had an option to use an internal oscillator and after switching to that the problem abruptly went away).

I'd double-check the value and type of the power supply bypass caps, too. The 877 may be old enough to be more robust, but I know (again, from personal experience) the dsPICs are very particular about the bypass capacitors.

Of course appliedpr may be correct that your chip is just defective, but these are good things to keep in mind when troubleshooting and might be easier for you to check if you don't have a spare 877 on hand yet.

\$\endgroup\$
  • \$\begingroup\$ I almost forgot about this post. I used another PIC chip, everything's fine now. \$\endgroup\$ – kdyz Jun 16 '16 at 4:14

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.