Usually, the C-Compiler has to care about it, but if you have to take over e.g a serial line, you have to know it.
Atmel AVR Endianess Cheat Sheet:
Example Value: 0x0A0BAll 8-bt AVRs: Little Endian in Memory 0x0B 0x0A (*adr: 0x0B, *(adr+1): 0x0A)
AVR32: Big Endian in Memory 0x0A 0x0B
Arduino DUE : ?!?!
Here are some images from Wikipedia to illustrate the memory layout of the different schemes, with the example 32-bit value 0x0A0B0C0D
http://en.wikipedia.org/wiki/Endianness
http://blog.coldtobi.de/1_coldtobis_blog/archive/87_little_endianess_guide_for_atmel_avr.html
No comments:
Post a Comment
Feel free to contact me with any suggestions, doubts or requests.
Bless