Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Stupid PIC problems

Status
Not open for further replies.
As I've mentioned before, I'm still a big newbie. How I have this set up is:

9v 210mA wall wart going into a 7805, out putting a good 5.08v on average.
Two .022uF polyster-film caps and a 20Mhz crystal, as arranged in the PIC16F87X datasheet example. The PIC is a 16F876A.

Now, I wrote a program onto it that should just set TRISA to 0 and PORTA to 101010b, and then I expect to be able to test it by using my multimeter on the RA0, RA1, etc. pins and finding a high voltage (5v).

However, when this is all up and running, I check the pins and they're wildly bouncing around from .3v to 5v, just up and down. What could the problem be? I've double and triple checked all my connections (powers, oscillator setup) but they're all right, and the program I made works in the PIC Simulator. Any ideas?
 
ArtemisGoldfish said:
As I've mentioned before, I'm still a big newbie. How I have this set up is:

9v 210mA wall wart going into a 7805, out putting a good 5.08v on average.
Two .022uF polyster-film caps and a 20Mhz crystal, as arranged in the PIC16F87X datasheet example. The PIC is a 16F876A.

Presuming the two capacitors are the ones conected to the crystal?, they should be 22pF, your ones are a thousand times too large! (0.022uF is 22nF).
 
Nigel Goodwin said:
Presuming the two capacitors are the ones conected to the crystal?, they should be 22pF, your ones are a thousand times too large! (0.022uF is 22nF).

Carp, I forgot that Nano sits between Pico and Micro. Well, thanks, maybe I won't be so stupid next time :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top