I uploaded a library (.h and .c file) to interface with a PS2 controller using an Axon MCU. It should work with any AVR based MCU, though, with some minor modifications.
The low level PS2 communication code was adapted from 'Dunk's tutorial.
http://www.societyofrobots.com/member_tutorials/node/200Features:
* Configurable pin assignments (uses 4 or 5 I/O pins, and 5v regulated power).
* Supports connecting/disconnecting the controller at any time.
* Detecting analog vs. digital mode.
* Forcing analog mode on controller.
* Easy access to all buttons and axes (axes can be raw, or with a simple deadzone).
* Currently tested to work with a genuine Sony PS2 wired controller (any other brands/types *may* require some tweaking of the low-level communication code).
Download Link:
http://forums.trossenrobotics.com/datacenter/drivers-libraries-firmware-7/axon-ps2-controller-interface-library-144/