SlideShare a Scribd company logo
1 of 11
Download to read offline
Extending the soundcard for use with generic DC sensors
                                  Demonstrated by revisiting a vintage ISA design
                                                                      Smilen Dimitrov
                                                                   Aalborg University
                                                                     Copenhagen
                                                                    Lautrupvang 15
                                                               DK-2750 Ballerup, Denmark
                                                                       sd@imi.aau.dk

ABSTRACT                                                                            ers as part of surround sound home entertainment systems.
The sound card anno 2009, is an ubiquitous part of almost                           Specialized soundcards with multiple inputs and outputs,
any personal computing system; what was once considered                             and full duplex (playback while recording) capabilities, have
a high-end, CD-quality audio fidelity, is today found in most                        found use in music recording in professional and home stu-
common sound cards. The increased presence of multichan-                            dios. Soundcards interface as add-ins to PCs through several
nel devices, along with the high-resolution sampling regime,                        busses, serial (USB, FireWire) or parallel (ISA, PCI) in na-
makes the sound card desirable as a generic interface for                           ture; although they are increasingly found integrated in PC
acquisition of analog signals in prototyping of sensor-based                        motherboards.
music interfaces. However, due to the need for coupling ca-                            A slightly different type of devices become increasingly
pacitors at a sound card’s inputs and outputs, the use as a                         popular with the academic and DIY community as A/D
generic signal interface of a sound card is limited to signals                      interfaces for utilization of sensor signals. Programmable,
not carrying information in a DC component. Through a re-                           micro-controller based devices such as the open-source Ar-
visit of a card design for the now defunct ISA bus, this paper                      duino [1], that offer both A/D conversion and PC connec-
proposes use of analog gates for bypassing the DC filtering                          tivity (through, for instance, USB), provide a relatively easy
input sections, controllable from software - thereby allowing                       way to interface with a variety of off-the-shelf sensors, from
for arbitrary choice by the user, if a soundcard input channel                      popular software development environments such as PD,
is to be used as an generic analog-to-digital sensor interface.                     Max/MSP, or Processing. However, these devices are also
Issues regarding use of obsolete technology and educational                         more limited in regard to sampling quality: for instance, the
aspects are discussed as well.                                                      Arduino offers 6 multiplexed channels of 10 bit resolution,
                                                                                    and the maximum serial transfer speed via USB is limited
                                                                                    to 115200 bps - which results with a theoretical best-case
Keywords                                                                            upper limit of 1800 Hz sampling rate for all channels (given
Soundcard, Sensors, ISA, DC                                                         a 64 bit frame is used to transfer analog data of six channels
                                                                                    @ 10 bits).
1. INTRODUCTION                                                                        Because of these limitations, a lot of prototypers and de-
                                                                                    signers opt for a sound-card as a sensor A/D interface in-
  The ”humble” beginnings of the soundcard1 as a dedi-
                                                                                    stead. This also relieves the designer of worrying about
cated part of a PC system intended to produce audible
                                                                                    specifics of serial communication, and up-sampling the sig-
sound, could be seen in the use of a timer circuit Intel
                                                                                    nals so they match the audio domain processing rate, when
8253, to generate pulses in the audible frequency range and
                                                                                    sensor signals are to be applied to sound in software. How-
drive a speaker, thereby producing audible sound [20]. Since
                                                                                    ever, since a typical soundcard filters out frequencies outside
then, the PC soundcard has become a multichannel A/D
                                                                                    of the audible 20Hz - 20KHz range, both on the input and
interfacing device, able to work at CD quality (16 bit / 44
                                                                                    the output, its use is limited with those sensing devices that
KHz) rates and above. Devices offering more than two out-
                                                                                    produce output in this range. A soundcard has been in use
put channels are commonly used to drive multiple speak-
                                                                                    by Leroy et al for capturing optical pickups [12], or as phys-
1                                                                                   ical computing interface in context of artwork production
  Ignoring earlier occurrences, such as the SID sound chip
on a Commodore 64 (whose sound was provided as part of                              [10]; but its use can go beyond musical applications - such
a TV output signal) and similar                                                     as chemical analysis [15] or medicine [17].
                                                                                       The DC filtering problem is most apparent with sensors
                                                                                    that encode some useful information in the DC level (such as
                                                                                    a force-sensitive voltage divider, which would provide pres-
                                                                                    sure as a DC level, or an accelerometer, which would show
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
                                                                                    the influence of gravity as change of DC level). A common
not made or distributed for profit or commercial advantage and that copies           way to circumvent this limitation is to use the DC signal to
bear this notice and the full citation on the first page. To copy otherwise, to      modulate a sinusoidal carrier in the audio range (using AM
republish, to post on servers or to redistribute to lists, requires prior specific   more often than FM), capture the modulated signal using a
permission and/or a fee.                                                            soundcard, and then demodulate in software [8]. In case of
Copyright 2009 Copyright remains with the author(s).
resistive voltage dividers, they can be driven directly by an
AC signal (conveniently, a sound-card can generate a sinu-
soidal signal for the purpose), in which case the output will
conform to the soundcard input limitations. Arguably, there
would be some loss of information when using this method -
especially if the modulating signal has a spectrum extending
above half the the carrier frequency; also, software resources     Figure 2: Capture of a battery being connected (at
are spent in demodulating a high-speed audio signal, in ad-        1.5s) and disconnected (at 4.5s) to a sound card mi-
dition to applying the demodulated signal as a control signal      crophone input in Audacity software.
in the application.
  On the other hand, direct modifications to commercial
sound cards - intended to bypass input sections and allow          connected, and a negative one when it is disconnected. This
sampling of DC signals - have also been proposed [14]. In          paper proposes that obtaining DC signals could be achieved
similar fashion, this paper proposes that by using software-       by implementing a voltage controlled switch, ultimately con-
controlled analog gates, filtering sections at soundcard in-        trolled by software, that bypasses the entire input filter sec-
puts can be bypassed - thereby allowing for user-configurable       tion, as shown on Fig. 3:
possibility of designating chosen inputs as ”sensor” inputs.
This relatively simple architectural change, would allow for
                                                                                                             Control
both high-fidelity acquisition of DC signals, as well as reuse
of common software tools made to interface with sound-
cards. To test this assumption, a vintage ISA (Industry                                           S
Standard Architecture) design has been implemented, along
with a corresponding C program - discussed further on in
this paper.                                                             Input                 C
                                                                                                                       ADC
                                                                                                       R
                                                                                     Filter
2.   PROBLEM OUTLINE
  A simplified input channel section of a sound card is shown                    Soundcard
in Fig. 1:

                                                                   Figure 3: Simplified diagram of a sound-card input
                                                                   channel, with a controllable switch bypassing the
     Input                                                         input filter.
                         C
                                                  ADC
                                   R
                Filter
                                                                      A theoretical ideal switch would manifest resistances of
                                                                   either 0 or infinity Ohms, depending on the control signal -
                                                                   and could thus ideally decouple the input filter section. A
              Soundcard                                            real switch will of course have finite maximum and mini-
                                                                   mum values for the resistance, and therefore some filtering
                                                                   of the input signal will still be present from the input filter
Figure 1: Simplified diagram of a sound-card input                  section. In addition, one should be careful, as not all digi-
channel.                                                           tally controlled switches can be used for the purpose - many
                                                                   digital switches will also function as comparators (i.e. will
   In Fig.1, a basic CR high-pass filter schematic is taken         aim to reconstruct a digital signal); since in this case, ana-
to represent a simplification of input filters usually found in      log signal is being switched, analog a.k.a. bilateral switches
soundcards, in order to emphasize the filtering of DC sig-          (gates) will be appropriate for the purpose.
nals. To illustrate this influence, a simple experiment can
be performed: a stereo mini TRS connector can be plugged           3. TESTING PLATFORM
in a microphone2 (or line-in) input of a soundcard, and the
ground and a channel wire can be used to connect to a 1.5V            In order to test the assumption given in the problem out-
battery. If we try to capture the resulting input data us-         line, a hardware platform needs to be chosen, that behaves
ing audio recording software (such as Audacity), we would          essentially like a sound-card - but also allows for demonstra-
obtain a capture like the one shown on Fig. 2                      tion of activating added analog gates via software. Primarily
   Instead of obtaining a constant (DC) level in the time pe-      because reverse-engineering an off-the-shelf soundcard de-
riod between approx 1.3s and 4.5s on Fig. 2, what is shown         vice to behave as imagined would have been problematic,
is a typical signature of a high-pass filter in the time do-        but also due to potential educational benefits - a DIY im-
main - a positive spike at the moment when the battery is          plementation of a soundcard design was sought instead.
                                                                      Although the Internet does offer some information and
2
 Note that most recent PC microphone inputs are designed           tutorials on building basic extension cards for a PC - inter-
to interface with electret microphones, which means that one       faced through either USB, ISA or PCI buses - it is difficult
of the channels of a stereo jack is in fact used to supply 5V to   to find an available design, which is specifically intended
the electret mic; so the input is effectively mono - although
some sound cards can sense the device being plugged in,            to represent a sound card (or even a high-speed A/D con-
and switch from electret regime to stereo. Here a built-in         verter). The only one found appropriate for the purpose, is
microphone input of an Asus EEE PC900 netbook was used.            the design for a ISA extension card by Joe D. Reeder [18]
- a now abandoned product, that was intended for learn-           ing voltages on the 20 address pins of the ISA bus, usually
ing the essentials of software-controlled hardware. Since the     marked as A0-A193 . The PC notifies devices when they can
schematic and the basic software code, related to this card,      act on the given address, by lowering its Address Enable line
are still available on the website associated with this prod-     (usually marked AEN4 ). Using an address decoder circuit on
uct (www.learn-c.com), it was this design that was taken as       the card, the card can produce a single digital trigger, when-
a starting point for development.                                 ever voltages corresponding to its own address are present
  The schematic for this “Learn-C” ISA card was reim-             on the bus (not all 20 address pins are necessary for this,
plemented as a double-sided PCB, with an added CD4066             though). So, whenever the card’s address is present on the
CMOS quad bilateral switch. Since the ISA bus is now ob-          address line, and the AEN signal is taken low, the card is to
solete and cannot be found in modern PC systems, an older         respond by checking whether the PC wants to read or write
PC based on an Elitegroup ECS P6VAP-A+ (or P6VAP-AP)              - and act accordingly; in all other cases, the card must ap-
motherboard was acquired. This motherboard from 2000              pear electrically as a high-impedance circuit to the ISA bus
features a single ISA slot, however the age of this PC as a       circuitry. The PC notifies that it wants to read by taking
whole caused some specific problems, which forced an in-           ISA’s Input/Output Read pin (marked IOR5 ) low; intent to
quiry into alternatives for the booting process for the ma-       write is provided by taking ISA’s Input/Output Write pin
chine. Code in C language from [18] was used to implement         (marked IOW 6 ) low. Typically, if a digital line is activated
test software, and Agilent 54621a oscilloscope was used to        by taking it to a low electric level, it is known as “active
capture signals on board - using the open-source agiload          low”.
package for transferring oscilloscope traces to a PC as raw          These signals (A0-A9, AEN, IOR and IOW) are in fact
data. The experiment finally consisted of using a vintage          “the minimum set of signals that must be used in an inter-
Wavetek model 145 signal generator to produce an approx.          face design[13]”. Exchange of data between the PC and the
440 Hz sinusoid voltage with a DC offset level, and captur-        device occurs through the 8 data pins of the bus, D0-D77 .
ing this voltage with the “Learn-C” card and test software        Besides an address decoder, a minimal ISA interface card
on disk. As the test software allowed for user-controlled         would also need a data transceiver circuit, for electrical de-
activation of the bilateral switches, these were alternately      coupling of circuits on board from the ISA bus - as well as
turned on and off during capture - and the captured signal         target digital devices, such as A/D or D/A converters, that
was observed in the open-source Audacity software.                the PC ultimately communicates with through the bus [23].

3.1    ISA bus principles                                         3.2 ISA hardware implementation
   Let us reiterate some basic principles of the ISA bus inter-      The original schematics for the “Learn-C” ISA card found
facing, before proceeding with the implementation details.        in [18] was rebuilt using open-source KiCad software (Fig. 4);
In essence, we can distinguish between serial and parallel        the same software was also used to produce the PCB layout.
hardware interfacing modes; RS-232 being an example of
conceptually simple serial protocol, and IEEE 1284/Cen-
tronics of a parallel one. A serial protocol transmits one bit
at a time, and electrically needs at least three wires: one
for transmission, one for reception and ground. A parallel
protocol will use individual wires to represent a single bit -
and can hence carry more than one bit at a time, but needs
as many wires as there are bits in the word, plus a ground
wire. In some dialects of C, interfacing with either type of
protocol could have been achieved with commands like void
outportb(unsigned short port, unsigned char data).
   When outportb executes, the address given by port will
eventually activate the corresponding interface circuitry, and
the value data will be “written to the port”. Roughly             Figure 4: KiCad schematic of the ISA card; em-
speaking - in case of serial, this would mean alternating the     phasized dashed lines indicate connections of bipolar
voltage between low and high levels (say -12V and 12V) on         switch (In electronic PDF version, zoom in for more detail).
the transmit wire, with a rate specified by the serial trans-
fer speed, such that a BCD binary representation of data            The design on Fig. 4 relies only on the ISA bus power
is reproduced; in case of parallel, this could mean that each     supply pins 1, 3, 5, 7, 9, 10, 29, 31 (GND, +5V, -5V, -12V,
of the wires of the parallel bus is set to a low or high volt-    +12V, GND, VCC, GND) as well as ISA pins 2, 13, 14, 20,
age (say 0V and 5V), corresponding to which bit in the BCD        33-40, 42, 53-62 (RESET, IOW, IOR, OSC, D0-D7, AEN,
representation of data a given wire represents. A command         A9-A0). The pin RESET goes high during power-on, and is
like unsigned char inportb(unsigned short _port) could            used for device initialization, whereas OSC is the ISA system
be used to “read from a port” into a variable instead.            oscillator, typically at 14.318 MHz. ISA address pins A0-A2
   The ISA bus (like the current PCI) is a parallel peripheral    are first buffered using a 74LS244 (3-state octal buffer/-
bus. It has occurred as either PC/XT-bus, an 8-bit bus imple-
                                                                  3
mented physically as 62 pin port; or PC/AT-bus, a 16 bit bus,       pins 62-43, or 31-12 on the bottom side
                                                                  4
physically containing a PC/XT slot’s 62 pins and additional         pin 42, or 11 on bottom side
                                                                  5
36 pins (total of 98 pins). The operation principles can be         pin 14 - on top side
                                                                  6
discussed only using the PC/XT slot. The PC will address            pin 13 - on top side
                                                                  7
different devices on the ISA bus, by setting up correspond-          pins 40-33, or 9-2 on the bottom side
line driver) circuit, and then used for selecting a particular
channel from the ADC from software. Address decoding of
A3-A5 is performed using 74LS138 (3-to-8 line decoder/-
multiplexer), and used to select among the different devices
on the card (the DACs or ADC, for instance). Address
decoding of A6-A9 is performed using 74LS688 (8-bit mag-
nitude comparator), comparing these pin voltages to a state
set by a DIP switch - which allows for manual setting of the
card address using the DIP switch.
   Additionally, 74LS245 (3-state octal bus transceiver) takes   Figure 5: Left: image of the wired card; right: card
care about buffering D0-D7 for use by the ADC or DACs,            in ISA slot of motherboard of test PC.
depending on whether the PC is not in a read operation, by
providing the correct impedance for each direction (towards
or from the PC); a 74LS393 (dual 4-bit binary counter) di-       in a project like this - and initially, it wasn’t. The PC used
vides the OSC system oscillator signal frequency, providing      for testing, apart from the P6VAP-AP motherboard, offered
1/16th of the frequency (about 894 KHz) as a clock signal        a Pentium III 750 MHz processor, a broken floppy drive, a
for the ADC. Most of the logic circuits are from the 7400 se-    working IDE hard-disk, a working but slow CD-ROM, and a
ries, working with TTL signal levels (0 and 5V). Besides         working network card. The hard disk contained Windows XP
the two DAC0832 (8-bit µP compatible, double-buffered             operating system, which was initially used for development
D/A converters) and ADC0809 (8-Bit µP compatible A/D             - since the original source code in [18] is meant to run under
converter with 8-channel multiplexer) ICs, a 8255 (general       MS-DOS.
purpose Programmable Peripheral Interface (PPI)) is also            Unfortunately, in the middle of the project, the hard-disk
present - and used in this test setup as a simple digital out-   became unusable, apart from the very first sectors - and at
put switch, which eventually activates the CD4066 analog         the same time, it was impossible to obtain a replacement
gate. Finally, an input, “mic” analog preamplifier/filter is       quickly. This turned the test PC into a, essentially, disk-
present for the input signal; as well as output amplifiers/fil-    less machine, which cannot reliably boot a full desktop op-
ters for the DAC outputs.                                        erating system in the standard manner (from a local hard
   As shown on Fig. 4, most of the original design of the        drive). Therefore, several alternative booting procedures
“Learn-C” ISA card has been reproduced, although with            were looked into. The final setup is shown on Fig. 6:
some differences. For instance, a socket for the CD4066
switch was added, and not all wired connections were im-
plemented on the PCB (for instance, headers were left un-
connected, as well as most of the I/O port pins of the 8255
PPI). On the other hand, both DAC0832 digital-to-analog
converters were implemented8 .
   To avoid problems with over-etching thin tracks, the lay-
out was deliberately taken to feature thicker tracks - this,
however, made it very difficult to implement the entire de-
sign as a double-layer PCB. Hence in some instances (like the
digital input pins of the DACs), holes were left on the board,
intended to be connected with parallel wire. The board was
thus easy to etch, but somewhat difficult to solder - as plenty
of wire had to be soldered by hand. In addition, IC sockets      Figure 6: Boot setup between the diskless test PC
were used, to avoid possible problems with soldering ICs di-     (hosting the ISA card), and a tftp server PC. The
rectly; however, since IC sockets to not expose enough pin       test PC starts the boot from CD, and then proceeds
metal for double layer soldering, pins were obtained from        to boot an OS image from the server PC.
additional IC sockets9 , and added as an extension to the
used socket pins. This solved the double layer IC soldering         The easiest, and increasingly popular, alternative would
issue, however it also further complicated the geometry and      be to attempt a boot into MS-DOS (which would still allow
access to the card. The implementation of the card is shown      for running of the card’s test programs) from a USB thumb
on Fig. 5.                                                       drive. This would allow for testing of the card software com-
   The PCB layout had unfortunately some errors as well          piled elsewhere, in spite of the test PC lacking the possibility
(like missing tracks), which additionally complicated the im-    to compile programs. Unfortunately - unlike most modern
plementation phase. However, once found, these errors were       desktop PCs - the P6VAP-AP does not natively (from BIOS)
relatively easy to correct on the board itself (due to the de-   support booting from a USB device10 .
liberate design with larger tracks, which allowed for direct        So, since the initial sectors of the hard-disk were still in
user intervention).                                              order, Mandriva 2008 was installed on this hard-drive from
                                                                 a live CD, in spite of getting a corrupt installation as a re-
3.3     Host PC and booting process                              sult - simply to get the GRUB boot-loader software installed.
    The PC booting process would normally not be an issue        The GRUB could then chainload (further boot into) the PLoP
8                                                                [28] boot manager software, which can detect bootable USB
 although only a single one is actually used.
9                                                                10
 only open-frame, round-pin type sockets can be used for          not even with the latest BIOS update for this motherboard,
this purpose                                                     released in 2003.
drives on older machines, even if their BIOS cannot - and        and then compile the executables on the server machine,
further chainload (boot) from them. This unfortunately           copy them to the share, and execute new versions on the
does not work with all USB flash drives - PLoP couldn’t boot      test machine - without the need for a reboot.
from a TakeMS 4 GB USB memory key, while it could boot              Some issues around the network boot were: the need to
from a generic brand 128 MB memory stick. However, even          have both test PC and server connected to the same net-
a working USB thumb drive doesn’t seem to last long - af-        work switch; the need for the tftpd server to assign IP ad-
ter a series of copying operations, the 128 MB stick stopped     dresses in the same range as the IP address the server PC
being bootable from PLoP on the older test PC (although it       itself obtains from a master DHCP server; and the need for
remained directly bootable from newer PCs), and it had to        folder sharing under password-less accounts under Win XP
be reformatted.                                                  (since the net command on the BFD disk image does not sup-
   The boot managers can usually be sensitive to CHS (cylin-     port Windows XP account password authentication). The
ders/heads/sectors) disk geometry entered as part of the         network boot method could be, in principle, used to serve
formatting process - even though no such organization ex-        any bootable image, not just an MS-DOS one; for instance
ists on a physical level in a flash drive. Using Gparted to       the open-source FreeDOS might be an alternative - unfortu-
format a drive as FAT32 with ”cylinder rounding” is one          nately it lacks a free equivalent of the net command, and
of the safer methods; however, it is difficult to get such a       hence cannot establish network connectivity on its own. An-
USB thumb drive directly bootable as a MS-DOS drive after-       other alternative is to use a Linux bootable network disk.
wards11 . Here a different approach was used instead: QEMU,          For the Linux operating system, initially the nanobox
an open-source processor emulator, was used to virtually         linux [25] network boot disk was tried out. Using the de-
boot from an MS-DOS floppy image, and to virtually mount          fault floppy disk image of nanobox can be easily served with
the USB thumb drive as a hard drive of the virtual machine.      a tftpd server - however, it lacks the smbmount command,
This can be achieved with the following command in a Linux       which is closest in functionality to DOS’s net use. There
OS:                                                              are resources available on the web page for producing a ver-
 sudo qemu -L / usr / local / share / qemu / - fda /             sion with smbmount - however, that still does not make this
     path / to / WIN98SEC . IMG - usb - hda / dev /              OS suitable for test of the card. Linux systems are based
     sdc - boot a                                                on different supporting libraries; whereas typical Linux sys-
                                                                 tems are built on glibc (GNU C library), nanobox is built
Then the entire USB thumb drive can be formatted and
                                                                 on a small embedded C library known as uClibc. This
made bootable from within MS-DOS - and this seems to en-
                                                                 means that the software source code must be recompiled
sure both successful booting into MS-DOS from managers
                                                                 for the corresponding C library of the OS (or supply the
such as PLoP, and usage of the entire free disk space of the
                                                                 missing objects, risking compatibility problems). As it can
thumb drive12 . In the end, this method proves tedious too,
                                                                 be difficult to set up the, needed for compilation, uClibc
especially for development - since MS-DOS typically doesn’t
                                                                 build toolchain on a nanobox system with only a remote
offer network connectivity, the only way to transfer exe-
                                                                 drive mounted via smbmount - an easier solution was found
cutable files to the test machine requires that the thumb
                                                                 in using a Damn Small Linux (DSL) [4] distribution. This
drive is removed (and therefore the test machine rebooted)
                                                                 distribution (based on KNOPPIX Linux distribution), while
each time a new file is to be tested.
                                                                 offering a GUI, is only 50 MB in size, which makes it suit-
   Finally, the booting method settled on a network boot,
                                                                 able for a network boot (since the entire operating system
also known as Preboot Execution Environment (PXE), as
                                                                 image is generally loaded in RAM in such cases); addition-
most convenient. The test PC’s network adapter is 3COM
                                                                 ally, there are Internet resources specifying the booting of
3C905-TX, which features an empty slot for an add-on
                                                                 KNOPPIX based systems using tftpd server; and finally, al-
boot ROM. If it had a PXE boot ROM, the test PC could
                                                                 though small, Damn Small Linux is extensible with prebuilt
have booted over the network without any need for addi-
                                                                 packages, including the GNU C compiler gcc and debugger
tional software, since the P6VAP-AP supports network boot
                                                                 gdb - and these can also be used from a local network loca-
directly from BIOS - but only if the network adapter sup-
                                                                 tion. Thus, it becomes relatively easy to compile the card
ports it too. Therefore, the test PC was set to boot from
                                                                 software, and run it under a DSL distribution.
CD-ROM, and a rewritable CD was “burned” with the open-
                                                                    The most typical problem with these Linux OS’s on a disk-
source gPXE [6] network bootloader image. Of course, net-
                                                                 less machine, is accessing Windows network shares. Typi-
work booting demands a server as well - a Windows XP ma-
                                                                 cally, the smbmount command can be used with the following
chine was used to host the open source tftpd32 [22] server,
                                                                 syntax:
which in turn was used to serve an image of an MS-DOS net-
work disk (built using the Build Floppy Disk BFD [26] soft-      mount -t smbfs // mypc / myshare / local / mount
ware). Once the test PC is booted in a networked MS-DOS              / dir
environment, it is relatively easy to mount a remote Win-
dows share on the server through the net command:                where mypc is the computer name under Windows of the re-
                                                                 mote PC. However, using this name is not always successful
 net use X :  mypc  myshare
                                                                 (especially if the domain information is not set in the Linux
11
   In such a case, Grub4DOS can be installed as a boot-manager   PC); in most cases, using the IP address of the PC instead,
 on the flash drive, which has the capability to boot a MS-DOS    helps. In DSL Linux, installing its samba package will also
 floppy disk image (stored on the flash drive) directly to mem-    provide a graphical LinNeighborhood program which allows
 ory.
12
   in this case around 120 MB - other methods for achieving      for automatic discovery of PCs and shares on the local net-
 the same can “force” the USB flash drive to behave like a        work; however, the exact user-name, password and domain
 diskette, along with only 1.44 MB as entire capacity of the     as the current Windows logged-in user are needed in order
 disk                                                            to access a share on a Windows PC.
3.4     Software                                                  considerations taken in the software, and additionally, the
   As mentioned previously, the source code for the “Learn-       DACs do not depend on a clock signal - we can expect that
C” ISA card given in [18] is C code, originally intended          the test PC will simply try to write the ramp values, as
to run under MS-DOS (as part of this project, portions of         soon as it can, to the ISA card DACs; without previous
that code were ported to Linux as well). The “Learn-C”            experience, one could speculate that this could result even
example programs can also run in the command prompt               with a hypersonic wave being generated by the DACs. To
shell of Windows XP - however, they cannot be directly            confirm this, the output analog signal was captured with an
compiled with modern Windows C compilers. The reason              oscilloscope (shown on Fig. 7).
for this is that the code relies on C commands like inportb
and outportb (or inp and outp), which represent direct I/O
port access13 ; however direct I/O port access is disabled for
Windows architectures newer than NT [19].
   Nonetheless, older compilers can be employed in order to
compile the test programs for the ISA card - so they run even
under Windows XP. Currently, Borland’s historical compil-
ers Turbo C v2.01 and Turbo C++ v1.02 are provided at no
cost - both of them can be installed under DOS or Windows,
and can compile the ISA card test programs. However, there
is another option as well - the open-source DJGPP compiler
[5]; although there are some subtleties in switching from a
Borland to a DJGPP compiler, the process is almost straight-
forward.
                                                                  Figure 7: Agilent oscilloscope screen capture of the
   The first piece of test software run, was the C code ex-
                                                                  output DAC signal, after amplification (obtained us-
ample from [18] (experiment 8 ) which controls a DAC, and
                                                                  ing agiload software).
outputs a triangular wave analog sound. The core of the
code is relatively simple:
                                                                     The DAC output signal on Fig. 7 is well in the audi-
     disable () ;                                                 ble range (which can be shown by connecting a speaker to
     while (! kbhit () )                                          the output, and hearing the output). The agiload soft-
     {                                                            ware can also obtain a scope capture, like on Fig. 7, as a
       for ( x =0; x <256; x ++) { outp ( da1 , x ) ; }           list of 2000 floating point voltage values; this list can be
       for ( x =254; x >0; x - -) { outp ( da1 , x ) ; }
       __asm__ (" sti ") ; // required by DJGPP                   used to obtain more precise locations of local minima, and
     }                                                            thus more precise period. Using this method, we arrive at
     enable () ;                                                  a period of approximately T=876.5 µs (or f=1140 Hz DAC
                                                                  frequency), which means that the time between consecutive
                  Listing 1: DAC code                             outp(da1,x) commands in listing 1 (which involves check of
                                                                  for loop condition, increase of counter x value, and the ac-
   In essence, as long as no keyboard presses are detected,       tual outp command) is about 1.7 µs. Since the same tempo-
the code will loop two for loops, that generate a ramp of all     ral granularity occurs for test programs under both MS-DOS
8-bit values - from 0 to 255 and then back - and write those      and Linux environments, and is somewhat similar regardless
values to a DAC. Here is one difference that can be seen           of interrupt disabling - it is likely that this limit is imposed
between DJGPP and Borland compilers: DJGPP for some rea-          by a more fundamental problem (such as incompatibility
son cannot detect a keyboard press, if the kbhit command          between bus requests timing, and relaxation time of the the
is encapsulated between enable and disable commands -             DAC chip or similar device - similar to the 8530 latency
unless the assembler command __asm__("sti") is added at           problem described in [9, pg. 809]).
the end of the loop [7]. Also, whereas Borland compilers
will produce executables some 15 KB in size, the DJGPP com-
piler generates 117 KB executables for the same source code.      4. TESTING PROCEDURE
Finally, “raw” executable from DJGPP will complain about             The testing procedure consisted of two distinct steps. The
“cannot open swap file c:cwsdpmi.swp”, although the              first was to use a known signal to determine the sampling
software will run - the way to work around this is to use         rate of the ADC; and to check whether this rate is cor-
the exe2coff, cwsdstub and cwsparam programs from the             rect (by auditorily comparing a capture from the ISA card’s
DJGPP distribution, to explicitly set the swap file used by the    ADC to the known signal). The second step (the actual
executable to none.                                               experiment) consisted of sampling and capturing a known,
   It is interesting to observe the frequency of the eventually   DC-lifted, sinusoidal signal; turning the analog switch on
produced analog signal - since there are no explicit timing       and off during capture; and looking for presence of a DC
                                                                  level recording when the switch was active in observations
13
  These C commands are in fact interface for the assem-           of captured data.
bler commands IN and OUT, which otherwise represent core
commands in the Programmed Input/Output (PIO) trans-              4.1 Determining the ISA card sampling rate
fer mode [23]. Since PIO (as opposed to Direct Memory               As the DAC sampling rate discussion hints, determining
Access (DMA)) involves the processor in every transaction of
data between the PC and the peripheral devices on the bus,        the ADC sampling rate will also involve some work. A
it suffers from performance issues, which is why it is being       known reference signal - a 440 Hz sinusoid - was generated
phased out where fast devices are involved [27].                  using Audacity with the maximum amplitude, and repro-
duced using a sound-card headphone output; this signal was
applied directly to the ADC’s first input (pin 26). Since
the headphone output spans from -1.65 to 1.65 Vpp, and
ADC0809 operates ratiometrically against a voltage reference
set to 5V - obviously only the positive semi-period of the si-
nusoid will be captured. This distortion, however, would not
affect the fundamental frequency seriously – which means
that the captured signal’s pitch should remain audibly close     Figure 8: Oscilloscope screen captures of EOC (top)
to the pitch of the original sinusoid.                           vs IOW (bottom). Left: 100 µs of non-periodic be-
   The starting point was again code from [18] (experiment       havior; right: 1 ms of periodic behaviour.
9 ). Auditory comparison requires that the test software
is able to record captures on disk, which is done relatively
easy by adding the fputc C command to write the 8-bit            mands (such as printf or fputc) from the ADC reading loop
data (obtained from the ADC) to disk - as soon as it is          code, IOW started firing and EOC stabilized its frequency -
available. However, initial captures for several seconds of      which is shown on Fig. 8 right. The execution of C com-
capture time were only few thousand bytes in size - which        mands thus visibly influences the sampling rate of the ADC
meant something was wrong with the ADC sampling rate.            process. Eventually, it turns out that this can be resolved by
   Let’s briefly review the principle of work of the ADC: we      introducing a short delay between the outport and the first
already mentioned that the ADC chip is addressed through         inport command in the reading loop, as shown in listing 2:
10 bits of the ISA address line: A9-A6 determine the card,       unsigned base; unsigned adcport; base = adcport =
A5-A3 determine the ADC chip (through the 74LS138 de-                 0x200; //1000000000
coder) and A2-A0 determine the input channel on the chip         if ((fp = fopen(FILENAME,"w+b")) != NULL) {
to read from; the base address is this case was 0x200              while(!kbhit())
(1000000000). If the PC does a write (outport) on this ad-         {
                                                                     outp(adcport, 0); // start channel 0 conversion , by
dress, IOW line is activated. In that case, pins of 74LS02 are                 writing   whatever   value   to   address   adcport
set to: 74LS02/p1=”1” and 74LS02/p4=”0”. 74LS02/p1                       iz = del; while (iz > 0) iz--;             // fake delay , ’ del ’
being high enables lines START (ADC0809/p6) and ALE (ad-                       increments
dress latch enable, ADC0809/p22), to notify the ADC to                   while(!(inp(adcport+0x18) & 0x80));        // wait for EOC
process analog input channel based on the brought A2-A0                       ready : 0 x18 = 000011000, 0 x80 = 010000000
lines. 74LS02/p4 being low disables line OE (out enable,                 x = inp(adcport); // read ADC value into variable x
                                                                         fputc((char)x,fp); // since value is 8− bit anyways ,
ADC0809/p9). Thus, analog-to-digital conversion in the                        just cast to char and save to disk
chip starts during a write operation, but the chip’s digital         }
output pins are not yet enabled at that moment. If the PC        }
does a read (inport) on this address, IOR line is activated.
In that case, pins of 74LS02 are set to: 74LS02/p1=”0” and                     Listing 2: ADC reading loop code
74LS02/p4=”1”. 74LS02/p1 being low deactivates START
                                                                    Additional code made it possible to interactively change
line (however this does not stop an already started ADC
                                                                 the value of the del variable, and thus the duration of the
process) and ALE; and 74LS02/p4 being high enables line
                                                                 delay. It was discovered that for values of del greater than
OE, which makes ADC0809 output the last finished sam-
                                                                 8102, the EOC signal settles its period as on Fig. 8 right - and
pled result. Once started, the ADC works in sync with the
                                                                 furthermore, in this case, commands like printf or fputc
OSC/16 (about 894 KHz) clock signal, finishing with the EOC
                                                                 didn’t seem to affect the EOC period as seriously. This need
(END OF CONVERSION) signal. Upon EOC, we should
                                                                 for a delay occurs for test programs running both under
have the digital sample value ready, laid out on BD0-BD7
                                                                 Windows and Linux environments (and it’s likely it is re-
pins of ADC0809.
                                                                 lated to timing inconsistencies between the bus and the card
   So, from the PC side, we always have to do an outport
                                                                 hardware). Using the data captures of oscilloscope traces,
to start the ADC process, then wait for the EOC signal, and
                                                                 the period of the EOC signal while capturing to disk was de-
then an inport to obtain the digitized value. Waiting for
                                                                 termined to be around 78.583 µs, which gives around 12725
the EOC signal is implemented by reading from the base
                                                                 Hz sampling frequency. As listing 2 indicates, the recorded
address plus 0x18 (0000011000), which sets address lines
                                                                 file is simply a stream of 8-bit characters. This file can be
A3-A4 to ”11” and thus makes the decoder select the line
                                                                 imported in Audacity as raw data, and the sampling fre-
EOC/SWITCH SELECT (74LS138/p12) instead of line
                                                                 quency is set upon import; the resulting waveforms can be
ADC SELECT (74LS138/p15). This eventually causes the
                                                                 seen on Figure 9.
74LS244 to map the EOC signal to BD7, which is then routed
                                                                    The multi-track capabilities of Audacity also allow the
to the D7 data pin of the ISA bus through the 74LS245
                                                                 original 440 Hz source signal, and the ADC captured sig-
transceiver. So, from software, we would simply wait - un-
                                                                 nal from the ISA card, to be played simultaneously in spite
til the value, read from base address + 0x18, gets its 8th
                                                                 of differing sampling rates; their respective pitches can be
bit set to 1 (which is easily done by bit-masking with 0x80
                                                                 heard as audibly close. It was difficult to determine by hear-
(010000000)). Hence, a more precise way to obtain the sam-
                                                                 ing whether the obtained 12.725 KHz sampling rate truly
pling rate, would be through determining the period of the
                                                                 produces a pitch closest to the original source signal, as
EOC signal. However, initial observations of the EOC signal
                                                                 Audacity doesn’t offer a way to modify the sampling rate of
showed problems, shown on Fig. 8 left.
                                                                 an audio file interactively while the sound is playing.
   Figure 8 (left) shows that EOC is not periodic; addition-
ally, IOW never fires. However, by removing extraneous com-
targetpin = 0x80;

                                                                 if ((fp = fopen(FILENAME,"w+b")) != NULL) {
                                                                   while( (ch == ’p’) ) {
                                                                     if (kbhit()) {
                                                                       ch = getch(); //windows only , conio . h
                                                                       if (ch == ’p’) {
                                                                         outval = !outval; // toggle value
                                                                         ov = targetpin * outval; // shift
Figure 9: Display of captured ADC signal imported                        printf("outval is now %d (0x%X=%d).n",
                                                                              outval, ov, ov);
in Audacity, interpreted as signed (top) or unsigned                     outp(ppi_porta, ov); // write value to PPI
(bottom) 8-bit data. The portion on the right shows                    }
a temporally zoomed slice.                                           }
                                                                     outp(adcport, 0); // start channel 0 conversion
                                                                     ... // [ snip rest of code ] ...
4.2   Test of analog switch functionality                          } // end while , reading loop
   As mentioned previously, a CD4066 was used to imple-
                                                                 Listing 3: Toggling PPI pin 37 via press of key ’p’
ment an analog switch, which bypasses the input preamp/-
filter section of the ISA card. This chip offers four analog          Listing 3 allows that a press on key ‘p’ toggles the out-
switches - only a single one was used, defined by pins 1 and      put voltage of 8255/p37 between 0 and 5V, which in turn
2 and switch connectors, and pin 13 as voltage control. Us-      turns toggles the analog switch on or off via CD4066/p13.
ing a pocket digital multimeter, the resistance of the channel   Otherwise, the switch terminal CD4066/p2 is connected to
(between pins 1 and 2) was measured. With the PC powered         ADC0809/p26; and CD4066/p1 is connected to input of
off, 25.6 KΩ were measured; however, with the PC powered          the mic preamplifier (input pin of capacitor C1 on Fig. 4).
and the program running, this resistance was measured at 0       Thus, using the analog switch, the entire input preamplifier
Ω for closed switch, and greater than 2 MΩ for open switch;      can be bypassed by a key press - while the software records
which is a good sign that the device will behave close to an     the ADC samples to a disk file. Then, if a signal with a DC
ideal switch when in use. Of course, there is the question of    level is present on the preamplifier input, the toggling of the
how to target the voltage control pin of the bilateral switch    switch should be visible on a recorded capture.
(CD4066/p13). The 8255 PPI on the ISA card was used
for the purpose, as it offers three ports (A, B and C) of 8       5. RESULTS
pins each, which can be configured to act as either digital
                                                                    The procedure described in section 4.2 was used to capture
inputs, or digital outputs; it additionally has an 8-pin data
                                                                 a DC offset sinusoidal signal. This signal was generated by a
port, through which all the communication with the chip is
                                                                 vintage Wavetek model 145 signal generator, which doesn’t
performed. Just a single output pin is needed from a single
                                                                 provide for fine-tuning control of the AC amplitude and the
port, configured as output, in order to control the analog
                                                                 DC offset separately. Eventually, a signal spanning between
switch; pin 7 of port A (8255/p37) was chosen for the pur-
                                                                 0.5V and 1.66V, set at approximately 450 Hz, was used as
pose, and was connected to CD4066/p13. The 8255 offers
                                                                 the input signal for ADC capture. The signal arriving at the
three different modes of configuration of the three ports;
                                                                 input pin ADC0809/p26, without and with the influence
here any mode that configures port A as output will do,
                                                                 of the switch, is shown on Fig. 10.
and the function set up ppi from [18] was used to quickly
configure the ports.
   The ISA bus address lines A0, A1 are eventually routed
to the two address pins of 8255 (p8 and p9), which are used
to choose which internal 8255 register is targeted through
the data pins. The control register is accessed when A0=1,
A1=1 (or, the base address of the 8255 + 3 appears on the
ISA bus), and can be used to configure the PPI; the port A
register is accessed when A0=0, A1=0 (or, the base address
                                                                 Figure 10: Oscilloscope screen captures of the in-
of the 8255 appears on the ISA bus), and can be used to
                                                                 put signal brought to ADC0809 IN0 (left) without
read from port A - or turn individual pins on and off if
                                                                 the influence of analog switch; (right) while analog
configured as output. Eventually, this was coded within the
                                                                 switch turned on
ADC reading loop, so as to allow 8255/p37 to be turned
high or low at the press of the button. The key elements           It should be noted that the input section of the ISA card,
of the code, integrated with code on listing 2, are shown on     features a small voltage divider, formed by VR1 and R3 (Fig. 4),
listing 3:                                                       used to offset an input signal (and thereby avoid clipping
// make port A an output and port B an     input −               of signal with no zero offset). This voltage offset was set
      Aout CUin Bin CLin = 0 x1C0                                to zero by tuning the VR1 potentiometer, in order to em-
set_up_ppi(0x1C0);                                               ulate accurately the DC filtering behavior of input section
// 0 x200 = 1 000 000 000                                        of soundcards. Additionally, the amplification factor of the
unsigned base; unsigned adcport; base = adcport =                preamplifier section is fixed, and set by the ratio of resistors
    0x200;
// 1 000 000 000 + 0 000 100 000; A0=0, A1=0                     R2 (4.7 MΩ) and R1 (3.9 KΩ) - which results with some 1200
unsigned ppi_porta = base + 0x20;                                times amplification. Such an amplification will clip the DC-
int ch = ’p’; int outval = 0; int ov = 0; int                    offset input signal rather quickly, hence a 3.9 KΩ resistor
was soldered in parallel with R2, in order to bring the am-      needed) for strictly positive voltages when using an active
plification close to 1 - and keep the amplitudes of the input     switch.
in both test cases equal. As per Fig. 10, that didn’t turn          This project started by looking for a hardware platform,
out to be a total success, yet it is close: the filtered signal   that behaves essentially like a sound-card. Arguably, the
has an amplitude of 1.14 Vpp, whereas the switched signal        ISA platform used here cannot be even considered a sound
shows 1 Vpp.                                                     card, until it can be used by typical audio software (like
   This input signal was captured using the procedure given      players or editors) from the application level in an operating
in section 4.2, as the analog switch was turned on and off        system. Although the ISA card could be extended to play
during capture using keyboard key presses. The data cap-         back audio (encoded for the measured DAC frequency) - at
tured by the ISA card can be verified through an import in        the state presented here, it behaves more like a generic signal
Audacity, depicted in Fig. 11.                                   generator and sampler, than a modern soundcard. Finding
                                                                 a modern open hardware platform, that allows for the type
                                                                 of research as in this project, is still problematic; although
                                                                 FPGA based designs, such as the ones described in [11], are
                                                                 very promising as a base for miltichannel, high-speed, hybrid
                                                                 audio/sensor interfaces.
                                                                    Whereas it is utopistic to expect that this paper could
                                                                 significantly influence industry in such a manner, that simi-
                                                                 lar modifications become a standard for future sound-cards
                                                                 - it certainly aims to inspire designers working in the elec-
                                                                 tronic music instrument field, to focus at the intricacies of
                                                                 digital interfacing with analog signals; and to consider us-
                                                                 ing older, historic designs for appropriate purposes - while
Figure 11: Top: Six second capture of an input                   being aware of potential obstacles. Mostly, one has to deal
signal with DC, with the switch activated in mid-                with hardware availability, although software can be an is-
capture; Bottom: temporal zoom at moments of ac-                 sue as well. However, in the case of ISA, the paper shows
tivating (left) and deactivating (right) the switch.             that currently there is still a palette of tools that can tar-
                                                                 get such machines and corresponding functionality, many of
   As it is obvious from Fig. 11, activating the switch allows   them free and open-source; yet, one has to be prepared for
the DC level of the signal to be captured by the card’s ADC;     a time investment for straightening out potential glitches.
and the waveforms obtained in Audacity remain relatively            Although the “Learn-C” ISA design was sufficient to illus-
faithful to the original input signal shown in Fig. 10.          trate potential use of analog gates, it is pointless to attempt
                                                                 to turn it into a full sound-card, primarily since the ISA bus
6. DISCUSSION                                                    is in itself obsolete. However, it may be interesting to look
                                                                 at the practical obstacles to it. The biggest problem with
   This paper indicates that analog switches bypassing the
                                                                 this design, and possibly with any design based on PIO mode
input preamplifier section of sound-card inputs, would be a
                                                                 control of an ISA sound-card, is the difficulty in obtaining
relatively simple change to perform on existing sound-card
                                                                 consistent and predictable timing. Neither the ADC input,
designs, thereby expanding their purpose to high speed A/D
                                                                 nor the DAC output design outlined here haven’t taken a
interfaces for generic sensors. Similar change could be im-
                                                                 particular timing goal into account; in both cases the sam-
plemented for output sections, thereby allowing sound-cards
                                                                 pling rate had to be determined after the device was built
to be used as generic signal generators. The DC blocking ca-
                                                                 and used. As an experiment, during development an at-
pacitors are present in a sound-card, of course, for a purpose
                                                                 tempt was made to develop a PD object under Windows XP,
- primarily to protect speakers from constant DC biasing,
                                                                 that would eventually be able to transfer digital audio data
and thereby prolong their lifetime [24]. The design change
                                                                 streams played within PD to be passed and reproduced on
proposed here, would ideally leave that regime unchanged
                                                                 the ISA card. PD objects are based on a so-called “perform”
for audio purposes - and simply introduce a different one,
                                                                 function, which gets called by the OS repeatedly; the gran-
more suitable for sensor data acquisition, when the user re-
                                                                 ularity of this perform function calls is about 1 ms. When
quires it.
                                                                 a perform function is triggered, it has access to input and
   Unfortunately, the card’s implementation is of rather low
                                                                 output sound buffers, which contain a number of samples,
quality, which results with a noisy input and output - obvi-
                                                                 corresponding to about a millisecond of audio. Hence, all a
ous even from the oscilloscope traces provided in this paper.
                                                                 perform function would do, is simply write these values to
Therefore it is difficult to make any claims beyond a simple
                                                                 the DAC of the ISA card as soon as possible; the DAC would
demonstration of the concept - such as frequency character-
                                                                 also reproduce them as soon as possible, and then hold the
istic of the preamplifier sections with a switch for both on
                                                                 last value for about a millisecond, until the perform func-
and off states, or distortion introduced by the switch. How-
                                                                 tion gets called again. Thus, this particular ISA card design
ever, the paper also shows that once a platform is available,
                                                                 simply cannot be driven by a standard PD object, in such a
it is relatively easy to suggest modifications that would be
                                                                 way that audio is reproduced at the DAC output; because
workable in practice - and that even vintage designs can be
                                                                 of the slow, millisecond, call rate of the perform function -
used for the purpose. Still, many factors would still need to
                                                                 and the need to access the hardware directly via in and out
be considered, before a final conclusion is made regarding
                                                                 commands during its execution 14 .
implementation in modern sound-cards: for instance, how
to preserve the bipolar voltage sampling capabilities when
                                                                 14
in audio mode, while adjusting to the ADC input range (if             This would be quite possible, if the ISA card had compo-
In fact, Windows, apart from prohibiting PIO access via         8. REFERENCES
inport and outport commands15 , also has millisecond gran-          [1] Arduino. Arduino homepage, http://www.arduino.cc/.
ularity built into the operating system [21]. Essentially,              World Wide Web electronic publication.
standard Microsoft C and C++ programs cannot be guar-
                                                                    [2] D. Beal, I. Ripoll, P. Pisa, L. Abeni, P. Gai, and
anteed timed access beyond a millisecond granularity, unless            A. Lanusse. Linux As a Real-Time Operating System.
the Windows Driver Development Kit16 is used [3], which re-             Metrowerks Corporation–A Motorola Company,
quires a Microsoft paid subscription. Although Linux “is not            OCERA, 2003. World Wide Web electronic
a real-time system, it has some features, already included in           publication,
the mainstream source code or distributed as patch files, de-
                                                                        http://www.freescale.com/files/soft dev tools/doc/-
signed to provide real-time to Linux” [2]; and since it allows          white paper/CWLNXRTOSWP.pdf.
for free development of device drivers, it could be seen as
                                                                    [3] M. Cherepov, M. Hirst, C. Jones, and M. Zimmerman.
a viable alternative for work with designs, such as the one
                                                                        Hard Real-Time with Ardence RTX on Microsoft
discussed in this paper.
                                                                        Windows XP and Windows XP Embedded. Technical
   Arguably, the ISA design used as a test platform here,
                                                                        report, Ardence, Tech. Rep. Also at
doesn’t even come close to issues in contemporary sound-
                                                                        http://msdn.microsoft.com/en-
card production. However, it is an excellent educational
                                                                        us/library/ms838340(WinEmbedded.5).aspx,
tool to introduce general issues related to design of sound-
                                                                        2002.
cards and corresponding software. Namely, it is often diffi-
cult for beginner engineers to come to a practical example,         [4] damnsmalllinux.org. DSL information - What is DSL?
which is both relatively simple to understand as introduc-              (Damn Small Linux). World Wide Web electronic
tory material (and thus easy to relate to theory) - and can             publication, http://damnsmalllinux.org/, Last
be practically implement to serve a purpose, already known              Accessed: 12 April, 2009. DSL (Damn Small Linux)
from a user perspective. So in spite of the obsolescence of             homepage.
ISA, this design can still be useful educationally - consider       [5] D. Delorie. DJGPP - Homepage. World Wide Web
that 8255, used as a central component of the now obsolete              electronic publication,
parallel PC port, in modern times finds implementation as                http://www.delorie.com/djgpp/, Last Accessed: 12
part of VLSI circuits; similarly address decoders and similar           April, 2009.
logic circuits are likely to be found as components in FPGA         [6] etherboot.org. start - Etherboot/gPXE Wiki. World
design. One positive point of using discrete components in              Wide Web electronic publication,
the card implementation, is the possibility to measure their            http://etherboot.org/wiki/index.php, Last Accessed:
signals individually with an oscilloscope and thus observe              12 April, 2009.
the interdependence of different signals on the physical, elec-      [7] groups.google.com. Problem with tight kbhit() loop -
tric level - something that becomes arguably difficult, if the            comp.os.msdos.djgpp. World Wide Web electronic
components are part of a single VLSI chip.                              publication,
                                                                        http://groups.google.com/group/comp.os.msdos.-
                                                                        djgpp/browse thread/thread/18aa27bae2b98485/-
7.    CONCLUSION                                                        cecf3d9dfed4ee28, Last Accessed: 12 April, 2009.
   In conclusion, the project managed to demonstrate the                forum post.
possibility to use analog switches, for software controlled by-     [8] M. H. Puts, J. Pokorny, J. Quinlan, and L. Glennie.
pass of input filters of a sound-card device; thereby, in princi-        Audiophile hardware in vision science; the soundcard
ple, allowing it to interface with generic sensors that produce         as a digital to analog converter. Journal of
DC-offset voltages. However, claims cannot be made on the                Neuroscience Methods, 142(1):77–81, 2005.
feasibility of implementing such a change in an existing com-       [9] P. Horowitz and W. Hill. Microprocessor Support
mercial sound-card design. The project also illustrated the             Chips. In The Art of Electronics. Cambridge
specific problems encountered with usage of a card design for            University Press, 1989.
the now obsolete ISA bus; while demonstrating how it can
                                                                   [10] K. Jo. Audio Interface as a Device for Physical
be used to emulate modern hardware (at least to a degree,
                                                                        Computing. Proceedings of Audio Mostly 2008 - a
sufficient to expose the problem at hand). Additionally, the
                                                                        Conference on Interaction with Sound, pages 123–127,
simplified analysis of particular issues, aims to serve as an
                                                                        2008. Also at
educational introductory example for designers starting with
                                                                        http://www.jojporg.dreamhosters.com/public dav/-
digital hardware design; in line with this aspect, the source
                                                                        paper/audiomostly08-audiointerface-jo.pdf.
files for schematics and code, as well as the full list of on-
                                                                   [11] S. Kartadinata. The Gluion advantages of an
line references (too numerous to include here) relevant to
                                                                        FPGA-based sensor interface. In Proceedings of the
the topic discussed in this paper, is provided on the project
                                                                        2006 conference on New interfaces for musical
webpage [16].
                                                                        expression, pages 93–96. IRCAM-Centre Pompidou
 nents that would allow the card to receive data from the PC            Paris, France, France, 2006.
 quickly, store this data in memory, and eventually control its    [12] N. Leroy, E. Fl´ty, and F. Bevilacqua. Reflective
                                                                                        e
 reproduction on the DAC chip; however, such a data trans-              optical pickup for violin. In Proceedings of the 2006
 fer implies use of a direct memory access (DMA) method, an
 alternative to the PIO method.                                         conference on New interfaces for musical expression,
15
   Although, historic compilers and DJGPP still support them,           pages 204–207. IRCAM-Centre Pompidou Paris,
 and a workaround is possible using a commercial library                France, France, 2006.
 NTPort [29].                                                      [13] F. Looft. Isa bus - a brief description and io device
16
   (WDK, earlier known as DDK)                                          design. World Wide Web electronic publication,
http://web.archive.org/web/20070222231336/-                     Last Accessed: 12 April, 2009.
       http://ece.wpi.edu/∼wrm/Courses/EE3803/Labs/isa/,          [27] www.pcguide.com. Programmed I/O (PIO) Modes.
       Last Accessed: 12 March, 2009. Last Modified:                    World Wide Web electronic publication,
       03/23/1997 01:43:54.                                            http://www.pcguide.com/ref/hdd/if/ide/modesPIO-
[14]   S. Molloy. How to Modify a PC Sound Card to Allow               c.html, Last Accessed: 12 April,
       D.C. Voltage Measurements. World Wide Web                       2009.
       electronic publication,                                    [28] www.plop.at. PLoP - Home. World Wide Web
       http://web.archive.org/web/20080108175023/-                     electronic publication, http://www.plop.at/, Last
       http://www.mandanet.net/adc/adc.shtml, Last                     Accessed: 12 April, 2009.
       Accessed: 7 April, 2009.                                   [29] www.zealsoftstudio.com. NTPort Library - Inport,
[15]   D. Nacapricha, N. Amornthammarong,                              Outport, Inp, Outp functions, direct I/O ports access.
       K. Sereenonchai, P. Anujarawat, and P. Wilairat. Low            World Wide Web electronic publication,
       cost telemetry with PC sound card for chemical                  http://www.zealsoftstudio.com/ntport/, Last
       analysis applications. Talanta, 71(2):605–609, 2007.            Accessed: 12 April, 2009.
[16]   name(s) omitted for submission. Extending isa
       soundcard webpage. World Wide Web electronic
       publication, http://link.omitted.for.submission, Last
       Accessed: 20 March, 2009. Last Modified: 03/20/2009
       08:27:02.
[17]   K. Reddy, J. Bai, B. George, N. Mohan, and
       V. Kumar. Virtual Instrument for the Measurement of
       Haemo-dynamic Parameters Using
       Photoplethysmograph. Proc 23rd Int ConfIEEE,
       IMTC-2006, pages 1167–1171, 2006.
[18]   J. D. Reeder. Tutorial - controlling the real world with
       computers. World Wide Web electronic publication,
       http://learn-c.com/, Last Accessed: 12 March, 2009.
       Last Modified: 03/21/2005 22:53:00.
[19]   D. Roberts. Dr. Dobb’s - Direct Port I/O and
       Windows NT. World Wide Web electronic publication,
       http://www.ddj.com/184409876?pgno=3, Last
       Accessed: 12 April, 2009.
[20]   T. Savell. 23.3 Digital Audio Processors for Personal
       Computer Systems. Linear Algebra and Ordinary
       Differential Equations, 1993.
[21]   technet.microsoft.com. Inside Windows NT High
       Resolution Timers. World Wide Web electronic
       publication, http://technet.microsoft.com/en-
       us/sysinternals/bb897569.aspx, Last Accessed: 12
       April, 2009.
[22]   tftpd32.jounin.net. TFTPD32 : an opensource TFTP
       server/service for windows : TFTP server. World
       Wide Web electronic publication,
       http://tftpd32.jounin.net/, Last Accessed: 12 April,
       2009.
[23]   B. Trumbic. How to make your own at card. World
       Wide Web electronic publication,
       http://web.archive.org/web/20011008162116/-
       http://www.fesb.hr/∼btrumbic/atcardTR12.htm,
       Last Accessed: 12 March, 2009. Last Modified:
       02/23/1998 13:29:28.
[24]   www.maxim ic.com. APPLICATION NOTE 3979 -
       Overview of DirectDrive R Technology. World Wide
       Web electronic publication, http://www.maxim-
       ic.com/appnotes.cfm/an pk/3979/, Last Accessed: 12
       April, 2009.
[25]   www.neonbox.org. nanobox linux. World Wide Web
       electronic publication,
       http://www.neonbox.org/nanobox/index.html, Last
       Accessed: 12 April, 2009. home page.
[26]   www.nu2.nu. BFD - Build Floppy Disk. World Wide
       Web electronic publication, http://www.nu2.nu/bfd/,

More Related Content

What's hot

Practical Applications of Digital Media Networking - ProLight + Sound Frankfurt
Practical Applications of Digital Media Networking - ProLight + Sound FrankfurtPractical Applications of Digital Media Networking - ProLight + Sound Frankfurt
Practical Applications of Digital Media Networking - ProLight + Sound FrankfurtBob Vanden Burgt
 
Scientech trainer kit catalog
Scientech trainer kit catalogScientech trainer kit catalog
Scientech trainer kit catalogABHAYTAVPSC
 
Introduction to Digital Signal Processing (DSP)
Introduction  to  Digital Signal Processing (DSP)Introduction  to  Digital Signal Processing (DSP)
Introduction to Digital Signal Processing (DSP)Md. Arif Hossain
 
Software defined radio
Software defined radioSoftware defined radio
Software defined radioDevesh Samaiya
 
DIGITAL SIGNAL PROCESWSING AND ITS APPLICATION
DIGITAL SIGNAL PROCESWSING AND ITS APPLICATIONDIGITAL SIGNAL PROCESWSING AND ITS APPLICATION
DIGITAL SIGNAL PROCESWSING AND ITS APPLICATIONLokeshBanarse
 
Architecture of direct_digital_synthesiz
Architecture of direct_digital_synthesizArchitecture of direct_digital_synthesiz
Architecture of direct_digital_synthesizanjunarayanan
 
USRP Project Final Report
USRP Project Final ReportUSRP Project Final Report
USRP Project Final ReportArjan Gupta
 
Application of digital_signal_processing_in_audio_processing[1]
Application of digital_signal_processing_in_audio_processing[1]Application of digital_signal_processing_in_audio_processing[1]
Application of digital_signal_processing_in_audio_processing[1]Sveris COE Pandharpur
 
Small form factor cognitive radio implemented via fpga partial reconfiguratio...
Small form factor cognitive radio implemented via fpga partial reconfiguratio...Small form factor cognitive radio implemented via fpga partial reconfiguratio...
Small form factor cognitive radio implemented via fpga partial reconfiguratio...Roberto Uribeetxeberria
 
Unit 6: DSP applications
Unit 6: DSP applicationsUnit 6: DSP applications
Unit 6: DSP applicationsMinakshi Atre
 
Channel Coding and Clipping in OFDM for WiMAX using SDR
Channel Coding and Clipping in OFDM for WiMAX using SDRChannel Coding and Clipping in OFDM for WiMAX using SDR
Channel Coding and Clipping in OFDM for WiMAX using SDRidescitation
 
Situation Review: SDR Transceivers
Situation Review: SDR TransceiversSituation Review: SDR Transceivers
Situation Review: SDR TransceiversTobias Wellnitz
 
Video Conferencing PAGES
Video Conferencing PAGESVideo Conferencing PAGES
Video Conferencing PAGESVideoguy
 
Digital signal processing
Digital signal processingDigital signal processing
Digital signal processingvanikeerthika
 
Introduction to Digital Signal Processing
Introduction to Digital Signal ProcessingIntroduction to Digital Signal Processing
Introduction to Digital Signal Processingop205
 

What's hot (20)

Practical Applications of Digital Media Networking - ProLight + Sound Frankfurt
Practical Applications of Digital Media Networking - ProLight + Sound FrankfurtPractical Applications of Digital Media Networking - ProLight + Sound Frankfurt
Practical Applications of Digital Media Networking - ProLight + Sound Frankfurt
 
Scientech trainer kit catalog
Scientech trainer kit catalogScientech trainer kit catalog
Scientech trainer kit catalog
 
Amiko
AmikoAmiko
Amiko
 
Introduction to Digital Signal Processing (DSP)
Introduction  to  Digital Signal Processing (DSP)Introduction  to  Digital Signal Processing (DSP)
Introduction to Digital Signal Processing (DSP)
 
Software defined radio
Software defined radioSoftware defined radio
Software defined radio
 
DIGITAL SIGNAL PROCESWSING AND ITS APPLICATION
DIGITAL SIGNAL PROCESWSING AND ITS APPLICATIONDIGITAL SIGNAL PROCESWSING AND ITS APPLICATION
DIGITAL SIGNAL PROCESWSING AND ITS APPLICATION
 
Architecture of direct_digital_synthesiz
Architecture of direct_digital_synthesizArchitecture of direct_digital_synthesiz
Architecture of direct_digital_synthesiz
 
journal final
journal finaljournal final
journal final
 
USRP Project Final Report
USRP Project Final ReportUSRP Project Final Report
USRP Project Final Report
 
Application of digital_signal_processing_in_audio_processing[1]
Application of digital_signal_processing_in_audio_processing[1]Application of digital_signal_processing_in_audio_processing[1]
Application of digital_signal_processing_in_audio_processing[1]
 
Small form factor cognitive radio implemented via fpga partial reconfiguratio...
Small form factor cognitive radio implemented via fpga partial reconfiguratio...Small form factor cognitive radio implemented via fpga partial reconfiguratio...
Small form factor cognitive radio implemented via fpga partial reconfiguratio...
 
Unit 6: DSP applications
Unit 6: DSP applicationsUnit 6: DSP applications
Unit 6: DSP applications
 
Antiference
AntiferenceAntiference
Antiference
 
Channel Coding and Clipping in OFDM for WiMAX using SDR
Channel Coding and Clipping in OFDM for WiMAX using SDRChannel Coding and Clipping in OFDM for WiMAX using SDR
Channel Coding and Clipping in OFDM for WiMAX using SDR
 
Situation Review: SDR Transceivers
Situation Review: SDR TransceiversSituation Review: SDR Transceivers
Situation Review: SDR Transceivers
 
Dsp presentation
Dsp presentationDsp presentation
Dsp presentation
 
Video Conferencing PAGES
Video Conferencing PAGESVideo Conferencing PAGES
Video Conferencing PAGES
 
Usrp family-09-open
Usrp family-09-openUsrp family-09-open
Usrp family-09-open
 
Digital signal processing
Digital signal processingDigital signal processing
Digital signal processing
 
Introduction to Digital Signal Processing
Introduction to Digital Signal ProcessingIntroduction to Digital Signal Processing
Introduction to Digital Signal Processing
 

Viewers also liked

1º básico a semana del 25 abril y 29 de abril
1º básico a semana del 25 abril y 29 de abril1º básico a semana del 25 abril y 29 de abril
1º básico a semana del 25 abril y 29 de abrilColegio Camilo Henríquez
 
The Business BI is the driving force
The Business BI is the driving forceThe Business BI is the driving force
The Business BI is the driving forcePavel Hruska
 
Is your eyewear safe and effective?
Is your eyewear safe and effective?Is your eyewear safe and effective?
Is your eyewear safe and effective?SGS
 
Future ofsmartphones tjandra
Future ofsmartphones tjandraFuture ofsmartphones tjandra
Future ofsmartphones tjandraNatashia Tjandra
 
IFIC Foundation food safety infographics
IFIC Foundation food safety infographicsIFIC Foundation food safety infographics
IFIC Foundation food safety infographicsFood Insight
 
Nano e hndbk
Nano e hndbkNano e hndbk
Nano e hndbkdimitar53
 
Purple Tributes to Prince
Purple Tributes to PrincePurple Tributes to Prince
Purple Tributes to Princemaditabalnco
 
Software quality factor2
Software quality factor2Software quality factor2
Software quality factor2Dian Lukitasari
 
How to prevent illnesses Pass The Word
How to prevent illnesses Pass The WordHow to prevent illnesses Pass The Word
How to prevent illnesses Pass The Wordmargaserranoflo
 
Sumit nair portfolio
Sumit nair portfolioSumit nair portfolio
Sumit nair portfolioSumitnair
 
MakeYourHome Boxspringbetten
MakeYourHome BoxspringbettenMakeYourHome Boxspringbetten
MakeYourHome BoxspringbettenRalf Böwing
 
Wordcamp Sydney 2014
Wordcamp Sydney 2014Wordcamp Sydney 2014
Wordcamp Sydney 2014Braintree
 

Viewers also liked (18)

1º básico a semana del 25 abril y 29 de abril
1º básico a semana del 25 abril y 29 de abril1º básico a semana del 25 abril y 29 de abril
1º básico a semana del 25 abril y 29 de abril
 
The Business BI is the driving force
The Business BI is the driving forceThe Business BI is the driving force
The Business BI is the driving force
 
Is your eyewear safe and effective?
Is your eyewear safe and effective?Is your eyewear safe and effective?
Is your eyewear safe and effective?
 
Future ofsmartphones tjandra
Future ofsmartphones tjandraFuture ofsmartphones tjandra
Future ofsmartphones tjandra
 
IFIC Foundation food safety infographics
IFIC Foundation food safety infographicsIFIC Foundation food safety infographics
IFIC Foundation food safety infographics
 
Nano e hndbk
Nano e hndbkNano e hndbk
Nano e hndbk
 
Purple Tributes to Prince
Purple Tributes to PrincePurple Tributes to Prince
Purple Tributes to Prince
 
Software quality factor2
Software quality factor2Software quality factor2
Software quality factor2
 
French recipes
French recipesFrench recipes
French recipes
 
How to prevent illnesses Pass The Word
How to prevent illnesses Pass The WordHow to prevent illnesses Pass The Word
How to prevent illnesses Pass The Word
 
ECOO_iPod_iPad_CEO
ECOO_iPod_iPad_CEOECOO_iPod_iPad_CEO
ECOO_iPod_iPad_CEO
 
Nanofabrics
NanofabricsNanofabrics
Nanofabrics
 
Sumit nair portfolio
Sumit nair portfolioSumit nair portfolio
Sumit nair portfolio
 
7 ترفند ضروری و موردنیاز در اکسل 2013
7 ترفند ضروری و موردنیاز در اکسل 20137 ترفند ضروری و موردنیاز در اکسل 2013
7 ترفند ضروری و موردنیاز در اکسل 2013
 
Dynamic Scoring at CBO
Dynamic Scoring at CBODynamic Scoring at CBO
Dynamic Scoring at CBO
 
MakeYourHome Boxspringbetten
MakeYourHome BoxspringbettenMakeYourHome Boxspringbetten
MakeYourHome Boxspringbetten
 
Musicas faceis
Musicas faceisMusicas faceis
Musicas faceis
 
Wordcamp Sydney 2014
Wordcamp Sydney 2014Wordcamp Sydney 2014
Wordcamp Sydney 2014
 

Similar to Extending soundcard

Cbaa Ip Workshop
Cbaa Ip WorkshopCbaa Ip Workshop
Cbaa Ip Workshopcbaacomms
 
Optimal Communication Of Real Time Data On Secure Cdma Ip...
Optimal Communication Of Real Time Data On Secure Cdma Ip...Optimal Communication Of Real Time Data On Secure Cdma Ip...
Optimal Communication Of Real Time Data On Secure Cdma Ip...Stefanie Yang
 
Ecw course
Ecw courseEcw course
Ecw courseshubcoep
 
Sound systems on linux
Sound systems on linuxSound systems on linux
Sound systems on linuxDeepak KARDA
 
Input output ports and connectors
Input output ports and connectorsInput output ports and connectors
Input output ports and connectorsAjo Alex
 
Input output ports and connectors
Input output ports and connectorsInput output ports and connectors
Input output ports and connectorsbhardwaj1992
 
Analog & digital oscilloscope
Analog & digital oscilloscopeAnalog & digital oscilloscope
Analog & digital oscilloscopeAsir Foysal
 
Analog to digital conversion
Analog to digital conversionAnalog to digital conversion
Analog to digital conversionFirman Bachtiar
 
Expansion cards and slots
Expansion cards and slotsExpansion cards and slots
Expansion cards and slotsJibin Varghese
 
Multi Channel Multi Clock Frequency Speed Rate Real Time Industrial Standard ...
Multi Channel Multi Clock Frequency Speed Rate Real Time Industrial Standard ...Multi Channel Multi Clock Frequency Speed Rate Real Time Industrial Standard ...
Multi Channel Multi Clock Frequency Speed Rate Real Time Industrial Standard ...theijes
 
Noaa reception
Noaa receptionNoaa reception
Noaa receptionAdam Leach
 

Similar to Extending soundcard (20)

Cbaa Ip Workshop
Cbaa Ip WorkshopCbaa Ip Workshop
Cbaa Ip Workshop
 
Feature transmission
Feature transmissionFeature transmission
Feature transmission
 
20120140503024 2-3
20120140503024 2-320120140503024 2-3
20120140503024 2-3
 
Optimal Communication Of Real Time Data On Secure Cdma Ip...
Optimal Communication Of Real Time Data On Secure Cdma Ip...Optimal Communication Of Real Time Data On Secure Cdma Ip...
Optimal Communication Of Real Time Data On Secure Cdma Ip...
 
Ecw course
Ecw courseEcw course
Ecw course
 
Sound systems on linux
Sound systems on linuxSound systems on linux
Sound systems on linux
 
20230224021355113.pdf
20230224021355113.pdf20230224021355113.pdf
20230224021355113.pdf
 
pr900-dmr-repeater.pdf
pr900-dmr-repeater.pdfpr900-dmr-repeater.pdf
pr900-dmr-repeater.pdf
 
Input output ports and connectors
Input output ports and connectorsInput output ports and connectors
Input output ports and connectors
 
Input output ports and connectors
Input output ports and connectorsInput output ports and connectors
Input output ports and connectors
 
Analog & digital oscilloscope
Analog & digital oscilloscopeAnalog & digital oscilloscope
Analog & digital oscilloscope
 
Dukane projector glossary
Dukane projector glossaryDukane projector glossary
Dukane projector glossary
 
Analog to digital conversion
Analog to digital conversionAnalog to digital conversion
Analog to digital conversion
 
Expansion cards and slots
Expansion cards and slotsExpansion cards and slots
Expansion cards and slots
 
Ch 8
Ch 8Ch 8
Ch 8
 
Jiuzhou
JiuzhouJiuzhou
Jiuzhou
 
Dana Server Datasheet
Dana Server DatasheetDana Server Datasheet
Dana Server Datasheet
 
Multi Channel Multi Clock Frequency Speed Rate Real Time Industrial Standard ...
Multi Channel Multi Clock Frequency Speed Rate Real Time Industrial Standard ...Multi Channel Multi Clock Frequency Speed Rate Real Time Industrial Standard ...
Multi Channel Multi Clock Frequency Speed Rate Real Time Industrial Standard ...
 
Noaa reception
Noaa receptionNoaa reception
Noaa reception
 
Kathrein
KathreinKathrein
Kathrein
 

More from dimitar53

Sigma delta adc
Sigma delta adcSigma delta adc
Sigma delta adcdimitar53
 
V10164 010-0037-3
V10164 010-0037-3V10164 010-0037-3
V10164 010-0037-3dimitar53
 
Nanotech handbook
Nanotech handbookNanotech handbook
Nanotech handbookdimitar53
 

More from dimitar53 (6)

Sigma delta adc
Sigma delta adcSigma delta adc
Sigma delta adc
 
Avto0232
Avto0232Avto0232
Avto0232
 
2 p4b 0786
2 p4b 07862 p4b 0786
2 p4b 0786
 
Ush2127
Ush2127Ush2127
Ush2127
 
V10164 010-0037-3
V10164 010-0037-3V10164 010-0037-3
V10164 010-0037-3
 
Nanotech handbook
Nanotech handbookNanotech handbook
Nanotech handbook
 

Recently uploaded

Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 

Recently uploaded (20)

Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 

Extending soundcard

  • 1. Extending the soundcard for use with generic DC sensors Demonstrated by revisiting a vintage ISA design Smilen Dimitrov Aalborg University Copenhagen Lautrupvang 15 DK-2750 Ballerup, Denmark sd@imi.aau.dk ABSTRACT ers as part of surround sound home entertainment systems. The sound card anno 2009, is an ubiquitous part of almost Specialized soundcards with multiple inputs and outputs, any personal computing system; what was once considered and full duplex (playback while recording) capabilities, have a high-end, CD-quality audio fidelity, is today found in most found use in music recording in professional and home stu- common sound cards. The increased presence of multichan- dios. Soundcards interface as add-ins to PCs through several nel devices, along with the high-resolution sampling regime, busses, serial (USB, FireWire) or parallel (ISA, PCI) in na- makes the sound card desirable as a generic interface for ture; although they are increasingly found integrated in PC acquisition of analog signals in prototyping of sensor-based motherboards. music interfaces. However, due to the need for coupling ca- A slightly different type of devices become increasingly pacitors at a sound card’s inputs and outputs, the use as a popular with the academic and DIY community as A/D generic signal interface of a sound card is limited to signals interfaces for utilization of sensor signals. Programmable, not carrying information in a DC component. Through a re- micro-controller based devices such as the open-source Ar- visit of a card design for the now defunct ISA bus, this paper duino [1], that offer both A/D conversion and PC connec- proposes use of analog gates for bypassing the DC filtering tivity (through, for instance, USB), provide a relatively easy input sections, controllable from software - thereby allowing way to interface with a variety of off-the-shelf sensors, from for arbitrary choice by the user, if a soundcard input channel popular software development environments such as PD, is to be used as an generic analog-to-digital sensor interface. Max/MSP, or Processing. However, these devices are also Issues regarding use of obsolete technology and educational more limited in regard to sampling quality: for instance, the aspects are discussed as well. Arduino offers 6 multiplexed channels of 10 bit resolution, and the maximum serial transfer speed via USB is limited to 115200 bps - which results with a theoretical best-case Keywords upper limit of 1800 Hz sampling rate for all channels (given Soundcard, Sensors, ISA, DC a 64 bit frame is used to transfer analog data of six channels @ 10 bits). 1. INTRODUCTION Because of these limitations, a lot of prototypers and de- signers opt for a sound-card as a sensor A/D interface in- The ”humble” beginnings of the soundcard1 as a dedi- stead. This also relieves the designer of worrying about cated part of a PC system intended to produce audible specifics of serial communication, and up-sampling the sig- sound, could be seen in the use of a timer circuit Intel nals so they match the audio domain processing rate, when 8253, to generate pulses in the audible frequency range and sensor signals are to be applied to sound in software. How- drive a speaker, thereby producing audible sound [20]. Since ever, since a typical soundcard filters out frequencies outside then, the PC soundcard has become a multichannel A/D of the audible 20Hz - 20KHz range, both on the input and interfacing device, able to work at CD quality (16 bit / 44 the output, its use is limited with those sensing devices that KHz) rates and above. Devices offering more than two out- produce output in this range. A soundcard has been in use put channels are commonly used to drive multiple speak- by Leroy et al for capturing optical pickups [12], or as phys- 1 ical computing interface in context of artwork production Ignoring earlier occurrences, such as the SID sound chip on a Commodore 64 (whose sound was provided as part of [10]; but its use can go beyond musical applications - such a TV output signal) and similar as chemical analysis [15] or medicine [17]. The DC filtering problem is most apparent with sensors that encode some useful information in the DC level (such as a force-sensitive voltage divider, which would provide pres- sure as a DC level, or an accelerometer, which would show Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are the influence of gravity as change of DC level). A common not made or distributed for profit or commercial advantage and that copies way to circumvent this limitation is to use the DC signal to bear this notice and the full citation on the first page. To copy otherwise, to modulate a sinusoidal carrier in the audio range (using AM republish, to post on servers or to redistribute to lists, requires prior specific more often than FM), capture the modulated signal using a permission and/or a fee. soundcard, and then demodulate in software [8]. In case of Copyright 2009 Copyright remains with the author(s).
  • 2. resistive voltage dividers, they can be driven directly by an AC signal (conveniently, a sound-card can generate a sinu- soidal signal for the purpose), in which case the output will conform to the soundcard input limitations. Arguably, there would be some loss of information when using this method - especially if the modulating signal has a spectrum extending above half the the carrier frequency; also, software resources Figure 2: Capture of a battery being connected (at are spent in demodulating a high-speed audio signal, in ad- 1.5s) and disconnected (at 4.5s) to a sound card mi- dition to applying the demodulated signal as a control signal crophone input in Audacity software. in the application. On the other hand, direct modifications to commercial sound cards - intended to bypass input sections and allow connected, and a negative one when it is disconnected. This sampling of DC signals - have also been proposed [14]. In paper proposes that obtaining DC signals could be achieved similar fashion, this paper proposes that by using software- by implementing a voltage controlled switch, ultimately con- controlled analog gates, filtering sections at soundcard in- trolled by software, that bypasses the entire input filter sec- puts can be bypassed - thereby allowing for user-configurable tion, as shown on Fig. 3: possibility of designating chosen inputs as ”sensor” inputs. This relatively simple architectural change, would allow for Control both high-fidelity acquisition of DC signals, as well as reuse of common software tools made to interface with sound- cards. To test this assumption, a vintage ISA (Industry S Standard Architecture) design has been implemented, along with a corresponding C program - discussed further on in this paper. Input C ADC R Filter 2. PROBLEM OUTLINE A simplified input channel section of a sound card is shown Soundcard in Fig. 1: Figure 3: Simplified diagram of a sound-card input channel, with a controllable switch bypassing the Input input filter. C ADC R Filter A theoretical ideal switch would manifest resistances of either 0 or infinity Ohms, depending on the control signal - and could thus ideally decouple the input filter section. A Soundcard real switch will of course have finite maximum and mini- mum values for the resistance, and therefore some filtering of the input signal will still be present from the input filter Figure 1: Simplified diagram of a sound-card input section. In addition, one should be careful, as not all digi- channel. tally controlled switches can be used for the purpose - many digital switches will also function as comparators (i.e. will In Fig.1, a basic CR high-pass filter schematic is taken aim to reconstruct a digital signal); since in this case, ana- to represent a simplification of input filters usually found in log signal is being switched, analog a.k.a. bilateral switches soundcards, in order to emphasize the filtering of DC sig- (gates) will be appropriate for the purpose. nals. To illustrate this influence, a simple experiment can be performed: a stereo mini TRS connector can be plugged 3. TESTING PLATFORM in a microphone2 (or line-in) input of a soundcard, and the ground and a channel wire can be used to connect to a 1.5V In order to test the assumption given in the problem out- battery. If we try to capture the resulting input data us- line, a hardware platform needs to be chosen, that behaves ing audio recording software (such as Audacity), we would essentially like a sound-card - but also allows for demonstra- obtain a capture like the one shown on Fig. 2 tion of activating added analog gates via software. Primarily Instead of obtaining a constant (DC) level in the time pe- because reverse-engineering an off-the-shelf soundcard de- riod between approx 1.3s and 4.5s on Fig. 2, what is shown vice to behave as imagined would have been problematic, is a typical signature of a high-pass filter in the time do- but also due to potential educational benefits - a DIY im- main - a positive spike at the moment when the battery is plementation of a soundcard design was sought instead. Although the Internet does offer some information and 2 Note that most recent PC microphone inputs are designed tutorials on building basic extension cards for a PC - inter- to interface with electret microphones, which means that one faced through either USB, ISA or PCI buses - it is difficult of the channels of a stereo jack is in fact used to supply 5V to to find an available design, which is specifically intended the electret mic; so the input is effectively mono - although some sound cards can sense the device being plugged in, to represent a sound card (or even a high-speed A/D con- and switch from electret regime to stereo. Here a built-in verter). The only one found appropriate for the purpose, is microphone input of an Asus EEE PC900 netbook was used. the design for a ISA extension card by Joe D. Reeder [18]
  • 3. - a now abandoned product, that was intended for learn- ing voltages on the 20 address pins of the ISA bus, usually ing the essentials of software-controlled hardware. Since the marked as A0-A193 . The PC notifies devices when they can schematic and the basic software code, related to this card, act on the given address, by lowering its Address Enable line are still available on the website associated with this prod- (usually marked AEN4 ). Using an address decoder circuit on uct (www.learn-c.com), it was this design that was taken as the card, the card can produce a single digital trigger, when- a starting point for development. ever voltages corresponding to its own address are present The schematic for this “Learn-C” ISA card was reim- on the bus (not all 20 address pins are necessary for this, plemented as a double-sided PCB, with an added CD4066 though). So, whenever the card’s address is present on the CMOS quad bilateral switch. Since the ISA bus is now ob- address line, and the AEN signal is taken low, the card is to solete and cannot be found in modern PC systems, an older respond by checking whether the PC wants to read or write PC based on an Elitegroup ECS P6VAP-A+ (or P6VAP-AP) - and act accordingly; in all other cases, the card must ap- motherboard was acquired. This motherboard from 2000 pear electrically as a high-impedance circuit to the ISA bus features a single ISA slot, however the age of this PC as a circuitry. The PC notifies that it wants to read by taking whole caused some specific problems, which forced an in- ISA’s Input/Output Read pin (marked IOR5 ) low; intent to quiry into alternatives for the booting process for the ma- write is provided by taking ISA’s Input/Output Write pin chine. Code in C language from [18] was used to implement (marked IOW 6 ) low. Typically, if a digital line is activated test software, and Agilent 54621a oscilloscope was used to by taking it to a low electric level, it is known as “active capture signals on board - using the open-source agiload low”. package for transferring oscilloscope traces to a PC as raw These signals (A0-A9, AEN, IOR and IOW) are in fact data. The experiment finally consisted of using a vintage “the minimum set of signals that must be used in an inter- Wavetek model 145 signal generator to produce an approx. face design[13]”. Exchange of data between the PC and the 440 Hz sinusoid voltage with a DC offset level, and captur- device occurs through the 8 data pins of the bus, D0-D77 . ing this voltage with the “Learn-C” card and test software Besides an address decoder, a minimal ISA interface card on disk. As the test software allowed for user-controlled would also need a data transceiver circuit, for electrical de- activation of the bilateral switches, these were alternately coupling of circuits on board from the ISA bus - as well as turned on and off during capture - and the captured signal target digital devices, such as A/D or D/A converters, that was observed in the open-source Audacity software. the PC ultimately communicates with through the bus [23]. 3.1 ISA bus principles 3.2 ISA hardware implementation Let us reiterate some basic principles of the ISA bus inter- The original schematics for the “Learn-C” ISA card found facing, before proceeding with the implementation details. in [18] was rebuilt using open-source KiCad software (Fig. 4); In essence, we can distinguish between serial and parallel the same software was also used to produce the PCB layout. hardware interfacing modes; RS-232 being an example of conceptually simple serial protocol, and IEEE 1284/Cen- tronics of a parallel one. A serial protocol transmits one bit at a time, and electrically needs at least three wires: one for transmission, one for reception and ground. A parallel protocol will use individual wires to represent a single bit - and can hence carry more than one bit at a time, but needs as many wires as there are bits in the word, plus a ground wire. In some dialects of C, interfacing with either type of protocol could have been achieved with commands like void outportb(unsigned short port, unsigned char data). When outportb executes, the address given by port will eventually activate the corresponding interface circuitry, and the value data will be “written to the port”. Roughly Figure 4: KiCad schematic of the ISA card; em- speaking - in case of serial, this would mean alternating the phasized dashed lines indicate connections of bipolar voltage between low and high levels (say -12V and 12V) on switch (In electronic PDF version, zoom in for more detail). the transmit wire, with a rate specified by the serial trans- fer speed, such that a BCD binary representation of data The design on Fig. 4 relies only on the ISA bus power is reproduced; in case of parallel, this could mean that each supply pins 1, 3, 5, 7, 9, 10, 29, 31 (GND, +5V, -5V, -12V, of the wires of the parallel bus is set to a low or high volt- +12V, GND, VCC, GND) as well as ISA pins 2, 13, 14, 20, age (say 0V and 5V), corresponding to which bit in the BCD 33-40, 42, 53-62 (RESET, IOW, IOR, OSC, D0-D7, AEN, representation of data a given wire represents. A command A9-A0). The pin RESET goes high during power-on, and is like unsigned char inportb(unsigned short _port) could used for device initialization, whereas OSC is the ISA system be used to “read from a port” into a variable instead. oscillator, typically at 14.318 MHz. ISA address pins A0-A2 The ISA bus (like the current PCI) is a parallel peripheral are first buffered using a 74LS244 (3-state octal buffer/- bus. It has occurred as either PC/XT-bus, an 8-bit bus imple- 3 mented physically as 62 pin port; or PC/AT-bus, a 16 bit bus, pins 62-43, or 31-12 on the bottom side 4 physically containing a PC/XT slot’s 62 pins and additional pin 42, or 11 on bottom side 5 36 pins (total of 98 pins). The operation principles can be pin 14 - on top side 6 discussed only using the PC/XT slot. The PC will address pin 13 - on top side 7 different devices on the ISA bus, by setting up correspond- pins 40-33, or 9-2 on the bottom side
  • 4. line driver) circuit, and then used for selecting a particular channel from the ADC from software. Address decoding of A3-A5 is performed using 74LS138 (3-to-8 line decoder/- multiplexer), and used to select among the different devices on the card (the DACs or ADC, for instance). Address decoding of A6-A9 is performed using 74LS688 (8-bit mag- nitude comparator), comparing these pin voltages to a state set by a DIP switch - which allows for manual setting of the card address using the DIP switch. Additionally, 74LS245 (3-state octal bus transceiver) takes Figure 5: Left: image of the wired card; right: card care about buffering D0-D7 for use by the ADC or DACs, in ISA slot of motherboard of test PC. depending on whether the PC is not in a read operation, by providing the correct impedance for each direction (towards or from the PC); a 74LS393 (dual 4-bit binary counter) di- in a project like this - and initially, it wasn’t. The PC used vides the OSC system oscillator signal frequency, providing for testing, apart from the P6VAP-AP motherboard, offered 1/16th of the frequency (about 894 KHz) as a clock signal a Pentium III 750 MHz processor, a broken floppy drive, a for the ADC. Most of the logic circuits are from the 7400 se- working IDE hard-disk, a working but slow CD-ROM, and a ries, working with TTL signal levels (0 and 5V). Besides working network card. The hard disk contained Windows XP the two DAC0832 (8-bit µP compatible, double-buffered operating system, which was initially used for development D/A converters) and ADC0809 (8-Bit µP compatible A/D - since the original source code in [18] is meant to run under converter with 8-channel multiplexer) ICs, a 8255 (general MS-DOS. purpose Programmable Peripheral Interface (PPI)) is also Unfortunately, in the middle of the project, the hard-disk present - and used in this test setup as a simple digital out- became unusable, apart from the very first sectors - and at put switch, which eventually activates the CD4066 analog the same time, it was impossible to obtain a replacement gate. Finally, an input, “mic” analog preamplifier/filter is quickly. This turned the test PC into a, essentially, disk- present for the input signal; as well as output amplifiers/fil- less machine, which cannot reliably boot a full desktop op- ters for the DAC outputs. erating system in the standard manner (from a local hard As shown on Fig. 4, most of the original design of the drive). Therefore, several alternative booting procedures “Learn-C” ISA card has been reproduced, although with were looked into. The final setup is shown on Fig. 6: some differences. For instance, a socket for the CD4066 switch was added, and not all wired connections were im- plemented on the PCB (for instance, headers were left un- connected, as well as most of the I/O port pins of the 8255 PPI). On the other hand, both DAC0832 digital-to-analog converters were implemented8 . To avoid problems with over-etching thin tracks, the lay- out was deliberately taken to feature thicker tracks - this, however, made it very difficult to implement the entire de- sign as a double-layer PCB. Hence in some instances (like the digital input pins of the DACs), holes were left on the board, intended to be connected with parallel wire. The board was thus easy to etch, but somewhat difficult to solder - as plenty of wire had to be soldered by hand. In addition, IC sockets Figure 6: Boot setup between the diskless test PC were used, to avoid possible problems with soldering ICs di- (hosting the ISA card), and a tftp server PC. The rectly; however, since IC sockets to not expose enough pin test PC starts the boot from CD, and then proceeds metal for double layer soldering, pins were obtained from to boot an OS image from the server PC. additional IC sockets9 , and added as an extension to the used socket pins. This solved the double layer IC soldering The easiest, and increasingly popular, alternative would issue, however it also further complicated the geometry and be to attempt a boot into MS-DOS (which would still allow access to the card. The implementation of the card is shown for running of the card’s test programs) from a USB thumb on Fig. 5. drive. This would allow for testing of the card software com- The PCB layout had unfortunately some errors as well piled elsewhere, in spite of the test PC lacking the possibility (like missing tracks), which additionally complicated the im- to compile programs. Unfortunately - unlike most modern plementation phase. However, once found, these errors were desktop PCs - the P6VAP-AP does not natively (from BIOS) relatively easy to correct on the board itself (due to the de- support booting from a USB device10 . liberate design with larger tracks, which allowed for direct So, since the initial sectors of the hard-disk were still in user intervention). order, Mandriva 2008 was installed on this hard-drive from a live CD, in spite of getting a corrupt installation as a re- 3.3 Host PC and booting process sult - simply to get the GRUB boot-loader software installed. The PC booting process would normally not be an issue The GRUB could then chainload (further boot into) the PLoP 8 [28] boot manager software, which can detect bootable USB although only a single one is actually used. 9 10 only open-frame, round-pin type sockets can be used for not even with the latest BIOS update for this motherboard, this purpose released in 2003.
  • 5. drives on older machines, even if their BIOS cannot - and and then compile the executables on the server machine, further chainload (boot) from them. This unfortunately copy them to the share, and execute new versions on the does not work with all USB flash drives - PLoP couldn’t boot test machine - without the need for a reboot. from a TakeMS 4 GB USB memory key, while it could boot Some issues around the network boot were: the need to from a generic brand 128 MB memory stick. However, even have both test PC and server connected to the same net- a working USB thumb drive doesn’t seem to last long - af- work switch; the need for the tftpd server to assign IP ad- ter a series of copying operations, the 128 MB stick stopped dresses in the same range as the IP address the server PC being bootable from PLoP on the older test PC (although it itself obtains from a master DHCP server; and the need for remained directly bootable from newer PCs), and it had to folder sharing under password-less accounts under Win XP be reformatted. (since the net command on the BFD disk image does not sup- The boot managers can usually be sensitive to CHS (cylin- port Windows XP account password authentication). The ders/heads/sectors) disk geometry entered as part of the network boot method could be, in principle, used to serve formatting process - even though no such organization ex- any bootable image, not just an MS-DOS one; for instance ists on a physical level in a flash drive. Using Gparted to the open-source FreeDOS might be an alternative - unfortu- format a drive as FAT32 with ”cylinder rounding” is one nately it lacks a free equivalent of the net command, and of the safer methods; however, it is difficult to get such a hence cannot establish network connectivity on its own. An- USB thumb drive directly bootable as a MS-DOS drive after- other alternative is to use a Linux bootable network disk. wards11 . Here a different approach was used instead: QEMU, For the Linux operating system, initially the nanobox an open-source processor emulator, was used to virtually linux [25] network boot disk was tried out. Using the de- boot from an MS-DOS floppy image, and to virtually mount fault floppy disk image of nanobox can be easily served with the USB thumb drive as a hard drive of the virtual machine. a tftpd server - however, it lacks the smbmount command, This can be achieved with the following command in a Linux which is closest in functionality to DOS’s net use. There OS: are resources available on the web page for producing a ver- sudo qemu -L / usr / local / share / qemu / - fda / sion with smbmount - however, that still does not make this path / to / WIN98SEC . IMG - usb - hda / dev / OS suitable for test of the card. Linux systems are based sdc - boot a on different supporting libraries; whereas typical Linux sys- tems are built on glibc (GNU C library), nanobox is built Then the entire USB thumb drive can be formatted and on a small embedded C library known as uClibc. This made bootable from within MS-DOS - and this seems to en- means that the software source code must be recompiled sure both successful booting into MS-DOS from managers for the corresponding C library of the OS (or supply the such as PLoP, and usage of the entire free disk space of the missing objects, risking compatibility problems). As it can thumb drive12 . In the end, this method proves tedious too, be difficult to set up the, needed for compilation, uClibc especially for development - since MS-DOS typically doesn’t build toolchain on a nanobox system with only a remote offer network connectivity, the only way to transfer exe- drive mounted via smbmount - an easier solution was found cutable files to the test machine requires that the thumb in using a Damn Small Linux (DSL) [4] distribution. This drive is removed (and therefore the test machine rebooted) distribution (based on KNOPPIX Linux distribution), while each time a new file is to be tested. offering a GUI, is only 50 MB in size, which makes it suit- Finally, the booting method settled on a network boot, able for a network boot (since the entire operating system also known as Preboot Execution Environment (PXE), as image is generally loaded in RAM in such cases); addition- most convenient. The test PC’s network adapter is 3COM ally, there are Internet resources specifying the booting of 3C905-TX, which features an empty slot for an add-on KNOPPIX based systems using tftpd server; and finally, al- boot ROM. If it had a PXE boot ROM, the test PC could though small, Damn Small Linux is extensible with prebuilt have booted over the network without any need for addi- packages, including the GNU C compiler gcc and debugger tional software, since the P6VAP-AP supports network boot gdb - and these can also be used from a local network loca- directly from BIOS - but only if the network adapter sup- tion. Thus, it becomes relatively easy to compile the card ports it too. Therefore, the test PC was set to boot from software, and run it under a DSL distribution. CD-ROM, and a rewritable CD was “burned” with the open- The most typical problem with these Linux OS’s on a disk- source gPXE [6] network bootloader image. Of course, net- less machine, is accessing Windows network shares. Typi- work booting demands a server as well - a Windows XP ma- cally, the smbmount command can be used with the following chine was used to host the open source tftpd32 [22] server, syntax: which in turn was used to serve an image of an MS-DOS net- work disk (built using the Build Floppy Disk BFD [26] soft- mount -t smbfs // mypc / myshare / local / mount ware). Once the test PC is booted in a networked MS-DOS / dir environment, it is relatively easy to mount a remote Win- dows share on the server through the net command: where mypc is the computer name under Windows of the re- mote PC. However, using this name is not always successful net use X : mypc myshare (especially if the domain information is not set in the Linux 11 In such a case, Grub4DOS can be installed as a boot-manager PC); in most cases, using the IP address of the PC instead, on the flash drive, which has the capability to boot a MS-DOS helps. In DSL Linux, installing its samba package will also floppy disk image (stored on the flash drive) directly to mem- provide a graphical LinNeighborhood program which allows ory. 12 in this case around 120 MB - other methods for achieving for automatic discovery of PCs and shares on the local net- the same can “force” the USB flash drive to behave like a work; however, the exact user-name, password and domain diskette, along with only 1.44 MB as entire capacity of the as the current Windows logged-in user are needed in order disk to access a share on a Windows PC.
  • 6. 3.4 Software considerations taken in the software, and additionally, the As mentioned previously, the source code for the “Learn- DACs do not depend on a clock signal - we can expect that C” ISA card given in [18] is C code, originally intended the test PC will simply try to write the ramp values, as to run under MS-DOS (as part of this project, portions of soon as it can, to the ISA card DACs; without previous that code were ported to Linux as well). The “Learn-C” experience, one could speculate that this could result even example programs can also run in the command prompt with a hypersonic wave being generated by the DACs. To shell of Windows XP - however, they cannot be directly confirm this, the output analog signal was captured with an compiled with modern Windows C compilers. The reason oscilloscope (shown on Fig. 7). for this is that the code relies on C commands like inportb and outportb (or inp and outp), which represent direct I/O port access13 ; however direct I/O port access is disabled for Windows architectures newer than NT [19]. Nonetheless, older compilers can be employed in order to compile the test programs for the ISA card - so they run even under Windows XP. Currently, Borland’s historical compil- ers Turbo C v2.01 and Turbo C++ v1.02 are provided at no cost - both of them can be installed under DOS or Windows, and can compile the ISA card test programs. However, there is another option as well - the open-source DJGPP compiler [5]; although there are some subtleties in switching from a Borland to a DJGPP compiler, the process is almost straight- forward. Figure 7: Agilent oscilloscope screen capture of the The first piece of test software run, was the C code ex- output DAC signal, after amplification (obtained us- ample from [18] (experiment 8 ) which controls a DAC, and ing agiload software). outputs a triangular wave analog sound. The core of the code is relatively simple: The DAC output signal on Fig. 7 is well in the audi- disable () ; ble range (which can be shown by connecting a speaker to while (! kbhit () ) the output, and hearing the output). The agiload soft- { ware can also obtain a scope capture, like on Fig. 7, as a for ( x =0; x <256; x ++) { outp ( da1 , x ) ; } list of 2000 floating point voltage values; this list can be for ( x =254; x >0; x - -) { outp ( da1 , x ) ; } __asm__ (" sti ") ; // required by DJGPP used to obtain more precise locations of local minima, and } thus more precise period. Using this method, we arrive at enable () ; a period of approximately T=876.5 µs (or f=1140 Hz DAC frequency), which means that the time between consecutive Listing 1: DAC code outp(da1,x) commands in listing 1 (which involves check of for loop condition, increase of counter x value, and the ac- In essence, as long as no keyboard presses are detected, tual outp command) is about 1.7 µs. Since the same tempo- the code will loop two for loops, that generate a ramp of all ral granularity occurs for test programs under both MS-DOS 8-bit values - from 0 to 255 and then back - and write those and Linux environments, and is somewhat similar regardless values to a DAC. Here is one difference that can be seen of interrupt disabling - it is likely that this limit is imposed between DJGPP and Borland compilers: DJGPP for some rea- by a more fundamental problem (such as incompatibility son cannot detect a keyboard press, if the kbhit command between bus requests timing, and relaxation time of the the is encapsulated between enable and disable commands - DAC chip or similar device - similar to the 8530 latency unless the assembler command __asm__("sti") is added at problem described in [9, pg. 809]). the end of the loop [7]. Also, whereas Borland compilers will produce executables some 15 KB in size, the DJGPP com- piler generates 117 KB executables for the same source code. 4. TESTING PROCEDURE Finally, “raw” executable from DJGPP will complain about The testing procedure consisted of two distinct steps. The “cannot open swap file c:cwsdpmi.swp”, although the first was to use a known signal to determine the sampling software will run - the way to work around this is to use rate of the ADC; and to check whether this rate is cor- the exe2coff, cwsdstub and cwsparam programs from the rect (by auditorily comparing a capture from the ISA card’s DJGPP distribution, to explicitly set the swap file used by the ADC to the known signal). The second step (the actual executable to none. experiment) consisted of sampling and capturing a known, It is interesting to observe the frequency of the eventually DC-lifted, sinusoidal signal; turning the analog switch on produced analog signal - since there are no explicit timing and off during capture; and looking for presence of a DC level recording when the switch was active in observations 13 These C commands are in fact interface for the assem- of captured data. bler commands IN and OUT, which otherwise represent core commands in the Programmed Input/Output (PIO) trans- 4.1 Determining the ISA card sampling rate fer mode [23]. Since PIO (as opposed to Direct Memory As the DAC sampling rate discussion hints, determining Access (DMA)) involves the processor in every transaction of data between the PC and the peripheral devices on the bus, the ADC sampling rate will also involve some work. A it suffers from performance issues, which is why it is being known reference signal - a 440 Hz sinusoid - was generated phased out where fast devices are involved [27]. using Audacity with the maximum amplitude, and repro-
  • 7. duced using a sound-card headphone output; this signal was applied directly to the ADC’s first input (pin 26). Since the headphone output spans from -1.65 to 1.65 Vpp, and ADC0809 operates ratiometrically against a voltage reference set to 5V - obviously only the positive semi-period of the si- nusoid will be captured. This distortion, however, would not affect the fundamental frequency seriously – which means that the captured signal’s pitch should remain audibly close Figure 8: Oscilloscope screen captures of EOC (top) to the pitch of the original sinusoid. vs IOW (bottom). Left: 100 µs of non-periodic be- The starting point was again code from [18] (experiment havior; right: 1 ms of periodic behaviour. 9 ). Auditory comparison requires that the test software is able to record captures on disk, which is done relatively easy by adding the fputc C command to write the 8-bit mands (such as printf or fputc) from the ADC reading loop data (obtained from the ADC) to disk - as soon as it is code, IOW started firing and EOC stabilized its frequency - available. However, initial captures for several seconds of which is shown on Fig. 8 right. The execution of C com- capture time were only few thousand bytes in size - which mands thus visibly influences the sampling rate of the ADC meant something was wrong with the ADC sampling rate. process. Eventually, it turns out that this can be resolved by Let’s briefly review the principle of work of the ADC: we introducing a short delay between the outport and the first already mentioned that the ADC chip is addressed through inport command in the reading loop, as shown in listing 2: 10 bits of the ISA address line: A9-A6 determine the card, unsigned base; unsigned adcport; base = adcport = A5-A3 determine the ADC chip (through the 74LS138 de- 0x200; //1000000000 coder) and A2-A0 determine the input channel on the chip if ((fp = fopen(FILENAME,"w+b")) != NULL) { to read from; the base address is this case was 0x200 while(!kbhit()) (1000000000). If the PC does a write (outport) on this ad- { outp(adcport, 0); // start channel 0 conversion , by dress, IOW line is activated. In that case, pins of 74LS02 are writing whatever value to address adcport set to: 74LS02/p1=”1” and 74LS02/p4=”0”. 74LS02/p1 iz = del; while (iz > 0) iz--; // fake delay , ’ del ’ being high enables lines START (ADC0809/p6) and ALE (ad- increments dress latch enable, ADC0809/p22), to notify the ADC to while(!(inp(adcport+0x18) & 0x80)); // wait for EOC process analog input channel based on the brought A2-A0 ready : 0 x18 = 000011000, 0 x80 = 010000000 lines. 74LS02/p4 being low disables line OE (out enable, x = inp(adcport); // read ADC value into variable x fputc((char)x,fp); // since value is 8− bit anyways , ADC0809/p9). Thus, analog-to-digital conversion in the just cast to char and save to disk chip starts during a write operation, but the chip’s digital } output pins are not yet enabled at that moment. If the PC } does a read (inport) on this address, IOR line is activated. In that case, pins of 74LS02 are set to: 74LS02/p1=”0” and Listing 2: ADC reading loop code 74LS02/p4=”1”. 74LS02/p1 being low deactivates START Additional code made it possible to interactively change line (however this does not stop an already started ADC the value of the del variable, and thus the duration of the process) and ALE; and 74LS02/p4 being high enables line delay. It was discovered that for values of del greater than OE, which makes ADC0809 output the last finished sam- 8102, the EOC signal settles its period as on Fig. 8 right - and pled result. Once started, the ADC works in sync with the furthermore, in this case, commands like printf or fputc OSC/16 (about 894 KHz) clock signal, finishing with the EOC didn’t seem to affect the EOC period as seriously. This need (END OF CONVERSION) signal. Upon EOC, we should for a delay occurs for test programs running both under have the digital sample value ready, laid out on BD0-BD7 Windows and Linux environments (and it’s likely it is re- pins of ADC0809. lated to timing inconsistencies between the bus and the card So, from the PC side, we always have to do an outport hardware). Using the data captures of oscilloscope traces, to start the ADC process, then wait for the EOC signal, and the period of the EOC signal while capturing to disk was de- then an inport to obtain the digitized value. Waiting for termined to be around 78.583 µs, which gives around 12725 the EOC signal is implemented by reading from the base Hz sampling frequency. As listing 2 indicates, the recorded address plus 0x18 (0000011000), which sets address lines file is simply a stream of 8-bit characters. This file can be A3-A4 to ”11” and thus makes the decoder select the line imported in Audacity as raw data, and the sampling fre- EOC/SWITCH SELECT (74LS138/p12) instead of line quency is set upon import; the resulting waveforms can be ADC SELECT (74LS138/p15). This eventually causes the seen on Figure 9. 74LS244 to map the EOC signal to BD7, which is then routed The multi-track capabilities of Audacity also allow the to the D7 data pin of the ISA bus through the 74LS245 original 440 Hz source signal, and the ADC captured sig- transceiver. So, from software, we would simply wait - un- nal from the ISA card, to be played simultaneously in spite til the value, read from base address + 0x18, gets its 8th of differing sampling rates; their respective pitches can be bit set to 1 (which is easily done by bit-masking with 0x80 heard as audibly close. It was difficult to determine by hear- (010000000)). Hence, a more precise way to obtain the sam- ing whether the obtained 12.725 KHz sampling rate truly pling rate, would be through determining the period of the produces a pitch closest to the original source signal, as EOC signal. However, initial observations of the EOC signal Audacity doesn’t offer a way to modify the sampling rate of showed problems, shown on Fig. 8 left. an audio file interactively while the sound is playing. Figure 8 (left) shows that EOC is not periodic; addition- ally, IOW never fires. However, by removing extraneous com-
  • 8. targetpin = 0x80; if ((fp = fopen(FILENAME,"w+b")) != NULL) { while( (ch == ’p’) ) { if (kbhit()) { ch = getch(); //windows only , conio . h if (ch == ’p’) { outval = !outval; // toggle value ov = targetpin * outval; // shift Figure 9: Display of captured ADC signal imported printf("outval is now %d (0x%X=%d).n", outval, ov, ov); in Audacity, interpreted as signed (top) or unsigned outp(ppi_porta, ov); // write value to PPI (bottom) 8-bit data. The portion on the right shows } a temporally zoomed slice. } outp(adcport, 0); // start channel 0 conversion ... // [ snip rest of code ] ... 4.2 Test of analog switch functionality } // end while , reading loop As mentioned previously, a CD4066 was used to imple- Listing 3: Toggling PPI pin 37 via press of key ’p’ ment an analog switch, which bypasses the input preamp/- filter section of the ISA card. This chip offers four analog Listing 3 allows that a press on key ‘p’ toggles the out- switches - only a single one was used, defined by pins 1 and put voltage of 8255/p37 between 0 and 5V, which in turn 2 and switch connectors, and pin 13 as voltage control. Us- turns toggles the analog switch on or off via CD4066/p13. ing a pocket digital multimeter, the resistance of the channel Otherwise, the switch terminal CD4066/p2 is connected to (between pins 1 and 2) was measured. With the PC powered ADC0809/p26; and CD4066/p1 is connected to input of off, 25.6 KΩ were measured; however, with the PC powered the mic preamplifier (input pin of capacitor C1 on Fig. 4). and the program running, this resistance was measured at 0 Thus, using the analog switch, the entire input preamplifier Ω for closed switch, and greater than 2 MΩ for open switch; can be bypassed by a key press - while the software records which is a good sign that the device will behave close to an the ADC samples to a disk file. Then, if a signal with a DC ideal switch when in use. Of course, there is the question of level is present on the preamplifier input, the toggling of the how to target the voltage control pin of the bilateral switch switch should be visible on a recorded capture. (CD4066/p13). The 8255 PPI on the ISA card was used for the purpose, as it offers three ports (A, B and C) of 8 5. RESULTS pins each, which can be configured to act as either digital The procedure described in section 4.2 was used to capture inputs, or digital outputs; it additionally has an 8-pin data a DC offset sinusoidal signal. This signal was generated by a port, through which all the communication with the chip is vintage Wavetek model 145 signal generator, which doesn’t performed. Just a single output pin is needed from a single provide for fine-tuning control of the AC amplitude and the port, configured as output, in order to control the analog DC offset separately. Eventually, a signal spanning between switch; pin 7 of port A (8255/p37) was chosen for the pur- 0.5V and 1.66V, set at approximately 450 Hz, was used as pose, and was connected to CD4066/p13. The 8255 offers the input signal for ADC capture. The signal arriving at the three different modes of configuration of the three ports; input pin ADC0809/p26, without and with the influence here any mode that configures port A as output will do, of the switch, is shown on Fig. 10. and the function set up ppi from [18] was used to quickly configure the ports. The ISA bus address lines A0, A1 are eventually routed to the two address pins of 8255 (p8 and p9), which are used to choose which internal 8255 register is targeted through the data pins. The control register is accessed when A0=1, A1=1 (or, the base address of the 8255 + 3 appears on the ISA bus), and can be used to configure the PPI; the port A register is accessed when A0=0, A1=0 (or, the base address Figure 10: Oscilloscope screen captures of the in- of the 8255 appears on the ISA bus), and can be used to put signal brought to ADC0809 IN0 (left) without read from port A - or turn individual pins on and off if the influence of analog switch; (right) while analog configured as output. Eventually, this was coded within the switch turned on ADC reading loop, so as to allow 8255/p37 to be turned high or low at the press of the button. The key elements It should be noted that the input section of the ISA card, of the code, integrated with code on listing 2, are shown on features a small voltage divider, formed by VR1 and R3 (Fig. 4), listing 3: used to offset an input signal (and thereby avoid clipping // make port A an output and port B an input − of signal with no zero offset). This voltage offset was set Aout CUin Bin CLin = 0 x1C0 to zero by tuning the VR1 potentiometer, in order to em- set_up_ppi(0x1C0); ulate accurately the DC filtering behavior of input section // 0 x200 = 1 000 000 000 of soundcards. Additionally, the amplification factor of the unsigned base; unsigned adcport; base = adcport = preamplifier section is fixed, and set by the ratio of resistors 0x200; // 1 000 000 000 + 0 000 100 000; A0=0, A1=0 R2 (4.7 MΩ) and R1 (3.9 KΩ) - which results with some 1200 unsigned ppi_porta = base + 0x20; times amplification. Such an amplification will clip the DC- int ch = ’p’; int outval = 0; int ov = 0; int offset input signal rather quickly, hence a 3.9 KΩ resistor
  • 9. was soldered in parallel with R2, in order to bring the am- needed) for strictly positive voltages when using an active plification close to 1 - and keep the amplitudes of the input switch. in both test cases equal. As per Fig. 10, that didn’t turn This project started by looking for a hardware platform, out to be a total success, yet it is close: the filtered signal that behaves essentially like a sound-card. Arguably, the has an amplitude of 1.14 Vpp, whereas the switched signal ISA platform used here cannot be even considered a sound shows 1 Vpp. card, until it can be used by typical audio software (like This input signal was captured using the procedure given players or editors) from the application level in an operating in section 4.2, as the analog switch was turned on and off system. Although the ISA card could be extended to play during capture using keyboard key presses. The data cap- back audio (encoded for the measured DAC frequency) - at tured by the ISA card can be verified through an import in the state presented here, it behaves more like a generic signal Audacity, depicted in Fig. 11. generator and sampler, than a modern soundcard. Finding a modern open hardware platform, that allows for the type of research as in this project, is still problematic; although FPGA based designs, such as the ones described in [11], are very promising as a base for miltichannel, high-speed, hybrid audio/sensor interfaces. Whereas it is utopistic to expect that this paper could significantly influence industry in such a manner, that simi- lar modifications become a standard for future sound-cards - it certainly aims to inspire designers working in the elec- tronic music instrument field, to focus at the intricacies of digital interfacing with analog signals; and to consider us- ing older, historic designs for appropriate purposes - while Figure 11: Top: Six second capture of an input being aware of potential obstacles. Mostly, one has to deal signal with DC, with the switch activated in mid- with hardware availability, although software can be an is- capture; Bottom: temporal zoom at moments of ac- sue as well. However, in the case of ISA, the paper shows tivating (left) and deactivating (right) the switch. that currently there is still a palette of tools that can tar- get such machines and corresponding functionality, many of As it is obvious from Fig. 11, activating the switch allows them free and open-source; yet, one has to be prepared for the DC level of the signal to be captured by the card’s ADC; a time investment for straightening out potential glitches. and the waveforms obtained in Audacity remain relatively Although the “Learn-C” ISA design was sufficient to illus- faithful to the original input signal shown in Fig. 10. trate potential use of analog gates, it is pointless to attempt to turn it into a full sound-card, primarily since the ISA bus 6. DISCUSSION is in itself obsolete. However, it may be interesting to look at the practical obstacles to it. The biggest problem with This paper indicates that analog switches bypassing the this design, and possibly with any design based on PIO mode input preamplifier section of sound-card inputs, would be a control of an ISA sound-card, is the difficulty in obtaining relatively simple change to perform on existing sound-card consistent and predictable timing. Neither the ADC input, designs, thereby expanding their purpose to high speed A/D nor the DAC output design outlined here haven’t taken a interfaces for generic sensors. Similar change could be im- particular timing goal into account; in both cases the sam- plemented for output sections, thereby allowing sound-cards pling rate had to be determined after the device was built to be used as generic signal generators. The DC blocking ca- and used. As an experiment, during development an at- pacitors are present in a sound-card, of course, for a purpose tempt was made to develop a PD object under Windows XP, - primarily to protect speakers from constant DC biasing, that would eventually be able to transfer digital audio data and thereby prolong their lifetime [24]. The design change streams played within PD to be passed and reproduced on proposed here, would ideally leave that regime unchanged the ISA card. PD objects are based on a so-called “perform” for audio purposes - and simply introduce a different one, function, which gets called by the OS repeatedly; the gran- more suitable for sensor data acquisition, when the user re- ularity of this perform function calls is about 1 ms. When quires it. a perform function is triggered, it has access to input and Unfortunately, the card’s implementation is of rather low output sound buffers, which contain a number of samples, quality, which results with a noisy input and output - obvi- corresponding to about a millisecond of audio. Hence, all a ous even from the oscilloscope traces provided in this paper. perform function would do, is simply write these values to Therefore it is difficult to make any claims beyond a simple the DAC of the ISA card as soon as possible; the DAC would demonstration of the concept - such as frequency character- also reproduce them as soon as possible, and then hold the istic of the preamplifier sections with a switch for both on last value for about a millisecond, until the perform func- and off states, or distortion introduced by the switch. How- tion gets called again. Thus, this particular ISA card design ever, the paper also shows that once a platform is available, simply cannot be driven by a standard PD object, in such a it is relatively easy to suggest modifications that would be way that audio is reproduced at the DAC output; because workable in practice - and that even vintage designs can be of the slow, millisecond, call rate of the perform function - used for the purpose. Still, many factors would still need to and the need to access the hardware directly via in and out be considered, before a final conclusion is made regarding commands during its execution 14 . implementation in modern sound-cards: for instance, how to preserve the bipolar voltage sampling capabilities when 14 in audio mode, while adjusting to the ADC input range (if This would be quite possible, if the ISA card had compo-
  • 10. In fact, Windows, apart from prohibiting PIO access via 8. REFERENCES inport and outport commands15 , also has millisecond gran- [1] Arduino. Arduino homepage, http://www.arduino.cc/. ularity built into the operating system [21]. Essentially, World Wide Web electronic publication. standard Microsoft C and C++ programs cannot be guar- [2] D. Beal, I. Ripoll, P. Pisa, L. Abeni, P. Gai, and anteed timed access beyond a millisecond granularity, unless A. Lanusse. Linux As a Real-Time Operating System. the Windows Driver Development Kit16 is used [3], which re- Metrowerks Corporation–A Motorola Company, quires a Microsoft paid subscription. Although Linux “is not OCERA, 2003. World Wide Web electronic a real-time system, it has some features, already included in publication, the mainstream source code or distributed as patch files, de- http://www.freescale.com/files/soft dev tools/doc/- signed to provide real-time to Linux” [2]; and since it allows white paper/CWLNXRTOSWP.pdf. for free development of device drivers, it could be seen as [3] M. Cherepov, M. Hirst, C. Jones, and M. Zimmerman. a viable alternative for work with designs, such as the one Hard Real-Time with Ardence RTX on Microsoft discussed in this paper. Windows XP and Windows XP Embedded. Technical Arguably, the ISA design used as a test platform here, report, Ardence, Tech. Rep. Also at doesn’t even come close to issues in contemporary sound- http://msdn.microsoft.com/en- card production. However, it is an excellent educational us/library/ms838340(WinEmbedded.5).aspx, tool to introduce general issues related to design of sound- 2002. cards and corresponding software. Namely, it is often diffi- cult for beginner engineers to come to a practical example, [4] damnsmalllinux.org. DSL information - What is DSL? which is both relatively simple to understand as introduc- (Damn Small Linux). World Wide Web electronic tory material (and thus easy to relate to theory) - and can publication, http://damnsmalllinux.org/, Last be practically implement to serve a purpose, already known Accessed: 12 April, 2009. DSL (Damn Small Linux) from a user perspective. So in spite of the obsolescence of homepage. ISA, this design can still be useful educationally - consider [5] D. Delorie. DJGPP - Homepage. World Wide Web that 8255, used as a central component of the now obsolete electronic publication, parallel PC port, in modern times finds implementation as http://www.delorie.com/djgpp/, Last Accessed: 12 part of VLSI circuits; similarly address decoders and similar April, 2009. logic circuits are likely to be found as components in FPGA [6] etherboot.org. start - Etherboot/gPXE Wiki. World design. One positive point of using discrete components in Wide Web electronic publication, the card implementation, is the possibility to measure their http://etherboot.org/wiki/index.php, Last Accessed: signals individually with an oscilloscope and thus observe 12 April, 2009. the interdependence of different signals on the physical, elec- [7] groups.google.com. Problem with tight kbhit() loop - tric level - something that becomes arguably difficult, if the comp.os.msdos.djgpp. World Wide Web electronic components are part of a single VLSI chip. publication, http://groups.google.com/group/comp.os.msdos.- djgpp/browse thread/thread/18aa27bae2b98485/- 7. CONCLUSION cecf3d9dfed4ee28, Last Accessed: 12 April, 2009. In conclusion, the project managed to demonstrate the forum post. possibility to use analog switches, for software controlled by- [8] M. H. Puts, J. Pokorny, J. Quinlan, and L. Glennie. pass of input filters of a sound-card device; thereby, in princi- Audiophile hardware in vision science; the soundcard ple, allowing it to interface with generic sensors that produce as a digital to analog converter. Journal of DC-offset voltages. However, claims cannot be made on the Neuroscience Methods, 142(1):77–81, 2005. feasibility of implementing such a change in an existing com- [9] P. Horowitz and W. Hill. Microprocessor Support mercial sound-card design. The project also illustrated the Chips. In The Art of Electronics. Cambridge specific problems encountered with usage of a card design for University Press, 1989. the now obsolete ISA bus; while demonstrating how it can [10] K. Jo. Audio Interface as a Device for Physical be used to emulate modern hardware (at least to a degree, Computing. Proceedings of Audio Mostly 2008 - a sufficient to expose the problem at hand). Additionally, the Conference on Interaction with Sound, pages 123–127, simplified analysis of particular issues, aims to serve as an 2008. Also at educational introductory example for designers starting with http://www.jojporg.dreamhosters.com/public dav/- digital hardware design; in line with this aspect, the source paper/audiomostly08-audiointerface-jo.pdf. files for schematics and code, as well as the full list of on- [11] S. Kartadinata. The Gluion advantages of an line references (too numerous to include here) relevant to FPGA-based sensor interface. In Proceedings of the the topic discussed in this paper, is provided on the project 2006 conference on New interfaces for musical webpage [16]. expression, pages 93–96. IRCAM-Centre Pompidou nents that would allow the card to receive data from the PC Paris, France, France, 2006. quickly, store this data in memory, and eventually control its [12] N. Leroy, E. Fl´ty, and F. Bevilacqua. Reflective e reproduction on the DAC chip; however, such a data trans- optical pickup for violin. In Proceedings of the 2006 fer implies use of a direct memory access (DMA) method, an alternative to the PIO method. conference on New interfaces for musical expression, 15 Although, historic compilers and DJGPP still support them, pages 204–207. IRCAM-Centre Pompidou Paris, and a workaround is possible using a commercial library France, France, 2006. NTPort [29]. [13] F. Looft. Isa bus - a brief description and io device 16 (WDK, earlier known as DDK) design. World Wide Web electronic publication,
  • 11. http://web.archive.org/web/20070222231336/- Last Accessed: 12 April, 2009. http://ece.wpi.edu/∼wrm/Courses/EE3803/Labs/isa/, [27] www.pcguide.com. Programmed I/O (PIO) Modes. Last Accessed: 12 March, 2009. Last Modified: World Wide Web electronic publication, 03/23/1997 01:43:54. http://www.pcguide.com/ref/hdd/if/ide/modesPIO- [14] S. Molloy. How to Modify a PC Sound Card to Allow c.html, Last Accessed: 12 April, D.C. Voltage Measurements. World Wide Web 2009. electronic publication, [28] www.plop.at. PLoP - Home. World Wide Web http://web.archive.org/web/20080108175023/- electronic publication, http://www.plop.at/, Last http://www.mandanet.net/adc/adc.shtml, Last Accessed: 12 April, 2009. Accessed: 7 April, 2009. [29] www.zealsoftstudio.com. NTPort Library - Inport, [15] D. Nacapricha, N. Amornthammarong, Outport, Inp, Outp functions, direct I/O ports access. K. Sereenonchai, P. Anujarawat, and P. Wilairat. Low World Wide Web electronic publication, cost telemetry with PC sound card for chemical http://www.zealsoftstudio.com/ntport/, Last analysis applications. Talanta, 71(2):605–609, 2007. Accessed: 12 April, 2009. [16] name(s) omitted for submission. Extending isa soundcard webpage. World Wide Web electronic publication, http://link.omitted.for.submission, Last Accessed: 20 March, 2009. Last Modified: 03/20/2009 08:27:02. [17] K. Reddy, J. Bai, B. George, N. Mohan, and V. Kumar. Virtual Instrument for the Measurement of Haemo-dynamic Parameters Using Photoplethysmograph. Proc 23rd Int ConfIEEE, IMTC-2006, pages 1167–1171, 2006. [18] J. D. Reeder. Tutorial - controlling the real world with computers. World Wide Web electronic publication, http://learn-c.com/, Last Accessed: 12 March, 2009. Last Modified: 03/21/2005 22:53:00. [19] D. Roberts. Dr. Dobb’s - Direct Port I/O and Windows NT. World Wide Web electronic publication, http://www.ddj.com/184409876?pgno=3, Last Accessed: 12 April, 2009. [20] T. Savell. 23.3 Digital Audio Processors for Personal Computer Systems. Linear Algebra and Ordinary Differential Equations, 1993. [21] technet.microsoft.com. Inside Windows NT High Resolution Timers. World Wide Web electronic publication, http://technet.microsoft.com/en- us/sysinternals/bb897569.aspx, Last Accessed: 12 April, 2009. [22] tftpd32.jounin.net. TFTPD32 : an opensource TFTP server/service for windows : TFTP server. World Wide Web electronic publication, http://tftpd32.jounin.net/, Last Accessed: 12 April, 2009. [23] B. Trumbic. How to make your own at card. World Wide Web electronic publication, http://web.archive.org/web/20011008162116/- http://www.fesb.hr/∼btrumbic/atcardTR12.htm, Last Accessed: 12 March, 2009. Last Modified: 02/23/1998 13:29:28. [24] www.maxim ic.com. APPLICATION NOTE 3979 - Overview of DirectDrive R Technology. World Wide Web electronic publication, http://www.maxim- ic.com/appnotes.cfm/an pk/3979/, Last Accessed: 12 April, 2009. [25] www.neonbox.org. nanobox linux. World Wide Web electronic publication, http://www.neonbox.org/nanobox/index.html, Last Accessed: 12 April, 2009. home page. [26] www.nu2.nu. BFD - Build Floppy Disk. World Wide Web electronic publication, http://www.nu2.nu/bfd/,