![NyQuest Innovation Labs NY6 Series Скачать руководство пользователя страница 42](http://html1.mh-extra.com/html/nyquest-innovation-labs/ny6-series/ny6-series_user-manuel_1722361042.webp)
NY6 User Manual
Ver 1.3 2019/03/28
42
3.17 Audio Playback
This section will describe how to play voice and melody with example codes.
3.17.1 Voice Playback
3.17.1.1 Flow Chart
The flow chart of voice playback is depicted as graph below.
3.17.1.2 Programming Procedure
1. Setup Initial Starting Address of Voice File to Be Played
The starting address must be aligned with specific address whose last 4 bits must be all zeros.
ORGALIGN $, 0x10
L_Voice:
#INCLUDATA "Demo.v6x"
2. Setup Total Playback Channel
The total number of playback channel can be 2, 4, 6 or disable, and this value will determine PH
setting and volume setting accordingly. Once playback channel is set to non-disable, the audio
output will be ready in 16us. Users have to wait the audio is fully turned on and execute “PLAY”.
3. Set Audio Output
The audio output will be PWM or DAC for NY6 series. If DAC is selected, user has to implement
ramp-up
procedure
by
his program
codes.
If PWM is selected, it did not need ramp-up procedure.
4. Configure Digital Volume
There are 16 kinds of digital volume could be applied, from 0x0 to 0xF.