03-08-2013, 02:55 PM
INTERFACING DAC WITH 8051
AIM:
To interface DAC with 8051 parallel port to demonstrate the generation of square,
saw tooth and triangular wave.
APPARATUS REQUIRED:
8051 Trainer Kit
DAC Interface Board
THEORY:
DAC 0800 is an 8 – bit DAC and the output voltage variation is between – 5V and +
5V.The output voltage varies in steps of 10/256 = 0.04 (appx.). The digital data input and
the corresponding output voltages are presented in the Table below
ALGORITHM:
Square Wave Generation
Move the port address of DAC to DPTR
Load the initial value (00) to Accumulator and move it to DAC
Call the delay program
Load the final value(FF) to accumulator and move it to DAC
Call the delay program.
Repeat Steps 2 to 5
Saw tooth Wave Generation
Move the port address of DAC to DPTR
Load the initial value (00) to Accumulator
Move the accumulator content to DAC
Increment the accumulator content by 1.