SN8P1829
8-Bit MCU build-in 12-bit ADC + PGIA + Charge-pump Reg 128 dots LCD driver
SONiX TECHNOLOGY CO., LTD
Page 124
Version 1.0
PGIACKS- PGIA CLOCK SELECTION
092H
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
PGIACKS
PGIACKS7 PGIACKS6 PGIACKS5 PGIACKS4 PGIACKS3 PGIACKS2 PGIACKS1 PGIACKS0
R/W R/W R/W R/W R/W R/W R/W R/W
PGIACKS [7:0]
Sets the PGIA working clock, the suggestion PGIA clock is 12.5K Hz.
Refer to the following table for PGIACKS [7:0] register value setting in different Fosc frequency.
PGIA Clock= (Fosc / PGIACKS [7:0]) / 8
PGIACKS [7:0]
F
OSC
PGIA Working Clock
216
4M
(4M / 40) / 8 = 12.5K
176
8M
(8M / 80) / 8 = 12.5K
156
10M
(10M / 100) / 8 = 12.5K
136
12M
(12M / 120) / 8 = 12.5K
56
20M
(20M / 200) / 8 = 12.5K
Note: In general application, PGIA working clock is 12.5K Hz..
Example: PGIA setting (Fosc = 4M X’tal)
@CPREG_Init:
; Enable Charge-Pump/Regulator before PGIA working
MOV
A,
#04h
B0MOV
CPM, A
; Set Charge-Pump as Auto Mode
MOV
A,
#0236
B0MOV
CPCKS, A
; Set PGIACKS = 236 for CP working clock = 100K @ 4M X’tal
@CP_Enable:
B0BSET
FCPRENB
; Enable Charge-Pump / Regulator function
@Delay_10ms:
CALL
@Wait_10ms
; Delay 10ms for Charge-Pump Stabilize
@PGIA_Init:
MOV
A,
#030h
PGIAM
AMPM, A
; Selected PGIA Gain1=16, Gain2=1.5, total Gain=24
MOV
A,
#0216
B0MOV
PGIACKS, A
;Set PGIACKS = 216 for PGIA working clock = 12.5K @ 4M
X’tal
@PGIA_Enable
:
B0BSET
FPGIAENB
; Enable PGIA function
Note 1: Enable Charge-Pump/Regulator before PGIA working
Note 2: Please set PGIA relative registers first, then enable PGIA function bit.