Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

LED Display

Hello,
 
I am trying to use LabVIEW and NI ELVIS to control a 5x8 LED Dot Matrix. Particularly, I am trying to display a scrolling message. Since the NI ELVIS has only 8 I/O lines, I was thinking of using a 3-8 decoder to control the 8 rows of my LED Matrix and the other 5 I/O lines to control the 5 columns of my LED Matrix. It is a common cathode row matrix. The way I was planning it to do was to turn on very fast one row at a time to give the impression that a whole character is being displayed on the matrix. However, I am not sure how to implement this in LabVIEW. Do I need to create an 5x8 array for each letter and then use a case structure to select which pattern is going to be displayed on the LED Matrix? Does anyone have a better suggestion on how to display characters or numbers in a 5x8 LED Matrix. Thanks in advance!
 
PS. I have a VI that does more or less what I want to do, but I am not sure how to do it in hardware!
0 Kudos
Message 1 of 5
(7,063 Views)

Hey Argon,

I like the example vi - very well done. You've got a few options for the output. First off, what DAQ card do you have controlling the Elvis? If you have an M Series card, you can do clocked (fast HW timed) digital output on your 8 DI lines. This would open up a few options. You could generate a waveform that pulsed your LEDs very quicky and have it scroll across. You would have to map out the letters to the correct DO lines, but it looks like you have a good handle on that.

If you dont have an M series card, you're going to have to use SW timed writes. It will be slower and instead of using a digital waveform, you'll have to write one output at a time. You can write to the whole port to ensure that the whole 8 bits are correctly generated.

As far as using the 5x8 matrix, ideally you would have 13 DO's - do you have a break out box other than the Elvis? Most of our cards have more that 8 DIO lines, if you can get a break out box you can use all of the DIO of your card. If that's not an option, your work around with the encoder is going to be the best option - you may look into adding a few caps or flip flops to extend the duration of the LED's being on.

Cheers,

Andrew S

National Instruments 

 

0 Kudos
Message 2 of 5
(7,053 Views)
Hey Andrew,
 
Thanks for the info. I was able to go through an entire 5x7 matrix of LEDs (turning on/off one LED at a time) and it works very well. Since I only have access to ELVIS, I had to use a 3-8 decoder to go through the 7 rows and I used the other 5 I/O lines to go through the 5 columns. However, I have a small problem. The LED array I am using is basically an array of diodes. So, in order to turn on an LED I need to apply +5 V to the anode and GND to the cathode so current can flow through it. I am applying the +5 V from the five I/O lines controlling the 5 columns of my array. However, although the rows may be at zero volts (coming from the corresponding output of the decoder), they are not actually GND because all the lines are configured as digital output. Therefore, no current can flow through and the LEDs do not turn on this way unless I actually connect them to ground. Is there any way to fix this? Basically I need to provide +5V and GND to each of the 35 LEDs in my matrix. I hope you can help me. Thanks!!!!!
0 Kudos
Message 3 of 5
(7,036 Views)

Hi Argon,

Have you tried using a pull down resistor? If you supply a resistor to ground from the cathode along with the DO from the decoder, then when the row input is high and the column input is high then there will be no differential and no current will flow. When the row is high and the column is low, then current will flow across the LED and through the pull down resistor. You may have to play around with resistors to find one that works (I'd start with 10k, maybe less).

Cheers,

Andrew S

0 Kudos
Message 4 of 5
(7,017 Views)
Hi Andrew,
 
Thanks for getting back to me so fast. Your suggestion worked perfectly. I really appreciate your help!
0 Kudos
Message 5 of 5
(7,009 Views)