0 5 Po CRO 1: DAC Interface To Generate
0 5 Po CRO 1: DAC Interface To Generate
a. Square waveform
b. Tnangular Wavefom
c. Ramp wavefom
d. Sine waveform
8
0
DAC CRO
5 PO
1
C
main()
while(1)
PO-Oxf
delay(500)
PO-Ox00:
delay(1500);
.
b
TRIANGULAR WAVEFORM GENERATION.
Aim To generate Triangular wave
using. DAAC.
Algorithm for Triangular wave generation
Output the initial value 00 through PO.
Increment it in steps of 1 until a count value of FFh (5V) is reached. Every time
repeat step 1.
Decrement it in steps of 1 until a zero value is reached and
repeat step 1.
Program for triangular wave:
#include<REG51.H>
main)
unsigned char i=0;
PO Ox00; * P0
while(1) as
Output port */
P1i
POi,
main)
static inta[13]={128,192,238,255,238,192,128,64,17,0,17,64,128);
P0 Ox00;
while (1)
/*Output different values */
for(i-0;i<13;i++)
{PO=a[1];}
wwmw