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

📄 timer.lst

📁 LED控制
💻 LST
📖 第 1 页 / 共 2 页
字号:


HI-TECH Software PICC Macro Assembler V8.05PL2
Serial number: HCPIC-88888                            Thu Apr 23 16:52:09 2009

Licensed to: ONE TWO
     1                           	processor	16F737
     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	text4,local,class=CODE,delta=2
     9                           	psect	text5,local,class=CODE,delta=2
    10                           	psect	rbss_0,global,class=BANK0,space=1,delta=
      +                          1
    11  0000                     
    12  0000                     
    13  0000                     
    14  0000                     
    15  0000                     
    16  0000                     
    17  0000                     
    18  0000                     
    19  0000                     
    20  0000                     
    21                           
    22                           	psect	__Z88888RS_
    23  0190                     
    24  0190                     
    25                           
    26                           	psect	text0
    27  04E3                     _Timer_Init
    28                           ;Timer.c: 17: OPTION &= ~7;
    29  04E3  30F8               	movlw	-8
    30  04E4  1683               	bsf	3,5
    31  04E5  1303               	bcf	3,6	;carry unused
    32  04E6  0581               	andwf	1
    33                           ;Timer.c: 21: OPTION |= 0;
    34  04E7  1281               	bcf	1,5
    35                           ;Timer.c: 24: PSA = 0;
    36  04E8  1181               	bcf	1,3
    37                           ;Timer.c: 27: TMR0IE = 0;
    38  04E9  128B               	bcf	11,5
    39                           ;Timer.c: 29: T1CKPS1 = 0;
    40  04EA  1283               	bcf	3,5
    41  04EB  1290               	bcf	16,5
    42                           ;Timer.c: 30: T1CKPS0 = 0;
    43  04EC  1210               	bcf	16,4
    44                           ;Timer.c: 31: TMR1CS = 0;
    45  04ED  1090               	bcf	16,1
    46                           ;Timer.c: 33: TMR1IF = 0;
    47  04EE  100C               	bcf	12,0
    48                           ;Timer.c: 34: TMR1IE = 0;
    49  04EF  1683               	bsf	3,5
    50  04F0  100C               	bcf	12,0
    51                           ;Timer.c: 36: TMR1ON = 0;
    52  04F1  1283               	bcf	3,5
    53  04F2  1010               	bcf	16,0
    54                           ;Timer.c: 39: }
    55  04F3  0008               	return
    56                           
    57                           	psect	text1
    58  04B5                     _Delay10us
    59                           ;	_t assigned to ?a_Delay10us+0
    60  0000                     _Delay10us$t	set	?a_Delay10us
    61                           ;_t stored from w
    62  04B5  0183               	clrf	3	;select bank 0
    63  04B6  00A9               	movwf	?a_Delay10us
    64                           ;Timer.c: 45: if(t==0) return;
    65  04B7  08A9               	movf	?a_Delay10us
    66  04B8  1903               	btfsc	3,2
    67  04B9  0008               	return
    68                           ;Timer.c: 46: Cnt10us = t;
    69  04BA  00A2               	movwf	_Cnt10us	;volatile
    70                           ;Timer.c: 47: TMR0 = (256-5);
    71  04BB  30FB               	movlw	-5
    72  04BC  0081               	movwf	1	;volatile
    73                           ;Timer.c: 48: TMR0IF = 0;
    74  04BD  110B               	bcf	11,2
    75                           ;Timer.c: 49: TMR0IE = 1;
    76  04BE  168B               	bsf	11,5
    77                           ;Timer.c: 51: while(Cnt10us);
    78  04BF                     l4
    79  04BF  0822               	movf	_Cnt10us,w	;volatile
    80  04C0  1D03               	btfss	3,2
    81  04C1  2CBF               	goto	l4
    82                           ;Timer.c: 52: TMR0IE = 0;
    83  04C2  128B               	bcf	11,5
    84                           ;Timer.c: 53: }
    85  04C3  0008               	return
    86                           
    87                           	psect	text2
    88                           ;Timer.c: 55: void Timer0_ISR(void)
    89                           ;Timer.c: 56: {
    90  048F                     _Timer0_ISR
    91                           ;Timer.c: 57: TMR0IF = 0;
    92  048F  110B               	bcf	11,2
    93                           ;Timer.c: 58: if(Cnt10us){
    94  0490  1283               	bcf	3,5
    95  0491  1303               	bcf	3,6	;carry unused
    96  0492  0822               	movf	_Cnt10us,w	;volatile
    97  0493  1D03               	btfss	3,2
    98                           ;Timer.c: 59: Cnt10us--;
    99  0494  03A2               	decf	_Cnt10us	;volatile
   100                           ;Timer.c: 60: }
   101  0495  0822               	movf	_Cnt10us,w	;volatile
   102  0496  1903               	btfsc	3,2
   103  0497  0008               	return
   104                           ;Timer.c: 62: TMR0 = (256-5);
   105  0498  30FB               	movlw	-5
   106  0499  0081               	movwf	1	;volatile
   107                           ;Timer.c: 63: }
   108  049A  0008               	return
   109                           
   110                           	psect	text3
   111                           ;Timer.c: 68: void Delay1ms(unsigned char t)
   112                           ;Timer.c: 69: {
   113  0506                     _Delay1ms
   114                           ;	_t assigned to ?a_Delay1ms+0
   115  0000                     _Delay1ms$t	set	?a_Delay1ms
   116                           ;_t stored from w
   117  0506  0183               	clrf	3	;select bank 0
   118  0507  00A7               	movwf	?a_Delay1ms
   119                           ;Timer.c: 70: if(t==0) return;
   120  0508  08A7               	movf	?a_Delay1ms
   121  0509  1903               	btfsc	3,2
   122  050A  2D1C               	goto	l10
   123                           ;Timer.c: 71: Cnt1ms = t;
   124  050B  0827               	movf	?a_Delay1ms,w
   125  050C  00A3               	movwf	_Cnt1ms	;volatile
   126                           ;Timer.c: 72: TMR1H = (65536-2000)/256;
   127  050D  30F8               	movlw	-8
   128  050E  008F               	movwf	15	;volatile
   129                           ;Timer.c: 73: TMR1L = (65536-2000)%256;
   130  050F  3030               	movlw	48
   131  0510  008E               	movwf	14	;volatile
   132                           ;Timer.c: 75: TMR1IF = 0;
   133  0511  100C               	bcf	12,0
   134                           ;Timer.c: 76: TMR1IE = 1;
   135  0512  1683               	bsf	3,5
   136  0513  140C               	bsf	12,0
   137                           ;Timer.c: 77: TMR1ON = 1;
   138  0514  1283               	bcf	3,5
   139  0515  1410               	bsf	16,0
   140                           ;Timer.c: 79: while(Cnt1ms);
   141  0516                     l12
   142  0516  0823               	movf	_Cnt1ms,w	;volatile
   143  0517  1D03               	btfss	3,2
   144  0518  2D16               	goto	l12
   145                           ;Timer.c: 80: TMR1ON = 0;
   146  0519  1010               	bcf	16,0
   147                           ;Timer.c: 81: TMR1IE = 0;
   148  051A  1683               	bsf	3,5
   149  051B  100C               	bcf	12,0
   150                           ;Timer.c: 82: }
   151  051C                     l10
   152  051C  1283               	bcf	3,5
   153  051D  0008               	return
   154                           
   155                           	psect	text4
   156                           ;Timer.c: 84: void Timer1_ISR(void)
   157                           ;Timer.c: 85: {
   158  04A8                     _Timer1_ISR
   159                           ;Timer.c: 86: TMR1IF = 0;
   160  04A8  0183               	clrf	3	;select bank 0
   161  04A9  100C               	bcf	12,0
   162                           ;Timer.c: 87: if(Cnt1ms){
   163  04AA  0823               	movf	_Cnt1ms,w	;volatile
   164  04AB  1D03               	btfss	3,2
   165                           ;Timer.c: 88: Cnt1ms--;
   166  04AC  03A3               	decf	_Cnt1ms	;volatile
   167                           ;Timer.c: 89: }
   168  04AD  0823               	movf	_Cnt1ms,w	;volatile
   169  04AE  1903               	btfsc	3,2
   170  04AF  0008               	return
   171                           ;Timer.c: 91: TMR1H = (65536-2000)/256;
   172  04B0  30F8               	movlw	-8
   173  04B1  008F               	movwf	15	;volatile
   174                           ;Timer.c: 92: TMR1L = (65536-2000)%256;
   175  04B2  3030               	movlw	48
   176  04B3  008E               	movwf	14	;volatile
   177                           ;Timer.c: 93: }
   178  04B4  0008               	return
   179                           
   180                           	psect	text5
   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                     
   210  0000                     
   211  0000                     
   212  0000                     
   213  0000                     
   214  0000                     
   215  0000                     
   216  0000                     
   217  0000                     
   218  0000                     
   219  0000                     
   220  0000                     
   221  0000                     
   222  0000                     
   223  0000                     
   224  0000                     
   225  0000                     
   226  0000                     
   227  0000                     
   228  0000                     
   229  0000                     
   230  0000                     
   231  0000                     
   232  0000                     
   233  0000                     
   234  0000                     
   235  0000                     
   236  0000                     
   237  0000                     
   238  0000                     
   239  0000                     
   240  0000                     
   241  0000                     
   242  0000                     

⌨️ 快捷键说明

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