PDA

View Full Version : DAT



MacGeek117
01-30-2007, 03:34 AM
Would this work as coded, or would I have to step through each line of nulls?(I don't have a Prop yet.)
RoboGeek

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"I reject your reality and subsitute my own!"

Adam Savage, Mythbusters
www.parallax.com (http://www.parallax.com/)
www.goldmine-elec.com (http://www.goldmine-elec.com)
www.expresspcb.com (http://www.expresspcb.com)
www.startrek.com (http://www.startrek.com)

Mike Green
01-30-2007, 04:23 AM
I'm not sure what you're trying to do. The rgb.set routine will receive the address of the first byte in the DAT section ("welcome"). As you've written it, this address will be the address of the start of a block of 64 zero bytes. In the rgb.set routine, you can (and must) organize this any way you want.

MacGeek117
01-30-2007, 05:15 AM
What I'm trying to do is drive the RGB LED Matrix Serial backpack from SparkFun.(I've posted the docs on it) What I'm asking is the way this is coded, will the the object read the whole block, or only the first line?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"I reject your reality and subsitute my own!"

Adam Savage, Mythbusters
www.parallax.com (http://www.parallax.com/)
www.goldmine-elec.com (http://www.goldmine-elec.com)
www.expresspcb.com (http://www.expresspcb.com)
www.startrek.com (http://www.startrek.com)

Mike Green
01-30-2007, 05:44 AM
The compiler just compiles the DAT section into a series of byte values, so all 64 bytes are sequential with no way to tell which byte was from which line of the program. If you write your object to start with the byte whose address is passed and continue through 64 successive bytes, yes, it will read the whole block you've written in your fragment.

MacGeek117
01-31-2007, 01:01 AM
Thank you, Mike! You're a lifesaver!
RoboGeek

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"I reject your reality and subsitute my own!"

Adam Savage, Mythbusters
www.parallax.com (http://www.parallax.com/)
www.goldmine-elec.com (http://www.goldmine-elec.com)
www.expresspcb.com (http://www.expresspcb.com)
www.startrek.com (http://www.startrek.com)