资源描述:
《单片机与usb接口设计》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、单片机与USB接口设计摘要:51系列芯片的串口通信速率较低,会在其串口通信中形成一个速度瓶颈。通用串行总线(USB)作为一种新的微机总线接口规范,具有便捷、易扩展、低成本、低干扰等特点,非常适合作为主机和外设之间的通信接口。本文介绍了一种比较简单方便设计USB设备的方法,设计采用51单片机和USB接口芯片组成的单片机最小系统来实现一个完整的USB设备,大大提高了通信速率。在设计中,采用的控制器是51单片机AT89S52,USB电气接口则是PHILIPS公司的USB接口芯片PDIUSBD12。单片机控制器作为下
2、位机,通过USB电气接口芯片和USB总线与PC机交换数据,并实现USB设备的逻辑功能。系统开发的最终硬件成果是一个带有USB接口的设备,通过USB电缆与PC机相连接,能够实现主机对设备的列举,以及和PC机交换数据,并实现其扩展功能。关键词:USB;单片机系统;PDIUSBD12;AT89S52;接口技术USBinterfaceinthedesignofcommunicationAbstract:Thecommunicationrateoftheseries51chipisloweranditformsatar
3、ebottleneckinserialcommunication.ThispaperintroducedasimpleandconvenientmethodtodesignaUSBapparatus,thatistosay,torealizeanintactUSBapparatuswithaminimumsystemofsingle-chipcomputerthatmadeof51single-chipcomputerandUSBinterface,thecircuitgreatlyimprovescommu
4、nicationrate.Inthissystem,Iadopted51one-chipcomputersAT89S52asitscontroller,thechipPDIUSBD12ofPHILIPSCompanyasitselectricinterface.Theone-chipcomputerasthenextmachine,exchangesthedatawiththePC,throughtheUSBbusandUSBelectricinterfacechip,anditrealizesthelogi
5、cfunctionofUSBapparatus.ItcanexchangedatawithPC,andrealizeitsexpandingfunction,throughconnectingwithPC.Keywords:single-chipcomputersystem;interfaceotherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,Jiangx
6、iCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyC
7、ommitteeSecretaryandrecorderoftheCountypartyCommitteeSecretary,Ministersandtechnology;PDIUSBD12;AT89S52;USB0引言USB是英文UniversalSerialBus的缩写,中文含义是“通用串行总线”。它是应用在PC领域的新型接日技术。1997年开始有真正符合USB技术标准的外设出现。USB1.1是支持USB的计算机与外设上普遍采用的标准。USB2.0规范发布以后,支持者除了原有的康柏、Intel、微软和NE
8、C四个成员外,还有惠普、朗讯和飞利浦于个新成员。USB2.0将向下兼容USB1.1,数据的传输率将达120Mbps-24OMbps,目前已经能支持扫描仪、打印机及存储设备。1USB物理体系结构USB总线设备以星型的拓扑结构实现与主机的物理连接,其物理拓扑结构如图1.1所示。复合设备根HUB主机设备设备HUB设备设备HUB设备设备图1.1USB物理总线拓扑结构USB的接入点由集线器(Hub)来提供。这