st2608b Sitronix Technology Corporation, st2608b Datasheet - Page 25

no-image

st2608b

Manufacturer Part Number
st2608b
Description
8-bit Integrated Microcontroller
Manufacturer
Sitronix Technology Corporation
Datasheet
(6) change Sysclk from 32K to RC
Step1: use the macro “SWITCH_SYSCLK_32K_TO_RC ” to change Sysclk to RC
(7) sample code
1. When B/W, 4G, 16G mode change to fast B/W mode or fast B/W mode change to B/W, 4G, 16G mode, must turn off LCD.
for example: B/W, 4G, 16G mode change to fast B/W mode.
;====Step1 LCD OFF ===
;====Step2 set GL[3:2]=11, fast B/W mode ===
;=== Step3 set Frame rate about 65 Hz ===
LDA #6
STA
LDA #00001000B
STA
;===Step4 LCD ON ===
[After setting up fast B/W mode, then switch SYSCK from RC to 32k]
2. Sysck from RC change to 32k…
Please use the macro “SWITCH_SYSCLK_RC_TO_32K” .
This macro will use 4 bytes RAM. They are show below.
;===== used ram ====
LCD_FLAG
IENAL_BAK
IENAH_BAK
LPCK_BAK
And this macro will also use LCD interrupt. Please copy below program in LCD interrupt service routine.
;==== LCD interrupt service routine ===
LCDFR_ISR:
The declaration of this macro is show below (please don’ t modify this macro)
SWITCH_SYSCLK_RC_TO_32K
;=== backup LPCK ===
;=== BACKUP IENAL/H AND ONLY ENABLE LCD INT ===
LDA LCTR
ORA #10000000B
STA
LDA LCTR
ORA #00001100B
STA
LDA LCTR
AND #~10000000B
STA
PHA
LDA #FFH
STA
RMB7
PLA
RTI
LDA LPCK
STA
LDA #2
STA
SEI
LDA IENAL
STA
LDA IENAH
STA
LDA #10000000B
STA
LFRA
LCKR
LCTR
LCTR
LCTR
DS
LCD_FLAG
IENAL
LPCK_BAK
LPCK
IENAL_BAK
IENAH_BAK
IENAL
DS 1
;since LFRA has been determined, LCKR is determined by frame rate equation.
DS
;when Sysclk is changed to 32k, LFRA can’ t be modified. Thus LFRA
;is determined by equation2. Let the frame rate in sysclk=32k mode is
;Let the frame rate in Sysclk=RC mode is about 65hz
1
DS
;about 65hz
1
1
;ONLY ENABLE LCD INT
;DISABPLE LCD INTERRUPT
.MACRO
25/34
ST2608B

Related parts for st2608b