HT66FV1x0 Integrated Audio Amplifier Application Guideline
AN0486EN V1.10
13 / 16
June 8, 2021
CALL DELAY_10US
MOV A,1
; increase PLADH/PLADL from 0000H to 8000H
ADDM A,PLADL
MOV A,0
ADCM A,PLADH
SNZ PLADH.7
JMP LOOP1
MOV A,00H
; v
olume =
target value, MU
TEB=0
to disable speaker
MOV USVC, A
SET PAEN
; enable power amplifier
CALL DELAY_200MS
; wait before power amplifier is stable
SET MUTEB
;
MUTEB=1
to enable speaker
RET
(4)
Power On Sequence settings using V3 C language
SPI_ON();
RAMP_UP();
(5)
SPI On settings using V3 C language
void SPI_ON(void)
{
_pbs0 = _pbs0 | 0x03;
// enable VDDIO
_pcs1 = 0x55;
// enable SPI pins
// set SAMLS, SACSEN
_spiac0 = 0x00;
_spiac1 = 0x0C;
_spiaen = 1;
// set SPIAEN
}
(6)
Ramp Up settings using V3 C language
void RAMP_UP(void)
{
unsigned int j;
_pladl = 0x00;
// initialise DAC 16-bit data
_pladh = 0x00;
_daen = 1;
// enable 16-bit D/A converter
_paen = 0;
// disable power amplifier
_usvc = 0x80;
//
MUTEB=1 to enable speaker; volume=000_0000
PLAD = 0x0000;
while(PLAD != 0x8000)
// increase PLADH/PLADL from 0000H to 8000H
{
GCC_CLRWDT();
GCC_DELAY(10);
PLAD+=1;
_pladl = PLAD;
_pladh = PLAD >>8;
}
_usvc = 0x00;
// v
olume =
target
value, MUTEB=0 to disable speaker
_plac = 0x03;
// enable power amplifier
for(j= 0;j<300;j++)
// wait before power amplifier is stable
{
GCC_CLRWDT();
GCC_DELAY(4000);
}
_usvc = 0x80;
// MUTEB=1
to enable speaker
}
(7)
Ramp Down settings using ASM language
RAMPDOWN:
CLR PAEN
; disable power amplifier
COMPARE_EQUAL:
; increase PLADH/PLADL gradually to 8000H
MOV A,PLADH
XOR A,80h