On 7/3/06, Tony Duell <ard at p850ug1.demon.co.uk> wrote:
What I
really would like to find is a formula for calculating R2R
ladder values so that I could get a 0V-5V output from an 8-bit
parallel port. Constructing it is easy, once one knows what resistors
to pick.
Eh? The resistors in the ladder are R and 2*R, for some suitable value of
R.
Well... yes... I don't have enough analog theory in my head to come up with
the value of R... 2*R is rather obvious once you have R.
Ah, OK... What you need to do is choose R so that it (or more accurately
2*R) is large compared to the output impedance of the port lines (so that
the 'extra' resistance added by the drivers isn't a cause of
inaccuracies) and low compared to the load (IIRC, the output resistance
of the R-2R ladder is simply R).
Obviously you might well not be able to do this. In which case, you
either have to buffer the port lines (to reduce the output impedance
there) or add a buffer amplifier on the analogue output. Either solution
involves active components that need power.
Just out of
curiousity, why do you want to use an R-2R ladder, rather
than a single-chip DAC? Commercial vector displays that I've come across
either used a DAC chip (Vectrex), a DAC module (DEC GT40), or a rather
complicated circuit with tweakers for the top 6 bits (HP 1350).
Two reasons come to mind - one, to make this a passive device off of
the parallel port that doesn't require an external power wart, and
Can't you grab power from the computer? Obvious places would be either
the keynoard connector or the joystick port.
I have never forgivven IBM for not putting a +5V line on the parallel
port. It would be so useful for homebrew add-ons. I have modified a few
parallel cards (cut and jumper in the obvious way) so that pin 25 is a
+5V output, the problem then is that any normal printer cable will short
the 5V line to ground.
Incidnetally, the HP machine that currently occupies my bench has a 50
pin Blue Ribbon serial port connector. On that are the +5V, +12V and -12V
power supply lines :-)
two, because I'm at the South Pole and I have to
work with what I have
on hand - there won't be another plane for nearly 4 months.
Ah, and you don't have any DACs in the junk box... But do you have
suitable resistors? I've not done the calculations, but intuitively, you
need the R's and 2*R's all to agree to better than 0.5% for an 8 bit
converter. 0.5% resistors are not common.
-tony