Decoding serial data bytes and nibbles.


Results 1 to 7 of 7

Threaded View

  1. #1

    Default Decoding serial data bytes and nibbles.

    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
    Last edited by retepsnikrep; - 17th January 2018 at 18:08.

Similar Threads

  1. I need to play with Nibbles, am i on the right track?
    By OldMarty in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2016, 14:32
  2. Replies: 7
    Last Post: - 11th September 2010, 01:32
  3. incorrect requested number of data bytes recieved
    By doxdlite in forum mel PIC BASIC
    Replies: 0
    Last Post: - 17th April 2010, 23:47
  4. Word to nibbles
    By Gauge Guy in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 11th September 2005, 05:08
  5. Serial Data Recorder
    By d1camero in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th April 2005, 13:45

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts