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

📄 remote_v01.lst

📁 一种多自由度智能机器人的设计全部资料上传!
💻 LST
📖 第 1 页 / 共 2 页
字号:
MPASM  5.06                    REMOTE_V01.ASM   2-4-2008  18:33:07         PAGE  1


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                      00001                        LIST P=16F676,R=DEC
                      00002                        
                      00003                     
                      00004  INCLUDE "P16F676.INC" 
                      00001         LIST
                      00002 ; P16F676.INC  Standard Header File, Version 1.00    Microchip Technology, Inc.
                      00261         LIST
                      00005  
2007   3FD4           00006          __CONFIG       _INTRC_OSC_NOCLKOUT&_WDT_OFF&_MCLRE_OFF&_BODEN
                      00007  
                      00008 ;----------------------------------------
                      00009 BANK_0  MACRO
                      00010         BCF         STATUS,RP0
                      00011         ;BCF         STATUS,RP1
                      00012         ENDM
                      00013 BANK_1  MACRO
                      00014         BSF         STATUS,RP0
                      00015         ;BCF         STATUS,RP1
                      00016         ENDM
                      00017 ;-----------------------------------------------------------------------
                      00018 ;                            PAGE MACRO
                      00019 PAGE_0  MACRO
                      00020         BCF         PCLATH,3
                      00021         ;BCF         PCLATH,4
                      00022         ENDM
                      00023 PAGE_1  MACRO
                      00024         BSF         PCLATH,3
                      00025         ;BCF         PCLATH,4
                      00026         ENDM
                      00027 ;----------- define regisister --------
                      00028 
Warning[205]: Found directive in column 1. (CBLOCK)
                      00029 CBLOCK 0X20      ; NAME_1 WILL BE ASSIGNED 20
  00000020            00030 FLAG0
  00000021            00031 KEYL
  00000022            00032 SEND_BIT_CNT
  00000023            00033 SEND_CNT0
  00000024            00034 SEND_CNT
  00000025            00035 SLEEPH
  00000026            00036 SLEEPL
Warning[205]: Found directive in column 1. (ENDC)
                      00037 ENDC
                      00038 
                      00039 #DEFINE IR              PORTC,3
                      00040 #DEFINE BIT_FLAG        FLAG0,0
                      00041 #DEFINE IDLE_FLAG       FLAG0,1
                      00042 
                      00043 
                      00044 
                      00045 ;---------------------------------
                      00046 ;-           FLAG_T1  21         -
                      00047 ;---------------------------------
                      00048 
MPASM  5.06                    REMOTE_V01.ASM   2-4-2008  18:33:07         PAGE  2


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                      00049 
0000                  00050         ORG     0H
0000                  00051 POWER_RESET
0000   0183           00052         CLRF    STATUS
0001   2810           00053         GOTO    power_on
                      00054 
0004                  00055          ORG     04H
0004   018B           00056         CLRF    INTCON
0005   0009           00057         RETFIE
                      00058 
                      00059 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                      00060 ;         DELAY_300US             ;
                      00061 
0010                  00062         ORG     0X10
                      00063 
                      00064 
                      00065 
                      00066 ;--------------------------------------
0010                  00067 power_on:
0010   0064           00068         CLRWDT
0011   018B           00069         CLRF    INTCON
0012   0190           00070         CLRF    T1CON
0013   3007           00071         MOVLW   B'00000111'
0014   0099           00072         MOVWF   CMCON
                      00073         
                      00074         BANK_1
0015   1683               M         BSF         STATUS,RP0
                          M         ;BCF         STATUS,RP1
0016   23FF           00075         CALL       H'3FF'
Message[302]: Register in operand not in bank 0.  Ensure that bank bits are correct.
0017   0090           00076         MOVWF      OSCCAL
                      00077         
                      00078         
0018   3060           00079         MOVLW   B'01100000' ; Fosc/64
Message[302]: Register in operand not in bank 0.  Ensure that bank bits are correct.
0019   009F           00080         MOVWF   ADCON1
001A   3000           00081         MOVLW   B'00000000' ; AD SELECT A0
Message[302]: Register in operand not in bank 0.  Ensure that bank bits are correct.
001B   0091           00082         MOVWF   ANSEL
001C   3087           00083         MOVLW   B'10000111' ; DISABLE RB PULL UP
Message[302]: Register in operand not in bank 0.  Ensure that bank bits are correct.
001D   0081           00084         MOVWF   OPTION_REG           ;the prescaler is 256 to time0
                      00085         ;MOVLW  B'00000000'     ;
                      00086         ;MOVWF  PIE1
