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

📄 lcd_lm016l.lst

📁 我用PROTEUS做了一个基于PIC16F877A的5路电压采集系统
💻 LST
📖 第 1 页 / 共 3 页
字号:


HI-TECH Software PICC Macro Assembler V8.05PL1
Serial number: HCPIC-51037                            Sat Jun 21 21:44:27 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  0497                     _delay_1us
    26                           ;lcd_lm016l.c: 47: asm("nop");
    27  0497  0000               	nop	;#
    28                           ;lcd_lm016l.c: 48: }
    29  0498  0183               	clrf	3	;select bank 0
    30  0499  0008               	return
    31                           
    32                           	psect	text1
    33  0521                     _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  0521  0183               	clrf	3	;select bank 0
    38  0522  01B9               	clrf	?a_delay_nus
    39  0523  01BA               	clrf	?a_delay_nus+1
    40                           ;lcd_lm016l.c: 53: for (i=0;i<n;i++)
    41  0524  01B9               	clrf	?a_delay_nus
    42  0525  01BA               	clrf	?a_delay_nus+1
    43  0526  2D2C               	goto	l6
    44  0527                     l3
    45                           ;lcd_lm016l.c: 54: delay_1us();
    46                           ;lcd_lm016l.c: 47: asm("nop");
    47  0527  0000               	nop	;#
    48                           ;lcd_lm016l.c: 48: }
    49  0528  0183               	clrf	3	;select bank 0
    50  0529  0AB9               	incf	?a_delay_nus
    51  052A  1903               	btfsc	3,2
    52  052B  0ABA               	incf	?a_delay_nus+1
    53  052C                     l6
    54  052C  0838               	movf	?_delay_nus+1,w
    55  052D  023A               	subwf	?a_delay_nus+1,w
    56  052E  1D03               	btfss	3,2
    57  052F  2D32               	goto	u15
    58  0530  0837               	movf	?_delay_nus,w
    59  0531  0239               	subwf	?a_delay_nus,w
    60  0532                     u15
    61  0532  1803               	btfsc	3,0
    62  0533  0008               	return
    63  0534  2D27               	goto	l3
    64                           ;lcd_lm016l.c: 71: void LCD_INIT(void)
    65                           ;lcd_lm016l.c: 72: {
    66  0535                     _LCD_INIT
    67                           ;lcd_lm016l.c: 73: TRISD=0X00;
    68  0535  1683               	bsf	3,5
    69  0536  1303               	bcf	3,6	;carry unused
    70  0537  0188               	clrf	8	;volatile
    71                           ;lcd_lm016l.c: 75: (PORTD &= ~(1 << 1));
    72  0538  1283               	bcf	3,5
    73  0539  1088               	bcf	8,1	;volatile
    74                           ;lcd_lm016l.c: 76: (PORTD &= ~(1 << 0));
    75  053A  1008               	bcf	8,0	;volatile
    76                           ;lcd_lm016l.c: 77: (PORTD |= (1 << 2));
    77  053B  1508               	bsf	8,2	;volatile
    78                           ;lcd_lm016l.c: 78: asm("nop");
    79  053C  0000               	nop	;#
    80                           ;lcd_lm016l.c: 79: asm("nop");
    81  053D  0000               	nop	;#
    82                           ;lcd_lm016l.c: 80: (PORTD &= ~(1 << 2));
    83  053E  1108               	bcf	8,2	;volatile
    84                           ;lcd_lm016l.c: 81: delay_nus(40);
    85  053F  3028               	movlw	40
    86  0540  00B7               	movwf	?_delay_nus
    87  0541  01B8               	clrf	?_delay_nus+1
    88  0542  2521               	fcall	_delay_nus
    89                           ;lcd_lm016l.c: 94: PORTD = 0x20;
    90  0543  3020               	movlw	32
    91  0544  0088               	movwf	8	;volatile
    92                           ;lcd_lm016l.c: 95: (PORTD |= (1 << 2));
    93  0545  1508               	bsf	8,2	;volatile
    94                           ;lcd_lm016l.c: 96: asm("nop");
    95  0546  0000               	nop	;#
    96                           ;lcd_lm016l.c: 97: asm("nop");
    97  0547  0000               	nop	;#
    98                           ;lcd_lm016l.c: 98: (PORTD &= ~(1 << 2));
    99  0548  1108               	bcf	8,2	;volatile
   100                           ;lcd_lm016l.c: 99: delay_nus(40);
   101  0549  3028               	movlw	40
   102  054A  00B7               	movwf	?_delay_nus
   103  054B  01B8               	clrf	?_delay_nus+1
   104  054C  2D21               	ljmp	_delay_nus
   105                           ;lcd_lm016l.c: 104: void LCD_Busy ( void )
   106                           ;lcd_lm016l.c: 105: {
   107  054D                     _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  054D  30F0               	movlw	-16
   114  054E  1683               	bsf	3,5
   115  054F  1303               	bcf	3,6	;carry unused
   116  0550  0088               	movwf	8	;volatile
   117  0551                     l20
   118                           ;lcd_lm016l.c: 108: do
   119                           ;lcd_lm016l.c: 109: {
   120  0551  1283               	bcf	3,5
   121  0552  1488               	bsf	8,1	;volatile
   122                           ;lcd_lm016l.c: 111: (PORTD &= ~(1 << 0));
   123  0553  1008               	bcf	8,0	;volatile
   124                           ;lcd_lm016l.c: 112: (PORTD |= (1 << 2));
   125  0554  1508               	bsf	8,2	;volatile
   126                           ;lcd_lm016l.c: 113: delay_nus(3);
   127  0555  3003               	movlw	3
   128  0556  00B7               	movwf	?_delay_nus
   129  0557  01B8               	clrf	?_delay_nus+1
   130  0558  2521               	fcall	_delay_nus
   131                           ;lcd_lm016l.c: 114: high = PORTD;
   132  0559  0808               	movf	8,w	;volatile
   133  055A  00B6               	movwf	?a_LCD_Busy+1
   134                           ;lcd_lm016l.c: 115: (PORTD &= ~(1 << 2));
   135  055B  1108               	bcf	8,2	;volatile
   136                           ;lcd_lm016l.c: 116: (PORTD |= (1 << 2));
   137  055C  1508               	bsf	8,2	;volatile
   138                           ;lcd_lm016l.c: 117: asm("nop");
   139  055D  0000               	nop	;#
   140                           ;lcd_lm016l.c: 118: asm("nop");
   141  055E  0000               	nop	;#
   142                           ;lcd_lm016l.c: 119: low = PORTD;
   143  055F  0808               	movf	8,w	;volatile
   144  0560  00B5               	movwf	?a_LCD_Busy
   145                           ;lcd_lm016l.c: 120: (PORTD &= ~(1 << 2));
   146  0561  1108               	bcf	8,2	;volatile
   147                           ;lcd_lm016l.c: 121: } while(high & 0x80);
   148  0562  1BB6               	btfsc	?a_LCD_Busy+1,7
   149  0563  2D51               	goto	l20
   150                           ;lcd_lm016l.c: 122: delay_nus(20);
   151  0564  3014               	movlw	20
   152  0565  00B7               	movwf	?_delay_nus
   153  0566  01B8               	clrf	?_delay_nus+1
   154  0567  2D21               	ljmp	_delay_nus
   155                           ;lcd_lm016l.c: 127: void LCD_WriteControl (unsi
      +                          gned char CMD)
   156                           ;lcd_lm016l.c: 128: {
   157  0568                     _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  0568  0183               	clrf	3	;select bank 0
   162  0569  00B4               	movwf	?a_LCD_WriteControl
   163                           ;lcd_lm016l.c: 130: LCD_Busy();
   164  056A  254D  120A  118A   	fcall	_LCD_Busy
   165                           ;lcd_lm016l.c: 131: TRISD=0X00;
   166  056D  1683               	bsf	3,5
   167  056E  0188               	clrf	8	;volatile
   168                           ;lcd_lm016l.c: 134: PORTD =CMD & 0xf0;
   169  056F  1283               	bcf	3,5
   170  0570  0834               	movf	?a_LCD_WriteControl,w
   171  0571  39F0               	andlw	-16
   172  0572  0088               	movwf	8	;volatile
   173                           ;lcd_lm016l.c: 135: (PORTD &= ~(1 << 1));
   174  0573  1088               	bcf	8,1	;volatile
   175                           ;lcd_lm016l.c: 136: (PORTD &= ~(1 << 0));
   176  0574  1008               	bcf	8,0	;volatile
   177                           ;lcd_lm016l.c: 137: (PORTD |= (1 << 2));
   178  0575  1508               	bsf	8,2	;volatile
   179                           ;lcd_lm016l.c: 138: asm("nop");
   180  0576  0000               	nop	;#
   181                           ;lcd_lm016l.c: 139: asm("nop");
   182  0577  0000               	nop	;#
   183                           ;lcd_lm016l.c: 140: (PORTD &= ~(1 << 2));
   184  0578  1108               	bcf	8,2	;volatile
   185                           ;lcd_lm016l.c: 141: PORTD =CMD<<4;
   186  0579  0E34               	swapf	?a_LCD_WriteControl,w
   187  057A  39F0               	andlw	240
   188  057B  0088               	movwf	8	;volatile
   189                           ;lcd_lm016l.c: 142: (PORTD &= ~(1 << 1));
   190  057C  1088               	bcf	8,1	;volatile
   191                           ;lcd_lm016l.c: 143: (PORTD &= ~(1 << 0));
   192  057D  1008               	bcf	8,0	;volatile
   193                           ;lcd_lm016l.c: 144: (PORTD |= (1 << 2));
   194  057E  1508               	bsf	8,2	;volatile
   195                           ;lcd_lm016l.c: 145: asm("nop");
   196  057F  0000               	nop	;#
   197                           ;lcd_lm016l.c: 146: asm("nop");
   198  0580  0000               	nop	;#
   199                           ;lcd_lm016l.c: 147: (PORTD &= ~(1 << 2));
   200  0581  1108               	bcf	8,2	;volatile
   201                           ;lcd_lm016l.c: 148: }
   202  0582  0008               	return
   203                           ;lcd_lm016l.c: 177: void Init_LCD(void)
   204                           ;lcd_lm016l.c: 178: {
   205  0583                     _Init_LCD
   206                           ;lcd_lm016l.c: 179: LCD_INIT();
   207  0583  2535  120A  118A   	fcall	_LCD_INIT
   208                           ;lcd_lm016l.c: 181: LCD_WriteControl (0x28);
   209  0586  3028               	movlw	40
   210  0587  2568  120A  118A   	fcall	_LCD_WriteControl
   211                           ;lcd_lm016l.c: 182: LCD_WriteControl (0x08);
   212  058A  3008               	movlw	8
   213  058B  2568  120A  118A   	fcall	_LCD_WriteControl
   214                           ;lcd_lm016l.c: 183: LCD_WriteControl (0x01);
   215  058E  3001               	movlw	1
   216  058F  2568  120A  118A   	fcall	_LCD_WriteControl
   217                           ;lcd_lm016l.c: 184: LCD_WriteControl (0x06);
   218  0592  3006               	movlw	6
   219  0593  2568  120A  118A   	fcall	_LCD_WriteControl
   220                           ;lcd_lm016l.c: 185: LCD_WriteControl (0x0C);
   221  0596  300C               	movlw	12
   222  0597  2568  120A  118A   	fcall	_LCD_WriteControl
   223                           ;lcd_lm016l.c: 186: LCD_WriteControl (0x02);
   224  059A  3002               	movlw	2
   225  059B  2D68               	ljmp	_LCD_WriteControl
   226                           ;lcd_lm016l.c: 193: void LCD_Clear(void)
   227                           ;lcd_lm016l.c: 194: {
   228  059C                     _LCD_Clear
   229                           ;lcd_lm016l.c: 195: LCD_WriteControl(0x01);
   230  059C  3001               	movlw	1
   231  059D  2D68               	ljmp	_LCD_WriteControl
   232                           ;lcd_lm016l.c: 200: void LCD_Home(void)
   233                           ;lcd_lm016l.c: 201: {
   234  059E                     _LCD_Home
   235                           ;lcd_lm016l.c: 202: LCD_WriteControl(0x02);
   236  059E  3002               	movlw	2
   237  059F  2D68               	ljmp	_LCD_WriteControl
   238  05A0                     _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  05A0  0183               	clrf	3	;select bank 0
   243  05A1  00B3               	movwf	?a_LCD_Cursor
   244                           ;lcd_lm016l.c: 216: switch (row) {
   245  05A2  2DAF               	goto	l29

⌨️ 快捷键说明

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