RGB LED Interfacing

Rickharris

Senior Member
Hi all. I am wondering if there is any way to interface a picaxe 28X1 to a RGB LED. I realize it can't be directly connected, but are there any IC's
or something? Or can't it be done? There must be some way.
What sort of RGB LED? A simple answer is directly via a 100 ohm resistor to 3 outputs. then turn on the colour you need.

BUT you may want to colour mix so you need to look at PWM

Or need provide greater power than the 20 Ma the picaxe gives per output

Information as to what you want to do and with what will help
 

mad_sci_guy

New Member
Wowwwwwwwwww, nobody on this bloody website is of any help, I also have a thread on RGB led interfacing and everyone just gives roundabout, stupid answers. Like have you checked the manual?, or you just use a resistor and a led... we know how to hook up the RGB, we arn't idiots, we want to know how to PWM the 3 seperate pins to blend colors. The picaxe 28x1 can only pwm out on 2 pins so that wont work, and software written pwm doesn't have enough accuracy or speed to work properly. All Nicolas and I want to know is... how is it done, with what chip and what circuit. So if anyone could post a real answer it would be greatly appreciated.
 

papaof2

Senior Member
"Wowwwwwwwwww, nobody on this bloody website is of any help, I also have a thread on RGB led interfacing and everyone just gives roundabout, stupid answers. Like have you checked the manual?" "we want to know how to PWM the 3 seperate pins to blend colors. The picaxe 28x1 can only pwm out on 2 pins so that wont work, and software written pwm doesn't have enough accuracy or speed to work properly."

Well, *have you checked the manuals* to see if any of the PICAXE chips have 3 PWM outputs? If none of them have 3 PWM outputs, you will have your answer.

"All Nicolas and I want to know is... how is it done, with what chip and what circuit. So if anyone could post a real answer it would be greatly appreciated."

Since this is a PICAXE forum, a solution using some other chip isn't likely to surface.
 

hippy

Ex-Staff (retired)
Wowwwwwwwwww, nobody on this bloody website is of any help
I disagree with that but what would you expect from people who freely give their time when they don't have to, who try to help the best they can but don't have all the answers ?

I also have a thread on RGB led interfacing and everyone just gives roundabout, stupid answers. Like have you checked the manual?, or you just use a resistor and a led... we know how to hook up the RGB, we arn't idiots, we want to know how to PWM the 3 seperate pins to blend colors. The picaxe 28x1 can only pwm out on 2 pins so that wont work, and software written pwm doesn't have enough accuracy or speed to work properly. All Nicolas and I want to know is... how is it done, with what chip and what circuit. So if anyone could post a real answer it would be greatly appreciated.
I'm not sure what a "real answer" is or why you think anyone here would have one. This forum is primarily about mentoring and helping people help themselves. Contributors do the best they can and point to sources of information which they hope will help; it might it might not. If really lucky then someone may say "I've done that, here's how to do it", second best is people pointing to the work others have done on RGB LED interfacing already.

Ultimately there is rarely a single "real answer" just options, some of which may be suitable for what you need, some may not. Unless you've clearly stated what your criteria is for an acceptable solution it's hard to say if it's even possible, let alone how. A "real answer" for one situation may not be what you need in yours.
 

Dippy

Moderator
I agree with hippy. This is NOT 'Ask Jeeves'. No-one gets paid to answer.

If people happen to be at a PC and have a few spare minutes then if they can answer a question or provide 'food for thought' then they usually do - even when the answer to the question is cringingly and toe-curlingly obvious.

We don't sit here waiting for questions to pop up. Some of us have a life.... well, I do anyway.

Bottom line; unless you can write a soft pwm routine then you're stuck for 'direct' control from any PICAXE.

Why not think it through? Why not have a go? If you achieve it then I'm sure you'll share it with others who also think the forum is bloody useless and spend hours explaining it to people and always be waiting by your PC so that people don't get impatient.

Maybe you'll be the first to do it.
Maybe you could use this:-
http://www.national.com/an/AN/AN-1293.pdf
or
http://www.national.com/pf/LP/LP55281.html

Maybe you could search for yourself?

On a serious note, PLEASE remember that many of the questioners here are getting info for school/college projects which may, or may not, affect exam results.
I and many of us do NOT do other people's homework. Some do - but only if you flatter them by saying trash like "Wow, awesomely cool! Thanx!" etc.
 

Mycroft2152

Senior Member
Mad_sci_guy,

If you haven't understood by now, let me repeat:

WE DO NOT DO YOU SCHOOL PROJECT FOR YOU!

We"ll be glad to help you over the rough spots and guide you in the right direction. But you have to do the work, that includes spending the time reading the manuals, doing a forum search and learning the basics of using a PICAXE.

This takes time, so if dont ask the forum members to finish the project for you in the last week or few days before it is due. You get to fail on your own.

All that does is gives a us a chuckle -- yup, got another one here. :)

Heartless Myc
 

boriz

Senior Member
"Wowwwwwwwwww, nobody on this bloody website is of any help…All Nicolas and I want to know is... how is it done, with what chip and what circuit”

Nice. You want it all done for you. As you seem to be unable to get what you want from this forum, I suggest you don’t bother visiting us again. How sad.

I have been working on a solution to this RGB issue that should work on all PICAXEs with no additional ICs. Any genuine forum contributors can PM me for my solution. I’d rather just post it here, but I’m dammed if I am going to help this idiot.
 

moxhamj

New Member
Hear Hear, Boriz!

Actually Nicholas23 has been very polite - it is just that mad_sci_guy hijacked his thread. So maybe get in touch with Nicholas23 privately?
 

inglewoodpete

Senior Member
Its my guess that very few of the regular forum contributors has experimented with RGB LEDs. My observation is that most questions on this subject are from younger members, often school students. Thats fine but they tend to disappear very quickly after getting what they want, learning how to do what they want or simply giving up because it seems too hard. Consequently, they're not on line to help others with the same quest.

I have never owned an RGB LED so have never experimented with one. However, I have used PWM on a single LED. Its quite simple: read up on the command PWMOut in the command manual. Among other things, it points the user at the PWM wizard, which makes the calculation of parameters simple. You don't know how to use PWM? Wire the components up and try it: experiment. Some of the experimenter boards already have LEDs wired up, so it's only software.

PWM of an RGB LED is a little more complicated. Here are some points that should help you solve the problem.
* Persistance of vision: if a LED is flashed fast enough, it appears to be 'on' all the time. This is how PWM can be used to dim a LED.
* An RGB LED is actually 3 LEDS in 1 package with either all their anodes or cathodes commoned together.
* A LED should not be connected directly between +5V and 0v: too much current will flow and damage the LED and/or the power source. A limiting resistor should be used the restrict the current to a safe level.
* Most PICAXE chips have only 1 PWM output pin so its output will need to be shared across the 3 coloured (RGB) LEDs using TDM (Time Division Multiplexing).
* In very simple terms, the 4-legged RGB LED can be connected between 4 output legs of a PICAXE chip. The common pin of the RGB LED will need to be connected to the PWM output pin of the PICAXE via a current limiting resistor (start with 330ohms) . The 3 colour legs would then be connected to 3 other output pins of the PICAXE via 3 series blocking diodes^.
* The series blocking diodes^ Eg 1N914 or 1N4148 must be included to prevent reverse currents from damaging the LEDs. You will notice that neither end of the LEDs connect to 0V, but rather to the various output pins of the PICAXE. This means that, at times, either end of each LED is 'live' (~5v). The diodes ensure that no damaging reverse current flows through each LED. The direction of the diodes will be determined by wheither the RGB LED is common anode or common cathode.
* Your software will need to turn on PWM and then enable@ each of the 3 'colour' outputs for a short duration (try 15 mS as a starting value) in turn. The PWM proportion can be changed between each colour selection to give different shades.
* Enabling@ the outputs will be either setting the pin high or low. Once again, this will be determined by whether you are using a common anode or common cathode RGB LED. All 3 'colour' pins should be initialised to their 'off' value (0 or 1 depending on LED type) so that all 3 LEDs do not turn on at once.

Rather than doing all 3 LED colours at once, why not start with 1, then add a 2nd, then a 3rd?

There's the basic architecture of what is required. The final design is up to you.
 

Rickharris

Senior Member
(to be read in a very deep crack of doom voice)

Curses - you have given away guild secrets to an outsider - YOU will never be allowed to enter the temple of Tesla again BEGONE helpful fool!!!!!
 

hippy

