sx/b DATA question
Hi
I'm working on a little project. I neet to store a lot off data at compile time to send out later on the serial colnnection.
I want to use the DATA statemend but I had a little question on it.
Can you store multiple byte values, separated by a "," on one line?
ex
Preset1:
DATA %10100000, %00000000, %00000000, %00000111, %00000000, %00010100, %00111000
DATA %10100001, %00000000, %00000000, %00000111, %00000000, %00010000, %00111001
see example.
And how do you recall them with read + indx??
Thanks in advance.
stef
·
I'm working on a little project. I neet to store a lot off data at compile time to send out later on the serial colnnection.
I want to use the DATA statemend but I had a little question on it.
Can you store multiple byte values, separated by a "," on one line?
ex
Preset1:
DATA %10100000, %00000000, %00000000, %00000111, %00000000, %00010100, %00111000
DATA %10100001, %00000000, %00000000, %00000111, %00000000, %00010000, %00111001
see example.
And how do you recall them with read + indx??
Thanks in advance.
stef
·
Comments
Yes a comma is all that is needed.
You may want to revert to coding in Hex notation so you can fit more on 1 line
See the SX B compiler online help file,
The example for the keypad encoder down the bottom shows you how
to retrieve the values from the data look up tables.
Cheers
Ronald Nollet
For example:········
Also look at the attached file - example from JonnyMac.
Post Edited (T&E Engineer) : 7/26/2007 5:09:23 PM GMT