🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2636

delay of partial milisecs

#2636
From: Mark Roder
Date: Wed, 17 Oct 1990 03:10
33 lines
1845 bytes

	I am trying to use my parallel port to drive a servo for a robotics
project.  The servo has a control line that reads a pulse to find out where
it is supposed to be.  A 1 milisec pulse is the left side, a 1.5 milisec is
the middle,  a 2 milisec is all the way to the right, and any other
value is in between (1.25 milisecs is 1/2 way between left and center).

	I am using TC++ as my programming language.  My original plan was
this: do a outport() to turn the line on.  And then after the required
delay, do a outport() to turn the line off.  The problem is that the delay
provided only does whole milisecs. Is there a way to get to the desired
partial milisecs? 

	Is there a way to increase the interrupts from the clock ticks.
These occur 18.2 times a sec(something like that).  Can these be increased
to be accurate for the control of the servo? 

	Is there a countdown timer that I can use to cause an interrupt
after it counts down from the required time?

	I would appreciate any help.  I need to get this servo to work so
that my project is a project and not a pile o parts.  Info: I am using a 20
mhz 386 sx running dos 4.01.  I need to have at least 20-30 steps in the
servo from all the way left to all the way right.  I would like to keep the
project to as little supporting hardware as possible(i.e. cheap)

Thanks.  Please e-mail me, I don't have the luxury to do my long rn
sessions any more.

Roder.

roder@plains.nodak.edu
Technical Details
Message-ID: <6310@plains.NoDak.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ogicse!plains!roder@plains.NoDak.edu

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ogicse!plains!roder@plains.NoDak.edu
From: roder@plains.NoDak.edu (Mark Roder)
Newsgroups: comp.os.msdos.programmer,comp.lang.c++
Subject: delay of partial milisecs
Message-ID: <6310@plains.NoDak.edu>
Date: 17 Oct 90 03:10:36 GMT
Organization: North Dakota State University, Fargo
Lines: 33