Ex-Staff (retired)
Time Division Multiplexing is one of things I was thinking about and the 14M has HPWM which allows routing to one of four outputs so that's perhaps a good candidate for RGB dimming; keep cathode at 0V and move PWM around.

For switching with a single immovable PWM, to skip the blocking diodes, R's could be fitted in series with each anode and the common cathode go to the PWM pin. The reverse currents should be low enough to prevent damage - correct me if I'm wrong.

For the 08M, the RGB Pins could be made inputs so no blocking diodes needed at all.

The technique I think I proposed which didn't use hardware PWM was to use PULSOUT on cyclic outputs and a final PULSOUT on a dummy pin to keep the cycle time constant. Again, that's TDM because the PICAXE cannot generate multiple length pulses simultaneously ( except via SERVO and that has very long cycle time ).

I don't have an RGB LED so haven't tried any of this. My gut feeling is that it should be possible, but it depends upon how many steps of resolution are needed and will involve some tweaking.

This is probably fine for driving a single RGB LED ( which is what most people ask for ) but different techniques with external hardware or other microcontrollers would be better suited to multiple RGB's.

I agree with inglewoodpete that people who want an answer on RGB dimming pass by then usually disappear so we don't have any detailed research or experimentation such as we have from those involved in getting 433MHz and other wireless comms working. We cannot complain when people take what they need and go, but it is nice to see people giving things back to the rest of the PICAXE community.
 

Dippy

Moderator
"Time Division Multiplexing" - that sounds real cool.

Maybe mad sic person will pay you to do it...?

Go on, me old hipster, have a go. You know you want to :)
 

moxhamj

New Member
Hippy, that sounds brilliant. Pulsout is fast, much faster than, say, pause. I wonder how low the resolution could go? Even 4 bits gives 4^3 colours=64. 5 bits is 5^3 etc. I'm sure it doesn't need 8 bits, unless one wants that particular shade of mould green that someone mentioned earlier. So the cycle time becomes very fast and the flicker gets less noticable. The maths works, but, oh shock, I feel pain as the witch doctor Rickharris starts poking pins into my voodoo doll. Ok. I promise not to breadboard this...
 

hippy

Ex-Staff (retired)
PULSOUT seems to be what Andrew "Brightspark" used ...

http://www.picaxeforum.co.uk/showthread.php?t=9653&page=2

With 8-bit resolution of each colour, that's ony 2.5mS per pulse max, 7.7mS cycle, ~130Hz so there shouldn't be that much flicker.

I cannot find my original post, but something like ...

- Do
- rTime = 1..255
- gTime = 1..255
- bTime = 1..255
- xTime = 766 - rTime - gTime - bTime
- PulsOut R_LED, rTime
- PulsOut G_LED, gTime
- PulsOut B_LED, bTime
- PulsOut DUMMY, xTime
- Loop

I'd write more but I feel the presence of an invisible sharp, pointy stick stabbing me in the back like a pin-prick :)
 
Last edited:

hippy

Ex-Staff (retired)
Well found eclectic and it's Tom2000 who gets the credit for applying PULSOUT as the clever means of adjusting the timing.
 

eclectic

Moderator
@ Hippy / Tom L
The pulsout concept works. Very, very well.

I've tried the following programs on:

A c/c RGB LED
Three separate LED's
“Footlights”, via a 2803.

(No, I'm not 3” tall! I'm making a “model-theatre” lighting system for a drama teacher chum.)

The resistor values will need adjustment, but that's minor.

Prog. Cycles through values. Could be “prettied” to the nth degree.
Code:
'Forum Tu 100608  rgb Hippy/Tom L
#picaxe 18x

symbol rTime = b0
symbol gTime = b1
symbol btime = b2
symbol xtime = w2
symbol R_LED = 0
symbol G_LED = 1
symbol B_LED = 2
symbol dummy = 3

setfreq m8
 main:
 for rTime = 10 to 255 step 10
 for gTime = 0 to 255 step 10
 for bTime = 0 to 255 'step 5
  
 xTime = 766 - rTime - gTime - bTime
 PulsOut R_LED, rTime
 PulsOut G_LED, gTime
 PulsOut B_LED, bTime
 PulsOut DUMMY, xTime
 next
 next
 next
Program 2. A wonderful Penicillium notatum green. (from earlier posts)

