摘 要
USB ( universal serial bus)是近年发展起来的一种快速、灵活的总线接口。它最大的特点是易于使用、可热插拔、接口连接灵活,并且能够提供外设电源,在嵌入式系统及智能仪表中得到广泛的应用。而51系列单片机以其优越的性能、成熟的技术、高性价比被广泛应用于测控仪器等自动化领域。因此用51系列单片机实现USB主机接口,进而实现对USB外设的控制,对提高整个系统的数据存储、数据传输、设备控制等性能都有很大的作用。介绍了一种USB总线的通用接口芯片CH375,并在此基础上提出了一种外部单片机读写U盘的基本方法及其硬件连接方法。单片机只要在原硬件系统中增加1个CH375芯片就可以直接调用CH375提供的子程序库来直接读取U盘中的数据,从而实现了普通单片机与U盘的通讯、方法简单、便于操作、综合成本比较低,具有较大的推广应用价值。
关键词:U盘;CH375;接口芯片;单片机
Abstract
USB (universal serial bus) is one kind which the recent years developed fast, the nimble bus interface. It most major characteristic is easy to use, may to insert hotly pulls out, the connection to be flexible, and can provide the peripheral device power source, obtains the widespread application in the embedded system and the intelligent measuring appliance. But 51 series monolithic integrated circuits by its superior performance, the mature technology, the high performance-to-price ratio are widely applied in observe and control automated domains and so on instrument. Therefore uses 51 series monolithic integrated circuits to realize the USB host interface, then realizes to the USB peripheral device control, to enhances performance and so on overall system's data storage, data transmission, device control to have the very major function。a general purpose interface chip CH375 for USB is introduced in this paper.Based On which a new method of Using external single chip microcomputer to connect with the flash disk is given.Only add one CH375 chip to the single chip microcomputer s hardware system,the operator can use the program given by the CH375 to read the data from the flash disk and realize the communication between the single chip microcomputer and the flash disk.This method is very simple and can be operated easily.