11-58 SA-1100
Developer’s Manual
Peripheral Control Module
11.8.1.2 Bit Encoding
USB uses nonreturn to zero inverted (NRZI) to encode individual bits. Both the clock and the data
are encoded and transmitted within the same signal. Instead of representing data by controlling the
state of the signal, transitions are used. A zero is represented by a transition, and a one is
represented by no transition (this produces the data). Each time a zero occurs, the receiver logic
synchronized the baud clock to the incoming data (this produces the clock). To ensure the receiver
is periodically synchronized, any time six consecutive ones are detected in the serial bit stream, a
zero is automatically inserted by the transmitter. This procedure is known as “bit stuffing”. The
receiver logic, in turn, automatically detects stuffed bits and removes them from the incoming data.
Bit stuffing causes a transition on the incoming signal at least once every seven bit-times to
guarantee baud clock lock. Bit stuffing is enabled for an entire packet beginning when the start of
packet is detected until the end of packet is detected (enabled during the sync field all the way
through the CRC field). Figure11-15 shows the NRZI encoding of the data byte 0b1101 0010.
Figure 11-15. NRZI Bit Encoding Example
A4795-01
Bit
Value
Digital
Data
NRZI
Data
11010010