摘要
现在越来越多的电子设计中包含USB接口,但这些USB接口程序大多只能应用在一种电路环境中,不具有可移值性。为了解决此问题,考虑用模块化的方法构建USB接口的程序。对基于PDIUSBD12芯片的硬件电路具体分析了固件编程的思想,提出接口程序的几个模块,并逐一说明每个模块的设计,几个重点地方给出了具体的程序。通过实验表明,该模块化程序能够很好完成微控制器与PC机间的USB通信,并且具有很好的可靠性,扩展性和可移植性。
Nowadays, a growing number of electrical designs include USB interface, but a majority of USB interface code can only be applied in some special circuits, and can't be transplantable. To solve such problems, constructing USB interface code with modular method is considered. In this paper, aiming at application circuit base on PDIUSBD12 chip in non-DMA mode, the firmware programming thoughts are analyzed, according to them a few modules of interface programe are proposed,and the design of every module is explained one by one. Besides,at some key points,the code is supplied in detail. According to the experiment results, the design has been proved to be reliable, extendable, and platform-independed, and is able to support USB communication working between micro controller and PC through the practice.
出处
《电子测量技术》
2007年第8期120-123,共4页
Electronic Measurement Technology