i don't know how to connect tyhe wires of the stepper motor along with the 89c51 . there are totally 6 wires in it . and the motors type is KP39HM4-018 and it seems to be japanese make that works for 5v. the colors of the wires are 1 brown , 2 red , 1 black , 1 yellow and 1 orange .