Code:
#picaxe 18x
'mouldy green rgbled OR r+g+b
'resistors need adjustment
symbol rTime = b0
symbol gTime = b1
symbol btime = b2
symbol xtime = w2
symbol R_LED =0
symbol G_LED =1
symbol B_LED =2
symbol dummy = 3

setfreq m8
 do
  
  rTime = 60
  gTime = 250
  bTime = 80 
  
 xTime = 766 - rTime - gTime - bTime
 PulsOut R_LED, rTime
 PulsOut G_LED, gTime
 PulsOut B_LED, bTime
 PulsOut DUMMY, xTime
 
loop
It's too light at the moment to get decent photo's.
And I'm too lazy to move to the darkroom!

e. and oe
 

Attachments

mad_sci_guy

New Member
Hey guys,

I wasn't trying to be rude, I'm just saying exactly what your saying, I get it that your not here to do our "homework" (It's summer...) and that we should search online or on the forums for answers... thats exactly what I'm trying to do except everytime I asked a question someone would just forward me to a forum of someone asking the same question... but there was no answer about how to control a RGB led using a single picaxe chip. I'm grateful for your construtive answers I'm just not a fan of people beating around the bush. If you dont know how to do it... don't post.
 

moxhamj

New Member
That program and photo could go to the completed projects section! I do like the penicillium green. Colour matched to some old bread or bitey cheese perchance?
 

eclectic

Moderator
Further thoughts on post #23
1.
The output is not “proper” pwmout.
It doesn't occur as background.
However, the programs are <50 bytes and work on an 08M.

Therefore, for low cost, a slave 08M could receive rTime, gTime and bTime values
via serin on pin 3. (with a diode to V+. Man.2 p. 142).
Master sends values to slave (s).
Cost = £2

2. BOGOF.
I've just tried a 20M. Added the lines
Code:
 PulsOut 4, bTime
 PulsOut 5, gTime
 PulsOut 6, rTime
 PulsOut 7, xTime
Now, there are two sets of RGB lights, showing two different patterns
With suitable maths/coding it should be possible to create complementary colours
and other interesting effects.
Cost = £2

3.Using HC595 to switch extra slaves??????
4.Unfortunately, the program won't work on a 14M (Man. 2 page 113)

e (and oe)
 
Last edited:

hippy

Ex-Staff (retired)
Unfortunately, the program won't work on a 14M (Man. 2 page 113)
That's because PULSOUT only works on 'the default output pins', but with a little arm twisting 8 x RGB may be doable ...

Use Ouput Pins 0, 1 and 2 for PULSOUT as already, use PORTC to select one of each of the 8 x RGB's common cathodes and cycle through each in turn, active LED pin low, the rest high.

Flicker could start to be an issue again but reduce the number of steps of brightness as already suggested and it may be acceptable. It would take longer to update the 24 levels via serial but should still be acceptable for slowly changing colours. Another alternative would be to have a palette of colours so a single byte could set the RGB levels collectively.
 

hippy

Ex-Staff (retired)
I'm grateful for your construtive answers I'm just not a fan of people beating around the bush. If you dont know how to do it... don't post.
I can understand your frustration when you are looking for a specific answer but there are a couple of things to bear in mind ...

1) If it's specified that only actual workable, proven answers are wanted I am sure most people will comply, but ...

2) One has to accept there may be no responses at all.

Look at this thread as a typical example of how things often go on this forum - Few posters seem to have done RGB interfacing themselves, or at least not a lot of it, but through the process of discussion and throwing ideas into the air we have got to the stage where it might be possible to have a single 14M control eight individual RGB's. Along the way people have been inspired to put their thinking caps on and even try things to see what may work.

"How can I?", is a very restricted question with a limited range of answers, most often "no idea!". "How could I?", is more open ended, can attract fluff, 'stupid answers' and digressions, but can also deliver astounding solutions which never previously existed. Final proof of feasibility is in the pudding, so there's usually still work which has to be done, but it's the closest anyone is likely to get to a free lunch.

One should never forget that, when trying to discover how to, hearing how not to is a lot of use in the absence of any other solution.

The most productive way to get people to do work for free is to challenge them into wanting to do that, asking them or telling them to usually has a poor outcome. The price to pay is having to be part of that process, helping steer things in the direction wanted and encouraging people to keep their ideas coming. After all, when has it been in anyone's nature to help someone who simply demands to be helped ?
 
Last edited:

moxhamj

