SN8P2977
8-Bit Micro-Controller with Regulator, PGIA, 24-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 110
Version 1.7
Example: PGIA setting (Fhosc = 8MHz IHRC)
@CPREG_Init:
B0BSET
FBGRENB
; Enable Band Gap Reference voltage.
@AVDDR_Enable:
B0BSET
FAVDDRENB
; Enable AVDDR Voltage=2.4V
@PGIA_Setting:
MOV
A, #00000001B
B0MOV
CHS, A
; V (X+, X-) Output = V (AI1, AI2)
MOV
A, #00011100B
; PGIA chopper Enable
B0MOV
AMPM, A
; PGIA chopper Freq. 31.25kHz.
@PGIA_Enable:
B0BSET
FAMPENB
; Enable PGIA function
Note_1: Enable AVDDR Regulator before PGIA working
Example: PGIA channel change:
@PGIA_Setting:
MOV
A, #00000001B
B0MOV
CHS, A
; V (X+, X-) Output = V (AI1, AI2)
MOV
A, #00011100B
; PGIA chopper Enable, Gain= 128x
B0MOV
AMPM, A
; PGIA chopper Freq. 31.25kHz.
@PGIA_Enable:
B0BSET
FAMPENB
; Enable PGIA function
…
…
@PGIA_single-end:
MOV
A, #00000100B
; Don
’t Disable PGIA when change PGIA Channel.
B0MOV
CHS, A
; Selected PGIA as Single-end channel
…
; V (X+, X-) Output = V(AI+,AVE)
…
@PGIA_VDD:
MOV
A, #01010101B
; Don
’t Disable PGIA when change PGIA Channel. PGIA Gain 1x
B0MOV
CHS, A
; Selected PGIA as Voltage detection channel
MOV
A, #00010000B
; PGIA chopper Enable, Gain= 1x
B0MOV
AMPM, A
; PGIA chopper Freq. 31.25kHz.
B0BCLR
AMPENB
; Select VDD Voltage Detect function.
…
; V (X+, X-) Output = 1/8*VDD x 1
…