Pages: [1]   Go Down
Author Topic: TLC5940mux with 16 rows ?  (Read 850 times)
0 Members and 1 Guest are viewing this topic.
Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've built a 16x16 mono LED array I want to control with one TLC5940 and two 74hc138s.

When I turn LEDs on and off manually I don't have any problems but when I use the TLC5940mux library only the first 8 rows work.

I've Googled around and see other people with the same question, but haven't found any answers. My guess is something in the library is hardcoded to 8 rows...I'm currently trying to wrap my head around the library sournce code, but was wondering if anyone else has already solved this and/or can give me any pointers.

Thanks,

Chris
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Houston, Tx
Offline Offline
Jr. Member
**
Karma: 0
Posts: 80
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I assumed you changed the value in tlcMux_config.h

/** Number of rows Multiplexed. */
#ifndef NUM_ROWS
#define NUM_ROWS    1<----------------right here?
#endif
Logged

Southern California
Offline Offline
God Member
*****
Karma: 5
Posts: 539
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I was able to solve this. I needed to explicitly say all analog ports are output mode in setup():

  pinMode(A0, OUTPUT);
  pinMode(A1, OUTPUT);
  pinMode(A2, OUTPUT);
  pinMode(A3, OUTPUT);

After that, all 16 rows light up like they should.

On a semi-related note, I'm using the interrupt routine from the 'matrix' sample and there's some flicker between rows, I think this is what the author means when he says:

    Currently I'm trying to fix timing issues by putting some D-type positive
    edge triggered latches between PORTC and the 3:8 line decoder, clocked on
    the rising edge of XLAT, but this doesn't seem to help.  I'm bringing the
    circuit in to the logic analyzer this weekend to see exactly when the ISR
    runs and how long it takes to shift in the GS data.

I got rid of some of the flicker by swapping the PORTC update and the TlcMux_shiftRow() lines but it's still noticable if a LED is fully on and its neighbor is fully off. I'm going to see if I can tie A4 to G2B of both decoders. Hopefully I can get rid of the flicker by setting A4 to high to disable outputs on all rows, changing the row and updating the TLC, then set A4 back low when everything is done.

I hope this helps someone out. As for me I wish I'd paid more attention in EE200 in college.

Chris
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

Pages: [1]   Go Up
Jump to: