cimo Posted September 16, 2007 Report Share Posted September 16, 2007 hii 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 ledSimoneEDIT: 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. Quote Link to comment Share on other sites More sharing options...
/tilted/ Posted September 17, 2007 Report Share Posted September 17, 2007 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_NextLC_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_NextLC_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. Quote Link to comment Share on other sites More sharing options...
doc Posted September 17, 2007 Report Share Posted September 17, 2007 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 ...greetsDoc Quote Link to comment Share on other sites More sharing options...
/tilted/ Posted September 18, 2007 Report Share Posted September 18, 2007 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... :Pso my theory goes:[tt]Vpot matrixed cathode 595s +---> Inverting Buffers ---> Vpot cathodes (blue) L---> Vpot cathodes (red) Bi-Colour LEDsVpot/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. Quote Link to comment Share on other sites More sharing options...
doc Posted September 19, 2007 Report Share Posted September 19, 2007 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)greetsDoc Quote Link to comment Share on other sites More sharing options...
stryd_one Posted September 19, 2007 Report Share Posted September 19, 2007 WIKIMARKERI always wanted to do that. Quote Link to comment Share on other sites More sharing options...
cimo Posted September 19, 2007 Author Report Share Posted September 19, 2007 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 safetxxSimone Quote Link to comment Share on other sites More sharing options...
cimo Posted September 21, 2007 Author Report Share Posted September 21, 2007 ... 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?SimoneEDIT: 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? Quote Link to comment Share on other sites More sharing options...
TK. Posted September 23, 2007 Report Share Posted September 23, 2007 BC337(one part is already stuffed on your core module)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.