Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Except that if you have the bit endian wrong, 0xA5 is the same forward and backward.


that's true! 0xAA 0x55 would work to differentiate that case?


Yes, AA and 55 are common test patterns for a variety of hardware.

Haven't seen A5 in the wild but I suppose it could be useful as a initial "Let's setup a connection" where endianness is unknown. Assuming the next thing that is exchanged is an endian negotiation.


I like to have several sequential ones. Easier to see on the oscilloscope. (I spent last night getting a microcontroller to talk to a SPI device, so I'm still licking my wounds.)


0xAA 0x55 is actually used as the last two bytes in the MBR just for this purpose


Endianness is byte order.


Bit endian is a thing in serial protocols. I had an issue with that when using a microcontroller to talk to an LCD last week.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: