Professional Documents
Culture Documents
PRACTICAL-6
AIM: Write a program to demonstrate “on chip DAC”.
PINSEL1 = 0x80000 ;
while(1)
DACR = 5;
GAURAV (19162151005)
2
Schematic Diagram :-
GAURAV (19162151005)
3
GAURAV (19162151005)
4
Schematic Diagram :-
GAURAV (19162151005)
5
#include <math.h>
void main()
PINSEL1=0x80000;
while(1)
int i=0;
for(i=0;i<360;i++)
DACR=sin(i);
GAURAV (19162151005)
6
Schematic Diagram :-
GAURAV (19162151005)
7
void main()
PINSEL1=0x80000;
while(1)
int i=0;
for(i=0;i<256;i++)
DACR=i<<6;
GAURAV (19162151005)
8
Schematic Diagram :-
GAURAV (19162151005)
9
int i=0;
PINSEL1 = 0x80000 ;
while(1)
GAURAV (19162151005)
10
Schematic Diagram :-
GAURAV (19162151005)