Saturday, 1 December 2012

Endianess ( Both the Big and the Little) : or "How they done my head for hours "...

This almost drove me to insanity, so here it is ( As a curiosity I still would like to know if the new DUE is Big Endianess or not, but ill have to wait till i get mine)
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: 0x0A0B

All 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

No comments:

Post a Comment

Feel free to contact me with any suggestions, doubts or requests.