24x24 led matrix
Moderators: Chuckt, Garth, bitfogav
It is starting to be a pretty impressive tool! ive learnt abit of java aswell.
Yeah your right it is using a 2-bit binary output, I thought this way was a good system to start with, but if I am using 74343 to drive the RED and GREEN leds then converting the 2-bit binary into code might not be very easily achieved..
00 = black
01 = red
10 = green
11 = orange
Hopefully I plan to start the coding weekend or early next week
Yeah your right it is using a 2-bit binary output, I thought this way was a good system to start with, but if I am using 74343 to drive the RED and GREEN leds then converting the 2-bit binary into code might not be very easily achieved..
00 = black
01 = red
10 = green
11 = orange
Hopefully I plan to start the coding weekend or early next week
This is something that the LedGridTool can output ready to go straight into the swordfish code
Im not sure that this type of output will work in swordfish, Ill probably have to change it to look more somthing like this
Code: Select all
dim block0col0 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block0col1 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block0col2 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block0col3 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block0col4 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block0col5 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block0col6 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block0col7 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block1col0 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block1col1 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block1col2 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block1col3 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block1col4 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block1col5 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block1col6 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block1col7 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block2col0 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block2col1 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block2col2 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block2col3 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block2col4 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block2col5 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block2col6 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block2col7 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block3col0 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block3col1 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block3col2 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block3col3 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block3col4 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block3col5 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block3col6 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block3col7 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block4col0 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block4col1 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block4col2 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block4col3 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block4col4 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block4col5 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block4col6 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block4col7 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block5col0 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block5col1 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block5col2 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block5col3 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block5col4 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block5col5 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block5col6 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block5col7 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block6col0 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block6col1 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block6col2 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block6col3 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block6col4 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block6col5 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block6col6 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block6col7 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block7col0 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block7col1 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block7col2 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block7col3 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block7col4 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block7col5 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block7col6 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block7col7 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block8col0 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block8col1 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block8col2 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block8col3 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block8col4 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block8col5 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block8col6 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
dim block8col7 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
Code: Select all
dim block0col0 as word = (% 0000000000000000)
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
I thought it was a little strange how you were writing your graphic data.
this here:
won't actually work.
I guess the first thing you would want to do is not use dim to declare your data.
using dim basically means it is a variable that we want to change - this means you will be using RAM and not program memory. You will fill up your RAM very fast doing it this way.
Instead, use CONST. because CONST saves your data to program memory where there's loads of space.
So if we were talking about one block out of the nine, I would recommend doing it like this:
So you would have a separate table for green and red. Then when you come to draw the graphics you just send the red to the red cathodes and green to the green cathodes.
This means that if you were to call block0_red(0) you would get the very first byte of red data for block 0.
this here:
Code: Select all
dim block0col0 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
I guess the first thing you would want to do is not use dim to declare your data.
using dim basically means it is a variable that we want to change - this means you will be using RAM and not program memory. You will fill up your RAM very fast doing it this way.
Instead, use CONST. because CONST saves your data to program memory where there's loads of space.
So if we were talking about one block out of the nine, I would recommend doing it like this:
Code: Select all
Const block0_red(8) As Byte = (%00000001,%00000010,%00000100,%00001000,%00010000,%00100000,%01000000,%10000000)
Const block0_green(8) As Byte = (%00000001,%00000010,%00000100,%00001000,%00010000,%00100000,%01000000,%10000000)
This means that if you were to call block0_red(0) you would get the very first byte of red data for block 0.
Code: Select all
Const block0_red(8) As Byte = (%10010000,%10010000,%10010000,%10010000,%10010000,%10010000,%10010000,%10010000)
Const block0_green(8) As Byte = (%10000001,%10000001,%10000001,%10000001,%10000001,%10000001,%10000001,%10000001)
This will display this on the top left 8x8 matrix
- Attachments
-
- 8x8led2.jpg (7.39 KiB) Viewed 15412 times
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
yep, looks perfect!bitfogav wrote:Code: Select all
Const block0_red(8) As Byte = (%10010000,%10010000,%10010000,%10010000,%10010000,%10010000,%10010000,%10010000) Const block0_green(8) As Byte = (%10000001,%10000001,%10000001,%10000001,%10000001,%10000001,%10000001,%10000001)
This will display this on the top left 8x8 matrix
I am actually thinking perhaps it would be better to use longwords so you would have 24 longwords for red and 24 for green that way it would be easier to manipulate the data rather than using 18 seperate tables (9 for red and 9 for green) hmmm, let me think about this some more!
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
If you do need to update them, you need to store them in ram via the dim instruction.bitfogav wrote:Yeah maybe (24) longwords will work better, But ive been thinking how would I update the screen data if I use "Const" - I could use "arrays" but I haven't learnt how to use these yet or know how they work if I need to update them
Something I haven't really looked much into just yet
Who is online
Users browsing this forum: No registered users and 1 guest