home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / misc / 4055 < prev    next >
Encoding:
Text File  |  1992-12-16  |  1.7 KB  |  41 lines

  1. Newsgroups: comp.lang.misc
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!ficc!peter
  3. From: peter@ferranti.com (peter da silva)
  4. Subject: Re: Accurate Timing in Visual Basic
  5. Message-ID: <id.HFWV.LZ4@ferranti.com>
  6. Keywords: Visual Basic, Timing
  7. Organization: Xenix Support, FICC
  8. References: <29569@castle.ed.ac.uk>
  9. Date: Wed, 16 Dec 1992 23:56:34 GMT
  10. Lines: 29
  11.  
  12. In article <29569@castle.ed.ac.uk> wbg@festival.ed.ac.uk (W Geake) writes:
  13. > In order to run an analogue to digital convertor module from a serial
  14. > port, I want to send a byte from the port every 10 ms.  This sets the
  15. > sampling rate, so the accuracy of the interval is very important.
  16.  
  17. If you want to do something every 10 ms, on an IBM clone, you have to:
  18.  
  19.     1. Write a device driver to do the work on a timer interrupt.
  20.     2. Deal with the standard timer interrupt, which runs at 18.2 Hz.
  21.        a. Make it run faster and then emulate the standard speed
  22.           for the rest of the system
  23.        b. Install a secondary clock for the device driver.
  24.        c. Use a video card that lets you work off the vertical
  25.           blank interrupt and runs at 100 frames per second.
  26.  
  27. Needless to say, you can't do this in Visual Basic, and doing it in
  28. C or C++ is going to require a lot of effort coercing the compiler
  29. to do the interrupt routine. I think you've got some assembler ahead
  30. of you.
  31.  
  32. > (I'd rather sell life insurance)?
  33.  
  34. I used to sell encyclopedias door to door, when I was at school. Is
  35. that anything like it?
  36. -- 
  37. Peter da Silva                                            `-_-'
  38. Ferranti International Controls Corporation                'U` 
  39. Sugar Land, TX  77487-5012 USA
  40. +1 713 274 5180                            "Zure otsoa besarkatu al duzu gaur?"
  41.