Check out this awesome Instructable.
http://www.instructables.com/id/How-to-make-an-Arduino-from-scratch