NY6 User Manual
Ver 1.3 2019/03/28
55
3.17.5 Ramp-up/Ramp-down Procedure for DAC
3.17.5.1 Operating Principle
While DAC is selected as audio output, the central point of DAC output is VDD/2 but DAC output is
0V before DAC is enabled. Therefore it needs a ramp-up process to make DAC output from 0V to
VDD/2 before start of playback, and vice versa, a ramp-down process is necessary to make DAC
output from VDD/2 to 0V after end of playback.
When user’s voice data, either Speech, Head or Tail waveform, is encoded by
Voice_Encoder
and
stored in NY6, users can take advantage of NY6 hardware to complete the ramp-up/ramp-down
process. First of all, users have to provide one ramp-up and one ramp-down *.wav data and encode
them with command “Encode Ramp Up/Down Table” in PCM format by
Voice_Encoder
and stored
them in *.V6x format. It is recommended that length of ramp-up/ramp-down *.wav data is about
10ms and sample rate is higher than 8KHz. An example of ramp-up/ramp-down *.wav data is
illustrated in the following graphs.
0x000
0x800
0xFFF
Time
Output Value
Ramp-up Waveform
10 ms
0x000
0x800
0xFFF
Time
Output Value
Ramp-down Waveform
10 ms
After ramp-up/ramp-down *.V6x files are ready, users can play this ramp-up/ramp-down *.V6x file by
instruction PLAY as playing ordinary voice data to complete ramp-up/ramp-down process.
3.17.5.2 Example Code of Ramp-up/Ramp-down
L_START:
L_RampUp:
MVLA
0x01
; Set Total Playback Channel & DAC Output
MVAT
CHARC
MVLA
0x03
; Set Digital Volume
MVAT
VOL
MVLA
0x00
L_RampUpChannelLoop:
XORL
0x06
SZEZ
JMP
L_RampUpEnd
XORL
0x06