Specifications

CONSTRUCTION
The low-cost R-2R ladder-type DAC
(Fig. 2) requires no power supply at all,
nor any active components such as buff-
ers, op-amps, and storage registers. Its
linearity is very good. Just give the digi-
tal input and take the analogue output.
It is incredible! At a cost of Rs 5 only for
8-bit resolution or Re 1 only per bit above
8 bits, you can practically implement any
application, which may otherwise require
an integrated circuit. You do not have to
bother about control signals, memory, or
I/O mapping of your micro-system. Just
hook it up to your parallel port and start
working.
Fig. 3 shows the transfer function or
the linearity behaviour of the DAC of Fig.
2, while Table I compares the cost of a
typical low-cost, 8-bit integrated chip
(along with power supply and other parts)
with that of R-2R, 8-bit DAC of Fig. 2.
The R-2R DAC can be used for most of
the applications. An R-2R network can
also be used in conjunction with an op-
amp. A 3-bit application circuit of the
same is shown in Fig. 4.
Application
A waveform generator using
R-2R and a low-power CMOS
microcontroller PIC16C84 (by
Microchip Technology Inc.,
USA) is presented here. All
standard waveforms such as
sine, square, tri-wave, forward
and reverse ramp are success-
fully generated using the R-
2R DAC, in conjunction with
the above-mentioned
microcontroller. Waveforms
other than sine are generated
quite easily. The sine wave,
however, needs a different ap-
proach, which makes use of
lookup-table technique.
The circuit of the function
generator is shown in Fig. 5.
The 8-bit data is sent to the
DAC by the microcontroller,
through one of its ports. The
desired function/waveform is
selected with the help of a
push-to-on switch. The selec-
tion is also indicated by a cor-
responding LED. To keep the
application as simple as pos-
sible, only fixed-frequency
waveform generation is de-
scribed in this article.
PIC16C84 microcont-
roller is a CMOS device from
Microchip, which is used here
in conjunction with an R-2R
DAC to realise a function gen-
erator, as stated earlier. The important
features of this device are reproduced in
Table II.
Besides this, the device has some code
protection bits which, once enabled, will
not allow access to the program memory.
These bits are actually programmed into
the program memory, but user access to
it is not available. (Note. For more infor-
mation on EEPROM programming of
PIC16C84, datasheet DS30189D in PDF
format, available on Microchip Website,
can be used.)
Fig. 8: Software flowcharts for generation of various waveforms
www.electronicsforu.com
a portal dedicated to electronics enthusiasts
166