Si3220/Si3225
Tone Generator Cadence Programming
2π852
----------------
coeff1 = cos
= 0.78434
Each of the two tone generators contains two timers,
one for setting the active period and one for setting the
inactive period. The oscillator signal is generated during
the active period and suspended during the inactive
period. Both the active and inactive periods can be
programmed from 0 to 8 seconds in 125 µs steps. The
active period time interval is set using OSC1TA for tone
generator 1 and OSC2TA for tone generator 2.
8000
OSC1FREQ = 0.78434(214) = 12851= 0x3233
1
0.21556
--
OSC1AMP =
--------------------- × (215 – 1) × 0.5= 1424
4
1.78434
= 0x590
To enable automatic cadence for tone generator 1,
define the OSC1TA and OSC1TI registers and set the
OSC1TAEN and OSC1TIEN bits. This enables each of
the timers to control the state of the oscillator enable bit,
OSC1EN. The 16-bit counter counts until the active
timer expires, at which time the 16-bit counter resets to
zero and begins counting until the inactive timer
expires. The cadence continues until the user clears the
OSC1TA and OSC1TIEN control bits. Setting the
ZEROEN1 bit implements the zero crossing detect
feature. This ensures that each oscillator pulse ends
without a dc component. The timing diagram in
Figure 36 is an example of an output cadence that uses
the zero crossing feature.
OSC1PHAS = 0
coeff = cos (2π 1336 / 8000) = 0.49819
2
14
OSC2FREQ = 0.49819 (2 ) = 8162 = 0x1FE2
--------------------- × (215 – 1) × 0.5= 2370
1
0.50181
--
OSC2AMP =
4
1.49819
= 0x942
OSC2PHAS = 0
The preceding computed values are written to the
corresponding registers to initialize the oscillators. Once
the oscillators are initialized, the oscillator control
registers can be accessed to enable the oscillators and
direct their outputs.
One-shot oscillation is possible with OSC1EN and
OSC1TAEN. Direct control over the cadence is
achieved by setting the OSC1EN bit directly if
OSC1TAEN and OSC1TIEN are disabled.
The operation of tone generator 2 is identical to that of
tone generator 1 using its respective control registers.
Note: Tone Generator 2 should not be enabled simulta-
neously with the ringing oscillator because of resource
sharing within the hardware.
60
Rev. 1.0