Tutorial Microcontroller 8051
 
 
 
 
 
   

BACK NEXT

 

2.6.1. Simple Experiment to Generate a Voltage from DAC

In this lesson we are like to design, how to generate a voltage 2 volt from DAC0808. There is something you must to do is to calculate the konstanta K, as you have learned in previous lesson.


Step 1st
Build the circuit as shown in figure 2.6.2 As you seen on figure 2.6.2. P0.0 trough P0.7 is connected to A8 - A1.
or example, we assumes that the Vref = 5 volt, R14 = 5 k, and Rf = 5k


   K = Vref/ R14;
     = 5/5k
= 1 mA
If, we put logic high into A1 through A8 then we have:
Io = 1 mA x 0.99
= 1 mA
So,Vo = Io x Rf
= 1 mA x 5k
= 5 volt
Voltage Resolution = 5/255 = 0.02 volt

If you like to send a 2 volt out from your DAC, than you
must write down this decimal
= 2/0.02
= 100 decimal

Step 2nd
In this step, you must tipe the assembly program to make a voltage from your DAC, we assume that you have already known the editor, we used MIDE-51 to edit the program. ( Download Complete Circuit File : DAC0808.pdf )

       org 0h
start: mov A,#100
mov P0,A
sjmp start

Step 3rd
Safe your assembly program above, and name it with dac1.asm (for example) Compile the program that you have been save by using MIDE-51, see the software instruction.

Step 4th
Download your hex file ( dac1.hex ) into the microcontroller by using Microcontroller ATMEL ISP software, see the instruction.After download this hex file you'll see the action of DAC ( of course if your cable connection and your program are corrected )

Best Link

 

 

BACK NEXT

 

Lesson 1:
T o o l
1.1. Programmer
1.2.
Edsim 51
1.3. MIDE-51
1.4. ATMEL ISP

Lesson 2:
Input Output
2.1.LED
2.2.Swicht
2.3.7 Segmen
2.4.LCD Character
2.5.ADC
2.6.DAC
2.7.Motor Stepper
2.8.Keypad

Lesson 3:

Timer Counter

3.1.Basic
3.2.Mode 0
3.3.Mode 1
3.4.Mode 2
3.5.Mode 3

Lesson 4:

Serial Comm.

4.1.Basic
4.2.LED
4.3.Rotate LED
4.2 ADC
4.3.LCD

Lesson 5:
Interuption

5.1.Basic
5.2.Timer
5.2.External