<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="generator" content="pdf2htmlEX">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css">
<link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css">
<link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/62709879d973ef42a43bcfe4/raw.css">
<script src="https://static.pudn.com/base/js/compatibility.min.js"></script>
<script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script>
<script>
try{
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar" style="display: none">
<div id="outline">
</div>
</div>
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/62709879d973ef42a43bcfe4/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">2020/8/30<span class="_ _0"> </span>CAN<span class="ff2">学习方法(知乎)</span> - Smah - <span class="ff2">博客园</span></div><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">https://www<span class="_ _1"></span>.cnblogs.com/still-smile/p/1<span class="_ _1"></span>1885453.html<span class="_ _2"> </span>1/35</div><div class="c x2 y3 w2 h4"><div class="t m0 x0 h5 y4 ff3 fs1 fc1 sc0 ls0 ws0"><span class="fc6 sc0">作者:心机之花</span></div><div class="t m0 x0 h5 y5 ff3 fs1 fc1 sc0 ls0 ws0">链接:<span class="ff1">https://www<span class="_ _1"></span>.zhihu.com/question/26776219/answer/244433861</span></div><div class="t m0 x0 h5 y6 ff3 fs1 fc1 sc0 ls0 ws0">来源:知乎</div><div class="t m0 x0 h5 y7 ff3 fs1 fc1 sc0 ls0 ws0">著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。</div><div class="t m0 x0 h5 y8 ff3 fs1 fc1 sc0 ls0 ws0">说下我的学习过程。刚到公司的时候我根本不知道什么是<span class="ff1">CAN</span>,甚至连以太网和串口通讯都不懂。领导把</div><div class="t m0 x0 h5 y9 ff1 fs1 fc1 sc0 ls0 ws0">USBCAN<span class="ff3">分析仪拿给我,把铜线短接上,用软件在</span>CAN1<span class="ff3">窗口点下发送,</span>CAN2<span class="ff3">窗口马上接收到了发送出来</span></div><div class="t m0 x0 h5 ya ff3 fs1 fc1 sc0 ls0 ws0">的数据,<span class="ff1">ok</span>,成功了。这就是<span class="ff1">CAN</span>通讯。<span class="ff4">所以第一点,你想学汽车<span class="ff5">CAN</span>总线,你首先要有个<span class="ff5">USBCAN</span>分析</span></div><div class="t m0 x0 h6 yb ff4 fs1 fc1 sc0 ls0 ws0">仪。否则你无法看到<span class="ff5">CAN</span>总线的原始数据。示波器?需要购买有<span class="ff5">CAN</span>总线数据分析功能的示波器。</div><div class="t m0 x0 h5 yc ff3 fs1 fc1 sc0 ls0 ws0">分析仪这东西我看知乎上还是土豪居多。<span class="ff1">USBCAN</span>分析仪属于舶来品,原产于欧洲,我们国内用的较多的有</div><div class="t m0 x0 h5 yd ff1 fs1 fc1 sc0 ls0 ws0">VN1630A<span class="ff3">(</span>V<span class="_ _1"></span>ector<span class="ff3">出品,用</span>CANoe<span class="ff3">软件),</span>PCAN-USB<span class="ff3">(</span>PEAK<span class="ff3">公司出品,国内用量大),</span>Kvaser<span class="ff3">的</span></div><div class="t m0 x0 h5 ye ff1 fs1 fc1 sc0 ls0 ws0">USBCAN<span class="ff3">(瑞典知名公司),</span>USB2CAN<span class="ff3">(</span>IXXA<span class="_ _3"></span>T<span class="ff3">公司,德国),</span>NI<span class="ff3">自己的</span>USBCAN<span class="ff3">。其特点是昂贵但功能</span></div><div class="t m0 x0 h5 yf ff3 fs1 fc1 sc0 ls0 ws0">强大,<span class="ff1">Peak</span>最便宜的无隔离版本也要<span class="ff1">2000</span>多块,<span class="ff1">V<span class="_ _3"></span>ector<span class="ff3">的硬件价格更是极高。作为学生党买不起,何谈学</span></span></div><div class="t m0 x0 h5 y10 ff3 fs1 fc1 sc0 ls0 ws0">习?接下来说下国产货,<span class="ff1">ZLG</span>作为知名的嵌入式龙头企业有很多<span class="ff1">CAN</span>设备卖,但同样的,价格上也是<span class="ff1">1200-</span></div><div class="t m0 x0 h5 y11 ff1 fs1 fc1 sc0 ls0 ws0">2200<span class="ff3">人民币不等,小贵。最后是平民价位的</span>CAN<span class="ff3">分析仪,淘宝和京东都有,</span>200-600<span class="ff3">元不等,这个价位大家</span></div><div class="t m0 x0 h5 y12 ff3 fs1 fc1 sc0 ls0 ws0">还是可以接受的。<span class="ff4">在这里不推荐大家购买<span class="ff5">250</span>元以下的分析仪</span>。很便宜的分析仪大多是<span class="ff1">USB</span>转串口,再转</div></div><div class="c x2 y13 w3 h7"><div class="t m0 x3 h8 y14 ff1 fs2 fc2 sc0 ls0 ws0">1</div></div><div class="c x4 y15 w4 h9"><div class="t m0 x5 h8 y16 ff1 fs2 fc2 sc0 ls0 ws0">0</div></div><div class="c x6 y17 w5 ha"><div class="t m0 x0 hb y18 ff6 fs2 fc1 sc0 ls0 ws0">1.一个USBCAN分析仪(买或者自己做)</div></div><div class="c x2 y3 w2 h4"><div class="t m1 x7 hc y19 ff1 fs3 fc3 sc0 ls0 ws0">|</div></div><div class="c x8 y1a w6 hd"><div class="t m2 x9 he y1b ff7 fs4 fc4 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x9 hf y1c ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x9 hf y1d ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x9 hf y1e ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x9 hf y1f ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div></div><div class="c xa y20 w7 h10"><div class="t m2 xb h11 y21 ff4 fs6 fc0 sc0 ls0 ws0"><span class="fc6 sc0">C</span><span class="_ _3"></span><span class="fc6 sc0">A</span><span class="_ _3"></span><span class="fc6 sc0">N</span><span class="_ _1"></span><span class="fc6 sc0">学</span><span class="_ _3"></span><span class="fc6 sc0">习</span><span class="_ _3"></span><span class="fc6 sc0">方</span><span class="_ _1"></span><span class="fc6 sc0">法</span><span class="_ _3"></span><span class="fc6 sc0">(</span><span class="_ _3"></span><span class="fc6 sc0">知</span><span class="_ _3"></span><span class="fc6 sc0">乎</span><span class="_ _1"></span><span class="fc6 sc0">)</span></div><div class="t m2 xb h11 y22 ff4 fs6 fc5 sc0 ls0 ws0"><span class="fc6 sc0">C</span><span class="_ _3"></span><span class="fc6 sc0">A</span><span class="_ _3"></span><span class="fc6 sc0">N</span><span class="_ _1"></span><span class="fc6 sc0">学</span><span class="_ _3"></span><span class="fc6 sc0">习</span><span class="_ _3"></span><span class="fc6 sc0">方</span><span class="_ _1"></span><span class="fc6 sc0">法</span><span class="_ _3"></span><span class="fc6 sc0">(</span><span class="_ _3"></span><span class="fc6 sc0">知</span><span class="_ _3"></span><span class="fc6 sc0">乎</span><span class="_ _1"></span><span class="fc6 sc0">)</span></div></div><div class="c x8 y23 w6 h12"><div class="t m2 xc hf y24 ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 xc hf y25 ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 xd h13 y24 ff8 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">发表于</span></div><div class="t m2 xe h13 y24 ff9 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"> </span><span class="fc6 sc0">2</span><span class="fc6 sc0">0</span><span class="fc6 sc0">1</span><span class="fc6 sc0">9</span><span class="fc6 sc0">-</span><span class="fc6 sc0">1</span><span class="fc6 sc0">1</span><span class="fc6 sc0">-</span><span class="fc6 sc0">1</span><span class="fc6 sc0">8</span><span class="fc6 sc0"> </span><span class="fc6 sc0">2</span><span class="fc6 sc0">1</span><span class="fc6 sc0">:</span><span class="fc6 sc0">2</span><span class="fc6 sc0">3</span></div><div class="t m2 xd h13 y25 ff8 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">发表于</span></div><div class="t m2 xe h13 y25 ff9 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"> </span><span class="fc6 sc0">2</span><span class="fc6 sc0">0</span><span class="fc6 sc0">1</span><span class="fc6 sc0">9</span><span class="fc6 sc0">-</span><span class="fc6 sc0">1</span><span class="fc6 sc0">1</span><span class="fc6 sc0">-</span><span class="fc6 sc0">1</span><span class="fc6 sc0">8</span><span class="fc6 sc0"> </span><span class="fc6 sc0">2</span><span class="fc6 sc0">1</span><span class="fc6 sc0">:</span><span class="fc6 sc0">2</span><span class="fc6 sc0">3</span></div><div class="t m2 xf hf y24 ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 xf hf y25 ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x10 h13 y24 ffa fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">阅</span></div><div class="t m2 x11 h13 y24 ffb fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">读</span></div><div class="t m2 x12 h13 y24 ffc fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">:</span></div><div class="t m2 x13 h13 y24 ff9 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">1</span><span class="fc6 sc0">8</span><span class="fc6 sc0">4</span></div><div class="t m2 x10 h13 y25 ffa fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">阅</span></div><div class="t m2 x11 h13 y25 ffb fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">读</span></div><div class="t m2 x12 h13 y25 ffc fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">:</span></div><div class="t m2 x13 h13 y25 ff9 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">1</span><span class="fc6 sc0">8</span><span class="fc6 sc0">4</span></div><div class="t m2 x14 hf y24 ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x14 hf y25 ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x15 h13 y24 ffb fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">评</span></div><div class="t m2 x16 h13 y24 ff8 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">论</span></div><div class="t m2 x17 h13 y24 ffc fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">:</span></div><div class="t m2 x18 h13 y24 ff9 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">0</span></div><div class="t m2 x15 h13 y25 ffb fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">评</span></div><div class="t m2 x16 h13 y25 ff8 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">论</span></div><div class="t m2 x17 h13 y25 ffc fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">:</span></div><div class="t m2 x18 h13 y25 ff9 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">0</span></div><div class="t m2 x19 hf y24 ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x19 hf y25 ff7 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x1a h13 y24 ff8 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">推</span></div><div class="t m2 x1b h13 y24 ffb fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">荐</span></div><div class="t m2 x1c h13 y24 ffc fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">:</span></div><div class="t m2 x1d h13 y24 ff9 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">0</span></div><div class="t m2 x1a h13 y25 ff8 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">推</span></div><div class="t m2 x1b h13 y25 ffb fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">荐</span></div><div class="t m2 x1c h13 y25 ffc fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">:</span></div><div class="t m2 x1d h13 y25 ff9 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0">0</span></div><div class="t m2 x1e h14 y26 ffd fs7 fc5 sc0 ls0 ws0">车<span class="_ _4"> </span>联<span class="_ _4"> </span>网</div></div><a class="l" rel='nofollow' onclick='return false;'><div class="d m3"></div></a></div><div class="pi" data-data='{"ctm":[1.140251,0.000000,0.000000,1.140251,0.000000,0.000000]}'></div></div>
</body>
</html>
<div id="pf2" class="pf w0 h0" data-page-no="2"><div class="pc pc2 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/62709879d973ef42a43bcfe4/bg2.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">2020/8/30<span class="_ _0"> </span>CAN<span class="ff2">学习方法(知乎)</span> - Smah - <span class="ff2">博客园</span></div><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">https://www<span class="_ _1"></span>.cnblogs.com/still-smile/p/1<span class="_ _1"></span>1885453.html<span class="_ _2"> </span>2/35</div><div class="c x2 y27 w2 h15"><div class="t m0 x0 h5 y28 ff1 fs1 fc1 sc0 ls0 ws0">CAN<span class="ff3">,这样的分析仪接收高负载数据时会出现丢帧的现象,之后我们也会说下如何自制一台这样的<span class="ff5">USB<span class="ff4">转串</span></span></span></div><div class="t m0 x0 h5 y29 ff4 fs1 fc1 sc0 ls0 ws0">口转<span class="ff5">CAN</span>分析仪<span class="ff3">。别图便宜,看下淘宝销量排行,不要省那<span class="ff1">100</span>元钱,用不好还要退货,麻烦。总结下,初</span></div><div class="t m0 x0 h5 y2a ff3 fs1 fc1 sc0 ls0 ws0">学<span class="ff1">CAN</span>,如果有足量科研经费,应该优先采购欧洲设备,毕竟软件功能多,性能好;如囊中羞涩,先买平价</div><div class="t m0 x0 h5 y2b ff3 fs1 fc1 sc0 ls0 ws0">国产分析仪接收数据完全可以满足需要。附:<span class="ff1">USBCAN</span>的百度词条</div><div class="t m0 x0 h5 y2c ff1 fs1 fc7 sc0 ls0 ws0">USB-CAN_<span class="ff3">百度百科</span></div><div class="t m0 x0 h5 y2d ff3 fs1 fc1 sc0 ls0 ws0">第一点完毕。<span class="ff4">第二点是足额的<span class="ff5">CAN</span>技术扫盲,来源是书和度娘。</span>入门书籍的选择很重要。在这里推荐的是</div><div class="t m0 x0 h5 y2e ff3 fs1 fc1 sc0 ls0 ws0">《<span class="fc7">项目驱动<span class="ff1">:CAN-bus</span>现场总线基础教程<span class="ff1"> </span>周立功<span class="ff1"> </span>新华书店正版畅销图书</span>》。这书实在便宜还好用。推荐大家</div><div class="t m0 x0 h5 y2f ff3 fs1 fc1 sc0 ls0 ws0">花时间把前两章反复看几遍。</div><div class="t m0 x1f h5 y30 ff3 fs1 fc1 sc0 ls0 ws0">高速<span class="ff1">CAN</span>的电平信号(有差分电压表示</div><div class="t m0 x0 h5 y31 ff1 fs1 fc1 sc0 ls0 ws0">0<span class="ff3">,没有则表示</span>1<span class="ff3">)</span></div></div><div class="c x2 y32 w3 h7"><div class="t m0 x3 h8 y14 ff1 fs2 fc2 sc0 ls0 ws0">2</div></div><div class="c x4 y33 w4 h16"><div class="t m0 x5 h8 y34 ff1 fs2 fc2 sc0 ls0 ws0">0</div></div><div class="c x6 y35 w5 h17"><div class="t m0 x0 hb y36 ff6 fs2 fc1 sc0 ls0 ws0">2.基础知识扫盲</div></div><div class="c x2 y27 w2 h15"><div class="t m1 x7 hc y37 ff1 fs3 fc3 sc0 ls0 ws0">|</div></div><div class="c x8 y27 w6 h15"><div class="t m2 x9 he y38 ffe fs4 fc4 sc0 ls0 ws0"></div><div class="t m2 x9 hf y39 ffe fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x9 hf y3a ffe fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x9 hf y3b ffe fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x9 hf y3c ffe fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div></div><a class="l" rel='nofollow' onclick='return false;'><div class="d m3"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m3"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m3"></div></a></div><div class="pi" data-data='{"ctm":[1.140251,0.000000,0.000000,1.140251,0.000000,0.000000]}'></div></div>
<div id="pf3" class="pf w0 h0" data-page-no="3"><div class="pc pc3 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/62709879d973ef42a43bcfe4/bg3.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">2020/8/30<span class="_ _0"> </span>CAN<span class="ff2">学习方法(知乎)</span> - Smah - <span class="ff2">博客园</span></div><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">https://www<span class="_ _1"></span>.cnblogs.com/still-smile/p/1<span class="_ _1"></span>1885453.html<span class="_ _2"> </span>3/35</div><div class="c x2 y3d w2 hd"><div class="t m0 x0 h5 y3e ff1 fs1 fc1 sc0 ls0 ws0">CAN<span class="ff3">总线标准数据帧的结构(无需过多了解)</span></div><div class="t m0 x0 h5 y3f ff3 fs1 fc1 sc0 ls0 ws0">你说我不喜欢看书,直接上资料?有的。清华<span class="ff1">PPT</span>和大众<span class="ff1">PPT</span>是典范,链接在下面。</div><div class="t m0 x0 h5 y40 ff3 fs1 fc7 sc0 ls0 ws0">清华大学教程<span class="ff1">――CAN</span>总线原理及应用<span class="ff1">_</span>图文<span class="ff1">_</span>百度文库</div><div class="t m0 x0 h5 y41 ff3 fs1 fc7 sc0 ls0 ws0">【图文】上海大众帕萨特<span class="ff1">CAN</span>数据总线的结构原理<span class="ff1">_</span>百度文库</div><div class="t m0 x0 h5 y42 ff3 fs1 fc7 sc0 ls0 ws0">一汽大众<span class="ff1">CAN-BUS</span>培训资料<span class="ff1">_</span>图文<span class="ff1">_</span>百度文库</div><div class="t m0 x0 h5 y43 ff3 fs1 fc1 sc0 ls0 ws0">你说我是搞<span class="ff1">ARM</span>的,最近公司让我用<span class="ff1">STM32</span>开发<span class="ff1">CAN</span>接口设备,下面是初级入门用的材料。</div><div class="t m0 x0 h5 y44 ff3 fs1 fc1 sc0 ls0 ws0">链接:<span class="ff1 fc7">https://pan.baidu.com/s/1goTfK1QjNVirbdtqQLFs4w<span class="fc1"> </span></span>密码:<span class="ff1">84sd</span></div><div class="t m0 x0 h5 y45 ff3 fs1 fc1 sc0 ls0 ws0">链接:<span class="ff1 fc7">https://pan.baidu.com/s/1rs2zmZZYs2LFYgro7bmd-A<span class="fc1"> </span></span>密码:<span class="ff1">zdgq</span></div><div class="t m0 x0 h5 y46 ff3 fs1 fc1 sc0 ls0 ws0">这个是野火和正点原子两家的开发手册,翻到<span class="ff1">CAN</span>总线那部分,推荐直接使用<span class="ff5">ST<span class="ff4">的库函数</span></span>,先实现功能,</div><div class="t m0 x0 h5 y47 ff3 fs1 fc1 sc0 ls0 ws0">有余力再看寄存器,免得走弯路。这手册里面的<span class="ff1">CAN</span>总线更侧重于开发和使用,基础的东西讲得少。</div><div class="t m0 x0 h6 y48 ff4 fs1 fc1 sc0 ls0 ws0">第三点是实际操作,在实际测试中巩固理论知识。</div></div><div class="c x2 y49 w3 h18"><div class="t m0 x3 h8 y4a ff1 fs2 fc2 sc0 ls0 ws0">3</div></div><div class="c x4 y4b w4 h18"><div class="t m0 x5 h8 y4c ff1 fs2 fc2 sc0 ls0 ws0">0</div></div><div class="c x6 y4d w5 ha"><div class="t m0 x0 hb y4e ff6 fs2 fc1 sc0 ls0 ws0">3.找个CAN设备测量数据</div></div><div class="c x2 y3d w2 hd"><div class="t m1 x7 hc y4f ff1 fs3 fc3 sc0 ls0 ws0">|</div></div><div class="c x8 y3d w6 hd"><div class="t m2 x9 he y50 fff fs4 fc4 sc0 ls0 ws0"></div><div class="t m2 x9 hf y39 fff fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x9 hf y3a fff fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x9 hf y3b fff fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m2 x9 hf y3c fff fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div></div><a class="l" rel='nofollow' onclick='return false;'><div class="d m3"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m3"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m3"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m3"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m3"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m3"></div></a></div><div class="pi" data-data='{"ctm":[1.140251,0.000000,0.000000,1.140251,0.000000,0.000000]}'></div></div>
<div id="pf4" class="pf w0 h0" data-page-no="4"><div class="pc pc4 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/62709879d973ef42a43bcfe4/bg4.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">2020/8/30<span class="_ _0"> </span>CAN<span class="ff2">学习方法(知乎)</span> - Smah - <span class="ff2">博客园</span></div><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">https://www<span class="_ _1"></span>.cnblogs.com/still-smile/p/1<span class="_ _1"></span>1885453.html<span class="_ _2"> </span>4/35</div><div class="c x2 y51 w2 h19"><div class="t m0 x0 h5 y52 ff1 fs1 fc1 sc0 ls0 ws0">CAN<span class="ff3">总线不是空中楼阁。不管你测什么东西的</span>CAN<span class="ff3">信号都行,重要的是,你要接收到那些宝贵的</span>CAN<span class="ff3">总线</span></div><div class="t m0 x0 h5 y53 ff3 fs1 fc1 sc0 ls0 ws0">数据。举个例子,你的汽车,你们项目组租的车,你导师的车都行。反正我能想到的最方便的资源就是你身</div><div class="t m0 x0 h5 y54 ff3 fs1 fc1 sc0 ls0 ws0">边的车,只要是<span class="ff1">09</span>年之后的车都带<span class="ff1">CAN</span>总线。我当时是测我自己的速腾车,但<span class="ff1">OBD</span>接口的<span class="ff1">CAN</span>被阉割了,</div><div class="t m0 x0 h5 y55 ff3 fs1 fc1 sc0 ls0 ws0">没有数据。后来从汽车之家论坛中发现空调<span class="ff1">CAN</span>线能引出来,这样才引出了两条宝贵的<span class="ff1">100K</span>波特率舒适</div><div class="t m0 x0 h5 y56 ff1 fs1 fc1 sc0 ls0 ws0">CAN<span class="ff3">总线,测出了很多数据。</span></div><div class="t m0 x0 h5 y57 ff3 fs1 fc1 sc0 ls0 ws0">汽车的<span class="ff1">CAN</span>分为动力<span class="ff1">CAN</span>和舒适<span class="ff1">CAN</span>,具体可以看<span class="ff1">PPT</span>。我测的速腾舒适<span class="ff1">CAN</span>内容很丰富,车门、尾箱打</div><div class="t m0 x0 h5 y58 ff3 fs1 fc1 sc0 ls0 ws0">开还是关闭,安全带,档位,油量,手刹,方向盘转角等等一应俱全,但都是<span class="ff1">CAN</span>总线源码,你不知道哪个</div><div class="t m0 x0 h5 y59 ff3 fs1 fc1 sc0 ls0 ws0">信号是车门信号。这个就叫做<span class="ff4">逆向破解</span>了。你需要频繁的开关车门来确定车门信号所对应的帧<span class="ff1">ID</span>和帧数据。</div><div class="t m0 x0 h5 y5a ff3 fs1 fc1 sc0 ls0 ws0">你动,它跟着动,你不动,它也不动,那就是它了。</div><div class="t m0 x0 h5 y5b ff3 fs1 fc1 sc0 ls0 ws0">什么是帧<span class="ff1">ID</span>?在实际应用中,<span class="ff1">CAN</span>总线一个帧主要由<span class="ff4">帧信息</span>,<span class="ff4">帧<span class="ff5">ID</span></span>和<span class="ff4">帧数据</span>组成。<span class="ff1">CAN</span>总线又分为<span class="ff1">3</span>种,高</div><div class="t m0 x0 h5 y5c ff3 fs1 fc1 sc0 ls0 ws0">速<span class="ff1">CAN</span>、容错<span class="ff1">CAN</span>、单线<span class="ff1">CAN</span>。妈呀,啥是高速<span class="ff1">CAN</span>?高速<span class="ff1">CAN</span>有别于容错<span class="ff1">CAN</span>和单线<span class="ff1">CAN</span>,高速<span class="ff1">CAN</span>的</div><div class="t m0 x0 h5 y5d ff3 fs1 fc1 sc0 ls0 ws0">电平静默<span class="ff1">2.5V</span>,上下限是<span class="ff1">3.5V</span>和<span class="ff1">1.5V</span>,容错<span class="ff1">CAN</span>显性时则为<span class="ff1">1V</span>和<span class="ff1">4V</span>,故可用万用表量出。容错<span class="ff1">CAN</span>和单线</div><div class="t m0 x0 h5 y5e ff1 fs1 fc1 sc0 ls0 ws0">CAN<span class="ff3">的市场占有率小,可暂时不学。附录:高速</span>CAN<span class="ff3">、容错</span>CAN<span class="ff3">、单线</span>CAN<span class="ff3">区别</span></div><div class="t m0 x0 h5 y5f ff3 fs1 fc7 sc0 ls0 ws0">高速<span class="ff1">CAN,</span>低速<span class="ff1">CAN, </span>单线<span class="ff1">CAN </span>比较</div><div class="t m0 x0 h5 y60 ff4 fs1 fc1 sc0 ls0 ws0">帧信息<span class="ff3">:四类,标准数据帧(汽油车、电机)、标准远程帧(少见)、扩展数据帧(广大柴油车、部分汽油</span></div><div class="t m0 x0 h5 y61 ff3 fs1 fc1 sc0 ls0 ws0">车)、扩展远程帧(少见)</div><div class="t m0 x0 h5 y62 ff3 fs1 fc1 sc0 ls0 ws0">有童鞋经常会问到<span class="ff1">CAN2.0A</span>和<span class="ff1">CAN2.0B</span>是啥,<span class="ff1">2.0A</span>是标准的意思,帧<span class="ff1">ID1<span class="_ _3"></span>1<span class="ff3">位,也即</span>0x000-0x7FF<span class="ff3">。</span>2.0B<span class="ff3">是</span></span></div><div class="t m0 x0 h5 y63 ff3 fs1 fc1 sc0 ls0 ws0">扩展的意思,帧<span class="ff1">ID</span>最高<span class="ff1">29</span>位,也即<span class="ff1">0x0000 0000-0x1FFF FFFF</span>,要注意<span class="ff1">2.0B</span>已经包含了<span class="ff1">2.0A</span>,他们俩是包</div><div class="t m0 x0 h5 y64 ff3 fs1 fc1 sc0 ls0 ws0">含与被包含的关系。</div><div class="t m0 x0 h5 y65 ff4 fs1 fc1 sc0 ls0 ws0">帧<span class="ff5">ID</span>是什么?<span class="ff3">通俗讲是<span class="ff1">CAN</span>的一种<span class="ff1">“</span>地址<span class="ff1">”</span>。<span class="ff1">CAN</span>有个特点是</span>竞争机制<span class="ff3">,</span>帧<span class="ff5">ID</span>越小越有占用总线资源的权利,</div><div class="t m0 x0 h5 y66 ff4 fs1 fc1 sc0 ls0 ws0">越会优先发送<span class="ff3">。举个例子,灯光信号帧<span class="ff1">ID0x555</span>,发动机温度传感器帧<span class="ff1">ID0x1<span class="_ _3"></span>1<span class="_ _3"></span>1<span class="ff3">,那么当两个信号同时发出</span></span></span></div><div class="t m0 x0 h5 y67 ff3 fs1 fc1 sc0 ls0 ws0">时,发动机的信号会优先发送,灯光在后面排队。通常在一个<span class="ff1">CAN</span>系统中,不同的设备,发出<span class="ff1">CAN</span>信号的帧</div><div class="t m0 x0 h5 y68 ff1 fs1 fc1 sc0 ls0 ws0">ID<span class="ff3">都是不一样的,或者说,</span>CAN<span class="ff3">信号的每个帧</span>ID<span class="ff3">都有一个固定的用途。如果</span>CAN<span class="ff3">信号的帧</span>ID<span class="ff3">的用途被确定下</span></div><div class="t m0 x0 h5 y69 ff3 fs1 fc1 sc0 ls0 ws0">来,并在一个文档中得到了解释,那么我们管这个叫<span class="ff1">CAN</span>总线的应用层协议,或者高层协议。常见的有</div><div class="t m0 x0 h5 y6a ff1 fs1 fc1 sc0 ls0 ws0">ISO15765-4<span class="ff3">,</span>SAE J1939<span class="ff3">,</span>CANopen<span class="ff3">(电机和挖沟机控制器用)。而这个文档在车辆行业中叫<span class="ff5">DBC<span class="ff4">文件</span></span>,</span></div><div class="t m0 x0 h5 y6b ff3 fs1 fc1 sc0 ls0 ws0">它对车辆<span class="ff1">CAN</span>总线上的每个帧<span class="ff1">ID</span>及每个帧数据都做了注释。</div></div><div class="c x8 y51 w6 h19"><div class="t m0 x9 he y6c ff10 fs4 fc4 sc0 ls0 ws0"></div><div class="t m0 x9 hf y6d ff10 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m0 x9 hf y6e ff10 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m0 x9 hf y6f ff10 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m0 x9 hf y70 ff10 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div></div><a class="l" rel='nofollow' onclick='return false;'><div class="d m3"></div></a></div><div class="pi" data-data='{"ctm":[1.140251,0.000000,0.000000,1.140251,0.000000,0.000000]}'></div></div>
<div id="pf5" class="pf w0 h0" data-page-no="5"><div class="pc pc5 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/62709879d973ef42a43bcfe4/bg5.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">2020/8/30<span class="_ _0"> </span>CAN<span class="ff2">学习方法(知乎)</span> - Smah - <span class="ff2">博客园</span></div><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">https://www<span class="_ _1"></span>.cnblogs.com/still-smile/p/1<span class="_ _1"></span>1885453.html<span class="_ _2"> </span>5/35</div><div class="c x2 y71 w2 hd"><div class="t m0 x0 h5 y72 ff5 fs1 fc1 sc0 ls0 ws0">1<span class="_ _3"></span>1<span class="ff4">位和</span>29<span class="ff4">位是什么意思呢?<span class="ff3">现在说下,<span class="ff1">1<span class="_ _3"></span>1<span class="ff3">位指的是标准帧的帧</span>ID<span class="ff3">范围是</span>0x000-0x7FF<span class="ff3">(</span>0x<span class="ff3">是十六进制的意</span></span></span></span></div><div class="t m0 x0 h5 y73 ff3 fs1 fc1 sc0 ls0 ws0">思),<span class="ff1">7FF</span>翻译成二进制是<span class="ff1">1<span class="_ _3"></span>1<span class="_ _3"></span>1 1<span class="_ _3"></span>1<span class="_ _3"></span>1<span class="_ _3"></span>1 1<span class="_ _3"></span>1<span class="_ _3"></span>1<span class="_ _3"></span>1<span class="ff3">,对吧,十一个</span>“1”<span class="ff3">。同理,</span>29<span class="ff3">位指扩展帧的帧</span>ID<span class="ff3">范围是</span>0x0000</span></div><div class="t m0 x0 h5 y74 ff1 fs1 fc1 sc0 ls0 ws0">0000-0x1FFF FFFF<span class="ff3">,</span>1FFF FFFF<span class="ff3">翻译成二进制是</span>29<span class="ff3">个</span>1<span class="ff3">。大致明白了吧。</span>29<span class="ff3">位的分配</span>ID<span class="ff3">能力比</span>1<span class="_ _3"></span>1<span class="ff3">位的强,</span></div><div class="t m0 x0 h5 y75 ff1 fs1 fc1 sc0 ls0 ws0">1<span class="_ _3"></span>1<span class="ff3">位总有些地方不够之感。</span></div><div class="t m0 x0 h5 y76 ff4 fs1 fc1 sc0 ls0 ws0">帧数据<span class="ff3">很简单了,说下特色吧。与串口相比,<span class="ff1">CAN</span>的帧数据只有<span class="ff1">8</span>个字节,即<span class="ff1">64</span>个位,不会再多了。当然,</span></div><div class="t m0 x0 h5 y77 ff1 fs1 fc1 sc0 ls0 ws0">CAN FD<span class="ff3">作为新型总线解决了仅有</span>8<span class="ff3">字节这个问题。有兴趣大家可以了解下</span>CAN FD<span class="ff3">。</span></div><div class="t m0 x0 h5 y78 ff4 fs1 fc1 sc0 ls0 ws0">波特率<span class="ff3">忘了,<span class="ff1">CAN</span>的波特率都是整数,要注意。常见的车辆波特率有<span class="ff1">500K</span>,<span class="ff1">250K</span>,<span class="ff1">125K</span>,<span class="ff1">100K</span>。波特率</span></div><div class="t m0 x0 h5 y79 ff3 fs1 fc1 sc0 ls0 ws0">这东西和收音机频率一样,如果两个<span class="ff1">CAN</span>设备的通信波特率不一致的话,是不能进行通讯的。</div></div><div class="c x8 y71 w6 hd"><div class="t m0 x9 he y7a ff11 fs4 fc4 sc0 ls0 ws0"></div><div class="t m0 x9 hf y7b ff11 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m0 x9 hf y7c ff11 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m0 x9 hf y7d ff11 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div><div class="t m0 x9 hf y7e ff11 fs5 fc0 sc0 ls0 ws0"><span class="fc6 sc0"></span></div></div></div><div class="pi" data-data='{"ctm":[1.140251,0.000000,0.000000,1.140251,0.000000,0.000000]}'></div></div>