A word consits of a high byte and a low byte. (see manual)
There is also a shift (right) possibility in PBP. (>>)
Only you have to copy the lsb of the high byte to the msb of the low byte after every shift.
A word consits of a high byte and a low byte. (see manual)
There is also a shift (right) possibility in PBP. (>>)
Only you have to copy the lsb of the high byte to the msb of the low byte after every shift.
Also try, as suggested by Mat
My16Bits = %1111111100000000
My10Bits=My16Bits >> 6 ; lose the lower 6 bits (same as divide by 64)
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Thank you for your response:
The problem I'm having is joining the entire Highbyte of the Word variable with the 2 MSB's of the Lowbyte to form my 10 Bits.
I know I need to concatenate the bits together,but I am getting a bit frustrated by this...If you or anyone else can show me the coding syntax for this operation I would appreciate it.
The concatenated bits will be placed in a word variable .
Down and out
Bob C.
Pfouuuuuh !!!
A is a Byte - Lower Part of THE 16bits value VAL
B is a Byte - Higher Part ....
VAL.Lowbyte = A
VAL.Highbyte = B
That'a All ...
and VAL >> 6 is What you look for.
Final point.
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
I now understand the process!!!....ACE-I honestly RTFM but I guess I just was not understanding.
In your honor Ace I have declared RTFM as a Word variable and will use it my program
Again,thanks for helping me out gentleman!!
Bob C
some may have learn from this RTFM expression
http://www.rtfm.com/
Some also did come cofee cup
![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks