Pramod Kotwal wrote: > > 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. > 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. You can use high res timinbg quite painlessly with the PC, you sense the PIT timer chip and get a count in microseconds, (actually 1.194MHz going from my memory) and you can then loop and sense this count and time things quite accurately. I did 3 years as a games graphics engine programmer, had to time everything by vertical retrace for screen draws. :o) -Roman -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics