Doug

You have the essence of what it can do and how it might do it, an old iron 
PDP-11 / LSI-11 can't organically do the signal processing necessary to go from 
a compact signal representation to audio.  That said you could use a one bit 
output, which would for efficiency require a serialiser, to drive a sigma delta 
converter, e.g. 
https://digilent.com/shop/pmod-i2s2-stereo-audio-input-and-output/, to convert 
a word stream to sound.  Generating the I2S bit stream is of course an XFU, 
probably doable from a DRV11 type interface, with a fair bit of logic or your 
favorite microcontroller as intermediary.

A 7 kHz sample rate will not be easily achieved, unless you can use an external 
clock or plug in an "optimal" oscillator, e.g. the classic example (but not for 
this requirement) is one running at a multiple of baud rate frequencies, 12M288 
Hz say.  On these old boards, frequency = oscillator / prescaler / divisor.  
Generally, the divisor is the "round" number and the frequency is the 
fractional mess.  Also, the prescalers may be powers of two, ten, or 1/2/5 : 
YMMV.

The sort of thing you could demonstrate as audio output from your hardware is 
either Morse or audio composed of phonemes.  The Morse would require some 
evolution of the test generator I described and a little tapering of the attack 
/ decay of the di dah dit sounds to avoid harshness, or could be done from 
canned waveforms (returning to 0V).  The phonemes might generate text to speech 
of 1980's (i.e. contemporary period) standard.

Have fun

Martin

-----Original Message-----
From: Douglas Taylor via cctalk [mailto:[email protected]] 
Sent: 10 July 2023 02:20
To: Martin Bishop via cctalk <[email protected]>
Cc: Douglas Taylor <[email protected]>
Subject: [cctalk] Re: Talking PDP11

Wow! Actual engineers responding...

It looks like I could only do the most rudimentary audio.

1. Sample Rate: You got maybe 20K samples to store in lower memory.  At 7KHz 
sample rate that would allow 3 seconds of audio.  Voice only.
2. Samples: They must be 12 bits. Converting a modern audio clip requires, band 
filtering, resampling and mapping to 12 bit integers. Could be done in python, 
they have libraries.
3. Clocking output:  I have a KMV11, but never programmed  around it.
4. Amplify output: AAV11-C produces -10 to +10 volts, have to divide this down 
for input to an audio amp.

In the end I will have undone all the advances made in digital audio in the 
last 30 to 40 years.

Doug

On 7/9/2023 4:09 PM, Martin Bishop via cctalk wrote:
> You just did use it to play "audio" :<)
>
> The 6 us settling time corresponds to a sampling rate of ~167 kHz, not that 
> you will ever get there or would wish to.
>
> The theoretical (real) sampling rate required for a given bandwith is 
> Fs = 2 Bw.  That requires brick wall filters and it is a lot of work 
> to get close without significant distortion.  These old DACs are all 
> but certain to use ladder circuits [see e.g. 
> https://en.wikipedia.org/wiki/Resistor_ladder] the settlng time will 
> mostly come from the output buffer [see e.g. 
> https://www.analog.com/en/technical-articles/ltc1668-dac-lt1807-opamp-
> achieve-90ns-settling-to-16bits-83db-sfdr-small-footprint.html for 
> bleeding edge examples].  To see something other than ringing on a 
> scope you want at least 10 samples per cycle, e.g. for 3 kHz bandwidth 
> (i.e. 0 - 3 kHz frequency coverage) output at 30 kHz or greater.  A 
> low pass (reconstruction in the argot) filter will round off the 
> corners - set the corner just above the passband
>
> DMA, a local FIFO or at least double buffering are the minimum to 
> avoid sample jitter.  On basic hardware you will probably have to do 
> what you can with a sampling clock derived from the RTC card, from 10 
> MHz you could get an interupt at 40 kHz or 25 kHz but maybe not 30 
> kHz.  The interupt then controls the play out from a table or disk ;<)
>
> For testing you can do quite a lot with a single cycle sine wave table in 
> memory.  Say you are playing out at Fs = 30 kHz, and you have a 30 k sample 
> table.  By varying the step through the table from 15k to 1 you can alter the 
> output frequency from 15 kHz to 1 Hz in 1 Hz increments; i.e. output 
> frequency = Fs * stride / table length.
>
>  From a VQ look at the AAV11 docs it uses the bottom 12 bits, doubtless <11> 
> is ms, hopefully it will like 2's complement numbers and the analog offset 
> voltage will be trimmed for bipolar signals.
>
> Have fun and good luck
>
> Martin
>
> -----Original Message-----
> From: Douglas Taylor via cctalk [mailto:[email protected]]
> Sent: 09 July 2023 19:46
> To: General Discussion: On-Topic and Off-Topic Posts 
> <[email protected]>
> Cc: Douglas Taylor <[email protected]>
> Subject: [cctalk] Talking PDP11
>
> I have a PDP-11/53 and have just started playing with an AAV11-C D/A board.  
> It is a 4 channel D/A convertor with 12 bit resolution.
>
> Can it be used to play an audio bit stream?
>
> Here is simple code used to see if the thing was actually working:
>
>       .title AAV11 D/A test
>       ;
>       .asect
>
>       dbr0 = 170440
>
>       .=1000
> start:
>       mov #7777,r0     4096 value to R0
>       mov #dbr0,r1     first D/A buffer out
>
> loop:    mov r0,(r1)    transfer value in r0 to D/A out
>       dec r0        subtract 1 from D/A value
>       bne loop
>
>       br start        loop back to start
>
> I was surprised to see that it took ~34 ms to run through all the numbers 
> from 0-7777, that is about 34 Hz.  The manual says the 'settling time' is 6 
> microseconds.  Is this fast enough for audio?
>
> How would you convert a modern audio file into 12 bit integers?
>
> Doug
>

Reply via email to