TAILIEUCHUNG - USB Complete fourth- P6

USB Complete fourth- P6:This book focuses on Windows programming for PCs, but other computers and operating systems also have USB support, including Linux and Apple Computer’s Macintosh. Some real-time kernels also support USB. | Chapter 1 Initial Decisions Before you can begin programming you need to select device hardware and a host driver 1. Specify the device s requirements. For the USB interface define the required rate of data transfer and timing or bandwidth requirements. Consider what else your device needs to carry out its function. For example a data logger might need an analog input. Chapter 3 has more about the capabilities of the different transfer types and how they relate to device requirements. 2. Decide whether the PC can access the device using a driver included with the operating system or a driver you provide. Chapter 7 has more about drivers. 3. Select a device controller chip. Chapter 6 has more about selecting chips. Enumerating To enable a host to enumerate your device do the following 1. Write or obtain device firmware to respond to standard USB requests from the host and other events on the bus. The requests ask for a series of descriptors which are data structures that describe the device s USB capabilities. Chip companies generally provide example code that you can modify for a specific application. A few controllers can enumerate with no device firmware required. 2. For a Windows host identify or create a device driver and INF information file to enable identifying the device and assigning a driver. The INF file is a text file that names the driver the device will use on the host computer. If your device fits a class supported by Windows you may be able to use an INF file included with Windows. Other operating systems use different methods to match a driver to a device. 3. Build or obtain a development board or other circuit to test the chip and your firmware. Chip companies typically offer development boards for their chips. 4. Load the code into the device and attach the device to the bus. A Windows host will enumerate the device and add it to the Device Manager. Exchanging Data When the device enumerates successfully you can begin to add components and code .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.