Andrew Cowan
Senior Member
As part of my robot project, I've found that I've run out of variables.
A main 28X2 in the robot collects data from a network of other PICs, and then sends the data across the radio link.
A 20X2 at the other end receives the data, and displays it on an LCD screen.
The problem is that I've run out of variables - there are about 80 bytes of data that need sending. My current setup (with about 50 bytes of data), uses one byte variable (b1, b2, b3 etc) for each bit of data.
I haven't used the scratchpad before - would I be wise to allocate a scratchpad location to each data byte, then get it out before sending?
EG:
In the 28X2 in the robot:
And on the receiving end, do the opposite.
Does this sound like a good solution? I'm happy to send the data in several packets. Can the symbol command be used as it can be with byte variables? It is very neat (code wise) to have code such as if CO2>25 then....
Thanks,
Andrew
A main 28X2 in the robot collects data from a network of other PICs, and then sends the data across the radio link.
A 20X2 at the other end receives the data, and displays it on an LCD screen.
The problem is that I've run out of variables - there are about 80 bytes of data that need sending. My current setup (with about 50 bytes of data), uses one byte variable (b1, b2, b3 etc) for each bit of data.
I haven't used the scratchpad before - would I be wise to allocate a scratchpad location to each data byte, then get it out before sending?
EG:
In the 28X2 in the robot:
- Collect all the data from the slave PICs, and put the data into scratchpad locations 1-70.
- Transfer the first 40 bytes into b1 to b40.
- Send these across the wireless link.
- Transfer the next 40 bytes into b1 to b40.
- Send these across the wireless link.
- Repeat
And on the receiving end, do the opposite.
Does this sound like a good solution? I'm happy to send the data in several packets. Can the symbol command be used as it can be with byte variables? It is very neat (code wise) to have code such as if CO2>25 then....
Thanks,
Andrew
Last edited: