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

📄 dddddd.lst

📁 pic实验源程序 分为六个实验,前面的太简单,就没有了,后面的比较复杂!
💻 LST
📖 第 1 页 / 共 3 页
字号:
000F   009F           00016                 movwf   ADCON0          ; A/D is turned on but not yet converting and ready on Ch 0.
                      00017 
0010   1683 1303      00018                 BANKSEL TRISC           ; BANKSEL to get to TRISC bank (bank 1)
Message[302]: Register in operand not in bank 0.  Ensure that bank bits are correct.
0012   1107           00019                 bcf             TRISC,2         ; Set CCP1 as an output
0013   3046           00020                 movlw   D'70'           ; Manualy Calculated Period
Message[302]: Register in operand not in bank 0.  Ensure that bank bits are correct.
0014   0092           00021                 movwf   PR2                     ;  loaded into PR2 (also in bank1)
0015   1283 1303      00022                 BANKSEL CCPR1L          ; BANKSEL is needed to get bank to bank 0.
0017   3023           00023                 movlw   D'35'           ; Manually Calculated Duty Cycle (50%)          
0018   0095           00024                 movwf   CCPR1L          ;  loaded into CCPR1L
0019   3006           00025                 movlw   0x06            ; Turn on TMR2 (for PWM) 
001A   0092           00026                 movwf   T2CON           ; and /16 prescale
                      00027 
                      00028 
001B                  00029 CheckAgain
                      00030                 Dly32   D'50'           ; MACRO to Wait 1 ms (at 4 MHz)
                          M                 
001B   1283 1303          M         BANKSEL Dly3
001D   3031               M         movlw   (D'50'-1) & H'FF'       ; * Take the delay value argument 
001E   00A0               M         movwf   Dly0                    ; * from the macro, precalculate 
001F   3000               M         movlw   (D'50'-1) >>D'08' & H'FF' ; * the required 4 RAM values and
0020   00A1               M         movwf   Dly1                    ; * load the The RAM values Dly3 
0021   3000               M         movlw   (D'50'-1) >>D'16' & H'FF' ; * though Dly0.
MPASM 03.80.04 Internal                            DDDDDD.ASM   3-16-2006  11:25:45         PAGE  5


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

0022   00A2               M         movwf   Dly2                    ; * Bytes are shifted and anded
0023   3000               M         movlw   (D'50'-1) >>D'24' & H'FF' ; * by the assembler to make 
0024   00A3               M         movwf   Dly3                    ; * user calculations easier
                          M 
0025   0000               M         nop     ; 7 cycle delay for precision delay value
0026   0000               M         nop ;
0027   0000               M         nop ;
0028   0000               M         nop ;
0029   0000               M         nop ;
002A   0000               M         nop ;
002B   0000               M         nop ;
                          M 
002C   2401               M         call    DoDly32 ; Call DoDly32 to run the delay loop.
002D   151F           00031                 bsf             ADCON0,GO       ; Start the Conversion
                      00032 
002E                  00033 PollAD
002E   191F           00034                 btfsc   ADCON0,GO       ; Wait for Conversion to finish
002F   282E           00035                 goto    PollAD          ; go back and poll the A/D GO/DONE bit again
0030                  00036 ConvertDone
0030   081E           00037                 movf    ADRESH,W        ; Move A/D result (high byte) into W for later testing
0031   3C64           00038                 sublw   TESTVAL         ; Test A/D result against test value
0032   1C03           00039                 btfss   STATUS,C        ; go to "over" if A/D result larger than test value
0033   283B           00040                 goto    Over            ; value is too large, run "Over" code
0034                  00041 Ok      
                      00042                 LEDOn   0                       ; MACRO to turn on LED 0
0034   3001               M         movlw   1 << 0
0035   0486               M         iorwf   PORTB,F
                      00043                 LEDOff  1                       ; MACRO to turn off LED 1 (this shows "Ok" condition)
0036   30FD               M         movlw   H'FF' - ((1 << 1)         & H'00FF')
0037   0586               M         andwf   PORTB,F
                      00044 
                      00045 
0038   300C           00046                 movlw   H'0C'           ; if low (pressed), fall here to "Button On" code.
0039   0097           00047                 movwf   CCP1CON         ; this turns on CCP1CON by writing 0C (hex) to it.
                      00048 
003A   281B           00049                 goto    CheckAgain      ; Do A/D read and value test over again
003B                  00050 Over
                      00051                 LEDOn   1                       ; MACRO to turn on LED 1
