Losing data when extracting bytes from words - 16F18855


+ Reply to Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: Losing data when extracting bytes from words - 16F18855

    1. Why does this compile OK? I mean the asm/endasm block is before defining the variables. Shouldn't the compiler complain about that?

    2. the sub TransmitData transfers data to variables Num0-Num9 from MsgLoop but then sends the str MsgData. Is this correct?

    Ioannis

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: Losing data when extracting bytes from words - 16F18855

    1. Why does this compile OK? I mean the asm/endasm block is before defining the variables. Shouldn't the compiler complain about that?
    why would it complain? the asm block generates no code at all , it only creates labels for the assembler

    2. the sub TransmitData transfers data to variables Num0-Num9 from MsgLoop but then sends the str MsgData. Is this correct?
    yes, MsgData is a 21 byte structure that holds the vars Num0-Num9 + ADCcode
    Warning I'm not a teacher

Similar Threads

  1. Decoding serial data bytes and nibbles.
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th January 2018, 08:22
  2. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  3. ORing / ANDing bytes or words
    By mmargolis in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 19th March 2011, 20:12
  4. Success! Are they 'words' or are they 'bytes'?
    By BitHead in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th December 2009, 16:54
  5. Codespace Saving Tip... Don't mix Words and Bytes
    By Melanie in forum Code Examples
    Replies: 0
    Last Post: - 18th June 2004, 10:23

Members who have read this thread : 14

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