This exercise demonstrates a bipolar stepper motor in action. The unit I'm using came from All Electronics several years ago. Its coils are rated at 12V and 75 ohms, making it a fairly hefty affair. Therefore, we'll require a separate power supply for it, and a driver chip to handle all of that current.
Check out the schematic:
You'll note that I'm using the SN754410 chip as a driver. This is a so-called quad half-H bridge affair and ideally suited to orchestrating bipolar steppers.
There are just two coils in a bipolar stepper, so it's fairly easy to chase down the color coding for the wires with a multimeter in ohms mode. And you might need to reverse pairs once you have it on the breadboard to get the phasing right.
The PIC Micro Pascal code is quite simple. I'll let you look it over and read the comments to see how the coils are phased one way or another to step forward or backwards through the motor's positions. If you'd like to see it in action, here's a short video:
Click to get the source code.
Click to get the schematic PDF.
Next Project: 3-Bit DAC Demo