202
AT90PWM216/316 [DATASHEET]
7710H–AVR–07/2013
18.3.3
Manchester encoding
Manchester encoding (also know as Biphase Code) is a synchronous clock encoding technique used to encode
the clock and data of a synchronous bit stream. In this technique, the actual binary data to be transmitted are not
sent as a sequence of logic 1's and 0's as in level encoded way as in standard USART (known technically as Non
Return to Zero (NRZ)). Instead, the bits are translated into a slightly different format that has a number of advan-
tages over using straight binary encoding (i.e. NRZ).
Manchester encoding follows the rules:
If the original data is a Logic 1, the Manchester code is: 0 to 1 (upward transition at bit center)
If the original data is a Logic 0, the Manchester code is: 1 to 0 (downward transition at bit center)
Figure 18-2. Manchester Bi-phase levels
18.3.3.1
Manchester frame
The USART supports Manchester encoded frames with the following characteristics:
One start bit Manchester encoded (logical ‘1’)
5, 6, 7, 8, 9, 13, 14,15,16,17 data bits in transmission or reception (MSB or LSB first)
The number of data bit in a frame is independently configurable in reception and transmission mode.
One or Two stop bits (level encoded)
Figure 18-3. Manchester Frame example
18.3.3.2
Manchester decoder
When configured in Manchester mode, the EUSART receiver is able to receive serial frame using a 17-bit shift reg-
ister, an edge detector and several data/control registers. The Manchester decoder receives a frame from the RxD
pin of the EUSART interface and loads the received data in the EUSART data register (UDR and EUDR).
The bit order of the data bits in the frame is configurable to handle MSB or LSB first.
Logical 0
Logical 1
1
0
1
0
1
0
1
0
1
0
1
0
Start
Bit
Data Bits
(up to 17 data bit)
Stop
Bits
Encoder Clock
Manchester Data
Binary Data