文件名称:can
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 2kb
- 下载次数:
- 0次
- 提 供 者:
- T***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
pic18 系列单片机,CAN配置模板。
//设置对CAN进行配置
/* ***********波特率设置 ************************** */
//设置CAN波特率1Mbps,在Fosc=32MHz时,Tbit=0.125us,假设BRP=01H
//则Tq=[2*(1+BRP)]/Fosc=2*(1+1)/(32MHz)=0.125us
//normal bit rate=8Tq,SJW=00,Sync_Seg=1Tq,Prog_Seg=1Tq,Phase_Seg1=3Tq,Phase_Seg2=3Tq-pic18 series of microcontrollers, CAN configuration template.// Set the configuration of the CAN /* baud rate settings**************************************///Set CAN baud rate of 1Mbps, when the Fosc = 32MHz, Tbit = 0.125us, assuming BRP = 01H// if Tq = [2* (1+ BRP)]/Fosc = 2* (1+1)/(32MHz) = 0.125us// normal bit rate = 8Tq, SJW = 00, Sync_Seg = 1Tq, Prog_Seg = 1Tq, Phase_Seg1 = 3Tq, Phase_Seg2 = 3Tq
//设置对CAN进行配置
/* ***********波特率设置 ************************** */
//设置CAN波特率1Mbps,在Fosc=32MHz时,Tbit=0.125us,假设BRP=01H
//则Tq=[2*(1+BRP)]/Fosc=2*(1+1)/(32MHz)=0.125us
//normal bit rate=8Tq,SJW=00,Sync_Seg=1Tq,Prog_Seg=1Tq,Phase_Seg1=3Tq,Phase_Seg2=3Tq-pic18 series of microcontrollers, CAN configuration template.// Set the configuration of the CAN /* baud rate settings**************************************///Set CAN baud rate of 1Mbps, when the Fosc = 32MHz, Tbit = 0.125us, assuming BRP = 01H// if Tq = [2* (1+ BRP)]/Fosc = 2* (1+1)/(32MHz) = 0.125us// normal bit rate = 8Tq, SJW = 00, Sync_Seg = 1Tq, Prog_Seg = 1Tq, Phase_Seg1 = 3Tq, Phase_Seg2 = 3Tq
(系统自动生成,下载前可以参看下载内容)
下载文件列表
can.c