Download Print this page

Epson S1C17W15 Technical Manual page 201

Cmos 16-bit single chip microcontroller

Advertisement

16 SOUND GENERATOR (SNDA)
2. Write data to the following sound buffer (SNDDAT register) bits.
- SNDDAT.SLEN[5:0] bits
- SNDDAT.SFRQ[7:0] bits
3. Write 1 to the SNDCTL.SSTP bit after the output period has elapsed. (Stop buzzer output)
Normal 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.
Writing 1 to the SNDCTL.SSTP bit stops buzzer output and sets the SNDINTF.EDIF bit (sound output comple-
tion interrupt flag) to 1. The SNDINTF.SBSY bit is cleared to 0.
Figure 16.4.2.1 shows a buzzer output timing chart in normal buzzer mode.
Writing to the SNDDAT register
CLK_SNDA
Sound buffer
(SNDDAT register)
Sound register
SNDCTL.SSTP
SNDINTF.SBSY
SNDINTF.EMIF
SNDINTF.EDIF
BZOUT pin
#BZOUT pin
Software operation
Figure 16.4.2.1 Buzzer Output Timing Chart in Normal Buzzer Mode
Buzzer output waveform configuration (normal buzzer mode/one-shot buzzer mode)
Set the buzzer signal frequency and duty ratio (high period/cycle) using the SNDDAT.SFRQ[7:0] and SND-
DAT.SLEN[5:0] bits, respectively. Use the following equations to calculate these setting values.
SNDDAT.SFRQ[7:0] bits = — — — — — — — -1
SNDDAT.SLEN[5:0] bits =
Where
f
: CLK_SNDA frequency [Hz]
CLK_SNDA
f
:
Buzzer signal frequency [Hz]
BZOUT
DUTY:
Buzzer signal duty ratio [%]
However, the following settings are prohibited:
• Settings as SNDDAT.SFRQ[7:0] bits ≤ SNDDAT.SLEN[5:0] bits
• Settings as SNDDAT.SFRQ[7:0] bits = 0x00
16-4
Writing to the SNDDAT register
f
CLK_SNDA
f
BZOUT
(
f
DUTY
CLK_SNDA
— — — — — — — × — — — — —
f
100
BZOUT
Seiko Epson Corporation
(Start buzzer output)
(Set buzzer output signal duty ratio)
(Set buzzer output signal frequency)
(When SNDSEL.SINV bit = 0)
(Eq. 16.1)
)
-1
(Eq. 16.2)
S1C17W15 TECHNICAL MANUAL
SSTP = 1
(Rev. 1.3)

Advertisement

loading