Overview
Many instruments and controllers need to connect to a computer, and USB is the simplest way to do it. Microchip offers microcontrollers with an integrated USB 2.0 interface, so the processor talks to the host directly without a separate controller, and the same family provides the 8-bit and 32-bit cores to match the workload. BeiLuo supplies these devices with genuine traceability and FAE support. This page shows how the USB path and the storage fit together.
Integrated USB
The PIC18F4550 provides a USB 2.0 full-speed interface in an 8-bit part, with low-speed and full-speed operation and control, interrupt, isochronous and bulk transfers, so it suits a USB peripheral or an instrument. The PIC32MX270F256B brings the same USB capability to a 32-bit core with more memory and throughput, for a design that needs a larger application. Because the interface is on the chip, the designer avoids a separate USB controller and its firmware, which saves the board area and the development time.
The USB Clock and the PLL
The USB interface needs a precise 48 MHz clock, and both devices provide an on-chip PLL that generates it from the crystal, so the designer configures the oscillator for the USB mode as the datasheet and the USB stack require. Confirm the clock on the bench, because a wrong PLL setting is a common cause of a USB enumeration failure.
Device Descriptors and Identity
A USB device presents descriptors that tell the host what it is, and those descriptors, along with the configuration and the calibration, are stored in a serial EEPROM. A Microchip 24LC256 or 25LC256 stores them reliably, and a 24AA02E48 adds a factory-programmed EUI-48 identity, so a connected product can also carry a unique network address. Keeping the descriptors in the EEPROM lets the firmware change without a code rebuild and lets each unit be personalized.
Choosing the Storage
Choose the storage from the size of the descriptors and the settings and from the bus. The I2C 24-series uses only two pins and shares a bus, and the SPI 25-series gives the fastest access for a larger buffer. Both share a common pinout within the family, so the density can grow without a board change.
Data Acquisition and Buffers
A USB data-acquisition instrument streams the measured data to the host, and the microcontroller buffers the samples in the on-chip SRAM and, for a larger buffer, in the serial EEPROM. The 32-bit PIC32 with 64 KB of SRAM suits a higher data rate, and the 25LC256 adds a fast serial buffer behind it. Match the sample rate and the buffer size to the USB throughput so the stream does not stall.
Power and Bus Power
A USB device may draw its power from the bus, so confirm the current the design needs against the USB budget, and use the low-power modes of the nanoWatt core to reduce the draw. Where a larger current is needed, a self-powered design uses its own supply and the USB only for the data.
Layout and Verification
Keep the USB differential pair short and matched, keep the crystal and the decoupling close to the device and use a ground plane, because the USB signal integrity matters as much as the firmware. Verify the design on the bench by enumerating the device on several hosts, by streaming data at the worst-case rate and by measuring the current in each mode. Our FAE team can review the USB layout and the bring-up.
Getting Help
Send your USB transfer type, your data rate, your memory and package needs and the host environment to our FAE team and we will propose a device and a storage, help choose the core and the PLL and review the layout. BeiLuo holds mainstream Microchip MCUs and EEPROM in regional stock and ships them with an import declaration, a certificate of origin and a RoHS compliance file, so a USB or a connected design can move from prototype to production without a supply gap.