My wish, as that of the other posters, is to use the PWM outputs of a 5940 to control a couple of 2803s and hence a bunch of LEDs. More specifically I have a string of LEDs on each output and the proper resistor to run the series string @ 12V and about 18mA, give or take the variances of the LEDs and resistors.
I've seen mentioned that I need to pull the 5940 outputs high, ok, but also seen that I'll lose the PWM ability of their output. This last bit I don't understand. I was hoping that the PWM output would just switch the 2803s also with PWM and hence control the LEDs.
These extra strings are meant as 'ambient' lighting to alter the overall colour of the lamp. They aren't RGB, just plain amber.
I've just realised that a 5940 isn't a PWM device, it's a constant current device
How many PWM outputs do I need? I don't know, 8 or so. It's a kind of open ended project
There's a document from TI at http://www.ti.com/lit/an/slva280/slva280.pdf describing how to use a FET with a 5940 to enable series LEDs operating at a higher voltage than the normal 5V.
Some Arduinos with Atmega328 only have 6 PWM outputs becuase they use the 28-pin DIP chip. Others have 8 because they use the surface mount chip that has more pins.
That's used a few pins, and I'm really trying to not use the SPI so that I can have Ethernet.
The switch and encoder are both interrupt driven, hence the encoder only gets 1 interrupt, seems to work OK though.
If I can take the 12V 'main power line', use a bunch of the amber LEDs and connect them directly to a 5940 pin then that's great.
I do need more PWM outs than the Uno has though.
I wonder if there is a library that will allow PWM on more outputs, through software emulation? The Arduino should be more than fast enough to allow this.
Quote from: emueyes on Sep 30, 2013, 04:26 pmThat's used a few pins, and I'm really trying to not use the SPI so that I can have Ethernet. No problem, with only one 5940 to communicate with, you will be fine using the shiftout() and can use any pins.
Quote from: PaulRB on Sep 30, 2013, 04:47 pmQuote from: emueyes on Sep 30, 2013, 04:26 pmThat's used a few pins, and I'm really trying to not use the SPI so that I can have Ethernet. No problem, with only one 5940 to communicate with, you will be fine using the shiftout() and can use any pins.I'm not sure what you mean by this.