中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 硬件维修 > 综合技术
Open Drain
作者:未知 时间:2005-09-13 23:53 出处:Blog.ChinaUnix.net 责编:chinaitpower
              摘要:Open Drain

A kind of PAD.

Can perform wire-AND function, it was called open-collector in Biploar.


How do I describe an open-drain, bidirectional I/O pin?

Q:

I am trying to build a ps/2 mouse interface for the xs40. I have been relying on http://panda.cs.ndsu.nodak.edu/~achapwes/PICmicro/PS2/ps2.htm for specs of the protocol, and I am now trying to build the open- drain collector shown on this page for the bidirectional I/O. (pullup -> transistor -> gnd). How do I do this?

A:

You can do an open-drain output like this:

ps: inout std_logic;

...

ps <= '0' when data='0' else 'Z';

u0: pullup port map(O=>ps);

The first statement declares a port which can be used as an input or output. The next statement pulls the ps output low if a logic 0 is being driven, but places the output in a high-impedance state if a logic '1' is being driven. The second statement attaches an internal pull-up resistor to the output pin. You might also use an external pullup resistor since the internal pullups are around 100 Kohms. You may need an explicit component declaration for the pullup as well:

component pullup -- pullup component port( O: out std_logic ); end component;


关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有