Skip to main content

Interfacing 10-bit DAC with 8085

Short answer

Use two latches for the 10-bit word: high byte (D9–D2) at port 80H, low byte (D1,D0 in D7,D6) at port 81H. A third strobe at port 82H transfers both simultaneously to avoid glitches. Resolution is 5 V/1024 ≈ 4.88 mV.

Explain the way you can interface a 10-bit DAC with 8085.

A 10-bit DAC (for example AD7533 / DAC1020) needs a 10-bit input, but the 8085 data bus has only 8 bits, so the data must be written in two bytes. To avoid glitches (wrong intermediate output when one byte is updated before the other), a double buffered interface is used: input latches hold the two bytes, and a second rank of latches (or the DAC register) updates all 10 bits together.

Data format (left justified)

The 10-bit value D9...D0 is written as byte 1 = D9...D2 (8 bits) and byte 2 = D1 D0 in bit positions D7, D6 (the rest zero).

Block diagram (I/O mapped)

 8085 D0-D7 ---> Latch 1 (74LS373)  D9..D2 ---+
            |      clock: port 80H            |
            |                                 +--> Latch 3 (output
            +---> Latch 2 (74LS373)  D1,D0  --+    register) ---> 10-bit
                   clock: port 81H                  DAC (AD7533)
 Port 82H write pulse -> Latch 3 (updates all 10 bits together)
 IOW' + address decoder (74LS138): Y0 -> port 80H, Y1 -> port 81H, Y2 -> port 82H
 DAC output current -> op-amp (I to V converter) -> Vout

Resolution: with Vref = 5 V, one step = 5 / 1024 = 4.88 mV (1024 levels).

Port addresses

Latch 1 (high byte) = 80H, Latch 2 (low 2 bits) = 81H, update strobe = 82H.

Program

Value stored as high byte at 2050H and low bits (D7, D6) at 2051H:

        LDA 2051H       ; low 2 bits in D7, D6
        OUT 81H         ; load latch 2
        LDA 2050H       ; D9..D2
        OUT 80H         ; load latch 1
        OUT 82H         ; strobe: transfer both to DAC at same time
        HLT

The same method generates waveforms by repeating the sequence for a table of values.

✓ Answer checked by Claude Sonnet 5.5

All Instrumentation II chapter 4 questions →