Cyrus the Great
Member level 4
hi i have seen a project which is making a sin wave in these way.first calculate some number which show the sample which create the wave such thise
and after that during the programming put this number on PORTA and after that use R-2R DAC to convert them to analog.so I want to know how dose it work.I mean that for example when 128 is on port A whats happen and how DAC change it to analog?
Best regard
Code:
flash char sin16[256]={128,176,218,245,255,245,218,176,128,80,38,10,0,10,38,80,128,176,218,245,255,245,218,176,128,80,38,10,0....
.
.
.
PORTA=sin16[i];
i++;
.
.
....
Best regard