Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Async Communication Bit Order

Rank

Total Posts: 19

Joined 2013-11-21

PM

Hello,

I apologize for asking a question that is so basic. Using an Atmel Microcontroller and nRFAP2 in Async UART mode.

I read from various documents that when using multiple bytes, they are sent in little endian format. This is OK.
I also read:

The bit order and USART details should follow relatively standard parameters:

8 Bits per Transfer, 1 Stop Bit, Least Significant Bit Sent First

So, for example, A4 (10100100) should be sent from first bit to last -> 00100101. This is the same for all bytes.


The system I use would transmit each byte [A4] as 10100100 by default. Do I need to reverse the bit order before I transmit from Micro to nRF????

OR, does this really mean: the Transmitter sends 10100100 from left to right and the Receiver sees 00100101 from right to left AND both see the same thing!
Thanks      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Many UARTs support configuring the serial port as lsb first. If you can configure your UART like that, that is all you need, otherwise, you will need to reverse the bits in software.