[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 580: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 636: sizeof(): Parameter must be an array or an object that implements Countable
Brads Electronic Projects Forum • 24x24 led matrix - Page 3
Page 3 of 5

Posted: Wed Aug 11, 2010 9:24 am
by 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 :)

Posted: Wed Aug 11, 2010 9:45 am
by bitfogav
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)

Posted: Wed Aug 11, 2010 12:31 pm
by brad
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.

Posted: Wed Aug 11, 2010 6:57 pm
by bitfogav
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..

Posted: Thu Aug 12, 2010 4:59 am
by bitfogav

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

Posted: Thu Aug 12, 2010 8:18 am
by brad
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!

Posted: Sun Aug 15, 2010 9:43 pm
by bitfogav
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 :?

Posted: Sun Aug 15, 2010 9:48 pm
by brad
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 :)

Posted: Sun Aug 15, 2010 9:58 pm
by bitfogav
Ummmm Im going to have to have a think about this.. :)

Posted: Thu Aug 19, 2010 4:28 am
by bitfogav
Heres an update, I am over half way building the 24x24 matrix board... ooowch!!


Image

Posted: Fri Aug 20, 2010 12:05 am
by brad
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

Posted: Fri Aug 20, 2010 5:02 am
by bitfogav
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

Posted: Fri Aug 20, 2010 10:36 pm
by brad
That's alot of network cables, good luck finding the one that is unplugged :D

Posted: Sat Aug 21, 2010 5:45 am
by bitfogav
Another update today, ive almost finished making two boards to control the 24x24 display.

heres a picture


Image

Posted: Sat Aug 21, 2010 11:28 pm
by brad
Very nice and neat, I am keen to see the results once it is all together :D