摘 要
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.