Intel 2920 Design Handbook page 46

Analog signal processor
Table of Contents

Advertisement

BUILDING BLOCK FUNCTIONS-FOUNDATION OF DESIGN
Therefore, the third harmonic is absent, the fifth is
down 28db, the seventh is down 34db, etc. This
represents a much lower harmonic content than the
original sawtooth which contains all harmonics in a
ratio p(n)
=
.i.
n
The 2920 code for this transformation is given below.
The oscillator, represented by the variable name OSC, is
assumed to be a sawtooth between + 1.0 and O. The com-
ments indicate the steps the waveform transformation
takes. Note the use of a constant KP4 to readjust DC
levels.
LDA
Y
asc
ROO
; Sawtooth
+
1.0 to 0
SUB
y
KP4
ROO
; Sawtooth
+
O.S to -0.5
ABS
y
y
LOI
; Triangle 0 to 1.0
SUB
y
KP4
ROO
; Triangle -O.S to O.S
ADD
y
y
LOI
; Clipped Triangle
Example-A program for an oscillator which generates
the clipped triangle wave approximation to a sine wave
for a frequency of 1070Hz
=
0.1 0/0. Assume a sample
interval of 76.8/isec.
The value for K1 may be found by solving the oscillator
frequency equation above.
KI
=.!....*
K2
fs
In binary, for 1070Hz
±
1.07 Hz and K2
=
1.0,
.0001010100000100
~
KI
~
.0001010100001110
A value of K1
=
.0001010100001
=
2-~+2-6+2-8+2-13
corresponds to 1069.7Hz. The program for the
oscillator then becomes as follows:
SUB
asc,
KPS, R03
SUB
asc,
KP4, R07
SUB
asc,
KP4, RI2
LDA DAR,
asc,
ROO
ADD
asc,
KP4, LOI,
CNDS ; conditional ADD K2
Note the use of the 2920 constants to generate the
desired values for K1, and K2, and the use of the condi-
tional ADD to perform the K2 addition, which resets
the osciIlator. This code may be followed by that realiz-
ing the waveform modification of Figure 4.2 to com-
plete the generation of the clipped triangle output.
4-7
4.2.2 Overflow Technique for Relaxation
Oscillator
It is possible to generate a sawtooth waveform using the
overflow disable operations described in Table 3-4c. In
some cases this technique may yield a shorter overall
program length. The technique involves using the
"wraparound" characteristics of a non-overflow cor-
rected 2's complement number system; that is, if you
add 1 to the most positive number, the result will be the
most negative number. In its simplest form, a sawtooth
or "ramp" may be developed using the following 2920
code:
ABA
asc
KP4
R07
CND(K)
where the ABA with CND(K) instruction disables
overflow correction and the non-CND(K) part incre-
ments the value OSC by a constant (2-
8
in this-example).
4.3 Voltage Controlled Oscillators
(VCQ's)
The basic relaxation oscillator described above may be
frequency modulated or voltage controlled by replacing
K1 with a suitably weighted variable from the control-
ling voltage or modulating signal.
If the variable V represents the instantaneous value of
the modulating signal and a frequency relationship of
the form F
=
fo + A V is desired, then the algorithm for
the oscilfator becomes as follows:
1) At
each
sample
period,
subtract
the
value
(fo +AV) K2/fs from the oscillator register.
2)
If the register contents become negative, add K2 to
the oscillator.
The value (fo+AV)K2Ifs can be separated into constant
and variable terms.
constant term
=
fo K2!fs
variable term
=
AV
*
K2!fs
Because 2920 realizations of VCO's are sampled, the
usual considerations for alias distortion must be made.
The output of the VCO will represent a sampled version
of the corresponding continuous signal. Because fre-
quency modulation can produce fairly wide side bands
(in addition to those due to waveform), this side band
energy is a potential source of alias distortion if it has

Advertisement

Table of Contents
loading

Table of Contents