描述
<div class="document">
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">* 1、项目功能介绍</h3>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">主要功能实现,</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">1. 通信协议:支持串口,485和232协议,由于硬件IO口引出的引脚有限,所以,使用了模拟开关芯片做了485和232的切换,2选1。</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">2. 交互逻辑:采用AT命令进行数据交互,用来创建,删除,读取和写入文件。</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">3. 存储介质:采用8M的flash--w25q64进行存储,使用qspi进行通信。由于RA4M2AD3不支持sdio协议,所以放弃了TF卡来作为存储介质。</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">4. 文件系统:采用littlefs文件系统,由于常用的fatfs文件系统并不支持磨损均衡,这样就会导致文件系统信息存储的扇区会因为存储文件的修改,导致同一扇区被多次擦除,而flash的擦除寿命有限,这样会导致加快flash的损耗。使用littlefs文件系统就可以避免该文件,自带磨损均衡和掉电保护的功能。</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt">5. 操作系统:采用的freertos,上手简单,使用门槛低,而且结实耐用。<br>6. 菜单界面:采用0.91寸OLED进行屏幕显示,使用模拟IIC通信,使用U8g2库进行UI绘制。</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*2、项目属性</h3>
<hr class="horizontal-splitline normal-bold-2">
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">项目首次公开;项目为原创;项目不在其他比赛中获奖;项目不在学校参加过答辩。</span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">* 3、开源协议</h3>
<hr class="horizontal-splitline normal-bold-2">
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">请输入内容…</span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">注:利他即利己,请认真阅读下述内容。</span></p>
<ol style="line-height:1.8;">
<li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">拥抱开源,赋予项目无限价值。建议项目核心功能开源80%以上;</span></li>
<li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">2、若某一部分功能不可替代且删掉之后项目无法解决对应的问题,则这一部分实现的功能就是项目的核心功能;比如设计了一台电子负载且设计了一款上位机软件监控功率变化,则电子负载为核心功能,上位机软件为辅助功能;比如电子负载中使用了一款隔离485模块与上位机通信,则此485模块实现的通讯功能为辅助功能; </span></li>
<li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">项目应选择适合自己的<span style="text-decoration:underline;"><a href="/posts/98fdb2accd754af7b51990790db3b47a" target="_blank">开源协议</a></span>,若项目引用其他开源项目,应注明来源并遵循原作者的开源协议规定;原创项目推荐使用GPL3.0开源协议;</span></li>
<li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">直接引用开源项目的原电路或原代码实现的功能不可作为自己项目的核心功能、使用市场上通用模块直接实现的功能不可作为自己项目的核心功能。</span></li>
</ol>
<p style="line-height:1.8;"> </p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><strong><span style="color:#0093e6;">请在竞赛阶段填写 ↓</span></strong></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*4、硬件部分</h3>
<hr class="horizontal-splitline normal-bold-2">
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;">本项目硬件部分较为简单,主要是通过两个上海贝岭的BL1555MM模拟开关进行485和232的通信模式的切换,该模拟开关是双宽频带,高速单极双掷的CMOS开关,既可以作为模拟开关使用也可以作为低延迟的总线开关使用,并且体积小巧。485芯片采用的是台舟的ADM3485,是一款具有3.0V~5.5V宽电源电压范围、总线端口ESD保护能力超过15kV HBM、半双工、低功耗的RS-485/RS-422收发器。232芯片使用的是台舟的MAX3232CSE是一款具有3.0V~5.5V宽电源电压范围,速率250Kpbs的RS-232收发器。采用地博电气的弹簧式接线端子,摆脱了拧螺丝的噩梦。由于采用的是模拟iic接口,屏幕使用的是分辨率为128*32的ssd1306 OLED。为了更高的通信速率,使用qspi来驱动w25q64 8M flash。</p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*5、软件部分</h3>
<hr class="horizontal-splitline normal-bold-2">
<p><strong>1. 操作逻辑</strong></p>
<p>1.操作简单,主要是通过左侧的两个电容触摸按键进行菜单界面的切换,系统刚上电会有开机动画。</p>
<p><img src="//image.lceda.cn/pullimage/oprBhYGZ2p5cHCEnNzJJOsnRNHJkT64a2xXGTaMD.jpeg" alt="" width="400" height="300">2. 内存占用界面,使用的8M的flash,USE表示现在占用12K字节的大小,ALL表示现在总内存具有8192K字节。</p>
<p>由于该页面是顶层页面,所以只存在下指示箭头,表示只能触摸触发下个页面。</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/nWKc8tHLBfRiCFqJZ91U7fLzeulXtQrglAUZLoqJ.jpeg" alt="" width="400" height="300"></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;">3. 通信模式和串口波特率界面,MODE表示当前的模式为485通信模式,BAUD表示当前的波特率为115200.</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;">该页面并不是顶层页面和底层页面,所以不隐藏上下指示箭头,可以上下触发页面。</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/RSSeDZ3Wbuod5tj90uX3zPRX4g63wxlbK8lnf0dO.jpeg" alt="" width="400" height="300"></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;">4. 文件名称和操作字节数界面,NAME表示读取或写入的文件名称为Test.txt,SIZE表示当前读取或者写入的字节数为30个字节。</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;">由于该页面是底层页面,所以只存在上指示箭头,表示只能触摸触发上个页面。</p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/BTjKYEuX2GYwssf0S2X4hHJO4u8Lso7xhf7GjQUP.jpeg" alt="" width="400" height="300"></p>
<p>2. 程序框架</p>
<p><img src="//image.lceda.cn/pullimage/Ae8fDf67WcA9PpklfjInp8D9BLJUVVPEd8Nt6UG9.png" alt="" width="400" height="260"></p>
<p>主要分为了四个任务进行操作,本项目通过使用了多个开源组件实现。</p>
<p>app_at_parse_task使用ring-buffer库,只靠两个指针和数组,不用 malloc、free,不会出现内存碎片,写满会自动覆盖最老数据或者拒绝写入,在任务中通过串口接收中断将数据预先保存到ringbuf中,并在task中进行轮询解析,防止数据过多溢出从而出现at指令的丢失。</p>
<p>自定义AT协议实现AT命令的服务端,可以通过AT指令来修改通信模式,波特率,创建文件,打开文件,读写文件,删除文件,获取文件大小,偏移文件指针,查询文件是否<br>存在,同步文件等功能。</p>
<p><img src="//image.lceda.cn/pullimage/4fWhxsLuHrh7tMp7zIQDsW5MIK8QM2UdE9QeEbsa.png" alt="" width="508" height="277"></p>
<p>app_ui_task使用u8g2库进行绘制,该库常用于OLED等单色屏幕的UI显示,在这里可以方便的绘画三角形的上下指示箭头和丰富字体大小的文本。</p>
<p>app_ctus_task则是使用瑞萨自带的qe_gen电容触摸算法库,可以十分准确检测出电容触摸状态,用来触发上下菜单页面切换。</p>
<p>app_key_task使用bitsbutton库,具有丰基础按键检测功能,组合按键支持和按键结果高性能缓冲区的支持,这里主要是用来触发通信模式的修改。</p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*6、BOM清单</h3>
</div>
<p> </p>
<p> </p>
<hr class="horizontal-splitline normal-bold-2">
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">请输入内容…</span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">注:项目涉及的BOM清单。在<span style="text-decoration:underline;"><a href="https://lceda.cn/editor" target="_blank">嘉立创EDA</a> </span>生成/上传设计文件后,BOM将自动生成至项目详情;建议包括型号、品牌、名称、封装、采购渠道、用途等内容。具体内容和形式应以表达清楚项目构成为准。 </span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*7、大赛LOGO验证</h3>
<hr class="horizontal-splitline normal-bold-2">
<p style="line-height:1.8;"> </p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">请上传包含大赛logo的项目图片,logo以丝印形式印刷在PCB上面。</span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">点击zip下载大赛logo标识! <span style="text-decoration:underline;"><a href="https://image.lceda.cn/easyedaResource/images/d1bbfd69f9404f56901a0e7b849b7245.rar" target="_blank">(大赛标识).zip</a></span></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p>
<h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">* 8、演示您的项目并录制成视频上传</h3>
<hr class="horizontal-splitline normal-bold-2">
<p style="line-height:1.8;"> </p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">视频要求:请横屏拍摄,分辨率不低于1280×720,格式Mp4/Mov,单个视频大小限100M内;</span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">视频标题:立创电赛:{项目名称}-{视频模块名称};如立创电赛:《自动驾驶》-团队介绍。</span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="font-size:14px;"><a href="/posts/42551e8f2f2548cabc1c36626a42da94" target="_blank">前往查看更多详情 ></a></span></p>
<p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p>
评论(1)