Pinout of 328 chip

hi
im learning to lay out a pcb and want to put the atmega328 chip into it, i really just want to be double sure on the pin out of the chip, as ive got it layed out on my board

pin8 +5
pin 9 crystal + cap
pin 10 crystal +cap
pin 20 +5
pin 22 Gnd

pin 21 is this pin i wasnt too sure about is it +5?, i see from some guides connect +5 to it - AREF, what does this pin do?

ok i see its the analog ref pin for max input range 5v.
thank you

Did you make a schematic? If you upload it, it will be a lot easier for us to see if it's okay.

Nope, that pinout is definitely wrong, pin 8 is GND, pin 7 is +5V

I always make sure I've had a look at the datasheet before I commit anything to a PC board.

Or use the Sparkfun library if using Eagle?

When I use a bare ATmega328 on a breadboard I use this drawing to see the pins:

Very handy because it has the Atmel and Arduino pin numbers on it.

Or copy an arduino schematic as a starting point, delete the parts you don't need.

thanks very much for the help

Or this:

That has the pins, the minimal configuration, and the Arduino pin numbers in brackets.

I really like Adafruit's stickers for breadboarded 328s, Adafruit AVR Sticker for Breadboard Arduino-compatibles - 10 pcs : ID 554 : $2.95 : Adafruit Industries, Unique & fun DIY electronics and kits
When I am working on a prototyping board I will cut one in half lengthwise and reverse the sides to mirror the pins and stick them on the bottom of the board.
Saves reversing everything in my head.
TomJ

I think a few corrections are needed:

CTS on the FTDI connector needs to be grounded as well for the FTDI breakout board/cable.
(CP2102 modules don't need the CTS pin.)
Pin6 is DTR.

What's the 10K on the Tx line? That will kill any transmit drive capability.

I've posted my eagle library here, which has a physical layout corresponding to the chip.
It might be useful: Loading...

CrossRoads:
Pin6 is DTR.

I don't know how those ideas got into my head, but I found this once:

That has pin 6 labelled as RTS.

CrossRoads:
What's the 10K on the Tx line? That will kill any transmit drive capability.

Why would it do that? Its to protect the pins and allow Arduino pin 0 to be used as an output.

here is my chip layed out whith what i think should be there could someone please verify it please.
thanks

krazatchu

I've posted my eagle library here, which has a physical layout corresponding to the chip.
It might be useful: Loading...

Got the eagle file for the 328. Thank You for that. Is the entire schematic available also? That'd be a big help to many, I think. - Scotty

sorry a bit confused whats an eagle file is it a schematic file or a pcb layout file?
cheers

It's both. http://www.cadsoftusa.com/ - Scotty

Is the entire schematic available also?

Yes, I just added to the blog post: n0m1.com

Thank You, Sir. Much appreciated. - Scotty