I have a hex serial 15 byte data stream in a byte array.
ED,1E,D2,EF,2E,D3,ED,2E,D2,EF,2E,D3,ED,1E,D2,
It needs to be chopped up into 10 x 12 bit data blocks as below.
ED1,ED2,EF2,ED3,ED1,ED2,EF2,ED3,ED1,ED2
How can i do that efficiently so I end up with each 12 bit block in a word array variable. eg
DataWord[0] = ED1
DataWord[1] = ED2
etc etc
Shifting came to mind but the logic scrambled my brain. Thanks for ideas
Bookmarks