Message[302]: Register in operand not in bank 0.  Ensure that bank bits are correct.
001E   018C           00087         CLRF    PIE1
001F   30FF           00088         MOVLW   B'11111111'
Message[302]: Register in operand not in bank 0.  Ensure that bank bits are correct.
0020   0085           00089         MOVWF   TRISA
                      00090         
Message[302]: Register in operand not in bank 0.  Ensure that bank bits are correct.
0021   0195           00091         CLRF    WPUA
0022   30F7           00092         MOVLW   B'11110111'
MPASM  5.06                    REMOTE_V01.ASM   2-4-2008  18:33:07         PAGE  3


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

Message[302]: Register in operand not in bank 0.  Ensure that bank bits are correct.
0023   0087           00093         MOVWF   TRISC
                      00094         
0024   303F           00095         MOVLW   B'00111111'
Message[302]: Register in operand not in bank 0.  Ensure that bank bits are correct.
0025   0096           00096         MOVWF   IOCA
                      00097         
                      00098         BANK_0
0026   1283               M         BCF         STATUS,RP0
                          M         ;BCF         STATUS,RP1
                      00099         
0027   0185           00100         CLRF    PORTA              ;init the porta
0028   0187           00101         CLRF    PORTC              ;init the portB
0029   3000           00102         MOVLW   B'00000000' ; LEFT JUSTIFIED ,Vref VDD,
002A   009F           00103         MOVWF   ADCON0
002B   1383           00104         BCF    STATUS,IRP
                      00105         
002C   3035           00106         MOVLW   B'00110101'
002D   0090           00107         MOVWF   T1CON
                      00108         
002E   01A4           00109         CLRF    SEND_CNT
002F   2099           00110         CALL    READ_KEY
0030                  00111 TEST_ME:
                      00112 
0030   2056           00113         CALL    SEND_IR 
                      00114         
0031   2099           00115         CALL    READ_KEY
0032   1D03           00116         BTFSS   STATUS,Z
0033   2830           00117         GOTO    TEST_ME
                      00118         
                      00119         
                      00120         
                      00121         
0034   300A           00122         MOVLW   10
0035   00A6           00123         MOVWF   SLEEPL
0036   3001           00124         MOVLW   1
0037   00A5           00125         MOVWF   SLEEPH
                      00126 
                      00127 
0038                  00128 MAIN:
0038   2099           00129         CALL    READ_KEY        
                      00130                 
0039   1903           00131         BTFSC   STATUS,Z
003A   283E           00132         GOTO    MAIN_SEND_IR
003B   00A5           00133         MOVWF   SLEEPH
003C   01A6           00134         CLRF    SLEEPL
                      00135 
                      00136 ;       MOVLW   8
003D   1624           00137         BSF     SEND_CNT,4
                      00138                 
003E                  00139 MAIN_SEND_IR:   
Message[305]: Using default destination of 1 (file).
003E   08A4           00140         MOVF    SEND_CNT
MPASM  5.06                    REMOTE_V01.ASM   2-4-2008  18:33:07         PAGE  4


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

003F   1903           00141         BTFSC   STATUS,Z        
0040   2848           00142         GOTO    SLEEP_TEST
                      00143 
Message[305]: Using default destination of 1 (file).
0041   03A4           00144         DECF    SEND_CNT
                      00145         
0042   14A0           00146         BSF     IDLE_FLAG       
                      00147         
0043   300C           00148         MOVLW   00001100B
0044   0524           00149         ANDWF   SEND_CNT,W
                      00150                 
0045   1903           00151         BTFSC   STATUS,Z                
0046   10A0           00152         BCF     IDLE_FLAG
                      00153         
0047   2056           00154         CALL    SEND_IR                                 
0048                  00155 SLEEP_TEST:
                      00156 
                      00157         ;BTFSS  TMR1H,6
                      00158         ;BSF    IR
                      00159         ;BTFSC  TMR1H,6
                      00160         ;BCF    IR      
                      00161 ;****************
0048   1F8F           00162         BTFSS   TMR1H,7
0049   2838           00163         GOTO    MAIN
                      00164 
004A   138F           00165         BCF     TMR1H,7
                      00166         
Message[305]: Using default destination of 1 (file).
004B   0BA6           00167         DECFSZ  SLEEPL
004C   2838           00168         GOTO    MAIN
Message[305]: Using default destination of 1 (file).
004D   0BA5           00169         DECFSZ  SLEEPH
004E   2838           00170         GOTO    MAIN
                      00171 
                      00172 ;**************
004F   1187           00173         BCF     IR
                      00174 
