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

📄 message_handler.lst

📁 PKE(被动无钥门禁系统
💻 LST
📖 第 1 页 / 共 5 页
字号:
                      00080 ;       movwf   SPI.BufferL
                      00081 ;       call    SPI.Read
                      00082 ;       @end-ex
                      00083 ;       @ex-desc This sends 0xf00f over the SPI-Bus, and reads the answer to SPI.BufferH and SPI.BufferL
                            .
                      00084 ;
                      00085 ;       @status Written
                      00086 ;
                      00087 ;       @stacklevel +1
                      00088 ;
                      00089 ;
                      00090 ;
                      00091 ;SPI.Read macro
                      00092 ;       call    SPI.ShiftOutBuffer
                      00093 ;       call    SPI.ShiftInBuffer
                      00094 ;       endm
                      00095 
                      00096 
                      00097         endif
                      00007 
                      00008 
                      00009 ;/*
                      00010 ;       The RAM-Map of the AFE's configuration register (8 byte)
                      00011 ;*/
  0000                00012         extern AFE.ConfMap
  0000                00013         extern AFE.Buffer
  0000                00014         extern AFE.LoadCfg, AFE.SafeCfg, AFE.ReadCfg, AFE.WriteCfg, AFE.WriteRegister, AFE.ReadRegister,
MPASM 03.90.01 Released                   MESSAGE_HANDLER.ASM   11-21-2005  16:07:18         PAGE 10


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                             AFE.WriteNVerifyRegister
  0000                00015         extern AFE.CalcColumnParity
                      00016 
                      00017 
                      00018         #define AFE.Alert                       PORTC,2         ; SPI Clock Output
                      00019 
                      00020         #define AFE.CMDClampOn          B'00000000'
                      00021         #define AFE.CMDClampOff         B'00100000'
                      00022         #define AFE.CMDSleep            B'01000000'
                      00023         #define AFE.CMDAGCOn            B'01100000'
                      00024         #define AFE.CMDAGCOff           B'10000000'
                      00025         #define AFE.CMDSR                       B'10100000'
                      00026 
                      00027         #define AFE.ModDepth12          B'00110000'
                      00028         #define AFE.ModDepth25          B'00100000'
                      00029         #define AFE.ModDepth75          B'00010000'
                      00030         #define AFE.ModDepth50          B'00000000'
                      00031 
                      00032 
                      00033 ;/*
                      00034 ;
                      00035 ;       This macro initialises the AFE
                      00036 ;
                      00037 ;*/
                      00038 AFE.Init macro
                      00039         call AFE.LoadCfg
                      00040         call AFE.WriteCfg
                      00041 ;       call AFE.ReadCfg
                      00042         AFE.SendCMDSoftReset
                      00043         banksel PORTA                   ;just debugging
                      00044         btfss   AFE.Alert
                      00045         goto    $-1
                      00046         endm
                      00047 
                      00048 
                      00049 ;/*
                      00050 ;
                      00051 ;       This macro sends a clamp on command to the AFE by using the SPI-Bus.
                      00052 ;       The clamp on command switches the transistor at the LF-Input to low resistance.
                      00053 ;       So use this macro for LF-Talkback.
                      00054 ;
                      00055 ;
                      00056 ;       @example
                      00057 ;       AFE.SendCMDClampOn
                      00058 ;       @end-ex
                      00059 ;       @ex-desc This sends the command
                      00060 ;
                      00061 ;       @status Tested
                      00062 ;
                      00063 ;       @stacklevel /*/SPI.Write
                      00064 ;       @registers /*/SPI.Write
                      00065 ;       @calls SPI.Write /*/SPI.Write
                      00066 ;
MPASM 03.90.01 Released                   MESSAGE_HANDLER.ASM   11-21-2005  16:07:18         PAGE 11


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                      00067 ;
                      00068 ;*/
                      00069 AFE.SendCMDClampON macro
                      00070         banksel SPI.BufferH
                      00071         movlw   AFE.CMDClampOn
                      00072         movwf   SPI.BufferH
                      00073         call    SPI.Write
                      00074         endm
                      00075 
                      00076 ;/*
                      00077 ;
                      00078 ;       This macro sends a clamp off command to the AFE by using the SPI-Bus.
                      00079 ;       The clamp on command switches the transistor at the LF-Input to high resistance.
                      00080 ;       So use this macro for LF-Talkback.
                      00081 ;
                      00082 ;
                      00083 ;       @example
                      00084 ;       AFE.SendCMDClampOff
                      00085 ;       @end-ex
                      00086 ;       @ex-desc This sends the command
                      00087 ;
                      00088 ;       @status Tested
                      00089 ;
                      00090 ;       @stacklevel /*/SPI.Write
                      00091 ;       @registers /*/SPI.Write
                      00092 ;       @calls SPI.Write /*/SPI.Write
                      00093 ;
                      00094 ;
                      00095 ;*/
                      00096 AFE.SendCMDClampOFF macro
                      00097         banksel SPI.BufferH
                      00098         movlw   AFE.CMDClampOff
                      00099         movwf   SPI.BufferH
                      00100         call    SPI.Write
                      00101         endm
                      00102 
                      00103 ;/*
                      00104 ;
                      00105 ;       This macro sends a Sleep command to the AFE by using the SPI-Bus.
                      00106 ;       The AFE will enter the sleep mode.
                      00107 ;       It will wake up by the next transmission over the SPI-Bus.
                      00108 ;
                      00109 ;
                      00110 ;       @example
                      00111 ;       AFE.SendCMDSleep
                      00112 ;       @end-ex
                      00113 ;       @ex-desc This sends the command
                      00114 ;
                      00115 ;       @status Written
                      00116 ;
                      00117 ;       @stacklevel /*/SPI.Write
                      00118 ;       @registers /*/SPI.Write
                      00119 ;       @calls SPI.Write /*/SPI.Write
MPASM 03.90.01 Released                   MESSAGE_HANDLER.ASM   11-21-2005  16:07:18         PAGE 12


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                      00120 ;
                      00121 ;
                      00122 ;*/
                      00123 AFE.SendCMDSleep macro
                      00124         banksel SPI.BufferH
                      00125         movlw   AFE.CMDSleep
                      00126         movwf   SPI.BufferH
                      00127         call    SPI.Write
                      00128         endm
                      00129 
                      00130 ;/*
                      00131 ;
                      00132 ;       This macro sends a AGC Preserve On command to the AFE by using the SPI-Bus.
                      00133 ;
                      00134 ;
                      00135 ;       @example
                      00136 ;       AFE.SendCMDAGCPresON
                      00137 ;       @end-ex
                      00138 ;       @ex-desc This sends the command
                      00139 ;
                      00140 ;       @status Written
                      00141 ;
                      00142 ;       @stacklevel /*/SPI.Write
                      00143 ;       @registers /*/SPI.Write
                      00144 ;       @calls SPI.Write /*/SPI.Write
                      00145 ;
                      00146 ;
                      00147 ;*/
                      00148 AFE.SendCMDAGCPresON macro
                      00149         banksel SPI.BufferH
                      00150         movlw   AFE.CMDAGCOn
                      00151         movwf   SPI.BufferH
                      00152         call    SPI.Write
                      00153         endm
                      00154 
                      00155 ;/*
                      00156 ;
                      00157 ;       This macro sends a AGC Preserve Off command to the AFE by using the SPI-Bus.
                      00158 ;
                      00159 ;
                      00160 ;       @example
                      00161 ;       AFE.SendCMDAGCPresOFF
                      00162 ;       @end-ex
                      00163 ;       @ex-desc This sends the command
                      00164 ;
                      00165 ;       @status Tested
                      00166 ;
                      00167 ;       @stacklevel /*/SPI.Write
                      00168 ;       @registers /*/SPI.Write
                      00169 ;       @calls SPI.Write /*/SPI.Write
                      00170 ;
                      00171 ;
                      00172 ;*/
MPASM 03.90.01 Released                   MESSAGE_HANDLER.ASM   11-21-2005  16:07:18         PAGE 13


LOC  OBJECT CODE     LINE SOURCE TEXT
  VALUE

                      00173 AFE.SendCMDAGCPresOFF macro
                      00174         banksel SPI.BufferH
                      00175         movlw   AFE.CMDAGCOff
                      00176         movwf   SPI.BufferH
                      00177         call    SPI.Write
                      00178         endm
                      00179 
                      00180 ;/*
                      00181 ;
                      00182 ;       This macro sends a SoftReset on command to the AFE by using the SPI-Bus.
                      00183 ;
                      00184 ;       @example
                      00185 ;       AFE.SendCMDSoftReset
                      00186 ;       @end-ex
                      00187 ;       @ex-desc This sends the command
                      00188 ;
                      00189 ;       @status Tested
                      00190 ;
                      00191 ;       @stacklevel /*/SPI.Write
                      00192 ;       @registers /*/SPI.Write
                      00193 ;       @calls SPI.Write /*/SPI.Write
                      00194 ;
                      00195 ;
                      00196 ;*/
                      00197 AFE.SendCMDSoftReset macro
                      00198         banksel SPI.BufferH
                      00199         movlw   AFE.CMDSR
                      00200         movwf   SPI.BufferH
                      00201         call    SPI.Write
                      00202         endm
                      00203 
                      00204 
                      00205 ;/*
                      00206 ;
                      00207 ;       This macro enables the LF Channel X at the AFE.
                      00208 ;
                      00209 ;       @example
                      00210 ;       AFE.EnableChannelX
                      00211 ;       @end-ex
                      00212 ;       @ex-desc This enables Channel X
                      00213 ;
                      00214 ;       @status Written

⌨️ 快捷键说明

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