libsidplayfp
2.0.2
|
#include <Dac.h>
Public Member Functions | |
Dac (unsigned int bits) | |
void | kinkedDac (ChipModel chipModel) |
double | getOutput (unsigned int input) const |
Estimate DAC nonlinearity. The SID DACs are built up as R-2R ladder as follows:
n n-1 2 1 0 VGND | | | | | | Termination 2R 2R 2R 2R 2R 2R only for | | | | | | MOS 8580 Vo --R---R--...--R---R-- ---
All MOS 6581 DACs are missing a termination resistor at bit 0. This causes pronounced errors for the lower 4 - 5 bits (e.g. the output for bit 0 is actually equal to the output for bit 1), resulting in DAC discontinuities for the lower bits. In addition to this, the 6581 DACs exhibit further severe discontinuities for higher bits, which may be explained by a less than perfect match between the R and 2R resistors, or by output impedance in the NMOS transistors providing the bit voltages. A good approximation of the actual DAC output is achieved for 2R/R ~ 2.20.
The MOS 8580 DACs, on the other hand, do not exhibit any discontinuities. These DACs include the correct termination resistor, and also seem to have very accurately matched R and 2R resistors (2R/R = 2.00).
On the 6581 the output of the waveform and envelope DACs go through a voltage follower built with two NMOS:
Vdd | |-+
Vin ----—| T1 (enhancement-mode) |-+ | o-----— Vout | |-+ +—| T2 (depletion-mode) | |-+ | |
GND GND
reSIDfp::Dac::Dac | ( | unsigned int | bits | ) |
Initialize DAC model.
bits | the number of input bits |
double reSIDfp::Dac::getOutput | ( | unsigned int | input | ) | const |
Get the Vo output for a given combination of input bits.
input | the digital input |
void reSIDfp::Dac::kinkedDac | ( | ChipModel | chipModel | ) |
Build DAC model for specific chip.
chipModel | 6581 or 8580 |