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

📄 tsl5621.lst

📁 该程序是pic单片机程序
💻 LST
📖 第 1 页 / 共 3 页
字号:


HI-TECH Software PICC Macro Assembler V8.05PL2
Serial number: HCPIC-42044                            Sat Nov 19 13:17:58 2005

Licensed to: ONE
     1                           	processor	16F873A
     2                           	opt	pw 79
     3                           	psect	__Z42044RS_,global,delta=1
     4                           	psect	rdata_0,global,class=BANK0,space=1,delta
      +                          =1
     5                           	psect	idata_0,global,class=CODE,delta=2
     6                           	psect	text4,local,class=CODE,delta=2
     7                           	psect	text14,local,class=CODE,delta=2
     8                           	psect	rbss_0,global,class=BANK0,space=1,delta=
      +                          1
     9                           	psect	temp,global,ovrld,class=BANK0,space=1,de
      +                          lta=1
    10  0000                     
    11  0000                     
    12  0000                     
    13  0000                     
    14  0000                     
    15  0000                     
    16  0000                     
    17  0000                     
    18  0000                     
    19  0000                     
    20                           
    21                           	psect	__Z42044RS_
    22  00A0                     
    23  00A0                     
    24                           
    25                           	psect	rdata_0
    26  002D                     _code
    27  002D                     	ds	1
    28  002E                     	ds	1
    29  002F                     	ds	1
    30  0030                     	ds	1
    31  0031                     	ds	1
    32  0032                     	ds	1
    33  0033                     	ds	1
    34  0034                     	ds	1
    35  0035                     	ds	1
    36                           
    37                           	psect	idata_0
    38  07F7  3400               	retlw	0
    39  07F8  3401               	retlw	1
    40  07F9  3403               	retlw	3
    41  07FA  3407               	retlw	7
    42  07FB  340F               	retlw	15
    43  07FC  341F               	retlw	31
    44  07FD  343F               	retlw	63
    45  07FE  347F               	retlw	127
    46  07FF  34FF               	retlw	-1
    47                           
    48                           	psect	text4
    49                           ;tsl5621.c: 100: unsigned char receive_byte()
    50                           ;tsl5621.c: 101: {
    51  0698                     _receive_byte
    52                           ;	_bit_count assigned to ?a_receive_byte+0
    53  0000                     _receive_byte$bit_count	set	?a_receive_byte
    54                           ;	_retc assigned to ?a_receive_byte+1
    55  0000                     _receive_byte$retc	set	?a_receive_byte+1
    56                           ;tsl5621.c: 102: unsigned char retc,bit_count;
    57  0698  0183               	clrf	3	;select bank 0
    58  0699  01A7               	clrf	?a_receive_byte+1
    59                           ;tsl5621.c: 104: TRISB2=1;
    60  069A  1683               	bsf	3,5
    61  069B  1506               	bsf	6,2
    62                           ;tsl5621.c: 105: for (bit_count=0;bit_count<8;b
      +                          it_count++)
    63  069C  1283               	bcf	3,5
    64  069D  01A6               	clrf	?a_receive_byte
    65  069E                     l13
    66                           ;tsl5621.c: 106: {
    67                           ;tsl5621.c: 107: asm("nop");
    68  069E  0000               	nop	;#
    69                           ;tsl5621.c: 108: TRISB1=0;
    70  069F  1683               	bsf	3,5
    71  06A0  1086               	bcf	6,1
    72                           ;tsl5621.c: 109: asm("nop");asm("nop");asm("nop
      +                          ");asm("nop");asm("nop");
    73  06A1  0000               	nop	;#
    74  06A2  0000               	nop	;#
    75  06A3  0000               	nop	;#
    76  06A4  0000               	nop	;#
    77  06A5  0000               	nop	;#
    78                           ;tsl5621.c: 110: TRISB1=1;
    79  06A6  1486               	bsf	6,1
    80                           ;tsl5621.c: 111: asm("nop");asm("nop");
    81  06A7  0000               	nop	;#
    82  06A8  0000               	nop	;#
    83                           ;tsl5621.c: 112: retc=retc<<1;
    84  06A9  1003               	bcf	3,0
    85  06AA  1283               	bcf	3,5
    86  06AB  0DA7               	rlf	?a_receive_byte+1
    87                           ;tsl5621.c: 113: if (RB2==1) retc=retc+1;
    88  06AC  1906               	btfsc	6,2
    89  06AD  0AA7               	incf	?a_receive_byte+1
    90                           ;tsl5621.c: 114: asm("nop");asm("nop");
    91  06AE  0000               	nop	;#
    92  06AF  0000               	nop	;#
    93                           ;tsl5621.c: 115: }
    94  06B0  0AA6               	incf	?a_receive_byte
    95  06B1  3008               	movlw	8
    96  06B2  0226               	subwf	?a_receive_byte,w
    97  06B3  1C03               	btfss	3,0
    98  06B4  2E9E               	goto	l13
    99                           ;tsl5621.c: 116: TRISB1=0;
   100  06B5  1683               	bsf	3,5
   101  06B6  1086               	bcf	6,1
   102                           ;tsl5621.c: 117: asm("nop");asm("nop");
   103  06B7  0000               	nop	;#
   104  06B8  0000               	nop	;#
   105                           ;tsl5621.c: 118: return (retc);
   106  06B9  1283               	bcf	3,5
   107  06BA  0827               	movf	?a_receive_byte+1,w
   108                           ;tsl5621.c: 119: }
   109  06BB  0008               	return
   110  06BC                     _stop_i2c
   111                           ;tsl5621.c: 56: TRISB2=0;
   112  06BC  1683               	bsf	3,5
   113  06BD  1303               	bcf	3,6	;carry unused
   114  06BE  1106               	bcf	6,2
   115                           ;tsl5621.c: 57: asm("nop");
   116  06BF  0000               	nop	;#
   117                           ;tsl5621.c: 58: TRISB1=1;
   118  06C0  1486               	bsf	6,1
   119                           ;tsl5621.c: 59: asm("nop");asm("nop");asm("nop"
      +                          );asm("nop");asm("nop");
   120  06C1  0000               	nop	;#
   121  06C2  0000               	nop	;#
   122  06C3  0000               	nop	;#
   123  06C4  0000               	nop	;#
   124  06C5  0000               	nop	;#
   125                           ;tsl5621.c: 60: TRISB2=1;
   126  06C6  1506               	bsf	6,2
   127                           ;tsl5621.c: 61: asm("nop");asm("nop");asm("nop"
      +                          );asm("nop");
   128  06C7  0000               	nop	;#
   129  06C8  0000               	nop	;#
   130  06C9  0000               	nop	;#
   131  06CA  0000               	nop	;#
   132                           ;tsl5621.c: 62: }
   133  06CB  1283               	bcf	3,5
   134  06CC  0008               	return
   135                           ;tsl5621.c: 221: void delay_250ms()
   136                           ;tsl5621.c: 222: {
   137  06CD                     _delay_250ms
   138                           ;	_d assigned to ?a_delay_250ms+0
   139  0000                     _delay_250ms$d	set	?a_delay_250ms
   140                           ;tsl5621.c: 223: unsigned int d=65535;
   141  06CD  30FF               	movlw	255
   142  06CE  0183               	clrf	3	;select bank 0
   143  06CF  00AB               	movwf	?a_delay_250ms
   144  06D0  00AC               	movwf	?a_delay_250ms+1
   145                           ;tsl5621.c: 224: while (--d);
   146  06D1                     l47
   147  06D1  30FF               	movlw	-1
   148  06D2  07AB               	addwf	?a_delay_250ms
   149  06D3  1C03               	btfss	3,0
   150  06D4  03AC               	decf	?a_delay_250ms+1
   151  06D5  082C               	movf	?a_delay_250ms+1,w
   152  06D6  042B               	iorwf	?a_delay_250ms,w
   153  06D7  1903               	btfsc	3,2
   154  06D8  0008               	return
   155  06D9  2ED1               	goto	l47
   156                           ;tsl5621.c: 232: void iic_error ()
   157                           ;tsl5621.c: 233: {
   158  06DA                     _iic_error
   159                           ;	_i assigned to ?a_iic_error+0
   160  0000                     _iic_error$i	set	?a_iic_error
   161                           ;tsl5621.c: 234: unsigned char i;
   162  06DA  0183               	clrf	3	;select bank 0
   163  06DB  01AA               	clrf	?a_iic_error
   164  06DC                     l51
   165                           ;tsl5621.c: 236: {
   166                           ;tsl5621.c: 237: RB6=0;
   167  06DC  1306               	bcf	6,6
   168                           ;tsl5621.c: 238: delay_250ms();
   169  06DD  26CD               	fcall	_delay_250ms
   170                           ;tsl5621.c: 239: asm("clrwdt");
   171  06DE  0064               	clrwdt	;#
   172                           ;tsl5621.c: 240: RB6=1;
   173  06DF  1706               	bsf	6,6
   174                           ;tsl5621.c: 241: delay_250ms();
   175  06E0  26CD               	fcall	_delay_250ms
   176                           ;tsl5621.c: 242: asm("clrwdt");
   177  06E1  0064               	clrwdt	;#
   178                           ;tsl5621.c: 243: }
   179  06E2  0AAA               	incf	?a_iic_error
   180  06E3  3008               	movlw	8
   181  06E4  022A               	subwf	?a_iic_error,w
   182  06E5  1803               	btfsc	3,0
   183  06E6  0008               	return
   184  06E7  2EDC               	goto	l51
   185  06E8                     _send_byte
   186                           ;	_c assigned to ?a_send_byte+0
   187  0000                     _send_byte$c	set	?a_send_byte
   188                           ;	_bit_count assigned to ?a_send_byte+1
   189  0000                     _send_byte$bit_count	set	?a_send_byte+1
   190                           ;_c stored from w
   191  06E8  0183               	clrf	3	;select bank 0
   192  06E9  00AA               	movwf	?a_send_byte
   193                           ;tsl5621.c: 73: unsigned char bit_count;
   194  06EA  01AB               	clrf	?a_send_byte+1
   195  06EB                     l5
   196                           ;tsl5621.c: 75: {
   197                           ;tsl5621.c: 76: if ((c<<bit_count)&0x80) {TRISB
      +                          2=1;}
   198  06EB  082B               	movf	?a_send_byte+1,w
   199  06EC  00B6               	movwf	btemp
   200  06ED  082A               	movf	?a_send_byte,w
   201  06EE  00B8               	movwf	btemp+2
   202  06EF  01B9               	clrf	btemp+3
   203  06F0  0AB6               	incf	btemp
   204  06F1  2EF5               	goto	u14
   205  06F2                     u15
   206  06F2  1003               	bcf	3,0
   207  06F3  0DB8               	rlf	btemp+2
   208  06F4  0DB9               	rlf	btemp+3
   209  06F5                     u14
   210  06F5  0BB6               	decfsz	btemp
   211  06F6  2EF2               	goto	u15
   212  06F7  1FB8               	btfss	btemp+2,7
   213  06F8  2EFC               	goto	l8
   214  06F9  1683               	bsf	3,5
   215  06FA  1506               	bsf	6,2
   216                           ;tsl5621.c: 77: else {TRISB2=0;}
   217  06FB  2EFE               	goto	l9
   218  06FC                     l8
   219  06FC  1683               	bsf	3,5
   220  06FD  1106               	bcf	6,2
   221  06FE                     l9
   222                           ;tsl5621.c: 78: asm("nop");
   223  06FE  0000               	nop	;#
   224                           ;tsl5621.c: 79: TRISB1=1;
   225  06FF  1486               	bsf	6,1
   226                           ;tsl5621.c: 80: asm("nop");asm("nop");asm("nop"
      +                          );asm("nop");asm("nop");
   227  0700  0000               	nop	;#
   228  0701  0000               	nop	;#
   229  0702  0000               	nop	;#
   230  0703  0000               	nop	;#
   231  0704  0000               	nop	;#
   232                           ;tsl5621.c: 81: TRISB1=0;
   233  0705  1086               	bcf	6,1
   234                           ;tsl5621.c: 82: }
   235  0706  1283               	bcf	3,5
   236  0707  0AAB               	incf	?a_send_byte+1
   237  0708  3008               	movlw	8
   238  0709  022B               	subwf	?a_send_byte+1,w
   239  070A  1C03               	btfss	3,0
   240  070B  2EEB               	goto	l5
   241                           ;tsl5621.c: 83: asm("nop");asm("nop");
   242  070C  0000               	nop	;#
   243  070D  0000               	nop	;#
   244                           ;tsl5621.c: 84: TRISB2=1;
   245  070E  1683               	bsf	3,5
   246  070F  1506               	bsf	6,2
   247                           ;tsl5621.c: 85: asm("nop");asm("nop");
   248  0710  0000               	nop	;#
   249  0711  0000               	nop	;#
   250                           ;tsl5621.c: 86: TRISB1=1;
   251  0712  1486               	bsf	6,1
   252                           ;tsl5621.c: 87: asm("nop");asm("nop");asm("nop"
      +                          );
   253  0713  0000               	nop	;#
   254  0714  0000               	nop	;#
   255  0715  0000               	nop	;#
   256                           ;tsl5621.c: 88: if (RB2==1) ack=0;
   257  0716  1283               	bcf	3,5
   258  0717  01A0               	clrf	_ack
   259  0718  1D06               	btfss	6,2
   260                           ;tsl5621.c: 89: else ack=1;
   261  0719  0AA0               	incf	_ack
   262                           ;tsl5621.c: 90: TRISB1=0;
   263  071A  1683               	bsf	3,5
   264  071B  1086               	bcf	6,1
   265                           ;tsl5621.c: 91: asm("nop");asm("nop");
   266  071C  0000               	nop	;#
   267  071D  0000               	nop	;#
   268                           ;tsl5621.c: 92: }
   269  071E  1283               	bcf	3,5
   270  071F  0008               	return
   271  0720                     _start_i2c
   272                           ;tsl5621.c: 37: TRISB2=1;
   273  0720  1683               	bsf	3,5
   274  0721  1303               	bcf	3,6	;carry unused
   275  0722  1506               	bsf	6,2
   276                           ;tsl5621.c: 38: asm("nop");
   277  0723  0000               	nop	;#
   278                           ;tsl5621.c: 39: TRISB1=1;
   279  0724  1486               	bsf	6,1
   280                           ;tsl5621.c: 40: asm("nop");asm("nop");asm("nop"
      +                          );asm("nop");asm("nop");
   281  0725  0000               	nop	;#
   282  0726  0000               	nop	;#
   283  0727  0000               	nop	;#
   284  0728  0000               	nop	;#
   285  0729  0000               	nop	;#
   286                           ;tsl5621.c: 41: TRISB2=0;
   287  072A  1106               	bcf	6,2
   288                           ;tsl5621.c: 42: asm("nop");asm("nop");asm("nop"
      +                          );asm("nop");asm("nop");
   289  072B  0000               	nop	;#
   290  072C  0000               	nop	;#
   291  072D  0000               	nop	;#
   292  072E  0000               	nop	;#
   293  072F  0000               	nop	;#
   294                           ;tsl5621.c: 43: TRISB1=0;
   295  0730  1086               	bcf	6,1
   296                           ;tsl5621.c: 44: asm("nop");asm("nop");
   297  0731  0000               	nop	;#
   298  0732  0000               	nop	;#
   299                           ;tsl5621.c: 45: }
   300  0733  1283               	bcf	3,5
   301  0734  0008               	return

⌨️ 快捷键说明

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