003B   3002               M         movlw   1 << 1
003C   0486               M         iorwf   PORTB,F
                      00052                 LEDOff  0                       ; MACRO to turn off LED 0 (this shows "Over" condition)
003D   30FE               M         movlw   H'FF' - ((1 << 0)         & H'00FF')
003E   0586               M         andwf   PORTB,F
                      00053 
                      00054 
003F   1283 1303      00055                 banksel CCP1CON
0041   0197           00056                 clrf    CCP1CON         ; Turn off CCP1 module by writing 0 to it
                      00057 
                      00058                 ;banksel PR2
                      00059                 ;RRF    PR2,f
0042   1283 1303      00060                 banksel CCP1CON
0044   281B           00061                 goto    CheckAgain      ; Do A/D read and value test over again
                      00062                 END
MPASM 03.80.04 Internal                            DDDDDD.ASM   3-16-2006  11:25:45         PAGE  6


SYMBOL TABLE
  LABEL                             VALUE 

ACKDT                             00000005
ACKEN                             00000004
ACKSTAT                           00000006
ADCON0                            0000001F
ADCON1                            0000009F
ADCS0                             00000006
ADCS1                             00000007
ADDEN                             00000003
ADFM                              00000007
ADIE                              00000006
ADIF                              00000006
ADON                              00000000
ADRESH                            0000001E
ADRESL                            0000009E
BCLIE                             00000003
BCLIF                             00000003
BF                                00000000
BRGH                              00000002
C                                 00000000
C1INV                             00000004
C1OUT                             00000006
C2INV                             00000005
C2OUT                             00000007
CCP1CON                           00000017
CCP1IE                            00000002
CCP1IF                            00000002
CCP1M0                            00000000
CCP1M1                            00000001
CCP1M2                            00000002
CCP1M3                            00000003
CCP1X                             00000005
CCP1Y                             00000004
CCP2CON                           0000001D
CCP2IE                            00000000
CCP2IF                            00000000
CCP2M0                            00000000
CCP2M1                            00000001
CCP2M2                            00000002
CCP2M3                            00000003
CCP2X                             00000005
CCP2Y                             00000004
CCPR1H                            00000016
CCPR1L                            00000015
CCPR2H                            0000001C
CCPR2L                            0000001B
CHS0                              00000003
CHS1                              00000004
CHS2                              00000005
CIS                               00000003
CKE                               00000006
CKP                               00000004
CM0                               00000000
CM1                               00000001
MPASM 03.80.04 Internal                            DDDDDD.ASM   3-16-2006  11:25:45         PAGE  7


SYMBOL TABLE
  LABEL                             VALUE 

CM2                               00000002
CMCON                             0000009C
CMIE                              00000006
CMIF                              00000006
CREN                              00000004
CSRC                              00000007
CVR0                              00000000
CVR1                              00000001
CVR2                              00000002
CVR3                              00000003
CVRCON                            0000009D
CVREN                             00000007
CVROE                             00000006
CVRR                              00000005
CheckAgain                        0000001B
ConvertDone                       00000030
D                                 00000005
DATA_ADDRESS                      00000005
DC                                00000001
D_A                               00000005
Dly0                              00000020
Dly1                              00000021
Dly2                              00000022
Dly3                              00000023
Dly32                             
DoDly32                           00000401
EEADR                             0000010D
EEADRH                            0000010F
EECON1                            0000018C
EECON2                            0000018D
EEDATA                            0000010C
EEDATH                            0000010E
EEIE                              00000004
EEIF                              00000004
EEPGD                             00000007
F                                 00000001
FERR                              00000002
FSR                               00000004
GCEN                              00000007
GIE                               00000007
GO                                00000002
GO_DONE                           00000002
I2C_DATA                          00000005
I2C_READ                          00000002
I2C_START                         00000003
I2C_STOP                          00000004
IBF                               00000007
IBOV                              00000005
INDF                              00000000
INTCON                            0000000B
INTE                              00000004
INTEDG                            00000006
INTF                              00000001
MPASM 03.80.04 Internal                            DDDDDD.ASM   3-16-2006  11:25:45         PAGE  8


SYMBOL TABLE
  LABEL                             VALUE 

IRP                               00000007
ISRRestore                        
ISRSave                           
LEDEnable                         
LEDOff                            

⌨️ 快捷键说明

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