Wednesday, December 27, 2017

YAC, a DAC (floating point)

I started looking for Yamaha OPL2 (YM3812) and OPL3 (YMF262) chips on ebay yesterday, as I thought it would be nice to get some for future use. These vintage FM chips were everywhere in the late 80's and early 90's, particularly on Adlib and SoundBlaster sound cards.

I soon realised that one needs an additional chip - a DAC - as the chips are completely digital.

The DACs used are YM3014B for the OPL2 and YAC512 for the OPL3. Both are serial input DACs with what they call 16bit dynamic range. But they are not 16bit integer DACs. So what are they?

They are in fact floating point DACs, with one "normal" integer DAC (10bit), called the mantissa, and an exponential multiplier, the exponent, that sets the reference voltage. This is just like a floating point number which has a significand (the mantissa) and a base raised to the power of an exponent.

As the exponent changes, the width of each step of the 10bit DAC changes. This means that at the resolution is higher at the lower end of the scale, and it decreases (the step width increases) as one moves upwards.

The circuitry is presumably along the lines of this (though this patent is from 1990 and the YM3014B is much older than that), though the Yamaha datasheets call the exponential part an analog shifter:
Floating point DAC patent
The YAC512 supports two time multiplexed outputs from a single DAC through external sample and hold capacitors. The YM3014B is single channel and requires no sample and hold.

I wonder if it would be a good idea to use such a DAC for my DCO - it seems to be available for less than $1 a piece on ebay, though I'm not sure if those are fakes or not. The exponential nature of the DAC should fit an exponential scale well.