Here is a simple ramp wave generator you can directly give data to DAC or use it for your internal reference...
1: //Ramp wave generating in c
2: Void main()
3: {
4: Int I;
5: I=0;
6: While(1)
7: {
8: I++;
9: delay_ms(1)//this count decides the frequency
10: if(I>=256) // this count decides the amplitude
11: {
12: I=0;
13: }
14: }
15: }
No comments:
Post a Comment