Download Print this page

Epson S1C17W15 Technical Manual page 203

Cmos 16-bit single chip microcontroller

Advertisement

16 SOUND GENERATOR (SNDA)
SNDDAT.
16,384 Hz
SLEN[5:0] bits
0x11
0x10
0x0f
0x0e
0x0d
0x0c
0x0b
0x0a
0x09
0x08
0x07
0x06
0x05
0x04
0x03
0x02
0x01
0x00
16.4.3 Buzzer Output in One-shot Buzzer Mode
One-shot buzzer mode is provided for clicking sound and short-duration buzzer output. This mode generates a
buzzer signal with the software specified frequency and duty ratio, and outputs the generated signal for the short
duration specified.
An output start procedure and the SNDA operations are shown below. For the buzzer output waveform, refer to
"Buzzer Output in Normal Buzzer Mode."
One-shot buzzer output start procedure
1. Set the following SNDSEL register bits:
- Set the SNDSEL.MOSEL[1:0] bits to 0x1.
- SNDSEL.STIM[3:0] bits
2. Write data to the following sound buffer (SNDDAT register) bits. (Start buzzer output)
- SNDDAT.SLEN[5:0] bits
- SNDDAT.SFRQ[7:0] bits
One-shot buzzer output operations
When data is written to the sound buffer (SNDDAT register), SNDA clears the SNDINTF.EMIF bit (sound buf-
fer empty interrupt flag) to 0 and starts buzzer output operations.
The data written to the sound buffer is loaded into the sound register in sync with the CLK_SNDA clock. At
the same time, the SNDINTF.EMIF bit and SNDINTF.SBSY bit are both set to 1. The output pin outputs the
buzzer signal with the frequency/duty ratio specified.
The buzzer output automatically stops when the duration specified by the SNDSEL.STIM[3:0] bits has elapsed.
At the same time, the SNDINTF.EDIF bit (sound output completion interrupt flag) is set to 1 and the SND-
INTF.SBSY bit is cleared to 0.
Figure 16.4.3.1 shows a buzzer output timing chart in one-shot buzzer mode.
16-6
8,192 Hz
75.0
50.0
50.0
25.0
Seiko Epson Corporation
Duty ratio by buzzer frequency
4,096 Hz
2,048 Hz
93.8
87.5
81.3
75.0
68.8
62.5
56.3
50.0
87.5
43.8
75.0
37.5
62.5
31.3
50.0
25.0
37.5
18.8
25.0
12.5
12.5
6.3
(Set one-shot buzzer mode)
(Set output duration)
(Set buzzer output signal duty ratio)
(Set buzzer output signal frequency)
1,024 Hz
512 Hz
56.3
28.1
53.1
26.6
50.0
25.0
46.9
23.4
43.8
21.9
40.6
20.3
37.5
18.8
34.4
17.2
31.3
15.6
28.1
14.1
25.0
12.5
21.9
10.9
18.8
9.4
15.6
7.8
12.5
6.3
9.4
4.7
6.3
3.1
3.1
1.6
S1C17W15 TECHNICAL MANUAL
(Rev. 1.3)

Advertisement

loading