II-92
EPSON
S1C88348/317/316/308 TECHNICAL SOFTWARE
14 SOUND GENERATOR
Specifications
Control of sound generator
(1) sound_init: Initialization for sound generator
Enables the buzzer output from R50 terminal.
(2) normal_init, normal_on, normal_off: Normal buzzer output
The normal_init routine sets the duty ratio of the buzzer signal to maximum and the frequency to
4,096 Hz. There is buzzer output when normal_on has been called until normal_off is called.
(3) envelope_init, envelope_on, envelope_reset, envelope_off: Buzzer output with digital envelope
The envelope_init routine sets the buzzer signal frequency to 4,096 Hz and the envelope attenua-
tion time to 1 sec and then turns the envelope ON.
There is buzzer output when envelope_on has been called until envelope_off is called.
The envelope_reset routine re-sets the buzzer signal frequency to 2,048 Hz and the envelope
attenuation time to 0.5 sec and then resets the envelope. The envelope is reset by calling
envelope_reset during output period of a buzzer with envelope.
(4) oneshot_ready, oneshot_on, oneshot_off: One-shot buzzer output
The oneshot_ready routine sets the one-shot buzzer pulse width to 125 msec and waits until the
one-shot buzzer output has shifted to READY status. One-shot buzzer output is done by calling
oneshot_on. Buzzer output is 125 msec when called by oneshot_on, but even in that time, the one-
shot buzzer output can be forcibly terminated by calling oneshot_off.
Flowchart
(1) Initialization for sound generator
(2) Normal buzzer output
normal_off
Turns buzzer output off
BZON
← 0
ret
sound_init
Enables buzzer output
(BR setting)
R50
← HIGH output
Sets R50 to complementary output
ret
normal_init
Duty ratio = maximum
Frequency = 4,096 Hz
Buzzer signal duty ratio
and frequency settings
ret
normal_on
Turns buzzer output on
BZON
← 1
ret