USB Complete: Everything You Need to Develop Custom USB Peripherals with Cdrom

Overview


In USB Complete, Jan Axelson once again reveals the programming secrets for a popular interface. The topic this time is the new Universal Serial Bus (USB), which was designed from the ground up to provide a single, easy-to-use interface for multiple peripherals. But this ease of use has come at the cost of greater complexity for the developers who design USB peripherals and write the program code that communicates with them.

Axelson takes the pain out of designing for USB by ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (10) from $1.99   
  • New (1) from $70.00   
  • Used (9) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$70.00
Seller since 2015

Feedback rating:

(214)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview


In USB Complete, Jan Axelson once again reveals the programming secrets for a popular interface. The topic this time is the new Universal Serial Bus (USB), which was designed from the ground up to provide a single, easy-to-use interface for multiple peripherals. But this ease of use has come at the cost of greater complexity for the developers who design USB peripherals and write the program code that communicates with them.

Axelson takes the pain out of designing for USB by showing how to write applications that communicate with USB devices using Visual Basic (or any programming language that can call Win32 API functions). There's no need to write low-level device drivers; you can use the drivers included with Windows 98/2000.

Unlike other books that only rehash specifications and manufacturers' marketing materials, this book has original examples, hands-on guidance, and practical tips that developers can put to use right away. USB Complete is an independent guide that isn't obligated to promote one manufacturer's products.

This book will help you decide whether or not USB is the right choice for a peripheral. You'll find tips on selecting the controller chip that matches your design's needs and enables you to get your peripheral up and running quickly. An example project shows how to develop a custom USB peripheral from start to finish, including device firmware and application programming.

As in her previous best-selling Serial Port Complete and Parallel Port Complete, Axelson's simple, direct style and attention to detail help make a complex topic understandable.

Read More Show Less

Editorial Reviews

Nuts & Volts
A very detailed discussion of USB and how to develop custom USB peripherals.
PC Magazine
A seminal book on the subject.
Karl W. Pfalzer

Axelson did a great job of presenting the difficult topic of USB peripheral development. With her depth of knowledge, she leaves the reader with a sense of knowing enough about USB to actually do related design work.(Karl W. Pfalzer, enterprise-zone.com)

Test and Measurement World
The author has a flair for taking complicated information and making it readable, interesting, and informative. This is the best book on the topic. I recommend it highly.
Read More Show Less

Product Details

  • ISBN-13: 9780965081931
  • Publisher: Lakeview Research, LLC
  • Publication date: 12/1/1999
  • Edition description: BK&CD ROM
  • Pages: 360
  • Product dimensions: 7.02 (w) x 8.91 (h) x 0.90 (d)

Meet the Author


Jan Axelson is the author of Parallel Port Complete, Serial Port Complete, The Microcontroller Idea Book, and Making Printed Circuit Boards. Bill Machrone of PC Magazine has described Jan's writing as "a model of clarity and conciseness."
Read More Show Less

Read an Excerpt


The Host's Duties

...The host PC is in charge of the bus. The host has to know what devices are on the bus and the capabilities of each. The host must also do its best to ensure that all devices on the bus can send and receive data as needed. A bus may have many devices, each with different requirements, and all wanting to transfer data at the same time. The host's job is not trivial!

Fortunately, the host controller's hardware and the USB support in Windows do much of the work of managing the bus. Each USB device attached to the host must have a device driver, which is a software component that enables applications to communicate with the device. Some peripherals can use device drivers included with Windows, while others require custom drivers. Other system-level software components manage communications between the device driver and the host controller.

Applications don't have to worry about the details of USB communications. All they have to do is send and receive data using standard operating-system functions that are accessible from just about all programming languages.

These are tasks that the host performs with little or no support required from applications:

Detect Devices

On power-up, the hubs make the host aware of all attached USB devices. In a process called enumeration, the host assigns an address and requests additional information from each device. After power-up, whenever a device is removed or attached, the host learns of the event and enumerates any newly attached device and removes any detached device from the devices available to applications.

Manage Data Flow

The host manages the flow of data on the bus. Multiple peripherals may want to transfer data at the same time. The host controller handles this by dividing the data path into 1-millisecond frames and giving each transmission a portion of each frame.

Transfers that must occur at specific rate are guaranteed to have the amount of time they need in each frame. During enumeration, a device's driver requests the bandwidth it will need for transfers that must have guaranteed timing. If the bandwidth isn't available, the host doesn't allow communications with the device. The driver can then request a smaller portion of the bandwidth, or wait until the requested bandwidth is available. Transfers that have no guaranteed rate use the remaining portion of the frames, and may have to wait.

Error Checking

The host also has error-checking duties. It adds error-checking bits to the data it sends. When a device receives data, it can perform calculations on the data and compare the results with the received error-checking bits. If the results don't match, the device doesn't acknowledge receiving the data and the host knows that it should retransmit. (USB also supports one transfer type that doesn't allow re-transmitting, in the interest of maintaining a constant transfer rate.) In a similar way, the host may error-check the data it receives from devices.

The host may receive other error indicators that indicate that a device can't send or receive data. The host can then inform the device's driver of the problem, and the driver can notify the application so it can take appropriate action.

Provide Power

In addition to its two signal wires, a USB cable has +5V and ground wires. Some peripherals can draw all of their power from these lines. The host provides power to all devices on power-up or attachment, and works with the devices to conserve power when possible. Each full-power, bus-powered device can draw up to 500 milliamperes. The ports on some battery-powered PCs and hubs support only low-power devices, which are limited to 100 milliamperes. A device may have its own power supply, using bus power only during the initial communications with the host.

Exchange Data with Peripherals

All of the above tasks support the host's main job, which is to exchange data with peripherals. In some cases, a device driver requests the host to poll a peripheral continuously at a requested rate, while in others the host communicates only when an application or other software component requests it. The device driver reports any problems to the appropriate application.

The Peripheral's Duties

In many ways, the peripheral's, or device's, duties are a mirror image of the host's. When the host initiates communications, the peripheral must respond. However, the peripheral also has duties that are unique.

A device can't begin USB communications on its own. Instead, it must wait and respond to a communication from the host. (An exception is the remote wakeup feature, which enables a device to request a communication from the host.)

The USB controller in the device handles many of the USB's duties automatically. The amount of support required in the device's program code varies with the chip.

Detect Communications Directed to the Chip

Each device monitors the device address in each communication on the bus. If the address doesn't match the device's stored address, the device knows it should ignore the communication. If the address does match, the device stores the data in its receive buffer and generates an interrupt to signal that data has arrived. In almost all chips, this is automatic; it's built into the hardware. The device's program code doesn't have to take action or make decisions until the chip has detected a communication containing its address.

Respond to Standard Requests

On power-up, or when the device attaches to a powered system, the device must respond to the requests made by the host in the enumeration process.

All USB devices must respond to the eleven standard request codes that query the capabilities and status of the device and select a configuration. On receiving a request, the device places the information to send in response in its transmit buffer. In some cases, such as setting an address or configuration, the device takes other action in addition to responding with information.

The device doesn't have to carry out every request, however; it just has to respond to the request in an understandable way. For example, when the host requests to use a configuration that the device doesn't support, the device responds with an indicator that the request is unsupported.

Error Check

Like the host, the device adds error-checking bits to the data it sends. On receiving data that includes error-checking bits, the device does the error-checking calculations and (with some exceptions) may request a retransmit if it detects an error. These functions built into the hardware and don't need to be programmed. When appropriate, the device also detects the acknowledgements that the host sends in reply to data it has received.

Manage Power

If the device isn't bus-powered, it must have its own power supply. When there is no bus activity, the device must enter its low-power Suspend state, while continuing to monitor the bus, exiting the Suspend state when bus activity resumes.

When the host enters a low-power state, such as Windows 98's Standby state, all communications on the bus cease, including the timing markers the host normally sends each millisecond. When the devices that connect to the bus detect the absence of bus activity for three milliseconds, they must enter the Suspend state and limit the current they draw from the bus. A host may also request to suspend communications with a specific device. When bus activity resumes, the device must exit its Suspend state.

Devices that don't support the remote-wakeup feature can consume no more than 500 microamperes from the bus in the Suspend state. With the remote-wakeup feature available and enabled by the host, the limit is 2.5 milliamperes. These are average values over a 1 second; the peak current can be greater.

Exchange Data with the Host

All of the above tasks support the main job of the device's USB port, which is to exchange data with the host. After the device is configured, it must respond to requests to send and receive data. The host may poll the device at regular intervals or only when an application requests to communicate with it. The device's configuration, the host's device driver, and the applications that use the device together determine what type of requests the host makes and how often it makes them.

For most transfer types, the device must respond to each poll by sending an acknowledge code (ACK) that indicates that it received the data, or a negative acknowledge (NAK) to indicate that it's too busy to handle the data. The device's hardware sends the appropriate response automatically. Some transfers don't use acknowledgements and the host just assumes that the device has received all transmitted data.

The controller chip's hardware handles the details of formatting the data for the bus. This includes adding error-checking bits to data to transmit, checking for errors in received data, and sending and receiving the individual bits on the bus.

Of course, the device must also do anything else it's responsible for. For example, a mouse must always be ready to detect movement and mouse clicks, a data-acquisition unit has to read the data from its sensors, and a printer must translate received data into images on paper....

Read More Show Less

Table of Contents


1: A Fresh Start
2: Is USB Right for My Project?
3: Inside USB Transfers
4: A Transfer Type for Every Purpose
5: Enumeration: How the Host Learns about Devices
6: Control Transfers: Structured Requests for Critical Data
7: Chip Choices
8: Inside a USB Controller: the Cypress CY7C63001
9: Writing Firmware: the Cypress CY7C63001
10: How the Host Communicates
11: How Windows Selects a Driver
12: Human Interface Devices: Firmware Basics
13: Human Interface Devices: Reports
14: Human Interface Devices: Host Applications
15: Device Testing
16: Hubs: the Link between Devices and the Host
17: Managing Power
18: The Electrical Interface
19: Signals and Encoding
Appendix A: Resources
Appendix B: Cypress CY7C63001 Registers
Index
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)