描述
<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" style="line-height: 1.8;"> 1、功能介绍</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 style="font-size: 18px;"> <span style="color: #000000;">电脑主板在维修过程中,常用诊断卡来判定故障位置,尤其是系统加电运行后,由于基本部件如中断控制器,定时器,DMA控制器存在故障,或内存测试时出现故障,此时主板只能以蜂鸣器做为输出,无法明确故障的位置和内容。</span></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;"><span style="color: #95a5a6; font-size: 14px;"><span style="font-size: 18px;"><span style="color: #000000;"> 传统的诊断卡只能显示最后停机前的故障代号,稍高级一些的配置了诊断码记忆和按键回查功能,但这种卡使用起来还是很不方便,1个按键回查不好控制,看了后面忘了前面,不便保存和分析数据。<span style="color: #003aff;">大数据时代,只有能获取,转存、并利用AI分析数据,才适合于未来机器替代人工完成自动化诊断的趋势。</span>我们根据使用需求,研发出一款智能诊断卡,将CPU启动过程中输出的诊断码全部经由诊断卡的MCU透过USB转串口,发送到另外的电脑的“串口调试助手”软件上,这样显示和回查就非常地直观。</span></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;"> <span style="font-size: 18px;"> 此诊断卡还有1个用途就是开发主板的BIOS程序或扩展BIOS程序时可用于程序调试信息的输出,由于数据输出只需要一条指令“Out 80h,AL”,这样就可以在需要诊断的位置插入这条指令,立即可以查看到寄存器AL的当前内容,如果需要查看其它寄存器的内容,可以先将AX寄存器的内容入栈保护 ,再将其它寄存器传送到AL寄存器输出,传送完成后用出栈操作恢复AX的内容。如果在显示格式上再做一些深层次的发挥,在BIOS程序研发阶段完全可以做出像DOS下用Debug一样的断点调试功能。</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="font-size: 18px;"> 开发扩展BIOS程序,ISR程序和DOS设备驱动程序也同样存在不方便调试和诊断代码Bug的问题,用此智能诊断卡,能够在不影响CPU内部现场的的情况下,将CPU内容现场进行拍照输出,确保查找验证软件故障时有据可查,降低开发难度,也提高了开发速度。</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="font-size: 18px;"><img src="//image.lceda.cn/pullimage/6M5f7GUx6GmfikPETibokQ1gJhnVmKhXxaBQdh7p.jpeg" alt="" width="1668" height="1250"></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="font-size: 18px;">智能诊断卡实物使用图片如下:测试主机为Pocket8086,config.sys文件加载了自研的打印口CF卡设备驱动程序。</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="font-size: 18px;"><img src="//image.lceda.cn/pullimage/XMXpQHe7Sc2OK8t1UEWuqFVsXdXaFajSC3U60eyA.jpeg" alt="" width="1702" height="1276">智能诊断卡通过USB口输出的开机诊断码与驱动加载时读取CF卡扇区的内容显示如下图所示:</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="font-size: 18px;"><img src="//image.lceda.cn/pullimage/vTecjmzYqyUifEXDnckHeIPaDmOu6tps9Whs5XkX.png" alt="" width="876" height="602"></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="font-size: 18px;">注:Pocket8086笔记本电脑的BIOS为自研,输出的诊断码与三大BIOS厂端输出的内容不一样。</span></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><span style="color: #000000; font-size: 18px;"> 此作品为作者原创。</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;"><img src="//image.lceda.cn/pullimage/4Vn9ERZAA6pDUG7V38HBZfg8eqxRr8usm3Bh4hCD.jpeg" alt="" width="1674" height="1150"></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;"> 智能诊断卡采用atmega16A单片机为控制核心,读取锁存器74HC573的8位诊断码到内存,然后发送应答信号给74HC74(双D锁存器),允许CPU继续运行。单片机将存放在FIFO内存中的全部诊断码利用中断方式由串口发送到上位机进行显示和存储。</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;"><img src="//image.lceda.cn/pullimage/SI2gnpWMum5GSYCHwS2pv6QPc7xulHwipThx47mR.png" alt="" width="928" height="459"></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;"><img src="//image.lceda.cn/pullimage/D1aaZBclIZHKMBqWOncw8CWhHBNB8mZ9ntDqy1RJ.png" alt="" width="769" height="503"></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="font-size: 18px;">本项目采用GPL3.0开源协议</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;">4、硬件部分</h3>
<strong>4.1、硬件电路原理总图如下:</strong>
<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;"><img src="//image.lceda.cn/pullimage/ZVB6SOgz8EiH3ipKgVmG00rTlgX8Ogr2HnJThqoj.png" alt="" width="748" height="532"></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: #003aff;">硬件电路原理图的高清PDF文件可以在附件中下载</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;"><strong>4.2、硬件功能解说-单片机控制部分</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;"><img src="//image.lceda.cn/pullimage/QJjudwwUuAvo83YVuQ7241FjBlAFoiocVD4V2Xub.png" alt="" width="878" height="606"></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;"> 单片机atmega16A 按典型电路设计,留出10针JTAG仿真下载口和6针AVRISP程序下载口。复位电路采用阻容复位,AVR芯片为低电平复位。时钟电路采用外置晶体振荡器,为了保证115200bps波特率准确,使用的晶振频率为14.7456M,板载2个指示灯和按键用于输入与输出功能扩充用,锁存信号接到单片机的中断引䐚INT1上,读取数据口接PA口。</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>4.3、硬件功能解说-ISA总线接口部分</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;"><img src="//image.lceda.cn/pullimage/YQfYFncw9FcqQjUxhnTDuZ6KqDirYEJIkohG58UN.png" alt="" width="983" height="484"></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;"> ISA接口单元数据锁存采用74HC573,译码信号产生采用简单可编程逻辑器件(SPLD)GAL16V8实现,因为电脑诊断IO口地址约定为80H,而80H-90H也是DMA芯片IO寄存器地址占用区,所以要对IO地址线A0-A9进行全地址译码,同时要使用IOW信号和AEN信号做为组合判定信号确保CPU执行写80H端口时,GAL16v8输出锁存器CLK信号<span style="color: #003aff;">HC573-LATCH<span style="color: #000000;">到74HC573的CLK端,此时HC573锁存总线数据内容,同时HC573-LATCH信号加载到HC74HC74锁存器的CLK端,74HC74立即在Q端输出高电平。</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 pap-left-indent-1.6em" style="line-height: 1.8;">HC573-Latch信号流动示意图如下图所示:</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/2n2iJyaLiuw0N4P8oDt5CIQB3W8SvOHAynZqFaDJ.png" alt="" width="1117" height="532"></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;"><strong><span style="color: #003aff;"><span style="color: #000000;">4.4、硬件功能解说-信号握手控制部分</span></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 pap-left-indent-1.6em" style="line-height: 1.8;"><span style="color: #003aff;"><span style="color: #000000;"><img src="//image.lceda.cn/pullimage/5Mf4eYRPWd79ysOxOnnVyCULtRZ7LuLBK7E33y76.png" alt="" width="851" height="502"></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 pap-left-indent-1.6em" style="line-height: 1.8;"><span style="color: #003aff;"><span style="color: #000000;"> 上图中U2的A单元完成握手信号,诊断卡上电复位时,单片机将RD_Data引脚 拉低,然后置为高电平,此时对74HC74双D锁存器的A单元进行一次同步复位功能,Q端输出低电平,U4三极管(NPN-8050)基极为低电平,输出为OC开路状态,不影响CPU工作。当CPU写数据到80H端口时,由GAL16V8B产生的HC573-LATCH信号为高电平,74HC74的Q脚立即输出高电平,三极管U4开关导通,将IO-RDY信号线拉低,控制CPU插入等待周期,停止后续工作,此时HC573-LATCH信号送到atmega16A的中断引脚INT1(12脚),单片机产生中断,读取锁存器上的总线数据写入FIFO,然后执行一次将RD-Data信号拉低,然后变高的操作,即恢复IO-RDY为高电平状态,CPU继续进行后续的操作。</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 pap-left-indent-1.6em" style="line-height: 1.8;"><span style="color: #003aff;"><span style="color: #000000;">小结一下<span style="color: #003aff;">:CPU写80H端口是所有连环动作的开始,然后触发74HC74联动装置,通过硬件立即叫停CPU干活,然后待mcu(Atmega16A)知道要插进来把东西取走,MCU完事后,触发一下74HC74联动装置的复位键,联动装置又恢复初始状态,开始时刻监视着下一次触发动作的出现,此时CPU又恢复高速工作状态了</span>。</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 pap-left-indent-1.6em" style="line-height: 1.8;"><strong><span style="color: #003aff;"><span style="color: #000000;">4.4、硬件功能解说-USB转串口部分</span></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 pap-left-indent-1.6em" style="line-height: 1.8;"><span style="color: #003aff;"><span style="color: #000000;"><img src="//image.lceda.cn/pullimage/cb5eTxyYFnZmx9ZkCCtd4pxTt1eBSpJ1jh8ZPvoH.png" alt="" width="863" height="446"></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 pap-left-indent-1.6em" style="line-height: 1.8;"><span style="color: #003aff;"><span style="color: #000000;">USB转串口采用国产芯片CH340C,国产芯性价比高,按芯片典型电路设计,此芯片的供电由USB-HOST端提供,所以串口信号与单片机串口交叉连接时,线路中间串联1K电阻,避免电流倒灌损坏mcu。</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 pap-left-indent-1.6em" style="line-height: 1.8;"><strong><span style="color: #003aff;"><span style="color: #000000;">4.5、硬件功能解说-锁存数据输出指示</span></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 pap-left-indent-1.6em" style="line-height: 1.8;"><span style="color: #003aff;"><span style="color: #000000;"><img src="//image.lceda.cn/pullimage/vJVJuXzEIPTtNstfjnIGfWiVjZUhaEo3c9h1v0D2.png" alt="" width="866" height="614"></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 pap-left-indent-1.6em" style="line-height: 1.8;"><span style="color: #003aff;"><span style="color: #000000;">主板CPU输出到80H端口的数据锁存后,采用8个LED灯同步指示,用于脱机工作或调试程序用,注意指示灯的亮灭与输出的状态是反相的,输出的bit位为0时,对应的指示灯为亮,输出值为1时,指示灯灭。</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 pap-left-indent-1.6em" 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;">5、软件部分</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;"><strong>5.1、单片机软件开发使用CVAVR集成开发环境完成,工程项目如下图所示:</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 pap-left-indent-1.6em" style="line-height: 1.8;"><span style="color: #003aff;">完整的单片机软件工程文件压缩包可以在附件中下载查阅</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 pap-left-indent-1.6em" style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/uSkHiFcQSnp64Ts4UUnqrPLO8RI7wxGUE8EJhiRq.png" alt="" width="1044" height="662"></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;"> 上图中显示的Putchar函数是此作品的软件核心内容,此部分内容由CVAVR自动生成,代码非常的简洁、高效。</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;">代码首先检测FIFO缓冲区是否已满,如满时则等待串口发送完1个字符,产生空闲位置用于添加新入FIFO的数据使用。</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;">然后检查当前是否处于中断发送状态,如果没有启动发送(FIFO已经为空,插入第1个发送数据时),将数据直接送UDR(UART的发送数据寄存器)立即执行发送操作,待加入FIFO的数据不入FIFO。如果MCU当前正在执行中断发送FIFO中的数据内容,此时又有新的数据收到,此时就执行数据入FIFO尾部等待前面的数据都发送完成后,轮到发送它时再将这个数据从串口发出。</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;">tx_write_index为队列尾部指针,在移动过程中行进到FIFO缓冲区的尾部时要回滚到FiFO缓冲区头部,如果FIFO只有256个存放单元,利用8位寄存器的自加1特性,加了256次后就自动清零,自动回滚到FIFO的头部,因而就不需要检查是否行进到FIFO缓冲区尾部后需要执行回滚到头部的操作。</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;"><strong>5.2、PLD芯片逻辑设计采用WINCUPL完成编译,软件工程如下图:</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 pap-left-indent-1.6em" style="line-height: 1.8;"><span style="color: #003aff;">完整的PLD工程文件压缩包可以在附件中下载查阅</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 pap-left-indent-1.6em" style="line-height: 1.8;"><img src="//image.lceda.cn/pullimage/MKWtHIvHnkocLT6U9KkPmeAoNBCcZQjsnVCkPCsw.png" alt="" width="1078" height="678"> 该软件可从microchip 官网下载免费使用,适合于SPLD逻辑设计用,用一条语句即可完成需要多个74HC门电路组合才能完成的功能。</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;">pin 1 = a2 ;<br>pin 2 = a3 ;<br>pin 3 = a4;<br>pin 4 = a5 ;<br>pin 5 = a6 ;<br>pin 6 = a7 ;<br>pin 7 = a8 ;<br>pin 8 = a9 ;<br>pin 9 = !aen;<br>pin 11 = !iow;</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><span style="font-size: 18px; color: #e03e2d;">HC573_LATCH = aen & !a9 & !a8 & a7 & !a6 & !a5 & !a4 & !a3 & !a2 & !a1 & !a0 & iow;</span></p>
<p>上面这个逻辑的输入信号中<span style="color: #003aff;">AEN</span>和<span style="color: #003aff;">IOW<span style="color: #000000;">为引脚<span style="color: #003aff;">输入信号反向<span style="color: #000000;">后</span></span>接入逻辑阵列进行组合译码,而全部的10根IO地址信号是与引脚信号同相接入逻辑阵列。逻辑表达式中地址A7为1,而其它地址信号全部为0时,同时AEN和IOW信号为低时,<span style="color: #e03e2d;">12与门</span>输出逻辑1,即锁存器时钟信号74HC573-CLK为高电平,此信号立即触发后续的连锁反应(包括锁存数据,生成CPU停机信号,触发MCU取走信号)。</span></span></p>
<p><span style="color: #003aff;"><span style="color: #000000;">此作品使用使用了ISA总线信号中的两个特殊信号AEN和IORDY功能如下图所示,正是因为有IORDY这个特殊信号,才使得实现诊断功能的输出非常简洁和高效。</span></span></p>
<p><span style="color: #003aff;"><span style="color: #000000;"><img src="//image.lceda.cn/pullimage/1oWI7xSRzwkAmcxNU3mgOUB9psXdFreLayy7iAK1.jpeg" alt="" width="1603" height="469"></span></span></p>
<p><span style="color: #003aff;"><span style="color: #000000;">在PLD逻辑表达式文件中还有一条备用逻辑如下:</span></span></p>
<p><span style="color: #003aff;"><span style="color: #000000;">D0 = WR_Wait;<br>D0.oe = aen & a9 & !a8 & !a7 & a6 & a5 & a4 &!a3 &!a2 &!a1 &!a0 & IOR;</span></span></p>
<p><span style="color: #003aff;"><span style="color: #000000;">此逻辑实现了1个三态门,将WR-Wait信号输出到总线的D0位置,三态控制逻辑为读270H地址单元,此逻辑在此作品功能中未使用,为备用或测试功能,如果CPU没有IORDY控制逻辑,则高速CPU与低速外设进行接口时,锁存器锁存CPU输出的数据输出后,CPU必须查询外设是否忙(外设取走数据后就会将忙信号清除),遇忙等待空闲后才能输出下1个内容,此原理与大家熟悉的UART或SPI接口输出数据后必须查空后再次写数据原理是一样的。<br> </span></span></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>
<p><span style="color: #003aff;">完整的BOM清单表格文件可以在附件中下载查阅</span></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;"><img src="//image.lceda.cn/pullimage/6sDKqKHrHpWzgUFKSNmWK59pQ45nkUK6c3oYZtAB.png" alt="" width="1084" height="474"></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 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;"><img src="//image.lceda.cn/pullimage/J5Nd7am9szomMSlPvUsXiaZV6ct08u4lCUb2HpsW.png" alt="" width="882" height="478"></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 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;"> </p>
</div>
评论(2)