⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 anim.lst

📁 Library for the 8051 microcontroller. such as math routine, hexBCD, LCD, Keyboard, I2C, Remote, Ke
💻 LST
字号:

ASEM-51 V1.3                                         Copyright (c) 2002 by W.W. Heinz                                         PAGE 1





       MCS-51 Family Macro Assembler   A S E M - 5 1   V 1.3
       =====================================================



	Source File:	E:\MiCrOConTroller\Coba_M-IDE\lcdANIM\ANIM.asm
	Object File:	E:\MiCrOConTroller\Coba_M-IDE\lcdANIM\ANIM.hex
	List File:	E:\MiCrOConTroller\Coba_M-IDE\lcdANIM\ANIM.lst



 Line  I  Addr  Code            Source

    1:				;*********************************************************************
    2:				;THIS CODE WILL DISPAY A CHARACTER "G" ON LCD AND SINK THE CHAR DOWNWARDS
    3:				;*********************************************************************
    4:
    5:
    6:		N      0000	        org 0000h
    7:				;*********************************************************************
    8:				;PORT DEFINED (CAN BE MODIFIED ACCORING TO CIRCUIT
    9:				;*********************************************************************
   10:				        ;p0= d0-d7
   11:				        ;RS  rs=0 for command    rs=1 for data
   12:				        ;RW  wr=0 for write      wr=1 for read
   13:				        ;EN   enable  -\_
   14:		B      00B5	      RS   equ  p3.5
   15:		B      00B4	       RW  equ  p3.4
   16:		B      00B3	       EN  equ  p3.3
   17:				;*********************************************************************
   18:				;TO INITIALIZE THE LCD
   19:				;*********************************************************************
   20:
   21:	  0000	74 38		        mov a,#38h     ;2 line 5x7
   22:	  0002	11 31		        acall command
   23:	  0004	74 0C		        mov a,#0ch     ;lcd on cursor on
   24:	  0006	11 31		        acall command
   25:	  0008	74 01		        mov a,#01h     ;clr lcd
   26:	  000A	11 31		        acall command
   27:	  000C	74 06		        mov a,#06h     ;shift cursor right
   28:	  000E	11 31		        acall command
   29:
   30:	  0010	74 61		        mov a,#'a'     ; testing for "a"
   31:	  0012	11 3E		        acall ddisp
   32:
   33:	  0014	11 59		        acall delay
   34:	  0016	11 62		        acall writech   ;writes char in CG ram of lcd
   35:
   36:	  0018	74 80		        mov a,#80h      ;go to start of lcd
   37:	  001A	11 31		        acall command
   38:	  001C	74 01		        mov a,#01h
   39:	  001E	11 31		        acall command   ;clr disp
   40:
   41:				;*********************************************************************
   42:				;LOOP FOR DISPLAYING 8 ROW (1CHAR) STORED IN CG RAM
   43:				;*********************************************************************

ASEM-51 V1.3                                         Copyright (c) 2002 by W.W. Heinz                                         PAGE 2



 Line  I  Addr  Code            Source

   44:
   45:	  0020			s:
   46:	  0020	78 00		        mov r0,#00h     ;CGram address
   47:	  0022	74 85		again1: mov a,#85h      ;DDRAM addres display position on lcd
   48:	  0024	11 31		        acall command
   49:	  0026	11 59		        acall delay
   50:	  0028	E8		        mov a,r0        ; r0=0 means first char of cg ram
   51:	  0029	11 3E		        acall ddisp     ; display on lcd
   52:	  002B	08		        inc r0          ; inc counter
   53:	  002C	B8 08 F3	        cjne r0,#08h,again1
   54:
   55:	  002F	80 EF		        sjmp s          ; main loop reapet
   56:
   57:
   58:	  0031	11 4B		command:acall ready      ;chk lcd is ready to accept command
   59:	  0033	F5 80		        mov p0,a
   60:	  0035	C2 B5		        clr RS  ;rs=0 for command
   61:	  0037	C2 B4		        clr RW  ;wr=0 for write
   62:	  0039	D2 B3		        setb EN
   63:	  003B	C2 B3		        clr EN
   64:	  003D	22		        ret
   65:
   66:	  003E	11 4B		ddisp:  acall ready
   67:	  0040	F5 80		        mov p0,a
   68:	  0042	D2 B5		        setb RS  ;rs=1 for data
   69:	  0044	C2 B4		        clr RW  ;wr=0 for write
   70:	  0046	D2 B3		        setb EN
   71:	  0048	C2 B3		        clr EN
   72:	  004A	22		        ret
   73:
   74:	  004B	D2 87		ready:  setb p0.7
   75:	  004D	C2 B5		        clr RS    ;rs=0 command
   76:	  004F	D2 B4		        setb RW   ;wr=1 read
   77:	  0051	C2 B3		back:   clr EN    ;enable
   78:	  0053	D2 B3		        setb EN
   79:	  0055	20 87 F9	        jb p0.7,back
   80:	  0058	22		        ret
   81:
   82:	  0059	7F 99		delay:  mov r7,#99h
   83:	  005B	7E 00		w2:     mov r6,#00h
   84:	  005D	DE FE		w1:     djnz r6,w1
   85:	  005F	DF FA		        djnz r7,w2
   86:	  0061	22		        ret
   87:
   88:	  0062	11 4B		writech:acall ready
   89:	  0064	74 40		        mov a,#40h     ; go to 00 of cgram
   90:	  0066	F5 80		        mov p0,a
   91:	  0068	C2 B4		        clr RW
   92:	  006A	C2 B5		        clr RS
   93:	  006C	D2 B3		        setb EN
   94:	  006E	C2 B3		        clr EN
   95:
   96:
   97:	  0070	7F 40		        mov r7,#64      ;counter for 64 times  8pix hor  x  8lines = 1 char
   98:	  0072	90 00 87	        mov dptr,#tabel ;load address values of tabel
   99:	  0075	E4		wr1:    clr a

ASEM-51 V1.3                                         Copyright (c) 2002 by W.W. Heinz                                         PAGE 3



 Line  I  Addr  Code            Source

  100:	  0076	11 4B		        acall ready
  101:	  0078	93		        movc a,@a+dptr
  102:	  0079	F5 80		        mov p0,a         ; this will write tabel in cgram (address 40 of lcd
  103:	  007B	D2 B5		        setb RS
  104:	  007D	C2 B4		        clr RW
  105:	  007F	D2 B3		        setb EN
  106:	  0081	C2 B3		        clr EN
  107:	  0083	A3		        inc dptr
  108:	  0084	DF EF		        djnz r7,wr1
  109:	  0086	22		        ret
  110:				;*********************************************************************
  111:				;TABEL FOR 8 CHAR
  112:				;MADE SUCH THAT CHAR "G" IS SINKING DOWN
  113:				;*********************************************************************
  114:
  115:	  0087			tabel:
  116:	  0087	0E		        db 00001110b   ;char 1 of CGRAM
  117:	  0088	11		        db 00010001b   ;1=high pixel
  118:	  0089	10		        db 00010000b   ;0=low pix
  119:	  008A	10		        db 00010000b
  120:	  008B	13		        db 00010011b
  121:	  008C	11		        db 00010001b
  122:	  008D	11		        db 00010001b
  123:	  008E	0E		        db 00001110b
  124:
  125:	  008F	00		        db 00000000b
  126:	  0090	0E		        db 00001110b   ;char 2 of CGRAM
  127:	  0091	11		        db 00010001b   ;1=high pixel
  128:	  0092	10		        db 00010000b   ;0=low pix
  129:	  0093	10		        db 00010000b
  130:	  0094	13		        db 00010011b
  131:	  0095	11		        db 00010001b
  132:	  0096	11		        db 00010001b
  133:
  134:	  0097	00		        db 00000000b
  135:	  0098	00		        db 00000000b
  136:	  0099	0E		        db 00001110b   ;char 3 of CGRAM
  137:	  009A	11		        db 00010001b   ;1=high pixel
  138:	  009B	10		        db 00010000b   ;0=low pix
  139:	  009C	10		        db 00010000b
  140:	  009D	13		        db 00010011b
  141:	  009E	11		        db 00010001b
  142:
  143:
  144:	  009F	00		        db 00000000b
  145:	  00A0	00		        db 00000000b
  146:	  00A1	00		        db 00000000b
  147:	  00A2	0E		        db 00001110b   ;char 4 of CGRAM
  148:	  00A3	11		        db 00010001b   ;1=high pixel
  149:	  00A4	10		        db 00010000b   ;0=low pix
  150:	  00A5	10		        db 00010000b
  151:	  00A6	13		        db 00010011b
  152:
  153:	  00A7	00		        db 00000000b
  154:	  00A8	00		        db 00000000b
  155:	  00A9	00		        db 00000000b

ASEM-51 V1.3                                         Copyright (c) 2002 by W.W. Heinz                                         PAGE 4



 Line  I  Addr  Code            Source

  156:	  00AA	00		        db 00000000b
  157:	  00AB	0E		        db 00001110b   ;char 5 of CGRAM
  158:	  00AC	11		        db 00010001b   ;1=high pixel
  159:	  00AD	10		        db 00010000b   ;0=low pix
  160:	  00AE	10		        db 00010000b
  161:
  162:	  00AF	00		        db 00000000b
  163:	  00B0	00		        db 00000000b
  164:	  00B1	00		        db 00000000b
  165:	  00B2	00		        db 00000000b
  166:	  00B3	00		        db 00000000b
  167:	  00B4	0E		        db 00001110b   ;char 6 of CGRAM
  168:	  00B5	11		        db 00010001b   ;1=high pixel
  169:	  00B6	10		        db 00010000b   ;0=low pix
  170:
  171:	  00B7	00		        db 00000000b
  172:	  00B8	00		        db 00000000b
  173:	  00B9	00		        db 00000000b
  174:	  00BA	00		        db 00000000b
  175:	  00BB	00		        db 00000000b
  176:	  00BC	00		        db 00000000b
  177:	  00BD	0E		        db 00001110b   ;char 7 of CGRAM
  178:	  00BE	11		        db 00010001b   ;1=high pixel
  179:
  180:	  00BF	00		        db 00000000b
  181:	  00C0	00		        db 00000000b
  182:	  00C1	00		        db 00000000b
  183:	  00C2	00		        db 00000000b
  184:	  00C3	00		        db 00000000b
  185:	  00C4	00		        db 00000000b
  186:	  00C5	00		        db 00000000b
  187:	  00C6	0E		        db 00001110b   ;char 8 of CGRAM
  188:
  189:				        end
  190:





                     register banks used:  ---

                     no errors




ASEM-51 V1.3                                         Copyright (c) 2002 by W.W. Heinz                                         PAGE 5





	       L I S T   O F   S Y M B O L S
	       =============================


SYMBOL				  TYPE     VALUE	LINE
------------------------------------------------------------
??ASEM_51			  NUMBER    8051
??VERSION			  NUMBER    0130
AC				  BIT	      D6
ACC				  DATA	      E0
AGAIN1				  CODE	    0022	  47
B				  DATA	      F0
BACK				  CODE	    0051	  77
COMMAND				  CODE	    0031	  58
CY				  BIT	      D7
DDISP				  CODE	    003E	  66
DELAY				  CODE	    0059	  82
DPH				  DATA	      83
DPL				  DATA	      82
EA				  BIT	      AF
EN				  NUMBER    00B3	  16
ES				  BIT	      AC
ET0				  BIT	      A9
ET1				  BIT	      AB
EX0				  BIT	      A8
EX1				  BIT	      AA
EXTI0				  CODE	    0003
EXTI1				  CODE	    0013
F0				  BIT	      D5
IE				  DATA	      A8
IE0				  BIT	      89
IE1				  BIT	      8B
INT0				  BIT	      B2
INT1				  BIT	      B3
IP				  DATA	      B8
IT0				  BIT	      88
IT1				  BIT	      8A
OV				  BIT	      D2
P				  BIT	      D0
P0				  DATA	      80
P1				  DATA	      90
P2				  DATA	      A0
P3				  DATA	      B0
PCON				  DATA	      87
PS				  BIT	      BC
PSW				  DATA	      D0
PT0				  BIT	      B9
PT1				  BIT	      BB
PX0				  BIT	      B8
PX1				  BIT	      BA
RB8				  BIT	      9A
RD				  BIT	      B7
READY				  CODE	    004B	  74
REN				  BIT	      9C
RESET				  CODE	    0000
RI				  BIT	      98

ASEM-51 V1.3                                         Copyright (c) 2002 by W.W. Heinz                                         PAGE 6



SYMBOL				  TYPE     VALUE	LINE
------------------------------------------------------------
RS				  NUMBER    00B5	  14
RS0				  BIT	      D3
RS1				  BIT	      D4
RW				  NUMBER    00B4	  15
RXD				  BIT	      B0
S				  CODE	    0020	  45
SBUF				  DATA	      99
SCON				  DATA	      98
SINT				  CODE	    0023
SM0				  BIT	      9F
SM1				  BIT	      9E
SM2				  BIT	      9D
SP				  DATA	      81
T0				  BIT	      B4
T1				  BIT	      B5
TABEL				  CODE	    0087	 115
TB8				  BIT	      9B
TCON				  DATA	      88
TF0				  BIT	      8D
TF1				  BIT	      8F
TH0				  DATA	      8C
TH1				  DATA	      8D
TI				  BIT	      99
TIMER0				  CODE	    000B
TIMER1				  CODE	    001B
TL0				  DATA	      8A
TL1				  DATA	      8B
TMOD				  DATA	      89
TR0				  BIT	      8C
TR1				  BIT	      8E
TXD				  BIT	      B1
W1				  CODE	    005D	  84
W2				  CODE	    005B	  83
WR				  BIT	      B6
WR1				  CODE	    0075	  99
WRITECH				  CODE	    0062	  88

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -