The FTC Team Resources pages has a well written document or two that will help you with this.
http://www.usfirst.org/roboticsprogr...team-resources
The obvious document of choice is the Robot Wiring Guide but I'd advise you to read the Samantha document and the document Addressing NXT Lockups. Combining the knowledge of the three should give you all the knowledge you need.