I am looking to make 16(columns) x 14(rows) LED matrix. Cathodes are connected to the columns and anodes are connected to the rows.
I want to drive rows(anodes) with I/O input expander MCP23017 which is controller via I2C. I am not using shift register because I need GPIO pins from microcontroller for other purposes. MCP23017 has 16 IO pins, which 14 I would use as outputs for LED matrix.
After MCP I would connect TLC59213 (LED) source driver. Interesting about TLC59213 is that it's connected to D flip-flop which requires rising clock signal in order to update signals. I am not sure how would I approach this. I need constant updates since this is LED matrix. Should I write small function in code which would create small pulse and connect one IO pin to TLC59213 clock pin? Then call that function all the time. Or should I create small circuit(maybe with 555 or such) which would constantly make pulses and connect it to the clock pin? Which of those is the best(best here means that update is quick anough you can not notice just by looking at it)? Is there a third, better, option?
On columns side(cathodes), I want to put ULN2003 sink driver just at the beginning of the column. Finally, there is TLC5940 LED PWM sink driver. I am putting ULN2003 because TLC is able to sink only 120mA. Taking in account that all LED of one column might be on at certain moment(16 x 15mA = 240mA), I added ULN2003.
Here I am having problems understanding whether do I need ULN2003 or not. Maybe is TLC5940 capacble of sinking short bursts of current so it won't harm him?
Also, the system is powered with 5V, while LED voltage is 3.3V. If all 16 LED would lit, it would need 240mA. According to Ohm law: R = U / I = (5 - 3.3) / 0.24 = 7ohm. So 7 ohm resistor will drop 1.7V when current is 240mA. But when only one LED is lit, resistor drops only U = I * R = 0.02 * 7 = 0.14V, so LED needs to drop 4.86V. Not so good! How should I approach this since the current is constantly changable?
After receiving some answer and analysing again, I choose to replace TLC59213 with just regulator PMOS and ULN2003 with NMOS. Simpler, wide available, even cheaper. Resistor problem stays still.