28.02.2014 Views

Manchester Transceiver Using the USART and XCL Modules on ...

Manchester Transceiver Using the USART and XCL Modules on ...

Manchester Transceiver Using the USART and XCL Modules on ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 4-1. <str<strong>on</strong>g>Manchester</str<strong>on</strong>g> decoding structure<br />

<str<strong>on</strong>g>Manchester</str<strong>on</strong>g> code can be over sample with a higher <str<strong>on</strong>g>USART</str<strong>on</strong>g> baud rate than <str<strong>on</strong>g>Manchester</str<strong>on</strong>g> clock. Then <str<strong>on</strong>g>Manchester</str<strong>on</strong>g> code is<br />

decoded from <str<strong>on</strong>g>USART</str<strong>on</strong>g> sampled bits by firmware. This way can set tolerance of <str<strong>on</strong>g>Manchester</str<strong>on</strong>g> clock rate error flexibly<br />

because <str<strong>on</strong>g>the</str<strong>on</strong>g> error is judged by firmware. Figure 4-2 illustrates a sample example with <str<strong>on</strong>g>USART</str<strong>on</strong>g> baud rate twelve times of<br />

<str<strong>on</strong>g>Manchester</str<strong>on</strong>g> code. The first six <str<strong>on</strong>g>USART</str<strong>on</strong>g> bits sample zero for <str<strong>on</strong>g>Manchester</str<strong>on</strong>g> low level <str<strong>on</strong>g>and</str<strong>on</strong>g> <str<strong>on</strong>g>the</str<strong>on</strong>g> next six sample <strong>on</strong>e for<br />

<str<strong>on</strong>g>Manchester</str<strong>on</strong>g> high level. In this way <str<strong>on</strong>g>the</str<strong>on</strong>g> maximum number <str<strong>on</strong>g>Manchester</str<strong>on</strong>g> code can be decoded limits to 256/12.<br />

Figure 4-2. <str<strong>on</strong>g>USART</str<strong>on</strong>g> bits sampling<br />

<str<strong>on</strong>g>Manchester</str<strong>on</strong>g> code<br />

<str<strong>on</strong>g>USART</str<strong>on</strong>g> bits sample<br />

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15<br />

4.1 How to c<strong>on</strong>figure <str<strong>on</strong>g>USART</str<strong>on</strong>g><br />

1. Set c<strong>on</strong>trol register C (CTRLC)<br />

7 6 5 4 3 2 1 0<br />

CMODE[1:0] PMODE[1:0] SBMODE CHSIZE[2:0]<br />

Bit 7:6 – CMODE[1:0]: Communicati<strong>on</strong> Mode<br />

Select asynchr<strong>on</strong>ous <str<strong>on</strong>g>USART</str<strong>on</strong>g> to sample <str<strong>on</strong>g>Manchester</str<strong>on</strong>g> code.<br />

Bit 5:4 – PMODE[1:0]: Parity Mode<br />

Bit 3 – SBMODE: Stop Bit Mode<br />

Bit 2:0 – CHSIZE[2:0]: Character Size<br />

Set up according to <str<strong>on</strong>g>Manchester</str<strong>on</strong>g> code frame structure.<br />

2. Set c<strong>on</strong>trol register D (CTRLD)<br />

7 6 5 4 3 2 1 0<br />

– – DECTYPE[1:0] LUTACT[1:0] PECACT[1:0]<br />

Bit 5:4 – DECTYPE[1:0]: Decoding <str<strong>on</strong>g>and</str<strong>on</strong>g> encoding type<br />

Atmel AT03335: <str<strong>on</strong>g>Manchester</str<strong>on</strong>g> <str<strong>on</strong>g>Transceiver</str<strong>on</strong>g> <str<strong>on</strong>g>Using</str<strong>on</strong>g> <str<strong>on</strong>g>the</str<strong>on</strong>g> <str<strong>on</strong>g>USART</str<strong>on</strong>g> <str<strong>on</strong>g>and</str<strong>on</strong>g> <str<strong>on</strong>g>XCL</str<strong>on</strong>g> <str<strong>on</strong>g>Modules</str<strong>on</strong>g> <strong>on</strong> XMEGA E [APPLICATION NOTE]<br />

42164A−AVR−07/2013<br />

9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!