Pages: [1]   Go Down
Author Topic: 5x5 led matrix with 2 74hc595  (Read 1584 times)
0 Members and 1 Guest are viewing this topic.
Elsegem, Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, i made a led matrix 5x5 leds.
i want to use 2 74hc595 shift-registers (i have some 74hc165 here to)

is it possible to help me out how to control the rows and collums with the registers, i'm a noob.
i want use follow code for it, but its for a 8x8. (in attachment)
is it also possible to make the lines for the letters as B00001, in the code its like 0x00, 0x22 etc

* sprites.h (9.55 KB - downloaded 26 times.)
* led_matrix_scrolling_text_by_rows.pde (10.36 KB - downloaded 34 times.)
Logged

France
Offline Offline
God Member
*****
Karma: 34
Posts: 978
Scientia potentia est.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm not sure you can control 25 LEDs with 2 8bits shift registers, so I will even not try to answer this, maybe someone else can smiley

As for converting hex to binary, it isn't hard and you don't even need a calculator, look how it's simple to do it manually:

Exemple for letter 'A':
Code:
B00000000,    // ________   A
B00011000,    // ___XX___
B00100100,    // __X__X__
B00100100,    // __X__X__
B00111100,    // __XXXX__
B00100100,    // __X__X__
B00100100,    // __X__X__
B00000000     // ________

0 = _
1 = X
« Last Edit: November 04, 2012, 01:53:53 pm by guix » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 596
Posts: 33283
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
(i have some 74hc165 here
The problem with those is that they have no data latch and so you will get intermediate logic states on the outputs while shifting out. This will look like ghosting on supposedly unlit LEDs.

Before any one can tell you what code to use you have to know what way you are going to wire things up, do you have that information?
This is the sort of thing you have to do to multiplex a matrix:-
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html
the same principle applies no matter how big it is.
Logged

Elsegem, Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i made mine so:


but with the positive side to resistor to the 74hc595
and the negative side to npn like this



the base to resistor to 74hc595 and collector to negative side of the leds and emiter to ground.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 26261
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So you have this matrix.
You connect the Anodes to the output of 1 shift register.
You connect the transistor bases to the output of the other shift register.

You shift out the anode data, you turn on one transistor, wait 2mS, turn it off
You shift out the next anode data, you turn on the next transistor, wait 2mS, turn it off
repeat 3 more times.

If you keep the anode data as 5 bytes of data (or a small array), you can have a function that updates the matrix every 2 mS, and a different function that updates the 5 bytes every 100mS.


* LED5x5matrix.jpg (40.55 KB, 720x960 - viewed 71 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Elsegem, Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the electrical scheme is right what you made. how do i integrate the above project in it? or is it not possible?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 514
Posts: 26261
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Easily possible.
Shift data into anod shift register, shift B00000001 into the cathode shift register
After 5mS:
Shift data into anod shift register, shift B00000010 into the cathode shift register
After 5mS:
Shift data into anod shift register, shift B00000100 into the cathode shift register
After 5mS:
Shift data into anod shift register, shift B00001000 into the cathode shift register
After 5mS:
Shift data into anod shift register, shift B00010000 into the cathode shift register
After5mS:
Repeat from the top.
Use millis() to check the time going by. During the 5mS between pairs for shifts, do other stuff, like check for serial data, manipulate the data to be shifted into the anode shift register, etc.



Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Elsegem, Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i dont understand at all :s
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 596
Posts: 33283
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Then read this, it tells you what you are trying to do.

http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html

After reading it go back and try and understand what Crossroads is telling you.
Logged

Pages: [1]   Go Up
Jump to: