Hi John, Thanks for the tip. If I understand you correctly, if I make a loop and read from a status port n times before writing the next step I should get an interval of n microseconds. Neat. I am not planning to use the port to drive the coils directly. Thanks for the warning. Pramod ----- Original Message ----- From: "John De Villiers" To: Sent: Thursday, December 28, 2000 4:15 PM Subject: Re: [EE]:writing data to IBM PC parallel port to drive stepper > dont use delay - its too slow > > I think the trick was to do a port read ( one of the status bits or > something equially arbitary ). Those take 1 microsecond > > The fastest i was able to go was about 50 us before the stepper started > skipping beats. It also depends if youre half stepping or full stepping. I > also suggest you use a tranny of some sort as the pc par port can let out > its smoke if you draw too much from it. I used normal TIP31's as i had a > whole box full of them. > > I found full stepping, but with 2 coils energized ( half step position, but > full step increments ) gave me the best torque. > > John > > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Pramod Kotwal > Sent: 28 December 2000 10:55 > To: PICLIST@MITVMA.MIT.EDU > Subject: [EE]:writing data to IBM PC parallel port to drive stepper > > > 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 > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads