[comp.sys.amiga] Need help reading audio digitizer

mnelson@vmsa.oac.uci.edu (01/11/90)

      i asked this question some time ago, and got zero response, so
i am giving it one more try.
      for quite a while now, i've been trying to figure out how to read 
the audio digitizer on my A1000 from a Modula-2 program.  unfortunately,
i have had only limited success.  as i dont have a hardware reference 
manual, i used as a launching point a fragment of C code supplied by the 
good folks who manufactured the digitizer.  their code goes directly into 
the i/o chip to do it's thing, so i dont really understand the code, since 
it reads/writes to lots of memory locations with which i am not familiar.  
to make things worse, my M2 program is having trouble modifying some of 
those locations (according to the debugger...).  actually i have gotten some 
samples out of the thing, but only after completely negating the logic of 
the C code, resulting in lots of crap spewing out of the printer during the 
sampling.  something is very wrong.
      my real question is this:  does anybody have any information on
reading an audio digitizer (a parallel one)?  would anybody be willing
to contribute a fragment of code to my effort (preferably M2, but anything
is ok)?
      the specific set-up is a Future Sound digitizer (mono, printer
switch, anybody remember this one?), i'm using Benchmark Modula-2,
and the above-mentioned C fragment is something the guys at Applied
Vision call 'C Porter', with a routine 'Get_Funky'.
      any information on reading this thing in any way would be
mucho appreciated.  i think that these things have quite a bit of hobby
potential, and have been frustrated for quite a while on this.


      many thanx in advance.    -matt

bevis@EE.ECN.PURDUE.EDU (Jeff Bevis) (01/19/90)

In article <4115@orion.cf.uci.edu>, mnelson@vmsa.oac.uci.edu writes:
[stuff deleted]
>      my real question is this:  does anybody have any information on
>reading an audio digitizer (a parallel one)?  would anybody be willing

Well, I don't have any code to contribute, but I can give you some hardware
thoughts... (since I have designed and constructed my own stereo digitizer
which will be going into small-scale production soon...).

The DRDY* output on the parallel port must be pulsed low to initiate a
conversion.. The pulse need not be more than a few microseconds (I cannot
recall the exact timing on this, so bear with my vague numbers)... Prior
to this pulse, however (by at least 10 to 50 microseconds) you must have
selected (with the aid of two outputs... pin numbers 12 & 13, I believe...
I would have to check that now...) one of the two possible channels for 
sampling (this would be a good idea to uphold even though you are using a
monophonic sampler.)  These two outputs are active high.  One enables the left
channel for sampling, the other enables the right.  You could look these
pins up in the hardware manual (I don't have one nearby just now) and track
these down to their I/O bits in the system... where you could make direct
use of them (yech) -- whatever.  But the signals need to look like this:
(assume stereo)

DRDY*		-------_--------_---------------
select1		--------_________---------------
select2		________---------_______________

		|  A  |B|  C   |D|  E   |  E... 

A:	Channel one is enabled for the conversion.
B:	DRDY* pulses low (active) initiating conversion; converter holds
	sample value.
C:	Conversion is carried out and read; channel two is enabled for next
	conversion, channel one disabled.
D:	DRDY* pulses low initiating second conversion.
E:	Conversion is carried out and read; channel one is enabled again
	for next set of stereo conversion.

If you want a mono conversion, just leave one select high and the other low.
(and you only need to pulse DRDY* once, of course, for one sample.)

Again, I'm not sure what the 'select's are actually called (in parallel-port
normal terms)... One's probably POUT (paper out).. The other eludes me.
They're adjacent on the connector, though.

DISCLAIMER: I will make no guarantees on the accuracy of this information,
	    but it is the best I can do without being near my reference
	    material (which, if you have been reading csat, you know is bad
	    for me...)

Hope this may be useful in any small way...


+--------------------------------+--------------------------------------------+
| Jeff Bevis 		         | "But I don't like spam!"		      |
| bevis@en.ecn.purdue.edu	 | 	     Give me Amiga or nothing at all. |
+--------------------------------+--------------------------------------------+