Data Manipulation?
Circuitbuilder9
Posts: 85
Hey, all.
I was looking at all of your really awesome feats/projects, and a lot of them involve some type of upper or lower byte/data manipulation. Is there any tutorial or website where i can learn that? That's one skill that i still can't seem to comprehend for any projects.
So here's my questions, if you would like to answer them:
1. Why is data/byte manipulation important to your propeller projects?
2. How would you go about using it on a regular basis for your own project?
3. Is there a certain format for doing data/byte manipulation, as Hanno did?
4. How do you program and incorporate the values attained into the rest of the program?
5. How do you write the code in spin (or assembly) in order to do this? Is there a certain syntax for data/byte retrieval or manipulation?
If i am asking questions that bother you of my stupidity, please excuse me; freshman at high school here.
I was looking at all of your really awesome feats/projects, and a lot of them involve some type of upper or lower byte/data manipulation. Is there any tutorial or website where i can learn that? That's one skill that i still can't seem to comprehend for any projects.
So here's my questions, if you would like to answer them:
1. Why is data/byte manipulation important to your propeller projects?
2. How would you go about using it on a regular basis for your own project?
3. Is there a certain format for doing data/byte manipulation, as Hanno did?
4. How do you program and incorporate the values attained into the rest of the program?
5. How do you write the code in spin (or assembly) in order to do this? Is there a certain syntax for data/byte retrieval or manipulation?
If i am asking questions that bother you of my stupidity, please excuse me; freshman at high school here.
Comments
1024 = 0x0400h
A common method is to send the low byte followed by the high byte; little-endian. Check out the LONG, WORD, and BYTE data types in the Propeller manual.
Get the low byte using a logical AND
0400 & 00FF = 0000
Get the high byte and shift the byte to the right 8 times
0400 & FF00 = 0400 -> 04
I think this is what you are asking. If not, please be more specific regarding data manipulation.
What i meant to say was: as an example using Hanno's way of data manipulation for values specifically inclined for the wheels of his DanceBot, what do you do to program (i.e. - what is the syntax of the code) and retrieve the data manipulation and its values and why is it significant in a project such as Hanno's?
Post the code you're having trouble understanding.