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