HT66FV1x0 Integrated Audio Amplifier Application Guideline
AN0486EN V1.10
14 / 16
June 8, 2021
SNZ Z
JMP COMPARE_LARGER
MOV A,PLADL
XOR A,00h
SNZ Z
JMP COMPARE_LARGER
JMP VOICE_OFF
COMPARE_LARGER:
CALL DELAY_10US
SZ
PLADH.7
JMP DECREASE
; jump if PLAD>8000H
JMP INCREASE
; jump if PLAD<8000H
DECREASE:
MOV A,0FFH
ADDM A,PLADL
MOV A,0FFH
ADCM A,PLADH
JMP COMPARE_EQUAL
RET
INCREASE:
MOV A,1
ADDM A,PLADL
MOV A,0
ADCM A,PLADH
JMP COMPARE_EQUAL
VOICE_OFF:
MOV A,80H
; v
olume=
000_0000
MOV USVC, A
LOOP2:
CALL DELAY_10US
MOV A,0FFH
; decrease PLADH/PLADL from 8000H to 0000H
ADDM A,PLADL
MOV A,0FFH
ADCM A,PLADH
SZ
PLADL
JMP LOOP2
SZ
PLADH
JMP LOOP2
CLR MUTEB
; disable speaker output
CLR DAEN
; disable 16-bit D/A converter
RET
(8)
Power Off Sequence settings using ASM language
MAIN_START:
CALL RAMP_DOWN
CALL SPI_OFF
(9)
SPI Off settings using ASM language
SPI_OFF:
CLR SPIAEN
; clear SPIAEN
CLR SPIAC1
; clear SAMLS, SACSEN
CLR PCS1
; disable SPI pin
MOV A,PBS0
; disable VDDIO
AND A,0FCH
MOV PBS0,A
RET
(10)
Ramp Down settings using V3 C language
void RAMP_DOWN(void)
{
_paen=0;
// disable power amplifier
PLAD =((unsigned int)_pladh<<8) | _pladl;
while(PLAD != 0x8000)
// increase PLADH/PLADL gradually to 8000H