Figure B-12 Sine Wave Generator-Second Order Oscillator - Motorola DSP56800 Manual

16-bit digital signal processor
Table of Contents

Advertisement

B.1.13.2
Second Order Oscillator
Figure B-12 gives a graphical overview of a second order oscillator.
a = Stored initial value which
is the desired tone amplitude
Figure B-12. Sine Wave Generator—Second Order Oscillator
opt
cc
clr
a
move
#$4000,y1
move
#$6d4b,y0
move
#$1,r1
move
#tmp,r0
move
#0,n
do
x0,loop2
mac
-y1,y0,a
neg
a
mac
y1,y0,a
move
tfr
y1,a
loop2
move
;
;
a
T
x0 = 2*cos( 2π Fs/F0)
F0 = Oscillation Frequency
Fs = Sampling Frequency
; 1
; 2
; 2
; 1
; 1
; 1
; 2
; 1
y1,x:(r1)+n
; 1
; 1
a,x:(r0)+n
; 1
x:(r0)+n,y1
; 1
y1,x:(r1)
; 1
______
Total:
16
DSP Benchmarks
x0
sin(w
t)
0
T
1
2
2
1
1
1
3
1
1
1
1
temp storage for swap
1
1
5N+12
AA0090
B-21

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents