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

📄 u873.lst

📁 此为一个详细的程序源代码 由单片机PIC16F873检测电平
💻 LST
📖 第 1 页 / 共 2 页
字号:


HI-TECH Software PICC Macro Assembler V8.05PL2
Serial number: HCPIC-88888                            Tue Aug 26 13:31:35 2008

Licensed to: ONE TWO
     1                           	processor	16F873A
     2                           	opt	pw 79
     3                           	psect	__Z88888RS_,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	text3,local,class=CODE,delta=2
     8                           	psect	text5,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	__Z88888RS_
    21  00B2                     
    22  00B2                     
    23                           
    24                           	psect	text0
    25  066C                     _delayC
    26                           ;	_del assigned to ?a_delayC+0
    27  0000                     _delayC$del	set	?a_delayC
    28                           ;_del stored from w
    29  066C  0183               	clrf	3	;select bank 0
    30  066D  00CB               	movwf	?a_delayC
    31                           ;U873.C: 5: while(--del);
    32  066E                     l2
    33  066E  1283               	bcf	3,5
    34  066F  1303               	bcf	3,6	;carry unused
    35  0670  0BCB               	decfsz	?a_delayC
    36  0671  2E6E               	goto	l2
    37  0672  0008               	return
    38  0673                     _ADIN
    39                           ;	_c0 assigned to ?a_ADIN+0
    40  0000                     _ADIN$c0	set	?a_ADIN
    41                           ;_c0 stored from w
    42  0673  0183               	clrf	3	;select bank 0
    43  0674  00CA               	movwf	?a_ADIN
    44                           ;U873.C: 45: ADCON0=c0;
    45  0675  009F               	movwf	31	;volatile
    46                           ;U873.C: 46: ADCON1=c1;
    47  0676  0849               	movf	?_ADIN,w
    48  0677  1683               	bsf	3,5
    49  0678  009F               	movwf	31	;volatile
    50                           ;U873.C: 48: delayC(15);
    51  0679  300F               	movlw	15
    52  067A  266C               	fcall	_delayC
    53                           ;U873.C: 49: ADGO=1;
    54  067B  151F               	bsf	31,2
    55                           ;U873.C: 50: }
    56  067C  0008               	return
    57                           
    58                           	psect	text1
    59  0A27                     _delayI
    60                           ;U873.C: 10: while(--del);
    61  0A27                     l6
    62  0A27  30FF               	movlw	-1
    63  0A28  0183               	clrf	3	;select bank 0
    64  0A29  07C5               	addwf	?_delayI
    65  0A2A  1C03               	btfss	3,0
    66  0A2B  03C6               	decf	?_delayI+1
    67  0A2C  0846               	movf	?_delayI+1,w
    68  0A2D  0445               	iorwf	?_delayI,w
    69  0A2E  1903               	btfsc	3,2
    70  0A2F  0008               	return
    71  0A30  2A27               	goto	l6
    72                           
    73                           	psect	text2
    74                           ;U873.C: 13: unsigned char ReadEEPROM(unsigned 
      +                          char EE_Addr)
    75                           ;U873.C: 14: {
    76  0A31                     _ReadEEPROM
    77                           ;	_EE_Addr assigned to ?a_ReadEEPROM+0
    78  0000                     _ReadEEPROM$EE_Addr	set	?a_ReadEEPROM
    79                           ;_EE_Addr stored from w
    80  0A31  0183               	clrf	3	;select bank 0
    81  0A32  00C5               	movwf	?a_ReadEEPROM
    82                           ;U873.C: 15: EEADR=EE_Addr;
    83  0A33  1703               	bsf	3,6
    84  0A34  008D               	movwf	13	;volatile
    85                           ;U873.C: 16: EEPGD=0;
    86  0A35  1683               	bsf	3,5
    87  0A36  138C               	bcf	12,7
    88                           ;U873.C: 17: RD=1;
    89  0A37  140C               	bsf	12,0
    90                           ;U873.C: 18: return EEDATA;
    91  0A38  1283               	bcf	3,5
    92  0A39  080C               	movf	12,w	;volatile
    93                           ;U873.C: 19: }
    94  0A3A  1303               	bcf	3,6	;carry unused
    95  0A3B  0008               	return
    96                           
    97                           	psect	text3
    98  0A77                     _WriteEEPROM
    99                           ;	_EE_data assigned to ?a_WriteEEPROM+0
   100  0000                     _WriteEEPROM$EE_data	set	?a_WriteEEPROM
   101                           ;	_j assigned to ?a_WriteEEPROM+1
   102  0000                     _WriteEEPROM$j	set	?a_WriteEEPROM+1
   103                           ;_EE_data stored from w
   104  0A77  0183               	clrf	3	;select bank 0
   105  0A78  00C6               	movwf	?a_WriteEEPROM
   106                           ;U873.C: 23: unsigned char j=0;
   107  0A79  01C7               	clrf	?a_WriteEEPROM+1
   108                           ;U873.C: 24: EEIF=0;
   109  0A7A  120D               	bcf	13,4
   110                           ;U873.C: 25: EEADR=EE_addr;
   111  0A7B  0845               	movf	?_WriteEEPROM,w
   112  0A7C  1703               	bsf	3,6
   113  0A7D  008D               	movwf	13	;volatile
   114                           ;U873.C: 26: EEDATA=EE_data;
   115  0A7E  1303               	bcf	3,6	;carry unused
   116  0A7F  0846               	movf	?a_WriteEEPROM,w
   117  0A80  1703               	bsf	3,6
   118  0A81  008C               	movwf	12	;volatile
   119                           ;U873.C: 27: EEPGD=0;
   120  0A82  1683               	bsf	3,5
   121  0A83  138C               	bcf	12,7
   122                           ;U873.C: 28: while(++j<10)
   123  0A84  2A94               	goto	l11
   124  0A85                     l12
   125                           ;U873.C: 29: {
   126  0A85  138B               	bcf	11,7
   127                           ;U873.C: 31: WREN=1;
   128  0A86  1683               	bsf	3,5
   129  0A87  1703               	bsf	3,6
   130  0A88  150C               	bsf	12,2
   131                           ;U873.C: 32: EECON2=0x55;
   132  0A89  3055               	movlw	85
   133  0A8A  008D               	movwf	13	;volatile
   134                           ;U873.C: 33: EECON2=0xaa;
   135  0A8B  30AA               	movlw	-86
   136  0A8C  008D               	movwf	13	;volatile
   137                           ;U873.C: 34: WR=1;
   138  0A8D  148C               	bsf	12,1
   139                           ;U873.C: 35: WREN=0;
   140  0A8E  110C               	bcf	12,2
   141                           ;U873.C: 36: GIE=1;
   142  0A8F  178B               	bsf	11,7
   143                           ;U873.C: 37: while(WR);
   144  0A90                     l14
   145  0A90  188C               	btfsc	12,1
   146  0A91  2A90               	goto	l14
   147                           ;U873.C: 38: if(!WRERR)
   148  0A92  1D8C               	btfss	12,3
   149  0A93  2A9B               	goto	l10
   150                           ;U873.C: 39: break;
   151  0A94                     l11
   152  0A94  300A               	movlw	10
   153  0A95  1283               	bcf	3,5
   154  0A96  1303               	bcf	3,6	;carry unused
   155  0A97  0AC7               	incf	?a_WriteEEPROM+1
   156  0A98  0247               	subwf	?a_WriteEEPROM+1,w
   157  0A99  1C03               	btfss	3,0
   158  0A9A  2A85               	goto	l12
   159                           ;U873.C: 41: }
   160  0A9B                     l10
   161  0A9B  0183               	clrf	3	;select bank 0
   162  0A9C  0008               	return
   163                           
   164                           	psect	text5
   165  0000                     
   166  0000                     
   167  0000                     
   168  0000                     
   169  0000                     
   170  0000                     
   171  0000                     
   172  0000                     
   173  0000                     
   174  0000                     
   175  0000                     
   176  0000                     
   177  0000                     
   178  0000                     
   179  0000                     
   180  0000                     
   181  0000                     
   182  0000                     
   183  0000                     
   184  0000                     
   185  0000                     
   186  0000                     
   187  0000                     
   188  0000                     
   189  0000                     
   190  0000                     
   191  0000                     
   192  0000                     
   193  0000                     
   194  0000                     
   195  0000                     
   196  0000                     
   197  0000                     
   198  0000                     
   199  0000                     
   200  0000                     
   201  0000                     
   202  0000                     
   203  0000                     
   204  0000                     
   205  0000                     
   206  0000                     
   207  0000                     
   208  0000                     
   209  0000                     

⌨️ 快捷键说明

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