Seleção de chip controlador para desenvolvimento de dispositivo habilitado para USB (Parte 6/6)

Controller Chip Selection for USB-Enabled Device Development (Part 6/6)

In this series, every possible detail about the USB system, including its architecture, protocols, requests and descriptors, as well as signaling and coding, has already been discussed. Packaging the controller chip selection series for developing a USB-enabled device is discussed here.

When developing a custom USB-enabled device, a controller chip needs to be selected. Chip selection depends on several form factors such as:

• Ease of availability

• Cost

• Supported functions

• Ease of Development – ​​Sample Code, Development Tools, Host Driver Software, Programming Language

USB Controller Components

To function as a USB device, the controller chip has the following building blocks -:

• USB transceiver

• Serial Interface Engine (SEI)

• Buffers for storing USB data

Register to store configuration, status and control information for USB communication

USB Transceiver: It provides hardware interface between the device's USB connector and the circuitry that controls USB communication. Typically, the transceiver is present on the same controller chip, but sometimes an external transceiver is used.

Serial interface mechanism: It is an intermediate unit that takes care of the transmission and reception of packets. The unit does not verify or manipulate the data, it only sends the data provided by the controller chip or stores the received data. Typical functions of the serial interface mechanism are:

• Send packages

• Detect incoming packets

• Detect and generate SOP (Start of Packet), EOP (End of Packet), Reset and Resume signals

• Encode and decode data in the required format. Generally, NRZI (Non Return to Zero Inverted) with bit padding

• Check and generate CRC values

Buffers: They are used to store received data or data that needs to be transmitted. In some controllers, a part of the data memory is reserved for buffers while in other registers are used. Buffers work in FIFO (First In, First Out) order. Controllers in which buffers are located in data memory, data is read/written from the lowest address to the highest address. Some controller chips have two parallel buffers to allow faster transfers. For example, when the first buffer is transmitting data, the second buffer may contain the next block of data to be transmitted. On reception, while the firmware processes data from the first buffer, the second buffer may contain the next block of received data. Some controllers support four buffers.

Configuration, status and control information: USB controller chips have built-in registers to store information. These records are mainly used to store information related to -:

• Number of bytes received

• Number of bytes ready to transmit

• Suspend state status

• Which endpoints are enabled

• Error checking information

Clock: The controller chip needs a clock signal for USB communication. Clock sources can be Crystal Oscillator, Ceramic Resonator or On-Chip Clock

USB Device Requirements

Several factors need to be considered when selecting a controller chip -:

Data communication speed

A USB can support three different speed modes – low, high and full. Some controller chips only support low speed, some support low and high speed, while others support all speed modes. The selection of the controller chip must be made according to the required data transfer rate. In designs where only low speed is required, the unnecessary inclusion of full or high speed controllers will add cost overruns to the device. Additionally, circuit components and manufacturing of complete, high-speed controllers are expensive.

Cable length

For low-speed devices, the cable length cannot exceed three meters, while full, high-speed cables can be up to five meters long.

Energy consumed

A peripheral device can draw a maximum current of 500mA in USB2.0, while in USB3.0 it can draw up to 900mA of current. In cases where the current requirement exceeds the USB standard, an external power supply is required.

Types of transfer

All USB controller chips support control transfer. The other types of transfer (Isochronous, Interrupt and Bulk) have specific applications. The controller chip can support all transfer types. The controller chip must be selected depending on the type of transfer required to fulfill the purpose of the device. For example, a mouse only needs interrupt transfer in addition to control transfer. Proper chip selection can avoid additional costs.

Firmware

Some controllers store firmware in their flash memory or EEPROM. Consequently, these controllers provide the functionality to remove, update, or change the firmware as needed. Although some controllers have dedicated memory to hold firmware that cannot be easily erased or rewritten. In this case, the controller chip must be replaced with another whenever a firmware update is performed.

Other features

In addition to a USB interface, a controller chip can provide other functionalities such as GPIO (General Purpose Input Output) pins, timers, counters, ADC (analog to digital converter), interrupts, SPI (Serial Peripheral Interface), TWI (Two Wire Serial Interface ) and other microcontroller features. Selecting a USB controller chip with the extra capability can eliminate the need for IC or external components in a project.

Common Controller Chips

There are a wide variety of controllers available that provide USB interface as well as other features. The use of ASIC (Application Specific Integrated Circuit) is also an option for application specific devices such as mouse or keyboard. Some of them are listed in the table:

Outras funcionalidades

Controller and external CPU

There are USB controllers available that can be interfaced with an external CPU or microcontroller. Interfacing can be done using parallel or serial protocols. This means that an obsolete CPU or microcontroller that does not support USB can receive a USB interface using a USB controller. Ultimately, the device will contain two separate chips, a USB controller chip and a CPU/Microcontroller chip.

Using two separate chips can add cost to the device, while using a USB controller with a built-in CPU like PIC18f4550 will be less expensive.

Some of the USB controllers that can be connected to external chips are listed below:

Controladores USB

FT232BM is commonly used for USB to RS232 conversion.

This completes the USB series. Now is the time to get your hands dirty and start implementing projects using USB interface and protocols.

Back to the blog

Leave a comment

Comments need to be approved before publication.