Gene Heskett writes: > > The point being that for real time control of stepper motors, the step > signals need to go out at a steady beat, whether that beat is 10 > times a second, or 50,000 times a second, and any variation in > between. In other words, when the motor is to be stepped, and an > outb is done at a certain rate, that certain rate must be maintained, > and cannot be subjected to any resync to a fixed clock that might be > built into the protocol. They cannot go out 10 packets at a time, > (your "multiple packets per frame" above) and then wait for the next > time the port can be energized, thereby skipping the time slots those > 10 packets represent, and then sending them as a single burst of > data. Motors, being subject to inertia effects, simply cannot have > their input signals subjected to the loss of coherency that we are > reading into the present information regarding the usb standard thats > published, albeit rather hard to come by if you are not a member of > the usb consortium.
First, the little thing: I didn't have much trouble getting the spec, and I'm not a member of the consortium: http://www.usb.org/developers/docs/usb_20.zip Anyway, yes, you've given me a much clearer picture of the problem. As a bit of background, I'm no expert in the area, but I am currently teaching a senior project class doing a USB-based DMX-512 controller. DMX-512, in turn, is a theatrical lighting controller standard built on top of RS-485 (which in turn is basically RS-232with different voltage levels); its timing requirements are nowhere near as precise as driving a stepper motor, but I still couldn't see taking an approach of just using an RS-485 port and driving it from the computer nor using a commercial USB-to-RS232 adapter and hacking it. Both of these approaches have been tried (and there was even an article in Circuit Cellar a couple of months ago showing how to do the latter). I've also got some experience with stepper motors, though I've never tried to drive one from a PC. So... what we've done is to put an SGS-Thompson ST7 microprocessor in a box with an RS-485 driver. The ST7 understands USB natively, and has a whole raft of peripherals on-board. The host sends dimmer levels to the adapter; the adapter keeps track of all 512 levels and generates the DMX protocol. Total project cost was about $150 (including having the board fabbed by PCBExpress), not counting a programmer for the ST7which cost about $250 but should be useable on into the future. I'm afraid my hardware design had two bugs and some relativeley harmless other small goofs so I'd be a bit embarrassed to send it to you as-is, but I'm hoping to do a version 1.1 over Christmas break if you'd be interested. If I were tring to do stepper motor control, I'd probably think in terms of an adapter like that one. Since I expect you want multiple motors moving synchronously, I'd try to find the micro that could handle as many outputs as possible, and then think of USB commands that would do something like give the time they should take to do something, and then give the number of steps several motors should take. Then the details of stepping would be off-loaded from the host. Anyway, take this for whatever it's worth... -- Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605 Department of Computer Science FAX -- (505) 646-1002 New Mexico State University http://www.cs.nmsu.edu/~pfeiffer ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
