WDATA / DATA statement bit shifting
Does anyone know of a good way to·move or shift·data in WDATA statements arround?
For example if I had the following:
WDATA %11111111_00000000
WDATA %11111111_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11111111_00000000
WDATA %11111111_00000000
so that it looks more like the data was shifted 90 degrees or something like this?
WDATA %11111111_11111111
WDATA %11111111_11111111
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
Not that I actually want new WDATA statements but yet it was stored in an array or something from a READINC or READ command.
I was thinking of the << or >> commands but then the data would be lost if shifted off the end.
I just don't want to re-invent the wheel if this has already been done or an easy method to do this can be done.
Any help here would be appreciated.
Post Edited (T&E Engineer) : 3/19/2007 9:51:18 PM GMT
For example if I had the following:
WDATA %11111111_00000000
WDATA %11111111_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11000000_00000000
WDATA %11111111_00000000
WDATA %11111111_00000000
so that it looks more like the data was shifted 90 degrees or something like this?
WDATA %11111111_11111111
WDATA %11111111_11111111
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %11000000_00000011
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
WDATA %00000000_00000000
Not that I actually want new WDATA statements but yet it was stored in an array or something from a READINC or READ command.
I was thinking of the << or >> commands but then the data would be lost if shifted off the end.
I just don't want to re-invent the wheel if this has already been done or an easy method to do this can be done.
Any help here would be appreciated.
Post Edited (T&E Engineer) : 3/19/2007 9:51:18 PM GMT
Comments
I can currently scroll LEFT and UP using a technique from the Parallax RobOylmpic coding - on my 16x16 LED display. I can also make this code scroll on either the left or right side (16x8 leds) OR top or bottom side (8x16 leds).
Scrolling from the right to the left looks good but scrolling up shows the letters in the·same direction and mirrored or flipped. I thought each letter should face upwards if scrolling up. This means I can add an additional set of data statements for all of the letters meaning I would have to had fixed each letter DATA statment manually (e.g. rotate 90 degrees is what I mean) - OR I can use the same DATA statements I have for scrolling LEFT and just do some math on each letter before it gets displayed.
Here is my· latest code if you want to give it a look.