Anyone else programming with Microchip C30? (Bitwise operation)


Results 1 to 10 of 10

Threaded View

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


    Did you find this post helpful? Yes | No

    Default Re: Anyone else programming with Microchip C30? (Bitwise operation)

    you use a union
    eg
    union U32_
    {
    unsigned long l; // For accessing the whole 32-bits
    unsigned char b[4]; // For accessing as individual bytes
    };


    char mybyte;

    union u32_ my_array;
    my_array.l= 0b00001111000011110000111100001111

    mybyte=my_array.b[3];
    Last edited by richard; - 16th May 2015 at 02:56. Reason: can't count o's and ones

Similar Threads

  1. Problems with U2 programmer C30 compiled code
    By minimii in forum Off Topic
    Replies: 0
    Last Post: - 5th November 2009, 09:43
  2. Bitwise Operators
    By SterlingY in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th March 2007, 05:57
  3. Anybody used MPLAB's C30 C Compiler for dsPICs?
    By picnaut in forum Off Topic
    Replies: 4
    Last Post: - 6th September 2005, 23:28
  4. Bitwise AND
    By paul.mcallister in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th February 2005, 05:22
  5. Bitwise Operations
    By rossfree in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th November 2004, 13:58

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