How to fit a variable in a fixed position in ram

You should be able to set a pointer to any place in memory, maybe something like this

byte * ptr = (byte*)(0x1234);

That's probably not right, I always have to try every possible combination of these things to get the right syntax :slight_smile:

But really what do you care where things are? It won't be any faster. Unless you have to address memory-mapped hardware it seems like an exercise in futility.

If your data elements are all the same use an array, if not use a structure.


Rob