[cpu]cpu unused pin应该怎样从硬件和软件上处理
Micro Community
1.
This is a common question with lots of replies and lots of opinions.
Preferred option. Tie pins to ground or "high" through 5k to 20k resistors.
Option to avoid: Don't let unused pins float as inputs.
My option: Set unused pins as outputs with no connections.
Floating input can play havoc on chip operation. The resistor technique is most conservative. Setting to outputs works fine for non critical applications.
2.
They are various alternatives.
Software set the pin to output (except the MCLR, e.t.c.).
Software set internal pull-up resistor if exists.
Tied an external resistor to Vcc or Vss
3.
You're right. Like all CMOS devices, PIC input pins should not be left floating. I don't know that there is any general rule, though. (That's like asking "What's the best car?")
Everybody seems to have a different opinion of what to do and why their particular way is "the best way". Some of the opinions include:
1) Set the unused pins as outputs and pull them either up or down through various size resistors.
2) Set the unused pins as inputs and pull them either up or down through various size resistors. Either way avoids floating inputs. In either case, I'd suggest not connecting the pins directly to Vdd or Vss.
By using pullup or pulldown resistors, you have future possibility of using the pins as either inputs or outputs without having to cut wires or PCB traces.
This also avoids the risk of a bug being able to flip an input pin to an output and then connect ground and Vdd by trying to drive the wrong state onto the pin.
StackExchange
16
down vote
There are many things that you can do, but the correct one depends on what you are trying to accomplish. I'll go over each of the common things:
Leave the pin unconnected, set as an input, and no pullup/pulldown. This is probably the worst thing you can do. A floating input could cause input noise, even if that input is not being used for anything. This could result in increased EMI and increased power consumption. There is no good reason to do this.
Leave the pin unconnected, set as an input, with internal or external pullups/pulldowns. This option is nice because the pin is available for future use (in case your design is not proven to work). Accidentally shorting the pin will likely not cause problems. This solution does nothing for EMI, however.
Leave the pin unconnected, set as an output, and driven high or low. This is nice because the pin is still available for future use, but accidental shorts could easily kill the thing. This is the worst case scenario for EMI, because each pin forms a tiny stub of an antenna.
Set the pin as a input, connect the pin to GND or VCC. The pin is not easily available for use if you have to rework the design. A good solution solution for EMI. One nice side benefit of this is that you can sometimes more easily route your power/gnd on the PCB since you can use the pads as a "route through"-- especally helpful on 2 layer PCB's with QFN or TQFP packages.
Set the pin as an OUTPUT, connect the pin to GND , drive the pin low as appropriate. Sometimes this is called a "virtual gnd", and improves the grounding of the chip. This solution is the absolute best for EMI, but does not tolerate mistakes of any kind. For example, if you enable the output before setting the output value low and the pin is driven high for a moment then you risk damaging the part. This is almost never done in MCU's, but is more frequently used in FPGAs where additional grounding helps to minimize simultaneous-switching-noise. I would not do this without consulting the chip manufacturer.
Without knowing specific issues that you might be having, solution #2 or #3 are the best balance of pro's and con's. Solutions #4 and #5 are reasonable solutions if EMI is a problem but your design is otherwise close to final (I.E., you are not likely to have a design change that will require more pins).
另外分享一篇PIC单片机的官方文章
http://www.piclist.com/techref/logic/xtrapins.htm
- Hardware:using resistors, to either ground ("pulldown") or the positive supply voltage ("pullup"). Anything from about 1K to about 10K will work fine.
- Software: If they are programmable I/O pins, also leave them tri-stated.
[cpu]cpu unused pin应该怎样从硬件和软件上处理的更多相关文章
- ]# dmesg | grep ATAcentos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息
centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息 osc_4o5tc4xq 2019/10/11 15:03 阅读数 253 centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信 ...
- centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息
centos下查看网卡,主板,CPU,显卡,硬盘型号等硬件信息 rose_willow rose_willow 发布于 2016/06/16 11:32 字数 902 阅读 405 收藏 0 点赞 0 ...
- 安装 SQL Server 2012 的硬件和软件要求(官方全面)
以下各节列出了安装和运行 SQL Server 2012 的最低硬件和软件要求. 有关 SharePoint 集成模式下 Analysis Services 的要求的详细信息,请参阅硬件和软件要求(S ...
- 安装 SQL Server 2005 的硬件和软件要求(官方全面)
SQL Server 2005 安装要求 本主题介绍了安装 SQL Server 205 的硬件和软件要求,以及查看安装文档的说明. 硬件和软件要求(32 位和 64 位) 访问 SQL Server ...
- 安装 SQL Server 2008 R2 的硬件和软件要求(转)
以下各部分列出了安装和运行 SQL Server 2008 R2 的最低硬件和软件要求.有关 SharePoint 集成模式下的 Analysis Services 的要求的详细信息,请参阅硬件和软件 ...
- 硬件和软件兼容i2c协议的24Cxx系列EEPROM存储器(转)
源:硬件和软件兼容i2c协议的24Cxx系列EEPROM存储器 硬件上由于24c01的A0A1A2管脚不允许悬空,故暂时的想法是兼容24c02 ---24c16 使用一个dip8封装的芯片插座,A0 ...
- Linux串口设备树硬件、软件流控设置
/********************************************************************** * Linux串口设备树硬件.软件流控设置 * 说明: ...
- 解决Win7启动时出现“windows未能启动。原因可能是最近更改了硬件或软件”的问题
昨天公司终于大发慈悲,统一更换电脑配置,终于要摆脱“手扶拖拉机”的时代了,赶上“动车时代”了.不过不想换硬盘,因为重新要安装太多东西,环境配置一大堆,所以就硬盘没有换,不过当我开机启动的时候,悲剧发生 ...
- Windows未能启动,原因可能是最近更改了硬件或软件,解决此问题的步骤
电脑开机出现显示这样一段文字"Windows未能启动,原因可能是最近更改了硬件或软件,解决此问题的步骤":出现问题的界面是这样的 步骤如下: 1.直接按"Enter&qu ...
随机推荐
- AndroidStudio编译错误:Error: null value in entry: blameLogFolder=null
今天写项目的时候,电脑开了个WiFi热点,然后这个热点和window驱动不兼容,有时候会导致电脑重启,重启之后AndroidStudio编译就报错了, Error: null value in ent ...
- python IDE 集合
python ruby等语言由于其小众和动态特性,缺少优良的IDE,本篇将介绍主要的python IDE. 1.python安装后自带有IDLE,简单方便,应该算是最简单的编辑环境了,但是过于简单,不 ...
- 在ToolStrip中加入具有更好体验性的DateTimePicker
一. 需求的产生 很多时候,需要根据年月或日期来检索数据.在我的数据库中,如果只需要以月为单位,我一般按照200801这样的格式(yyyyMM)保存为int类型.在做数据检索时,是根据工具栏 ...
- 针对MSHFlexGrid的一系列通用方法-项目中实践代码分享
1.给MSHFlexGrid填充数据通用方法 '自定义报表填充程序 fgrid Public Function ShowformfData(Resultset As ADODB.Recordset, ...
- 如何在ppt或word中添加高亮代码?
如何在ppt或word中添加高亮代码? 问题: 如何ppt中添加带有语法高亮的程序代码,就如同下面的形式(在ppt嵌入高亮代码,且可以编辑,带有行号) 详细的要求如下: 1.代码带有语法高亮. 2.结 ...
- MySQL通过Explain查看select语句的执行计划结果触发写操作
[背景] 某某同学执行了一下Explain结果结果发现数据库有了一条写入操作,恭喜这位同学你的锅到货了,你签收一下: 对! 你没有听错,在一种场景下就算是Explain也会引发数据的写操作,就这是外层 ...
- Python 3 的安装
python 3 的安装: 背景: 之前都是在Pychram上写,我的windows下的python版本是3.5,今天要把一个小脚本上到生产环境上. 无奈我服务器上的python版本是2.6.6.所以 ...
- 复习下C 链表操作(单向循环链表、查找循环节点)
循环链表 稍复杂点. 肯能会有0 或 6 字型的单向循环链表. 接下来创建 单向循环链表 并 查找单向循环链表中的循环节点. 这里已6字型单向循环链表为例. //创建 循环链表 Student * ...
- 使用Xilinx K7 KC705开发板调试PCIe中的问题【持续更新】
开发板:Xilinx K7 KC705 软件:ISE14.7 1.由于应用需求,我们要将开发板作为主机端,通过PCIe接口转接板外接一个NVMe PCIe SSD.并由FPGA控制SSD的数据读写. ...
- mongodb学习比较(数据操作篇)
1. 批量插入: 以数组的方式一次插入多个文档可以在单次TCP请求中完成,避免了多次请求中的额外开销.就数据传输量而言,批量插入的数据中仅包含一份消息头,而多次单条插入则会在每次插入数据时封 ...