EasyManua.ls Logo

STC micro STC8A8K64D4 Series - Page 210

Default Icon
901 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
STC8A8K64D4 Series Manual
-
- 194 -
MOV P1, A
MOV A, R0 ;P2 = ~(LCD_buff[j|4] & 0xf0);
ADD A, #4
MOV R0, A
MOV A, @R0
ANL A, #0f0H
CPL A
MOV P2, A
SJMP L_LCD_Scan3
L_LCD_Scan2: ; Normal phase scan
MOV A, @R0 ;P1 = LCD_buff[j];
MOV P1, A
MOV A, R0 ;P2 = (LCD_buff[j|4] & 0xf0);
ADD A, #4
MOV R0, A
MOV A, @R0
ANL A, #0f0H
MOV P2, A
L_LCD_Scan3:
MOV DPTR, #T_COM ;A COM is set as push-pull output mode
MOV A, R7
MOVC A, @A+DPTR
ORL P2M0, A
CPL A
ANL P2M1, A
INC scan_index ;if(++scan_index == 8) scan_index = 0;
MOV A, scan_index
CJNE A, #8, L_QuitLcdScan
MOV scan_index, #0
L_QuitLcdScan:
RET
;******************* Standard font**************************
T_Display:
; 0 1 2 3 4 5 6 7 8 9 A B C D E F
DB 03FH,006H,05BH,04FH,066H,06DH,07DH,007H,07FH,06FH,077H,07CH,039H,05EH,079H,071H
; black -
DB 000H,040H
;****************** Load display functions for numbers 1 to 6, and the algorithm is simple ***************************
F_LCD_load: ;R6 is the number, which is 1~6, R7 is the number to be displayed
MOV DPTR, #T_Display ;i = t_display[dat];
MOV A, R7
MOVC A, @A+DPTR
MOV B, A ;the number to be displayed
MOV A, R6
CJNE A, #1, L_NotLoadChar1
MOV R0, #LCD_buff
MOV A, @R0
MOV C, B.3 ;D
MOV ACC.6, C
MOV @R0, A
INC R0
MOV A, @R0
MOV C, B.2 ;C

Table of Contents

Related product manuals