Bits, Bytes Words and Arrays


+ Reply to Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: Bits, Bytes Words and Arrays

    Hi,
    I had a similar issue a couple of years (5) ago. Like you I found that indexing using a constant works but indexing using a variable doesn't (for bits beyond 255). And you, just like me back then, didn't bother to check the manual...
    7.6.4 Accessing Arrays as Multiple Variable-Types
    It is possible for a single array to be declared with multiple names and for each name to be assigned a different variable type. Note that offsets for BITs are limited to a maximum value of 255.
    So, I Think Melanies post where she indicates that using a WORD as the pointer for indexing bits in a BYTE Array really isn't correct.

    Here's my thread.

    /Henrik.

  2. #2
    Join Date
    Feb 2007
    Posts
    55


    Did you find this post helpful? Yes | No

    Default Re: Bits, Bytes Words and Arrays

    Thanks Henik

    solved that one

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


    Did you find this post helpful? Yes | No

    Default Re: Bits, Bytes Words and Arrays

    The other option is a bit of asm code.
    note the code would be slightly different for a pic18
    Attached Files Attached Files
    Warning I'm not a teacher

Similar Threads

  1. LP Instant Interrupts Error
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th December 2009, 09:13
  2. how to store a very large amount of data
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 2nd April 2008, 06:05

Members who have read this thread : 4

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