New Member
Well said Hippy. As always, the master of diplomacy.

mad_sci_guy, what you got here was some advice that cost you nothing. Many of the people on this forum have daytime jobs and we sometimes can't give answers instantly. Sometimes people don't post at all because they have gone home and are breadboarding a solution and it takes a few days to post a result. And if you were to work out how much all the people on this forum get paid, you might find the advice collectively is worth thousands of dollars an hour. And you get it all for free!

But we might just ask one little thing. When you get your project working, take some photos, write it up properly, and post it in the completed projects section. Then you can help someone else. And trust me, when you do help someone else, you will feel a lot better about yourself :)

Dr_Acula
(in real life, a medical doctor)
 
Last edited:

Mycroft2152

Senior Member
Hippy and Dr A,

Very thoughful and well said response.

Unfortunately, if you think a couple of posts in that vein will change a whiny little kid, who wants everything handed to him, you are sadly mistaken.

Mad_sci_guy reminds me a lot of Audrey II in Little Shop of Horrors, screaming "FEED ME! FEED ME!

It doesn't seem necessary for you to make excuses for his attitude. It seems to be a generational thing. Adults want to "protect' the youngsters from the difficulties that the adults experienced.

Unfortunately, this approach backfires too many times and doesn't prepare the youngster. He is due for a rude awakening when he finally goes out into the real world.

There plenty of excellent examples here on the forum of how to approach and solve a problem. All it takes is a bit of effort.

Myc
 

premelec

Senior Member
FWIW as I've been controlling lights about 10 years [first with STAMP] recently with PICAXE 08M mostly; I found the PULSOUT approach interesting as I'd tried PWMing integrators with MUX circuits and such before with less than stellar performance.

I set up an 08M at 8MHz running RGB current drivers [LM324 2n700s] and a program to raise and lower the PULSOUT between limits set for each R,G,B and constantly changing each... there was some flicker evident and it took about 50ms per change indicating about a 20Hz rate... not terrible but not invisible.

What I have decided in the past, and what I'll stay with now, is using the 08M to serially control a 4 or 8 channel DAC which feeds a current control - TIs TLC5628 or
TLC5620 [or TLV low voltage variant] are what I use. My needs are for fairly slow changes in intensity.

I just measured the rate - at 4MHz 08M - and it's about 35ms/channel update with my program so an update of all 8 channels takes 8 x .035 or .28 seconds.

The joy here is that the output stays stable as the DAC has internal registers holding the current when no input is received... and you can update only one channel if you want while all the others stay at the preset currents.... Almost no flicker...

So with an 8 ch DAC and using PWMOUT as well you could fully control 3 RGB circuits with good steady light - with an 08M. The DAC costs a bit more than the 08M. Program length is a bit of a problem but I've gotten some pretty lengthly sequences to work in the 08M program space.

I've used this approach to drive high voltage LED strings [xmas lights!] as well as phase control using a sawtooth ramp for incandescents. Also just single LEDs - the trick is in regulating current by a current sense resistor in the low side of the lights.

Note that this approach is not very energy efficient as the current regulating component [bipolar or MOSFET] dissipates what doesn't go into the lights...but I'm only using low watt stuff now.

I'm going to leave it at that for now... I just wanted to add to this thread for future ref! Light on!
 
Last edited:

Pat13

Senior Member
I kbow this is an old thread. I thought it would be cool if one of my halloween projects (animated with) had colour changing eyes. I have some RGB LED's (common anode) and have them hooked up to the B pins (R-B.4, G-B.5, B-B.7, Anode- B.6) on a CHI030 (just the pins, not thru the darlington). I am using the code set out by eclectic in post #22 of this thread, modified , of course, for the 18M2. When the code runs, only the Red portion lights up. Am I missing something?
 

eclectic

Moderator
I kbow this is an old thread. I thought it would be cool if one of my halloween projects (animated with) had colour changing eyes. I have some RGB LED's (common anode) and have them hooked up to the B pins (R-B.4, G-B.5, B-B.7, Anode- B.6) on a CHI030 (just the pins, not thru the darlington). I am using the code set out by eclectic in post #22 of this thread, modified , of course, for the 18M2. When the code runs, only the Red portion lights up. Am I missing something?
Please can you post both the code and the schematic please?

e
 

SAborn

