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

📄 instamp.lst

📁 代码保护功能处于持续发展中。Microchip 承诺将不断改进产品的代码保护功能。任何试图破坏Microchip 代码保护功能的行为均可视 为违反了《数字器件千年版权法案(Digital Mille
💻 LST
📖 第 1 页 / 共 3 页
字号:
004A   0BF0           00026         DECFSZ  Timer1          ; Count
004B   2849           00027         GOTO    loop1           ; until Z
004C   0008           00028         RETURN                  ; and finish
                      00029 
                      00030 ;---------------------------------------------------------------------------------------------  
                      00031 ;       Delay Xms
                      00032 ;       Receives count in W, uses Onems
                      00033 ;---------------------------------------------------------------------------------------------  
MPASM 03.70.01 Released                           INSTAMP.ASM   3-28-2006  22:38:49         PAGE  5


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

004D   00F1           00034 xms     MOVWF   TimerX          ; Count for X ms
004E   2047           00035 loopX   CALL    onems           ; Delay 1ms
Message[305]: Using default destination of 1 (file).
004F   0BF1           00036         DECFSZ  TimerX          ; Repeat X times 
0050   284E           00037         GOTO    loopX           ; until Z
0051   0008           00038         RETURN                  ; and finish
                      00039 
                      00040 ;---------------------------------------------------------------------------------------------  
                      00041 ;       Generate data/command clock siganl E
                      00042 ;---------------------------------------------------------------------------------------------  
0052   1508           00043 pulseE  BSF     PORTD,E         ; Set E high
0053   2047           00044         CALL    onems           ; Delay 1ms
0054   1108           00045         BCF     PORTD,E         ; Reset E low
0055   2047           00046         CALL    onems           ; Delay 1ms
0056   0008           00047         RETURN                  ; done
                      00048 
                      00049 ;---------------------------------------------------------------------------------------------  
                      00050 ;       Send a command byte in two nibbles from RB4 - RB7
                      00051 ;       Receives command in W, uses PulseE and Onems
                      00052 ;---------------------------------------------------------------------------------------------  
0057   00F5           00053 send    MOVWF   OutCod          ; Store output code
0058   39F0           00054         ANDLW   0F0             ; Clear low nybble
0059   0088           00055         MOVWF   PORTD           ; Output high nybble
005A   18F4           00056         BTFSC   Select,RS       ; Test RS bit
005B   1488           00057         BSF     PORTD,RS        ; and set for data
005C   2052           00058         CALL    pulseE          ; and clock display register
005D   2047           00059         CALL    onems           ; wait 1ms for display to complete
                      00060 
Message[305]: Using default destination of 1 (file).
005E   0EF5           00061         SWAPF   OutCod          ; Swap low and high nybbles 
005F   0875           00062         MOVF    OutCod,W        ; Retrieve output code
0060   39F0           00063         ANDLW   0F0             ; Clear low nybble
0061   0088           00064         MOVWF   PORTD           ; Output low nybble
0062   18F4           00065         BTFSC   Select,RS       ; Test RS bit
0063   1488           00066         BSF     PORTD,RS        ; and set for data
0064   2052           00067         CALL    pulseE          ; and clock display register
0065   2047           00068         CALL    onems           ; wait 1ms for display to complete
0066   0008           00069         RETURN                  ; done
                      00070 
                      00071 ;---------------------------------------------------------------------------------------------  
                      00072 ;       Initialise the display
                      00073 ;       Uses Send
                      00074 ;---------------------------------------------------------------------------------------------  
0067   3064           00075 inid    MOVLW   D'100'          ; Load count for 100ms delay
0068   204D           00076         CALL    xms             ; and wait for display start
0069   30F0           00077         MOVLW   0F0             ; Mask for select code
006A   00F4           00078         MOVWF   Select          ; High nybble not masked
                      00079 
006B   3030           00080         MOVLW   0x30            ; Load initial nibble
006C   0088           00081         MOVWF   PORTD           ; and output it to display
006D   2052           00082         CALL    pulseE          ; Latch initial code
006E   3005           00083         MOVLW   D'5'            ; Set delay 5ms
006F   204D           00084         CALL    xms             ; and wait
MPASM 03.70.01 Released                           INSTAMP.ASM   3-28-2006  22:38:49         PAGE  6


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

0070   2052           00085         CALL    pulseE          ; Latch initial code again
0071   2047           00086         CALL    onems           ; Wait 1ms
0072   2052           00087         CALL    pulseE          ; Latch initial code again
0073   1208           00088         BCF     PORTD,4         ; Set 4-bit mode
0074   2052           00089         CALL    pulseE          ; Latch it
                      00090         
0075   3028           00091         MOVLW   0x28            ; Set 4-bit mode, 2 lines
0076   2057           00092         CALL    send            ; and send code
0077   3008           00093         MOVLW   0x08            ; Switch off display
0078   2057           00094         CALL    send            ; and send code
0079   3001           00095         MOVLW   0x01            ; Code to clear display
007A   2057           00096         CALL    send            ; and send code
007B   3006           00097         MOVLW   0x06            ; Enable cursor auto inc  
007C   2057           00098         CALL    send            ; and send code
007D   3080           00099         MOVLW   0x80            ; Zero display address
007E   2057           00100         CALL    send            ; and send code
007F   300C           00101         MOVLW   0x0C            ; Turn on display  
0080   2057           00102         CALL    send            ; and send code
                      00103 
0081   0008           00104         RETURN                  ; Done
                      00105         
                      00161 ;       Contains routines:
                      00162 ;       init:   Initialises display
                      00163 ;       onems:  1 ms delay
                      00164 ;       xms:    X ms delay
                      00165 ;               Receives X in W
                      00166 ;       send:   sends a character to display
                      00167 ;               Receives: Control code in W (Select,RS=0)
                      00168 ;                         ASCII character code in W (RS=1)      
                      00169 ;
                      00170 ;----------------------------------------------------------
                      00171         END                     ; of source code
MPASM 03.70.01 Released                           INSTAMP.ASM   3-28-2006  22:38:49         PAGE  7


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
ADbin                             00000031
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
MPASM 03.70.01 Released                           INSTAMP.ASM   3-28-2006  22:38:49         PAGE  8


SYMBOL TABLE
  LABEL                             VALUE 

CM1                               00000001
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
D                                 00000005
DATA_ADDRESS                      00000005
DC                                00000001
D_A                               00000005
E                                 00000002
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
IRP                               00000007
NOT_A                             00000005
NOT_ADDRESS                       00000005
NOT_BO                            00000000
NOT_BOR                           00000000
NOT_DONE                          00000002
MPASM 03.70.01 Released                           INSTAMP.ASM   3-28-2006  22:38:49         PAGE  9


SYMBOL TABLE
  LABEL                             VALUE 

⌨️ 快捷键说明

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