文档详情

CAN总线的设置编程.pdf

发布:2017-05-25约3万字共14页下载文档
文本预览下载声明
#include c8051f500.h / /SFR declarationse #define CANCTRL 0x00 / /Control Register 控制寄存器 #define CANSTAT 0x01 / / Status register 状态寄存器 #define ERRCNT 0x02 / /error counter register 错误计数寄存器 #define BITREG 0x03 / /Bit Timing Register 位定时寄存器 #define INTREG 0x04 / /Interrupt Low Byte Register #define CANTSTR 0x05 / /Test register 测试寄存器 #define BRPEXT 0x06 / /BRP Extension Register BRP 扩展寄存器 #define IF1CMDRQST 0x08 / /==IF1 Interfance Registers IF1 接口寄存器==// //IF1 Command Request Register 命令请求寄存器 #define IF1CMDMSK 0x09 / / IF1 Command Mask Register 命令掩码寄存器 #define IF1MSK1 0x0A / / IF1 Mask1 Register 掩码寄存器 1 #define IF1MSK2 0x0B / / IF1 Mask2 Register 掩码寄存器2 #define IF1ARB1 0x0C / / IF1 Arbitration1 Register 仲裁寄存器 1 #define IF1ARB2 0x0D / / IF1 Arbitration2 Register 仲裁寄存器2 #define IF1MSGC 0x0E / / IF1 Message Conrol Register 消息控制寄存器/ #define IF1DATA1 0x0F / / IF1 Data A1 Register 数据A 寄存器 #define IF1DATA2 0x10 / / IF1 Data A2 Register #define IF1DATB1 0x11 / / IF1 Data B1 Register 数据B 寄存器 #define IF1DATB2 0x12 / / IF1 Data B2 Register #define IF2CMDRQST 0x20 / /==IF1 Interfance Registers IF1 接口寄存器==/ / / /IF1 Command Request Register 命令请求寄存器 #define IF2CMDMSK 0x21 / / IF2 Command Mask Register 命令掩码寄存器 #define IF2MSK1 0x22 / / IF2 Mask1 Register 掩码寄存器 1 #define IF2MSK2 0x23 / / IF2 Mask2 Register 掩码寄存器2 #define IF2ARB1 0x24 / / IF2Arbitration1 Register 仲裁寄存器 1 #define IF2ARB2 0x25 / / IF2 Arbit ration2 Register 仲裁寄存器2 #define IF2MSGC
显示全部
相似文档