📄 can_ref.lst
字号:
00394 btfsc _C
00395 goto Label
00396 endm
00397
00398 jmpNC macro Label
MPASM 02.20.15 Intermediate CAN_REF.ASM 2-8-2000 13:27:59 PAGE 10
CAN_Ref Design
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
00399 btfss _C
00400 goto Label
00401 endm
00402
00403 skipClr macro Reg,Bit
00404 btfsc Reg,Bit
00405 endm
00406
00407 skipSet macro Reg,Bit
00408 btfss Reg,Bit
00409 endm
00410
00411 skipNZ macro
00412 btfsc _Z
00413 endm
00414
00415 skipZ macro
00416 btfss _Z
00417 endm
00418
00419 skipNC macro
00420 btfsc _C
00421 endm
00422
00423 skipC macro
00424 btfss _C
00425 endm
00426
00427 toggle macro Reg,Bit
00428 local SLabel,Label
00429 btfss Reg,Bit
00430 goto SLabel
00431 bcf Reg,Bit
00432 goto Label
00433 SLabel bsf Reg,Bit
00434 Label
00435 endm
00436
00437
00438 tb2tb macro RegS,BitS,RegD,BitD
00439 local jLab1,jLab2
00440 jmpSet RegS,BitS,jLab1
00441 bcf RegD,BitD
00442 goto jLab2
00443 jLab1 bsf RegD,BitD
00444 jLab2
00445 endm
00446
00447 tb2Nottb macro RegS,BitS,RegD,BitD
00448 local jLab1,jLab2
00449 jmpClr RegS,BitS,jLab1
00450 bcf RegD,BitD
00451 goto jLab2
MPASM 02.20.15 Intermediate CAN_REF.ASM 2-8-2000 13:27:59 PAGE 11
CAN_Ref Design
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
00452 jLab1 bsf RegD,BitD
00453 jLab2
00454 endm
00076 #include "MCP2510.INC"
00001 ;----------------------------------------------------------------------
00002 ;MCP2510.INC
00003 ; Description: This file contains the definitions for the MicroChip
00004 ; standalone CANbus controller.
00005 ;
00006 ; 07/17/99 JPF Original Version
00007 ; 09/11/99 JCT Modified for ASM
00008 ;----------------------------------------------------------------------
00009
00010 #define RXF0SIDH 0x00
00011 #define RXF0SIDL 0x01
00012 #define RXF0EID8 0x02
00013 #define RXF0EID0 0x03
00014 #define RXF1SIDH 0x04
00015 #define RXF1SIDL 0x05
00016 #define RXF1EID8 0x06
00017 #define RXF1EID0 0x07
00018 #define RXF2SIDH 0x08
00019 #define RXF2SIDL 0x09
00020 #define RXF2EID8 0x0A
00021 #define RXF2EID0 0x0B
00022 #define BFPCTRL 0x0C
00023 #define TXRTSCTRL 0x0D
00024 #define CANSTAT 0x0E
00025 #define CANCTRL 0x0F
00026
00027 #define RXF3SIDH 0x10
00028 #define RXF3SIDL 0x11
00029 #define RXF3EID8 0x12
00030 #define RXF3EID0 0x13
00031 #define RXF4SIDH 0x14
00032 #define RXF4SIDL 0x15
00033 #define RXF4EID8 0x16
00034 #define RXF4EID0 0x17
00035 #define RXF5SIDH 0x18
00036 #define RXF5SIDL 0x19
00037 #define RXF5EID8 0x1A
00038 #define RXF5EID0 0x1B
00039 #define TEC 0x1C
00040 #define REC 0x1D
00041 #define CANSTAT1 0x1E
00042 #define CANCTRL1 0x1F
00043
00044 #define RXM0SIDH 0x20
00045 #define RXM0SIDL 0x21
00046 #define RXM0EID8 0x22
00047 #define RXM0EID0 0x23
00048 #define RXM1SIDH 0x24
00049 #define RXM1SIDL 0x25
MPASM 02.20.15 Intermediate CAN_REF.ASM 2-8-2000 13:27:59 PAGE 12
CAN_Ref Design
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
00050 #define RXM1EID8 0x26
00051 #define RXM1EID0 0x27
00052 #define CNF3 0x28
00053 #define CNF2 0x29
00054 #define CNF1 0x2A
00055 #define CANINTE 0x2B
00056 #define CANINTF 0x2C
00057 #define EFLG 0x2D
00058 #define CANSTAT2 0x2E
00059 #define CANCTRL2 0x2F
00060
00061 #define TXB0CTRL 0x30
00062 #define TXB0SIDH 0x31
00063 #define TXB0SIDL 0x32
00064 #define TXB0EID8 0x33
00065 #define TXB0EID0 0x34
00066 #define TXB0DLC 0x35
00067 #define TXB0D0 0x36
00068 #define TXB0D1 0x37
00069 #define TXB0D2 0x38
00070 #define TXB0D3 0x39
00071 #define TXB0D4 0x3A
00072 #define TXB0D5 0x3B
00073 #define TXB0D6 0x3C
00074 #define TXB0D7 0x3D
00075 #define CANSTAT3 0x3E
00076 #define CANCTRL3 0x3F
00077
00078 #define TXB1CTRL 0x40
00079 #define TXB1SIDH 0x41
00080 #define TXB1SIDL 0x42
00081 #define TXB1EID8 0x43
00082 #define TXB1EID0 0x44
00083 #define TXB1DLC 0x45
00084 #define TXB1D0 0x46
00085 #define TXB1D1 0x47
00086 #define TXB1D2 0x48
00087 #define TXB1D3 0x49
00088 #define TXB1D4 0x4A
00089 #define TXB1D5 0x4B
00090 #define TXB1D6 0x4C
00091 #define TXB1D7 0x4D
00092 #define CANSTAT4 0x4E
00093 #define CANCTRL4 0x4F
00094
00095 #define TXB2CTRL 0x50
00096 #define TXB2SIDH 0x51
00097 #define TXB2SIDL 0x52
00098 #define TXB2EID8 0x53
00099 #define TXB2EID0 0x54
00100 #define TXB2DLC 0x55
00101 #define TXB2D0 0x56
00102 #define TXB2D1 0x57
MPASM 02.20.15 Intermediate CAN_REF.ASM 2-8-2000 13:27:59 PAGE 13
CAN_Ref Design
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
00103 #define TXB2D2 0x58
00104 #define TXB2D3 0x59
00105 #define TXB2D4 0x5A
00106 #define TXB2D5 0x5B
00107 #define TXB2D6 0x5C
00108 #define TXB2D7 0x5D
00109 #define CANSTAT5 0x5E
00110 #define CANCTRL5 0x5F
00111
00112 #define RXB0CTRL 0x60
00113 #define RXB0SIDH 0x61
00114 #define RXB0SIDL 0x62
00115 #define RXB0EID8 0x63
00116 #define RXB0EID0 0x64
00117 #define RXB0DLC 0x65
00118 #define RXB0D0 0x66
00119 #define RXB0D1 0x67
00120 #define RXB0D2 0x68
00121 #define RXB0D3 0x69
00122 #define RXB0D4 0x6A
00123 #define RXB0D5 0x6B
00124 #define RXB0D6 0x6C
00125 #define RXB0D7 0x6D
00126 #define CANSTAT6 0x6E
00127 #define CANCTRL6 0x6F
00128
00129 #define RXB1CTRL 0x70
00130 #define RXB1SIDH 0x71
00131 #define RXB1SIDL 0x72
00132 #define RXB1EID8 0x73
00133 #define RXB1EID0 0x74
00134 #define RXB1DLC 0x75
00135 #define RXB1D0 0x76
00136 #define RXB1D1 0x77
00137 #define RXB1D2 0x78
00138 #define RXB1D3 0x79
00139 #define RXB1D4 0x7A
00140 #define RXB1D5 0x7B
00141 #define RXB1D6 0x7C
00142 #define RXB1D7 0x7D
00143 #define CANSTAT7 0x7E
00144 #define CANCTRL7 0x7F
00145
00146 ;; Bit definitions
00147
00148 ;; Bit definitions BFPCTRL
00149 #define trB1BFS BFPCTRL,5
00150 #define trB0BFS BFPCTRL,4
00151 #define trB1BFE BFPCTRL,3
00152 #define trB0BFE BFPCTRL,2
00153 #define trB1BFM BFPCTRL,1
00154 #define trB0BFM BFPCTRL,0
00155
MPASM 02.20.15 Intermediate CAN_REF.ASM 2-8-2000 13:27:59 PAGE 14
CAN_Ref Design
LOC OBJECT CODE LINE SOURCE TEXT
VALUE
00156 ;; Bit definitions TXRTSCTRL
00157 #define trB2RTS BFPCTRL,5
00158 #define trB1RTS BFPCTRL,4
00159 #define trB0RTS BFPCTRL,3
00160 #define trB2RTSM BFPCTRL,2
00161 #define trB1RTSM BFPCTRL,1
00162 #define trB0RTSM BFPCTRL,0
00163
00164 ;; Bit definitions CANSTAT
00165 #define trOPMOD2 CANSTAT,7
00166 #define trOPMOD1 CANSTAT,6
00167 #define trOPMOD0 CANSTAT,5
00168 #define trICOD2 CANSTAT,3
00169 #define trICOD1 CANSTAT,2
00170 #define trICOD0 CANSTAT,1
00171
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -