This is about using an IBM PC parallel port to drive a bipolar stepper motor. So I hope it not too far off topic here. I would like to use C to to send the appropriate signal to the data port bits on the parallel port. P.H. Anderson gives a very nice and clear explanation of how to do it . The problem I have is in defining the delay between two subsequent commands to write the bit to the port. This time interval will define how fast the motor will turn. The command to wrie data to the port is outportb(port address, data). The interval between writing data is controlled by the delay(time) command. This command seems to read time in milliseconds. If this correct, the shortest delay I can specify is 1 millisecond between steps. This would mean that on stepper motor with 200 steps per revolution I can, at best get 5 rpm. This does not make sense to me. Where am I going wrong ? I will appreciate help. Pramod Kotwal -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads