From owner-freebsd-hackers Sun Sep 30 10:30:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from thunderer.cnchost.com (thunderer.concentric.net [207.155.252.72]) by hub.freebsd.org (Postfix) with ESMTP id 3886737B403 for ; Sun, 30 Sep 2001 10:30:21 -0700 (PDT) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by thunderer.cnchost.com id NAA29134; Sun, 30 Sep 2001 13:30:34 -0400 (EDT) [ConcentricHost SMTP Relay 1.14] Message-ID: <200109301730.NAA29134@thunderer.cnchost.com> To: Bart Kus Cc: hackers@freebsd.org Subject: Re: precise timing In-reply-to: Your message of "Sun, 30 Sep 2001 10:18:01 CDT." <200109301010.07784@EO> Date: Sun, 30 Sep 2001 10:30:15 -0700 From: Bakul Shah Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On a totally unrelated subject to my sio.c message, I have a second problem. > I've built a computer-controlled drill, that is controlled via the parallel > port. This drill uses stepper motors, at 1/2 step. My driver software > implements a maximum-acceleration control algorithm that ensures that at any > point in time, any axis will not experience more than X m/s/s of > acceleration. This keeps the drill from self-destructing. :) Unfortunately, > it means I need access to a very precise timing source to issue the step > instructions to the motor control board. Are you controlling the rotation speed of the drill or the x,y,z position? I'd guess the latter. Don't you also need guaranteed real time response (which FreeBSD won't provide you)? I suppose if you are controlling the position (and not the velocity) RT response won't be too critical. At any rate you are better off writing a device driver which can run timing critical code while blocking out all other interrupts. Or else between the time you measure time and supply the next pulse a higher prio interrupt handler else may sneak in. As was suggested you may want to consider a dedicated cpu based controller. Thre are a number of solutions for hobbyists (such as the handyboard, see www.handyboard.com). Is this a totally homebrew drill or something from a kit? I'd be interested in details (probably better offline since the interection of freebsd s/w hackers & h/w hackers is tiny). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message