laser-vector
11-05-2010, 10:12 PM
hi!
im building an application with labview to control a few things in my propeller.
labview sends out a string of bytes that the propeller interprets and compiles into a long.
in this example each bit after the 8 most significant bits represents a boolean condition, and the 8 msb's represent a number... so
databyte = 43
if button one is true,
LONG1 = %00101011_00000000_00000000_00000010
databyte = 46
if button one and two are true,
LONG1 = %00101110_00000000_00000000_00000110
databyte = 0
if button nineteen is true,
LONG1 = %00000000_00001000_00000000_00000000
so now i need to figure out a way to sample LONG1 to see the state of these bits and retrieve the value of the 8 msb's.
any ideas???
im building an application with labview to control a few things in my propeller.
labview sends out a string of bytes that the propeller interprets and compiles into a long.
in this example each bit after the 8 most significant bits represents a boolean condition, and the 8 msb's represent a number... so
databyte = 43
if button one is true,
LONG1 = %00101011_00000000_00000000_00000010
databyte = 46
if button one and two are true,
LONG1 = %00101110_00000000_00000000_00000110
databyte = 0
if button nineteen is true,
LONG1 = %00000000_00001000_00000000_00000000
so now i need to figure out a way to sample LONG1 to see the state of these bits and retrieve the value of the 8 msb's.
any ideas???