*jOi~ Posted August 16, 2007 Report Share Posted August 16, 2007 friends,i've been searching this forum far and wide, and whilst i can find a huge number of references to using PWM to control the brightness of LEDs, i haven't been able to find anything beyond "it's possible", and "i used it in my box".i was curious to know if anyone had any sample code as to how it is done in the firmware/application, and what the potential number of PWM'd LEDs I could hope to get from one core.originally i had planned to run a matrix, though after various experiments, im much more worried about maximum brightness, and the prospect of building a ridiculous number of DOUT modules is actually kind of endearing.I would like to do ~200 LEDs, and am quite prepared to chain a number of core modules together to do this.any thoughts?trent Quote Link to comment Share on other sites More sharing options...
monolake Posted August 16, 2007 Report Share Posted August 16, 2007 if you want to address a huge number of LEDs have a look at this: http://www.midibox.org/forum/index.php?topic=5626.0As far as PWM for dimming the LEDs is concerned, it depends if you want to dim each of them individually or if you just need to adjust overall brighness or RGB balance. I am currently working on a (hopefully) very stable solution for the latter problem, based on some additional hardware and a small modification of the DOUT board. Will post results if successful...Cheers, Robert Quote Link to comment Share on other sites More sharing options...
*jOi~ Posted August 17, 2007 Author Report Share Posted August 17, 2007 i have seen that page before, though somehow i always manage to lose the bookmark.. thanks for the redirection.i am trying to dim each LED individually, so I would be incredibly interested in the solution you speak of - please keep me/us posted.as an aside i'd just like to say how much of a kick i get out of having my questions answered by mr. Henke himself.. thankstrent Quote Link to comment Share on other sites More sharing options...
audiocommander Posted August 17, 2007 Report Share Posted August 17, 2007 Hi Trent,I'm not very sure about the things I'm going to say, because I haven't really worked with DOUTs so far:MIOS does not support setting a PWM conveniently through a method (though I agree it would be very handy if this would exist - eg: [tt]MIOS_DOUT_PWMSet_Pin(percentage)[/tt] :)Therefore (if you want to use MIOS), I think the trick is to use the ShiftRegister methods and set up a pattern with on/off values to create your pulses kinda "manually". I don't know if the PIC has an internal PWM function that could be accessed by asm; but I guess the approach there shouldn't be so different.I hope I'm not talking rubbish, so if anyone knows better, feel free to add your comments.Best,MichaelEdit:Ah, forgot what I really wanted to say: I recently stumbled upon a project using super bright "z power 3 watt LED" that is controllable by 5Vs. The Guy sais it's brighter than 12 normal super bright LEDs:http://tobe.nimio.info/led_mood_lamp.phpNot sure though about the requirements of the Power Supply :-\ 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.