Questions tagged [byte-order]
The byte-order tag has no summary.
10 questions
2
votes
2
answers
2k
views
How to swap byte order?
Background
I'm reading a 24-bit ADC value into a uint32. Using SPI bus, here's the logic:
value = SPI.transfer(0); // read first 8 bits (MSB first)
value <<= 8; // shift ...
3
votes
2
answers
23k
views
Problems on convert byte[] to String
I'm reading a RFID Card from RC522 and send the data to my computer. My problem is the conversion of byte[] to String or std::string.
#define SIZE_BUFFER 18
#define MAX_SIZE_BLOCK 16
byte ...
0
votes
3
answers
350
views
How to map 6 bytes of raw data to long long type?
I'm trying to solve some problems for a contest, and I have a problem with it. I have to implement a function that has 3 arguments like this:
void foo(unsigned char* A, unsigned char* B, unsigned ...
1
vote
3
answers
1k
views
Problem with transmitting 2 byte data in correct way
I'm using Atmel Studio with Atmega328P.
I'm trying to send the decimal number 876 continuously from the micro-controller. This was just to learn.
To send 876 I need two bytes which is:
0x036C = ...
1
vote
1
answer
2k
views
Using union to return a range of bits from a data frame: wrong approach?
I'm working on an adaptation of Jason Leyrer's Guitar Hero Library for Arduino. My version is for a DJ Hero controller, and I've also borrowed some code from this Arduino forum thread: topic=120527 (...