led matrix

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
nuwan5213
Posts: 82
Joined: Thu Jul 29, 2010 10:03 am
Location: sri lanka
Has thanked: 24 times
Been thanked: 4 times
Contact:

led matrix

Post by nuwan5213 »

hi all,
anybody have idea how to run led matrix with flowcode?.simply i want to make message display.
can anybody give simple example program.?

thanks .
nuwan :?
Electronics for better world.

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: led matrix

Post by Spanish_dude »

What I did is an array of bytes where each bit represents a single LED.
Let's say you have an 8x8 LED Matrix then I'd do an array of 8 bytes.

I use this array as a "displaybuffer".
Then I turn each row one after the other and send each byte to the display.
I usually use a for loop.

Let's say you connected PORTB (8 pins) and PORTC (8 pins) from PIC 'X'.
PORTB is used to send the data: 1 is on, 0 is off
PORTC selects the row which you want to enable: 0 is on, 1 is off.

Code: Select all

// main
char displaybuffer[8] = {0}:
char row = 0;

// display an 'X'
displaybuffer[0] = 0b10000001;
displaybuffer[1] = 0b01000010;
displaybuffer[2] = 0b00100100;
displaybuffer[3] = 0b00011000;
displaybuffer[4] = 0b00011000;
displaybuffer[5] = 0b00100100;
displaybuffer[6] = 0b01000010;
displaybuffer[7] = 0b10000001;

//main loop

for (row = 0; row < 8; row++)
{
    PORTC = ~(1 << row); // shift and invert
    PORTB = displaybuffer[row]; // output data
}

//end loop
You could use an interrupt to display your buffer on the LED Matrix (actually I recommend this).
This way, you can do stuff in the main, like changing the displaybuffer, and each time the interrupt is triggered you write on the LED Matrix.

Nicolas

nuwan5213
Posts: 82
Joined: Thu Jul 29, 2010 10:03 am
Location: sri lanka
Has thanked: 24 times
Been thanked: 4 times
Contact:

Re: led matrix

Post by nuwan5213 »

hi nicolas.
Thanks.
Now i know the concept.can we do that clean flowcode without c code.because im not much c player.
Can we mask some outputs as a data of port a.then give address from other port.is it possible.
Or givin data same way and scan address by using onther oscillator like 4017 possible.

Thanks.
Nuwan.
Sent from my mobile device.
Electronics for better world.

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: led matrix

Post by Spanish_dude »

Hi,

A 4017 is a 10 decade counter if I remember well ...
If so then you'll need to sync your data with the frequency of which the 4017 counts.

This will save you a whole port (assuming you're using an 8x8 LED Matrix).

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: led matrix

Post by Benj »

Hello,

There is a good project for creating a 8x8 LED matrix using 1 x 8-bit port and 2 x control lines available from here.

http://adrianus.3x.ro/electronic/zws_co ... lboard.htm

The project is good and works as I have tried it personally but my antivirus is warning about the favicon from this site so take care when visiting.

nuwan5213
Posts: 82
Joined: Thu Jul 29, 2010 10:03 am
Location: sri lanka
Has thanked: 24 times
Been thanked: 4 times
Contact:

Re: led matrix

Post by nuwan5213 »

hi ben,

thanks.
have you got any written flowcode for led matrix.

regards
nuwan. 8)
Electronics for better world.

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: led matrix

Post by STibor »

Not tested. 4*4 led matrix multiplex.
Good luck!
Attachments
matrix mpx.fcf
(14.72 KiB) Downloaded 337 times

nuwan5213
Posts: 82
Joined: Thu Jul 29, 2010 10:03 am
Location: sri lanka
Has thanked: 24 times
Been thanked: 4 times
Contact:

Re: led matrix

Post by nuwan5213 »

hi simphy
Any advise to me? For matrix....
Im new to led projects.
Regards,
Nuwan.
Electronics for better world.

nuwan5213
Posts: 82
Joined: Thu Jul 29, 2010 10:03 am
Location: sri lanka
Has thanked: 24 times
Been thanked: 4 times
Contact:

Re: led matrix

Post by nuwan5213 »

hi all, ben,

have youn got any written program for led matrix.

why dont you matrix team dont add the component of that,

regards

nuwan..... :|
Electronics for better world.

Post Reply