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

📄 tsl2561.lst

📁 该程序是pic单片机程序
💻 LST
📖 第 1 页 / 共 5 页
字号:
   466                           	psect	text13
   467                           ;tsl2561.c: 197: unsigned int ReadADCResult(voi
      +                          d)
   468                           ;tsl2561.c: 198: {
   469  0C89                     _ReadADCResult
   470                           ;	_datalow assigned to ?a_ReadADCResult+0
   471  0000                     _ReadADCResult$datalow	set	?a_ReadADCResult
   472                           ;	_ADCResult assigned to ?a_ReadADCResult+1
   473  0000                     _ReadADCResult$ADCResult	set	?a_ReadADCResult+1
   474                           ;	_datahigh assigned to ?a_ReadADCResult+3
   475  0000                     _ReadADCResult$datahigh	set	?a_ReadADCResult+3
   476                           ;tsl2561.c: 199: unsigned char datalow;
   477  0C89  308C               	movlw	-116
   478  0C8A  118A  21E8         	fcall	_ReadByte
   479  0C8C  00B3               	movwf	?a_ReadADCResult
   480                           ;tsl2561.c: 203: datahigh=ReadByte(0x8D);
   481  0C8D  308D               	movlw	-115
   482  0C8E  118A  21E8  158A   	fcall	_ReadByte
   483  0C91  00B6               	movwf	?a_ReadADCResult+3
   484  0C92  01B7               	clrf	?a_ReadADCResult+4
   485                           ;tsl2561.c: 205: ADCResult=(datahigh<<8)+datalo
      +                          w;
   486  0C93  00BD               	movwf	btemp+1
   487  0C94  01BC               	clrf	btemp
   488  0C95  0833               	movf	?a_ReadADCResult,w
   489  0C96  073C               	addwf	btemp,w
   490  0C97  00B4               	movwf	?a_ReadADCResult+1
   491  0C98  083D               	movf	btemp+1,w
   492  0C99  1803               	btfsc	3,0
   493  0C9A  0A3D               	incf	btemp+1,w
   494  0C9B  00B5               	movwf	?a_ReadADCResult+2
   495                           ;tsl2561.c: 207: return(ADCResult);
   496  0C9C  00BD               	movwf	btemp+1
   497  0C9D  0834               	movf	?a_ReadADCResult+1,w
   498  0C9E  00BC               	movwf	btemp
   499                           ;tsl2561.c: 208: }
   500  0C9F  0008               	return
   501                           ;tsl2561.c: 210: void I_byte_write(unsigned cha
      +                          r slave_address,unsigned char byte_address,unsi
      +                          gned char datain)
   502                           ;tsl2561.c: 211: {
   503                           ;       param _byte_address assigned to ?_I_byt
      +                          e_write+0
   504  0000                     _I_byte_write$byte_address	set	?_I_byte_write
   505                           ;       param _datain assigned to ?_I_byte_writ
      +                          e+1
   506  0000                     _I_byte_write$datain	set	?_I_byte_write+1
   507                           
   508                           	psect	text18
   509                           ;tsl2561.c: 267: unsigned char slavereceive_byt
      +                          e()
   510                           ;tsl2561.c: 268: {
   511  00F6                     _slavereceive_byte
   512                           ;	_bit_count0 assigned to ?a_slavereceive_byte+
      +                          0
   513  0000                     _slavereceive_byte$bit_count0	set	?a_slaverecei
      +                          ve_byte
   514                           ;	_retc0 assigned to ?a_slavereceive_byte+1
   515  0000                     _slavereceive_byte$retc0	set	?a_slavereceive_by
      +                          te+1
   516                           ;tsl2561.c: 269: unsigned char retc0,bit_count0
      +                          ;
   517  00F6  0183               	clrf	3	;select bank 0
   518  00F7  01B4               	clrf	?a_slavereceive_byte+1
   519                           ;tsl2561.c: 271: TRISB2=1;
   520  00F8  1683               	bsf	3,5
   521  00F9  1506               	bsf	6,2
   522                           ;tsl2561.c: 272: for (bit_count0=0;bit_count0<8
      +                          ;bit_count0++)
   523  00FA  1283               	bcf	3,5
   524  00FB  01B3               	clrf	?a_slavereceive_byte
   525  00FC                     l59
   526                           ;tsl2561.c: 273: {
   527                           ;tsl2561.c: 274: asm("nop");
   528  00FC  0000               	nop	;#
   529                           ;tsl2561.c: 275: TRISB1=0;
   530  00FD  1683               	bsf	3,5
   531  00FE  1086               	bcf	6,1
   532                           ;tsl2561.c: 276: asm("nop");asm("nop");asm("nop
      +                          ");asm("nop");asm("nop");
   533  00FF  0000               	nop	;#
   534  0100  0000               	nop	;#
   535  0101  0000               	nop	;#
   536  0102  0000               	nop	;#
   537  0103  0000               	nop	;#
   538                           ;tsl2561.c: 277: TRISB1=1;
   539  0104  1486               	bsf	6,1
   540                           ;tsl2561.c: 278: while(RB1==0)
   541  0105                     l62
   542                           ;tsl2561.c: 279: {
   543  0105  1283               	bcf	3,5
   544  0106  1C86               	btfss	6,1
   545  0107  2905               	goto	l62
   546                           ;tsl2561.c: 284: retc0=retc0<<1;
   547  0108  1003               	bcf	3,0
   548  0109  0DB4               	rlf	?a_slavereceive_byte+1
   549                           ;tsl2561.c: 285: if (RB2==1) retc0=retc0+1;
   550  010A  1906               	btfsc	6,2
   551  010B  0AB4               	incf	?a_slavereceive_byte+1
   552                           ;tsl2561.c: 287: asm("nop");asm("nop");
   553  010C  0000               	nop	;#
   554  010D  0000               	nop	;#
   555                           ;tsl2561.c: 288: }
   556  010E  0AB3               	incf	?a_slavereceive_byte
   557  010F  3008               	movlw	8
   558  0110  0233               	subwf	?a_slavereceive_byte,w
   559  0111  1C03               	btfss	3,0
   560  0112  28FC               	goto	l59
   561                           ;tsl2561.c: 289: TRISB1=0;
   562  0113  1683               	bsf	3,5
   563  0114  1086               	bcf	6,1
   564                           ;tsl2561.c: 290: asm("nop");asm("nop");
   565  0115  0000               	nop	;#
   566  0116  0000               	nop	;#
   567                           ;tsl2561.c: 291: return (retc0);
   568  0117  1283               	bcf	3,5
   569  0118  0834               	movf	?a_slavereceive_byte+1,w
   570                           ;tsl2561.c: 292: }
   571  0119  0008               	return
   572                           ;tsl2561.c: 93: unsigned char receive_byte()
   573                           ;tsl2561.c: 94: {
   574  011A                     _receive_byte
   575                           ;	_bit_count assigned to ?a_receive_byte+0
   576  0000                     _receive_byte$bit_count	set	?a_receive_byte
   577                           ;	_retc assigned to ?a_receive_byte+1
   578  0000                     _receive_byte$retc	set	?a_receive_byte+1
   579                           ;tsl2561.c: 95: unsigned char retc,bit_count;
   580  011A  0183               	clrf	3	;select bank 0
   581  011B  01B4               	clrf	?a_receive_byte+1
   582                           ;tsl2561.c: 97: TRISB2=1;
   583  011C  1683               	bsf	3,5
   584  011D  1506               	bsf	6,2
   585                           ;tsl2561.c: 98: for (bit_count=0;bit_count<8;bi
      +                          t_count++)
   586  011E  1283               	bcf	3,5
   587  011F  01B3               	clrf	?a_receive_byte
   588  0120                     l18
   589                           ;tsl2561.c: 99: {
   590                           ;tsl2561.c: 100: asm("nop");
   591  0120  0000               	nop	;#
   592                           ;tsl2561.c: 101: TRISB1=0;
   593  0121  1683               	bsf	3,5
   594  0122  1086               	bcf	6,1
   595                           ;tsl2561.c: 102: asm("nop");asm("nop");asm("nop
      +                          ");asm("nop");asm("nop");
   596  0123  0000               	nop	;#
   597  0124  0000               	nop	;#
   598  0125  0000               	nop	;#
   599  0126  0000               	nop	;#
   600  0127  0000               	nop	;#
   601                           ;tsl2561.c: 103: TRISB1=1;
   602  0128  1486               	bsf	6,1
   603                           ;tsl2561.c: 104: asm("nop");asm("nop");
   604  0129  0000               	nop	;#
   605  012A  0000               	nop	;#
   606                           ;tsl2561.c: 105: retc=retc<<1;
   607  012B  1003               	bcf	3,0
   608  012C  1283               	bcf	3,5
   609  012D  0DB4               	rlf	?a_receive_byte+1
   610                           ;tsl2561.c: 106: if (RB2==1) retc=retc+1;
   611  012E  1906               	btfsc	6,2
   612  012F  0AB4               	incf	?a_receive_byte+1
   613                           ;tsl2561.c: 107: asm("nop");asm("nop");
   614  0130  0000               	nop	;#
   615  0131  0000               	nop	;#
   616                           ;tsl2561.c: 108: }
   617  0132  0AB3               	incf	?a_receive_byte
   618  0133  3008               	movlw	8
   619  0134  0233               	subwf	?a_receive_byte,w
   620  0135  1C03               	btfss	3,0
   621  0136  2920               	goto	l18
   622                           ;tsl2561.c: 109: TRISB1=0;
   623  0137  1683               	bsf	3,5
   624  0138  1086               	bcf	6,1
   625                           ;tsl2561.c: 110: asm("nop");asm("nop");
   626  0139  0000               	nop	;#
   627  013A  0000               	nop	;#
   628                           ;tsl2561.c: 111: return (retc);
   629  013B  1283               	bcf	3,5
   630  013C  0834               	movf	?a_receive_byte+1,w
   631                           ;tsl2561.c: 112: }
   632  013D  0008               	return
   633                           ;tsl2561.c: 46: void stop_i2c()
   634                           ;tsl2561.c: 47: {
   635  013E                     _stop_i2c
   636                           ;tsl2561.c: 49: TRISB2=0;
   637  013E  1683               	bsf	3,5
   638  013F  1303               	bcf	3,6	;carry unused
   639  0140  1106               	bcf	6,2
   640                           ;tsl2561.c: 50: asm("nop");
   641  0141  0000               	nop	;#
   642                           ;tsl2561.c: 51: TRISB1=1;
   643  0142  1486               	bsf	6,1
   644                           ;tsl2561.c: 52: asm("nop");asm("nop");asm("nop"
      +                          );asm("nop");asm("nop");
   645  0143  0000               	nop	;#
   646  0144  0000               	nop	;#
   647  0145  0000               	nop	;#
   648  0146  0000               	nop	;#
   649  0147  0000               	nop	;#
   650                           ;tsl2561.c: 53: TRISB2=1;
   651  0148  1506               	bsf	6,2
   652                           ;tsl2561.c: 54: asm("nop");asm("nop");asm("nop"
      +                          );asm("nop");
   653  0149  0000               	nop	;#
   654  014A  0000               	nop	;#
   655  014B  0000               	nop	;#
   656  014C  0000               	nop	;#
   657                           ;tsl2561.c: 55: }
   658  014D  1283               	bcf	3,5
   659  014E  0008               	return
   660                           ;tsl2561.c: 64: void send_byte(unsigned char c)
   661                           ;tsl2561.c: 65: {
   662  014F                     _send_byte
   663                           ;	_c assigned to ?a_send_byte+0
   664  0000                     _send_byte$c	set	?a_send_byte
   665                           ;	_bit_count assigned to ?a_send_byte+1
   666  0000                     _send_byte$bit_count	set	?a_send_byte+1
   667                           ;_c stored from w
   668  014F  0183               	clrf	3	;select bank 0
   669  0150  00B3               	movwf	?a_send_byte
   670                           ;tsl2561.c: 66: unsigned char bit_count;
   671  0151  01B4               	clrf	?a_send_byte+1
   672  0152                     l10
   673                           ;tsl2561.c: 68: {
   674                           ;tsl2561.c: 69: if ((c<<bit_count)&0x80) {TRISB
      +                          2=1;}
   675  0152  0834               	movf	?a_send_byte+1,w
   676  0153  00BC               	movwf	btemp
   677  0154  0833               	movf	?a_send_byte,w
   678  0155  00BE               	movwf	btemp+2
   679  0156  01BF               	clrf	btemp+3
   680  0157  0ABC               	incf	btemp
   681  0158  295C               	goto	u24
   682  0159                     u25
   683  0159  1003               	bcf	3,0
   684  015A  0DBE               	rlf	btemp+2
   685  015B  0DBF               	rlf	btemp+3
   686  015C                     u24
   687  015C  0BBC               	decfsz	btemp
   688  015D  2959               	goto	u25
   689  015E  1FBE               	btfss	btemp+2,7

⌨️ 快捷键说明

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