24x24 led matrix

Post here to let others know of a project you're working on.

Moderators: Chuckt, Garth, bitfogav

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Wed Aug 11, 2010 9:24 am

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 :)

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Wed Aug 11, 2010 9:45 am

This is something that the LedGridTool can output ready to go straight into the swordfish code :)

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)
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 word = (% 0000000000000000)

User avatar
brad
Site Admin
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

Post by brad » Wed Aug 11, 2010 12:31 pm

I thought it was a little strange how you were writing your graphic data.

this here:

Code: Select all

dim block0col0 as byte = (%00, 00, 00, 00, 00, 00, 00, 00)
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:

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)
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.

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Wed Aug 11, 2010 6:57 pm

Oh yeah of course your so right, I havn't really thought it through yet, but I was aware that I need some sort of code in place to cover RED and GREEN leds..

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Thu Aug 12, 2010 4:59 am

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

Image
Attachments
8x8led2.jpg
8x8led2.jpg (7.39 KiB) Viewed 14849 times

User avatar
brad
Site Admin
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

Post by brad » Thu Aug 12, 2010 8:18 am

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

Image
yep, looks perfect!

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!

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Sun Aug 15, 2010 9:43 pm

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 :?

User avatar
brad
Site Admin
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

Post by brad » Sun Aug 15, 2010 9:48 pm

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 :?
If you do need to update them, you need to store them in ram via the dim instruction.

Something I haven't really looked much into just yet :)

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Sun Aug 15, 2010 9:58 pm

Ummmm Im going to have to have a think about this.. :)

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Thu Aug 19, 2010 4:28 am

Heres an update, I am over half way building the 24x24 matrix board... ooowch!!


Image
Attachments
back 24x24.jpg
back 24x24.jpg (39.37 KiB) Viewed 14813 times

User avatar
brad
Site Admin
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

Post by brad » Fri Aug 20, 2010 12:05 am

Man, that's some work right there!

You need to invest in some enamelled wire:

Image

It is really cheap and will last you ages!

It is perfect for these sorts of jobs because the wire is very thin and makes it easy to work in tight spaces like you have with your's

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Fri Aug 20, 2010 5:02 am

Yeah I think ill have to invest in some of that, but if you get a fault then all the wires are all the same colour, then that will be hard to find :)

check out this

Image
Attachments
wires.jpg
wires.jpg (143.93 KiB) Viewed 14810 times

User avatar
brad
Site Admin
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

Post by brad » Fri Aug 20, 2010 10:36 pm

That's alot of network cables, good luck finding the one that is unplugged :D

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Post by bitfogav » Sat Aug 21, 2010 5:45 am

Another update today, ive almost finished making two boards to control the 24x24 display.

heres a picture


Image
Attachments
boards and matrix.jpg
boards and matrix.jpg (81.69 KiB) Viewed 14797 times

User avatar
brad
Site Admin
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

Post by brad » Sat Aug 21, 2010 11:28 pm

Very nice and neat, I am keen to see the results once it is all together :D

Post Reply
[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

Who is online

Users browsing this forum: No registered users and 1 guest