What does it mean if a microcontroller supports big endian or little endian, what does endian mean?
For microcontrollers, big-endian and little-endian most commonly describe the order of bytes in external memory. Big-endian stores the most-significant bits first, whereas little-endian stores the least-significant bits first.
For example with data: 0xABCD
Would like to know .
I you read the data from the eeprom chip and say it is in little indian, can you write it back as big indian???
Will this have an effect on operation of the data???
The reason i ask is because i need to move data from the one st93c66 (Big Indian ) to Atmel 93c66a(Little indian)
Message was edited by: PierreTheron
In reality it doesn't matter if an eeprom chip stores it's data in little endian or big endian format. What matter's is the endian'ness of data transfer thru the communication interface of the eeprom of your actual data.
So write your software stack to deal with that accordingly.
And this doesn't just apply to microcontrollers - it applies pretty much to any processor that can store data that exceeds the native datasize.
i.e. an 8bit CPU storing > 8bit data or a 16bit CPU storing > 16bit data.
Once the native datasize is exceeded, multiple data units must now be stored in memory and the decision as to "how" comes into play.
If you are sending data to storage medium and you write your routine to input/output in the same way, as Robert says, it doesn't matter how it's stored. As long as the readback doesn't fuss with the order differently then they write-out, you should be fine.
Tested this byteswapping and it does not matter how you write it ..
The car still starts fine as long as you do not tamper with the file.
Am mostly playng with clio 2 uch units at moment..
FYI, useless information for you:
"Endian" comes from the novel "Gulliver's Travels", where some people of a "tribe" demanded that their soft boiled eggs be cracked open from the small end of the egg first ("little endian"), while another rival tribe demanded that their soft-boiled eggs be opened from the big end of the egg first ("big endian").
Actually, if the high order byte (most significant byte) is AB in hexadecimal and the low order (least significant byte) is CD then little endian would be CDAB. CD is the LSB and AB is the MSB. The question is only relevant if you need to do arithmetic with values greater than 256.
In MPU/MCU usage, big/little endian refers to how the bytes are stored in memory. As an example, if you were to dump the memory containing the dword 0x12345678 you'd see:
ADDR BIG LITTLE
100 12 78
101 34 56
102 56 34
103 78 12
In this case, endian basically means, which end of the number (least significant = little end) is stored in memory first (low order address).