I am using an ATtiny13a to control 12 LEDs by using 4 PINs with charlieplexing.
that works pretty good.
at the moment, if I want to light up 2 LEDs at the same time, my code is switching very fast between these 2 LEDs (light up each for 1ms, then the other, and so on). So you can'T see them flickering and it seems to be as if 2 LEDs are switched on at the same time. Fine.
my question is: I want to connect a bunch of LEDs instead of a single one. So I have to rise the voltage somehow. I wanna use a simple level shifter.
But I am not sure if a level shifter can work properly if it receives that many short impulses.
so, can I use a capacitor to smooth the signal to one lasting signal for each LED instead of these pulsed 1ms signals?
I don't want to be rude but it would be not helpful for me if anyone asks now why I do not use an arduino nano or something like that. I just want to know what I was asking for.
this forum helped me so much in the past, so I am excited if there is an solution with charlieplexing, the 2 signals at one time and a level shifter.
Since charlieplexing uses all three possible states of an output pin (high, low, off), it's pretty difficult to insert any active circuitry (like a level converter) in between the pins and the LEDs.
But you don't need to. You don't really need a higher voltage, you need more current to get an appropriate "average" brightness on each of your 12 LEDs. Decrease your current limiting resistors (assuming you have them) to provide the full ~40mA that the pins can drive, and light up each of your LEDs for about 1/12th of the time.
I've done 20 LEDs on an ATtiny11 (at 1MHz, I think.) I'd think a tiny13 at 9.6MHz should do OK even with Arduino functions in there. (my tiny11 code was assembly.) You just have to figure out how to fit anything else that you want the chip to do in there...
hm, how many LEDs can I activate using a parallel connection to one single pin for them?
3 or 4 would be enough.
I wanna do this. so i need a few leds per level: warp core