Jump to content

inverting the DOUT pins


cimo
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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... :P

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.

Link to comment
Share on other sites

  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

Link to comment
Share on other sites

... 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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...