home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / os2 / programm / 8103 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.2 KB  |  48 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!pipex!bnr.co.uk!bnrgate!nott!torn!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!news.netmbx.de!Germany.EU.net!mcsun!sunic!ericom!eua.ericsson.se!euas67c28!etxabju
  3. From: etxabju@eua.ericsson.se (Anders Bjurman)
  4. Subject: Re: Microsecond delays under OS/2
  5. Message-ID: <1993Jan28.145140.13412@eua.ericsson.se>
  6. Sender: news@eua.ericsson.se
  7. Nntp-Posting-Host: euas67c28.eua.ericsson.se
  8. Reply-To: etxabju@eua.ericsson.se
  9. Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden
  10. References: <1993Jan28.132339.29629@cs.joensuu.fi>
  11. Date: Thu, 28 Jan 1993 14:51:40 GMT
  12. Lines: 34
  13.  
  14. In article 29629@cs.joensuu.fi, jlavi@cs.joensuu.fi (Jarkko Lavinen) writes:
  15. >Does anybody know how to generate few microseconds delay under OS/2?
  16. >I am using emx environment and developing a front end for AD-converter
  17. >which is connected to parallel port. One needs few microseconds delays
  18. >to make sure the data really goes to device before pulsing strobe.
  19. >
  20. >    Jarkko Lavinen
  21.  
  22. Sorry! I have no nice and easy answer but here are some suggestions:
  23.  
  24. 1 (the easy solution): Write some dummy instructions before the strobe.
  25.  
  26. 2 (modified easy solution): As an answer to the obvious question: what
  27. happens when I bye a faster machine. The dummy instructions could be an
  28. (nearly) empty loop (perhaps with some dummy instructions so the compiler
  29. can't optimize it away, the volatile keyword could be of some use here).
  30. The number of iterations could be calculated at start up by executing
  31. the loop for a fix amount of time (say 1 second). The upper limit can
  32. be calculated from the number of iterations made.
  33.  
  34. 3 (As it "should" be implemented): Write a device driver for the A/D
  35. (huu! - complicated). Maybe there is a timer channel that could be
  36. used in there (I don't know anything about the hardware after the
  37. 8086 PC :-)
  38.  
  39. Hope this helped - Anders
  40. ---
  41.              _________________________________________________________
  42.  `"""'     _/  RF Anders Bjurman,       Memo: eri.etx.etxabju         \_
  43.   O O   __/    Ellemtel utvecklings AB  Anders.Bjurman@eua.ericsson.se  \
  44.    >  _/       S-125 25 Alvsjo, Sweden  +46 8 727 49 80                _/
  45.    o   \______________________________________________________________/
  46.  
  47.  
  48.