Senior Member
have them hooked up to the B pins (R-B.4, G-B.5, B-B.7, Anode- B.6) on a CHI030 (just the pins, not thru the darlington).
Would this wiring not be overloading the Anode pin B.6, once more than 1 led was lit, as if all 3 leds draw 20ma each that would be 60ma through B.6 which is 3 times the rating of B.6.
 

Pat13

Senior Member
here is the code for the RGB, it is your code, eclectic, just modified for an 18M2. Sorry, I currently don't have a schematic for the wiring, but to explain, I am using two RGB LED's with common anode, wired in parallel. The Red cathode(s) goes to B.4, the Blue cathode(s) goes to B.7, the Green cathode(s) to B.5, the anode(s) to B.6. I initially had a 330 ohm resistor between the B.6 and the anode(s) and had no light, removed it and put a 220 Ohm resisitor, still nothing, removed it and with no resistor between B.6 and anode finally got Red to go on, but no blue or green. Red is looping from bright to off to incremently brighter.
Code:
'Forum Tu 100608  rgb Hippy/Tom L, modified for Picaxe 18M2 by Pat13
#picaxe 18M2

symbol rTime = b0
symbol gTime = b1
symbol btime = b2
symbol xtime = w2
symbol R_LED = B.4
symbol G_LED = B.5
symbol B_LED = B.7
symbol dummy = B.6

setfreq m16
 main:
 for rTime = 10 to 255 step 10
 for gTime = 0 to 255 step 10
 for bTime = 0 to 255 step 5
  
 xTime = 766 - rTime - gTime - bTime
 PulsOut R_LED, rTime
 PulsOut G_LED, gTime
 PulsOut B_LED, bTime
 PulsOut DUMMY, xTime
 next
 next
 next
 

Pat13

Senior Member
Would this wiring not be overloading the Anode pin B.6, once more than 1 led was lit, as if all 3 leds draw 20ma each that would be 60ma through B.6 which is 3 times the rating of B.6.
Is there a way this can be done thru the darlington on the CHI030?
 

eclectic

Moderator
Is there a way this can be done thru the darlington on the CHI030?
The original code and circuit was designed around Common cathode LED's.
Pulsout > LED > resistor > ground
The "dummy" is not connected (NC).

The following code is working on an AXE091 board,
using a ULN2803, three LED's and three resistors.

Code:
#picaxe 18M2

symbol rTime = b0
symbol gTime = b1
symbol btime = b2
symbol xtime = w2
symbol R_LED = B.4
symbol G_LED = B.5
symbol B_LED = B.6
symbol dummy = B.7 ; unconnected

setfreq m16

 main:
 
 for rTime = 10 to 255 step 10
 for gTime = 0 to 255 step 10
 for bTime = 0 to 255 step 5
  
 xTime = 766 - rTime - gTime - bTime

 PulsOut R_LED, rTime
 PulsOut G_LED, gTime
 PulsOut B_LED, bTime
 PulsOut DUMMY, xTime

 next
 next
 next
 
 goto main
e
 

Attachments

hippy

Ex-Staff (retired)
As always, start simple. Just use one LED and start with just one colour.

Take note of the above comments, the polarity of the LED's and that for PICAXE pin control is important. If a common anode LED then the controlling pin should be low to light the LED. Any code to PULSOUT control the LED should be initialised for high outputs.

Without a resistor it's possible the forward voltage of one LED is causing the others not to light. Without a resistor there's the possibility the LED and/or PICAXE will be damaged.

If the red LED is working but not others then try swapping another colour for RED. Also test the LED with a battery pack and a resistor, check each can be controlled with HIGH/LOW before moving onto using PULSOUT.
 

Pat13

Senior Member
Thanks eclectic and hippy, that works great! The missing piece of the puzzle for me was where to connect the common anode. From reading a previous post, I thought it had to be connected to a pin. Once I tied it to +V, it worked great. The LED's definitely pulse (hence why it's called PULSOUT :p) but that is going to work for me. I assume that if I want to change the hue, it is thru changing the values of rTime, bTime and gTime. Correct me if I'm wrong but STEP is what is making the colors cycle and if I change that value, the colours will change quicker or slower?
 

SAborn

Senior Member
The reason that the anode leg is controlled by a pinout sometimes is to use PWM and fade the leds up or down, this is normally done using a transistor on the anode to handle the led current.
 
Top