Atmega328P-PU won't work in my PCB, does work in Uno

I have to make a PCB for a class. This is the first time I've ever used eagle or made something like this. I made the PCB:

Imgur: The magic of the Internet excuse me for the bad pictures.

Anyway, my problem is that the Atmega from my Uno will not work in my PCB. What I've done:

  • Pin 9 and 10 are connected to a 16 MHz crystal.
  • Pin 7 and 20 are connected to 5V.
  • Pin 8 and 22 are connected to GND.
  • Pin 1 is connected to a button, if it's not pressed then it's connected to GND with 10kOhm resistor.

I powered my PCB with the 5V and GND from a Uno, maybe this isn't enough? I don't have the equipment at home to measure this. I do have it at college.

I did digitalWrite on pin 25,26 and 27. These are connected to LEDs and they work. They do output a signal to turn on a LED in the Uno, just not in my PCB. When I switch back the Atmega to my Uno it'll work perfectly. I'm just clueless on what's wrong with this.

Pin 1 is connected to a button, if it's not pressed then it's connected to GND with 10kOhm resistor

Pin 1 should have 5volts through a 10K resistor. Continuous Gnd keeps the chip in reset.

kprims:
Pin 1 should have 5volts through a 10K resistor. Continuous Gnd keeps the chip in reset.

Damnit, well I guess I figured out my problem.

EDIT: This was the problem. I connected it to a breadboard to test it and it worked. I'll cut off a leg of the button and resolder it to GND instead of 5V and resolder the resistor to 5V. Luckily there are points within a few mm so I can simply solder a short wire.

Glad you got it to work. Good luck.

You appear to have a diode on the output of the regulator into the Atmel processor ?

I can understand why there would be a diode on the input of the regulator, it stops the magic smoke escaping from the regulator when you reverse the battery connection.

Where is the fuse ?

The power tracks, ground and VCC could be a lot thicker.

Because of the way you have shown the PCB layout in the picture, no-one can see the ground connections, so they may be missing or not.

What is the battery and what is connected to the charge input ?

With the addition of a 5 pin header, a capacitor and a diode (there is pleanty of space) you would have the option of programming the Atmel processor in-situ over the normal serial bootloader.

Needs power supply decoupling.