![]() |
||||||
| Pelatihan
Mikrokontroller Microcontroller Kits Simple
Mikrokontroller 89s51 Trainer + Include |
2.6.3. Generating a Stair Step Voltage by Using Look Up Table
In this lesson we are like to design, how to generate stair step voltage from 0volt trough 5 volt, with resolution 0.5 volt each step. There is something you must to do is to calculate the konstanta K, as you have learned in previous lesson.
K = Vref/ R14;
= 5/5k
Step 2nd org 0h start: clr A
movc A,@ A+DPTR
mov P0,A
inc DPTR
call delay
sjmp start
;
delay: mov R0,#0
delay1:mov R2,#0fh
djnz R2,$
djnz R0,delay1
ret
;
DataDAC:
DB 0,25,51,76,102,127,153,178,204,229,255
end
Step 3rd
f.4. Generating a Sine Wave Voltage by Using Look Up Table In this lesson we are like to design, how to generate sine wave voltage from 0volt trough 5 volt, with resolution 0.1 volt each step. There is something you must to do is to calculate the konstanta K, as you have learned in previous lesson. For this lesson you must to do by your self, something that gives you a clue is:
Figure 2.6.3. Sine wave voltage 0 - 5 volt Comments, questions and discussion about this topic
|
|
||||