|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
The C51 compiler stores unsigned ints in big-endian format, however the CAN registers on the C505 are stored in little-endian format. Is there a way to make the compiler store unsigned ints in little-endian format so I can write to the 16-bit CAN registers?
The C166 family stores 16-bit values in little-endian format. When the CAN peripheral was copied over to the 8051 devices, the registers were left in the same format, however the architecture of 8051s is big-endian.
There is no way to make the compiler store unsigned ints in little-endian format, so the CAN registers have to be loaded in single bytes, high and low.
Article last edited on: 2005-07-15 12:09:44
Did you find this article helpful? Yes No
How can we improve this article?