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

📄 lcd_lm016l.lst

📁 我用PROTEUS做了一个基于PIC16F877A的万年历
💻 LST
📖 第 1 页 / 共 3 页
字号:


HI-TECH Software PICC Macro Assembler V8.05PL1
Serial number: HCPIC-51037                            Tue Jun 10 19:30:36 2008

Licensed to: ONE
     1                           	processor	16F877
     2                           	opt	pw 79
     3                           	psect	__Z51037RS_,global,delta=1
     4                           	psect	text0,local,class=CODE,delta=2
     5                           	psect	text1,local,class=CODE,delta=2
     6                           	psect	text2,local,class=CODE,delta=2
     7                           	psect	text13,local,class=CODE,delta=2
     8                           	psect	text18,local,class=CODE,delta=2
     9  0000                     
    10  0000                     
    11  0000                     
    12  0000                     
    13  0000                     
    14  0000                     
    15  0000                     
    16  0000                     
    17  0000                     
    18  0000                     
    19                           
    20                           	psect	__Z51037RS_
    21  0190                     
    22  0190                     
    23                           
    24                           	psect	text0
    25  02F0                     _delay_1us
    26                           ;lcd_lm016l.c: 47: asm("nop");
    27  02F0  0000               	nop	;#
    28                           ;lcd_lm016l.c: 48: }
    29  02F1  0183               	clrf	3	;select bank 0
    30  02F2  0008               	return
    31                           
    32                           	psect	text1
    33  034E                     _delay_nus
    34                           ;	_i assigned to ?a_delay_nus+0
    35  0000                     _delay_nus$i	set	?a_delay_nus
    36                           ;lcd_lm016l.c: 52: unsigned int i=0;
    37  034E  0183               	clrf	3	;select bank 0
    38  034F  01B7               	clrf	?a_delay_nus
    39  0350  01B8               	clrf	?a_delay_nus+1
    40                           ;lcd_lm016l.c: 53: for (i=0;i<n;i++)
    41  0351  01B7               	clrf	?a_delay_nus
    42  0352  01B8               	clrf	?a_delay_nus+1
    43  0353  2B59               	goto	l6
    44  0354                     l3
    45                           ;lcd_lm016l.c: 54: delay_1us();
    46                           ;lcd_lm016l.c: 47: asm("nop");
    47  0354  0000               	nop	;#
    48                           ;lcd_lm016l.c: 48: }
    49  0355  0183               	clrf	3	;select bank 0
    50  0356  0AB7               	incf	?a_delay_nus
    51  0357  1903               	btfsc	3,2
    52  0358  0AB8               	incf	?a_delay_nus+1
    53  0359                     l6
    54  0359  0836               	movf	?_delay_nus+1,w
    55  035A  0238               	subwf	?a_delay_nus+1,w
    56  035B  1D03               	btfss	3,2
    57  035C  2B5F               	goto	u15
    58  035D  0835               	movf	?_delay_nus,w
    59  035E  0237               	subwf	?a_delay_nus,w
    60  035F                     u15
    61  035F  1803               	btfsc	3,0
    62  0360  0008               	return
    63  0361  2B54               	goto	l3
    64                           ;lcd_lm016l.c: 71: void LCD_INIT(void)
    65                           ;lcd_lm016l.c: 72: {
    66  0362                     _LCD_INIT
    67                           ;lcd_lm016l.c: 73: TRISD=0X00;
    68  0362  1683               	bsf	3,5
    69  0363  1303               	bcf	3,6	;carry unused
    70  0364  0188               	clrf	8	;volatile
    71                           ;lcd_lm016l.c: 75: (PORTD &= ~(1 << 1));
    72  0365  1283               	bcf	3,5
    73  0366  1088               	bcf	8,1	;volatile
    74                           ;lcd_lm016l.c: 76: (PORTD &= ~(1 << 0));
    75  0367  1008               	bcf	8,0	;volatile
    76                           ;lcd_lm016l.c: 77: (PORTD |= (1 << 2));
    77  0368  1508               	bsf	8,2	;volatile
    78                           ;lcd_lm016l.c: 78: asm("nop");
    79  0369  0000               	nop	;#
    80                           ;lcd_lm016l.c: 79: asm("nop");
    81  036A  0000               	nop	;#
    82                           ;lcd_lm016l.c: 80: (PORTD &= ~(1 << 2));
    83  036B  1108               	bcf	8,2	;volatile
    84                           ;lcd_lm016l.c: 81: delay_nus(40);
    85  036C  3028               	movlw	40
    86  036D  00B5               	movwf	?_delay_nus
    87  036E  01B6               	clrf	?_delay_nus+1
    88  036F  234E               	fcall	_delay_nus
    89                           ;lcd_lm016l.c: 94: PORTD = 0x20;
    90  0370  3020               	movlw	32
    91  0371  0088               	movwf	8	;volatile
    92                           ;lcd_lm016l.c: 95: (PORTD |= (1 << 2));
    93  0372  1508               	bsf	8,2	;volatile
    94                           ;lcd_lm016l.c: 96: asm("nop");
    95  0373  0000               	nop	;#
    96                           ;lcd_lm016l.c: 97: asm("nop");
    97  0374  0000               	nop	;#
    98                           ;lcd_lm016l.c: 98: (PORTD &= ~(1 << 2));
    99  0375  1108               	bcf	8,2	;volatile
   100                           ;lcd_lm016l.c: 99: delay_nus(40);
   101  0376  3028               	movlw	40
   102  0377  00B5               	movwf	?_delay_nus
   103  0378  01B6               	clrf	?_delay_nus+1
   104  0379  2B4E               	ljmp	_delay_nus
   105                           ;lcd_lm016l.c: 104: void LCD_Busy ( void )
   106                           ;lcd_lm016l.c: 105: {
   107  037A                     _LCD_Busy
   108                           ;	_low assigned to ?a_LCD_Busy+0
   109  0000                     _LCD_Busy$low	set	?a_LCD_Busy
   110                           ;	_high assigned to ?a_LCD_Busy+1
   111  0000                     _LCD_Busy$high	set	?a_LCD_Busy+1
   112                           ;lcd_lm016l.c: 106: unsigned char high,low;
   113  037A  30F0               	movlw	-16
   114  037B  1683               	bsf	3,5
   115  037C  1303               	bcf	3,6	;carry unused
   116  037D  0088               	movwf	8	;volatile
   117  037E                     l20
   118                           ;lcd_lm016l.c: 108: do
   119                           ;lcd_lm016l.c: 109: {
   120  037E  1283               	bcf	3,5
   121  037F  1488               	bsf	8,1	;volatile
   122                           ;lcd_lm016l.c: 111: (PORTD &= ~(1 << 0));
   123  0380  1008               	bcf	8,0	;volatile
   124                           ;lcd_lm016l.c: 112: (PORTD |= (1 << 2));
   125  0381  1508               	bsf	8,2	;volatile
   126                           ;lcd_lm016l.c: 113: delay_nus(3);
   127  0382  3003               	movlw	3
   128  0383  00B5               	movwf	?_delay_nus
   129  0384  01B6               	clrf	?_delay_nus+1
   130  0385  234E               	fcall	_delay_nus
   131                           ;lcd_lm016l.c: 114: high = PORTD;
   132  0386  0808               	movf	8,w	;volatile
   133  0387  00B4               	movwf	?a_LCD_Busy+1
   134                           ;lcd_lm016l.c: 115: (PORTD &= ~(1 << 2));
   135  0388  1108               	bcf	8,2	;volatile
   136                           ;lcd_lm016l.c: 116: (PORTD |= (1 << 2));
   137  0389  1508               	bsf	8,2	;volatile
   138                           ;lcd_lm016l.c: 117: asm("nop");
   139  038A  0000               	nop	;#
   140                           ;lcd_lm016l.c: 118: asm("nop");
   141  038B  0000               	nop	;#
   142                           ;lcd_lm016l.c: 119: low = PORTD;
   143  038C  0808               	movf	8,w	;volatile
   144  038D  00B3               	movwf	?a_LCD_Busy
   145                           ;lcd_lm016l.c: 120: (PORTD &= ~(1 << 2));
   146  038E  1108               	bcf	8,2	;volatile
   147                           ;lcd_lm016l.c: 121: } while(high & 0x80);
   148  038F  1BB4               	btfsc	?a_LCD_Busy+1,7
   149  0390  2B7E               	goto	l20
   150                           ;lcd_lm016l.c: 122: delay_nus(20);
   151  0391  3014               	movlw	20
   152  0392  00B5               	movwf	?_delay_nus
   153  0393  01B6               	clrf	?_delay_nus+1
   154  0394  2B4E               	ljmp	_delay_nus
   155                           ;lcd_lm016l.c: 127: void LCD_WriteControl (unsi
      +                          gned char CMD)
   156                           ;lcd_lm016l.c: 128: {
   157  0395                     _LCD_WriteControl
   158                           ;	_CMD assigned to ?a_LCD_WriteControl+0
   159  0000                     _LCD_WriteControl$CMD	set	?a_LCD_WriteControl
   160                           ;_CMD stored from w
   161  0395  0183               	clrf	3	;select bank 0
   162  0396  00B2               	movwf	?a_LCD_WriteControl
   163                           ;lcd_lm016l.c: 130: LCD_Busy();
   164  0397  237A  120A  118A   	fcall	_LCD_Busy
   165                           ;lcd_lm016l.c: 131: TRISD=0X00;
   166  039A  1683               	bsf	3,5
   167  039B  0188               	clrf	8	;volatile
   168                           ;lcd_lm016l.c: 134: PORTD =CMD & 0xf0;
   169  039C  1283               	bcf	3,5
   170  039D  0832               	movf	?a_LCD_WriteControl,w
   171  039E  39F0               	andlw	-16
   172  039F  0088               	movwf	8	;volatile
   173                           ;lcd_lm016l.c: 135: (PORTD &= ~(1 << 1));
   174  03A0  1088               	bcf	8,1	;volatile
   175                           ;lcd_lm016l.c: 136: (PORTD &= ~(1 << 0));
   176  03A1  1008               	bcf	8,0	;volatile
   177                           ;lcd_lm016l.c: 137: (PORTD |= (1 << 2));
   178  03A2  1508               	bsf	8,2	;volatile
   179                           ;lcd_lm016l.c: 138: asm("nop");
   180  03A3  0000               	nop	;#
   181                           ;lcd_lm016l.c: 139: asm("nop");
   182  03A4  0000               	nop	;#
   183                           ;lcd_lm016l.c: 140: (PORTD &= ~(1 << 2));
   184  03A5  1108               	bcf	8,2	;volatile
   185                           ;lcd_lm016l.c: 141: PORTD =CMD<<4;
   186  03A6  0E32               	swapf	?a_LCD_WriteControl,w
   187  03A7  39F0               	andlw	240
   188  03A8  0088               	movwf	8	;volatile
   189                           ;lcd_lm016l.c: 142: (PORTD &= ~(1 << 1));
   190  03A9  1088               	bcf	8,1	;volatile
   191                           ;lcd_lm016l.c: 143: (PORTD &= ~(1 << 0));
   192  03AA  1008               	bcf	8,0	;volatile
   193                           ;lcd_lm016l.c: 144: (PORTD |= (1 << 2));
   194  03AB  1508               	bsf	8,2	;volatile
   195                           ;lcd_lm016l.c: 145: asm("nop");
   196  03AC  0000               	nop	;#
   197                           ;lcd_lm016l.c: 146: asm("nop");
   198  03AD  0000               	nop	;#
   199                           ;lcd_lm016l.c: 147: (PORTD &= ~(1 << 2));
   200  03AE  1108               	bcf	8,2	;volatile
   201                           ;lcd_lm016l.c: 148: }
   202  03AF  0008               	return
   203                           ;lcd_lm016l.c: 177: void Init_LCD(void)
   204                           ;lcd_lm016l.c: 178: {
   205  03B0                     _Init_LCD
   206                           ;lcd_lm016l.c: 179: LCD_INIT();
   207  03B0  2362  120A  118A   	fcall	_LCD_INIT
   208                           ;lcd_lm016l.c: 181: LCD_WriteControl (0x28);
   209  03B3  3028               	movlw	40
   210  03B4  2395  120A  118A   	fcall	_LCD_WriteControl
   211                           ;lcd_lm016l.c: 182: LCD_WriteControl (0x08);
   212  03B7  3008               	movlw	8
   213  03B8  2395  120A  118A   	fcall	_LCD_WriteControl
   214                           ;lcd_lm016l.c: 183: LCD_WriteControl (0x01);
   215  03BB  3001               	movlw	1
   216  03BC  2395  120A  118A   	fcall	_LCD_WriteControl
   217                           ;lcd_lm016l.c: 184: LCD_WriteControl (0x06);
   218  03BF  3006               	movlw	6
   219  03C0  2395  120A  118A   	fcall	_LCD_WriteControl
   220                           ;lcd_lm016l.c: 185: LCD_WriteControl (0x0C);
   221  03C3  300C               	movlw	12
   222  03C4  2395  120A  118A   	fcall	_LCD_WriteControl
   223                           ;lcd_lm016l.c: 186: LCD_WriteControl (0x02);
   224  03C7  3002               	movlw	2
   225  03C8  2B95               	ljmp	_LCD_WriteControl
   226                           ;lcd_lm016l.c: 193: void LCD_Clear(void)
   227                           ;lcd_lm016l.c: 194: {
   228  03C9                     _LCD_Clear
   229                           ;lcd_lm016l.c: 195: LCD_WriteControl(0x01);
   230  03C9  3001               	movlw	1
   231  03CA  2B95               	ljmp	_LCD_WriteControl
   232                           ;lcd_lm016l.c: 200: void LCD_Home(void)
   233                           ;lcd_lm016l.c: 201: {
   234  03CB                     _LCD_Home
   235                           ;lcd_lm016l.c: 202: LCD_WriteControl(0x02);
   236  03CB  3002               	movlw	2
   237  03CC  2B95               	ljmp	_LCD_WriteControl
   238  03CD                     _LCD_Cursor
   239                           ;	_row assigned to ?a_LCD_Cursor+0
   240  0000                     _LCD_Cursor$row	set	?a_LCD_Cursor
   241                           ;_row stored from w
   242  03CD  0183               	clrf	3	;select bank 0
   243  03CE  00B1               	movwf	?a_LCD_Cursor
   244                           ;lcd_lm016l.c: 216: switch (row) {
   245  03CF  2BDC               	goto	l29

⌨️ 快捷键说明

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