Go Down

Topic: TLC5940mux with 16 rows ? (Read 1 time) previous topic - next topic


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.




I assumed you changed the value in tlcMux_config.h

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


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.


Go Up