I think you need to give us more information. You don't program a DC motor, you control it and that depends on what you want it to do. Could you elaborate further on your plans?
A DC motor is controlled by the Stamp (or logic of some sort) through a driver circuit--usually an H-bridge (a network of transistors). Try googling H-bridge--there's a million of them out there. Also look at driver chips (h-bridges built into a single silicone wafer); I use the SN754410N most often. A related term to research is PWM, the method used to control the speed of the motor. This will give you some basic context to refine your inquiry.
You may also search this site and others for information on using hobby servos to drive your project--often this is an adiquate place to begin movement control.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
How should I do ?
You may also search this site and others for information on using hobby servos to drive your project--often this is an adiquate place to begin movement control.
Mark
http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv23.pdf
http://www.parallax.com/dl/docs/cols/nv/vol2/col/nv52.pdf
http://www.parallax.com/dl/docs/cols/nv/vol2/col/nv58.pdf