how to access and set bits in a byte array?


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,653


    Did you find this post helpful? Yes | No

    Default Re: how to access and set bits in a byte array?

    bArrRGBData.0[offset]

  2. #2
    Join Date
    Nov 2003
    Posts
    98


    Did you find this post helpful? Yes | No

    Default Re: how to access and set bits in a byte array?

    Quote Originally Posted by richard View Post
    bArrRGBData.0[offset]
    thanks
    ok i think i get that
    but
    bArrRGBData.0[8]
    starts at the 9th bit (?), but what does it return ?
    oh
    maybe i have a bit var
    bitvar = bArrRGBData.0[8]
    is that how to do it ?
    and is 9th correct? i.e. the [offset] starts counting from 0 ?
    thanks for your help

Similar Threads

  1. How do I check (or set) a group of consecutive bits within a byte?
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 2nd April 2012, 08:13
  2. Problem with bits in byte array....
    By HenrikOlsson in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 19th October 2011, 06:27
  3. Access array in PBP and .asm
    By JEC in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th September 2008, 00:35
  4. reading first four bits of a byte
    By kamet in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd January 2007, 08:50
  5. Word array behaving like byte array.... wierd
    By forgie in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 2nd August 2005, 15:43

Members who have read this thread : 0

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