I'm currently trying to make a USB device with the ATMega16U2.
On page 187 of the datasheet, there are unspecified resistors between the USB port and the pins of the microcontroller
The Arduino Uno (R3) similarly uses these resistors in its design, with a value of 22 Ohms.
What are these for, and why are they needed with such low values?
Bonus question: The wiring between UDP
, UDM
, D+
and D-
in the figure on page 187 is a mistake, right? On the next page, they are reversed.
Best Answer
They are "termination" resistors. for impedance matching purpose.
Per USB 2.0 standard, when using a full speed (12Mbps) buffer in a USB 2.0 compliant system, it is necessary to place a series resistor on the D+ and D− pins external to the transceiver. This placement is a result of the need to properly match the impedance of the specified transmission line having a differential characteristic impedance (\$Z_{O}\$) of 90Ω and a single ended impedance of 45Ω. To match this load, it requires that the full speed transceiver output impedance must be in the range 28Ω to 44Ω. So if the transceiver has a output impedance less than this (many output drivers has a low output impedance), you may need a external termination resistor.