Why not just use a sound card for your ADC and DAC? Your average sound card
has at least 2 DAC outputs (headphone L+R), and 2 or more ADC inputs (Stereo
L+R Mic or Line input). They typically have 16-bit resolution, at 48 kHz or
better sampling rate. It's cheap (included in most motherboards), reliable,
widely available, and here is a good programming example:
http://xoscope.sourceforge.net/
they've also designed a hardware buffer to clip out-of-range inputs:
http://xoscope.sourceforge.net/hardware/hardware.html
Mark Tomich
That is something I should look into. Windows does not allow
direct hardware access so real time would be a problem but
I think there may be some support for sound in Power Basic
running under DOS.
-------------------------------------------------------
One easy way to send out a Pulse Width Modulation signal
is use the SOUND statement in Power Basic.
This generates a tone for a period of time.
Max freq. of the tone is 32K and resolution or increments of
the time period is .0015 seconds. That appears to be
an error in the DOS PB manual as 1 second divided by
18.2 PC clock ticks is .0549 and not .0015. AKA 55 ms.
The way you convert it to a pulse width is
use this circuit.
Since we need a pulse every 7 ms worst case
at 7500 RPM that would not work for us. This is one
reason why we need an external D to A. See the attached
circuits.
DOS PB in the PC has an amazing resolution
of about one microsecond as that is how long it
takes to execute one statement on average.
A full DOS PB floating point divide takes only
5 micro seconds.
However if something like ON MTIME = xxxxx were
added to DOS Power Basic that would give us a resolution
of around 2 micro seconds. Hint PB :)
Paul Lamar
--
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site.
http://www.rotaryeng.net
Youtube key word UTUBPLEASE
Copyright 1998-2009 All world wide rights reserved.