0050   3088           00175         MOVLW   B'10001000'
0051   008B           00176         MOVWF   INTCON
0052   0064           00177         CLRWDT
0053   0063           00178         SLEEP
0054   018B           00179         CLRF    INTCON
0055   2838           00180         GOTO    MAIN
                      00181 ;************************
                      00182 ;************************
                      00183 
0056                  00184 SEND_IR:
0056   13A1           00185         BCF     KEYL,7
0057   01A3           00186         CLRF    SEND_CNT0
                      00187         
0058   1821           00188         BTFSC   KEYL,0
Message[305]: Using default destination of 1 (file).
0059   0AA3           00189         INCF    SEND_CNT0
MPASM  5.06                    REMOTE_V01.ASM   2-4-2008  18:33:07         PAGE  5


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

005A   18A1           00190         BTFSC   KEYL,1
Message[305]: Using default destination of 1 (file).
005B   0AA3           00191         INCF    SEND_CNT0       
005C   1921           00192         BTFSC   KEYL,2
Message[305]: Using default destination of 1 (file).
005D   0AA3           00193         INCF    SEND_CNT0
005E   19A1           00194         BTFSC   KEYL,3
Message[305]: Using default destination of 1 (file).
005F   0AA3           00195         INCF    SEND_CNT0       
                      00196         
0060   1A21           00197         BTFSC   KEYL,4
Message[305]: Using default destination of 1 (file).
0061   0AA3           00198         INCF    SEND_CNT0
0062   1AA1           00199         BTFSC   KEYL,5
Message[305]: Using default destination of 1 (file).
0063   0AA3           00200         INCF    SEND_CNT0       
0064   1B21           00201         BTFSC   KEYL,6
Message[305]: Using default destination of 1 (file).
0065   0AA3           00202         INCF    SEND_CNT0
                      00203 
0066   1823           00204         BTFSC   SEND_CNT0,0
0067   17A1           00205         BSF     KEYL,7
                      00206                         
                      00207 ;SEND_HEAD:
0068   3030           00208         MOVLW   48
0069   1420           00209         BSF     BIT_FLAG
006A   207E           00210         CALL    SEND_BIT2       
006B   207C           00211         CALL    SEND_BIT_NO
                      00212 
006C   1003           00213         BCF     STATUS,C
                      00214 
006D   3009           00215         MOVLW   9
006E   00A3           00216         MOVWF   SEND_CNT0
006F                  00217 SEND_IR2:
006F   300C           00218         MOVLW   12
0070   1420           00219         BSF     BIT_FLAG
0071   207E           00220         CALL    SEND_BIT2
                      00221                 
Message[305]: Using default destination of 1 (file).
0072   0CA1           00222                 RRF     KEYL    
0073   1803           00223         BTFSC   STATUS,C
0074   2079           00224         CALL    SEND_BIT_NO_LONG
0075                  00225 SEND_IR8:
0075   207C           00226         CALL    SEND_BIT_NO
                      00227         
Message[305]: Using default destination of 1 (file).
0076   0BA3           00228         DECFSZ  SEND_CNT0
0077   286F           00229         GOTO    SEND_IR2
0078   0008           00230         RETURN
                      00231 ;----------------------------                   
0079                  00232 SEND_BIT_NO_LONG:
0079   1020           00233         BCF     BIT_FLAG
007A   3014           00234         MOVLW   20
MPASM  5.06                    REMOTE_V01.ASM   2-4-2008  18:33:07         PAGE  6


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

007B   287E           00235         GOTO    SEND_BIT2
                      00236         
007C                  00237 SEND_BIT_NO:
007C   1020           00238         BCF     BIT_FLAG
007D   3008           00239         MOVLW   8
007E                  00240 SEND_BIT2:
007E   00A2           00241         MOVWF   SEND_BIT_CNT
007F                  00242 SEND_BIT4:      
007F   18A0           00243         BTFSC   IDLE_FLAG
0080   2883           00244         GOTO    SEND_BIT6
                      00245                                 
0081   1820           00246         BTFSC   BIT_FLAG
0082   1587           00247         BSF     IR      
                      00248 
0083                  00249 SEND_BIT6:      
                      00250 
                      00251 
0083   0064           00252         CLRWDT
0084   0064           00253         CLRWDT
0085   0064           00254         CLRWDT
0086   0064           00255         CLRWDT
                      00256         
0087   0064           00257         CLRWDT
0088   0064           00258         CLRWDT
0089   0064           00259         CLRWDT
008A   0064           00260         CLRWDT  
008B   1187           00261         BCF     IR
                      00262         
008C   0064           00263         CLRWDT

⌨️ 快捷键说明

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