cimo
September 16, 2007, 2:52pm
1
hi
i was smart enough to order bicolor leds with common anode for my MBLC, so my question is:
-is it possible to change the software (MBLC) to invert the DOUT pins and use them as current sink ?
.. i ve read that the ST boards can be fitted with darlington arrays, but in my case i won t need that since 1 DOUT pin will sink only 1 led
Simone
EDIT: i a interested in knowing how to do this but i am also looking for other leds with common cathodes, that would probably be an easier solution.
_tilted
September 17, 2007, 2:15am
2
Look for this inside LC_LEDS:
[tt]LC_LED_Set_Loop_LEDOn
movf LC_LED_LOOP_CTR, W
call MIOS_DOUT_PinSet1
rgoto LC_LED_Set_Loop_Next
LC_LED_Set_Loop_LEDOff
movf LC_LED_LOOP_CTR, W
call MIOS_DOUT_PinSet0
;; rgoto LC_LED_Set_Loop_Next
[/tt]
And change to:
[tt]LC_LED_Set_Loop_LEDOn
movf LC_LED_LOOP_CTR, W
call MIOS_DOUT_PinSet0
rgoto LC_LED_Set_Loop_Next
LC_LED_Set_Loop_LEDOff
movf LC_LED_LOOP_CTR, W
call MIOS_DOUT_PinSet1
;; rgoto LC_LED_Set_Loop_Next
[/tt]
This would work assuming all your leds are the same.
If not, (ie a mix of bicolour and normal), then reverse the polarity of the normal LEDs, and tie their anodes to VCC instead of GND.
I think this would work.
doc
September 17, 2007, 7:41am
3
If it won’t work as /tilted/ said, here a hardware solution:
Drive the bicolor LEDs through a ULN Array (see: midio128) and you have a common anode …
greets
Doc
_tilted
September 18, 2007, 9:15am
4
I’m also working on an idea using an inverting buffer to do a similar trick.
I haven’t tested it yet, but of course have already started the design for the PCB…
so my theory goes:
[tt]
Vpot matrixed cathode 595s ±–> Inverting Buffers —> Vpot cathodes (blue)
L—> Vpot cathodes (red)
Bi-Colour LEDs
Vpot/meter anodes <------------- Common anodes
[/tt]
I just hope the anode 595s can sink enough current… else I’ll need to use transistors.
This would mean that the V-Pots have a red pointer, with the remaining LEDring glowing blue.
doc
September 19, 2007, 5:31am
5
I just hope the anode 595s can sink enough current…
… 10…15mA per Output. Not more!! .. or you’ll fry them.
For more current use transistors (or ULN Arrays)
greets
Doc
WIKIMARKER
I always wanted to do that.
cimo
September 19, 2007, 10:43am
7
mmmmm … fried 595s …
emmm… ok 10-15 mA isn t that much after all, i am somehow stuck to this point with the PCB layout.. deciding if i d better leave space for 4 pins (2 leds) or 3 pins (bicolor) or 4 pins again (RGB using only 2 colors).
I am really tempted to “bring home” this little piece of knowledge but buy some other leds for this purpose.. and go safe
txx
Simone
cimo
September 21, 2007, 6:33pm
8
… i will go for the software solution and use the common anode bicolor leds, i cross my fingers… BUT one of the DOUT pins will drive 16 leds, in this case i have to use a transistor: a sink DOUT pin that will drive a sink transistor (dunno if my terminology is correct)
-will this work?
-can you name a transistor for this purpose?
Simone
EDIT: a little bird s named bc547 (max 0.2A) will that stand 32 x 20mA leds, limiting the current of course…
do you know a bigger brother of the bc547?
T.K
September 23, 2007, 10:43am
9
BC337
(one part is already stuffed on your core module)
Best Regards, Thorsten.