Oh Dear. My head is spinning. HPWM RGB LEDs What to choose?


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2009
    Posts
    33

    Default Oh Dear. My head is spinning. HPWM RGB LEDs What to choose?

    I know this has been covered in lots of posts in various ways but I am swamped in confusion as to how to do my RGB Led dimming. I have a pic16f628 and looked at sPWM and it is all fine but at the same time I want to do some IR stuff to control the colours and perhaps some analogue input. Nobody's life depends on it, it it is just for fun but I can't work out what road to go down. PIC16f628s are in my cupboard, and sit nicely in my programmer with LEDs to test but obviously sPWM falls over as soon as I want to sit there waiting for an IR input.
    There is this: http://www.picbasic.co.uk/forum/showthread.php?t=10564 Thread: MIBAM - (Mirror Imaged Bit Angle Modulation).
    Looks interesting. Can this do it in the background?
    Or HPWM? I think that means moving to a 28 pin PIC which is a bit large for such a simple task. On this front there seems to be two hardware options CCP or some PICs seem to have dedicated pwm pins. Which is the simpler to use for a novice who struggles to understand Microchip datasheets. I have my mosfets sitting eagerly waiting for pwm, I just am confused as to what road to set off on.

    I'll start my infra-red confusion in another thread when it comes to it!

    Any pointers and ideas would be appreciated.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: Oh Dear. My head is spinning. HPWM RGB LEDs What to choose?

    About MIBAM:

    This module takes over the Interrupts on the PIC because the timing of the waveforms must be exact.
    With 16F's, You can NOT use any other interrupts, this includes ON INTERRUPT.
    So you won't be able to have things running in background. Maybe with 2 PIC 16F628 working separate functions?

    Robert

  3. #3
    Join Date
    Nov 2008
    Posts
    26


    Did you find this post helpful? Yes | No

    Default Re: Oh Dear. My head is spinning. HPWM RGB LEDs What to choose?

    It's a bit overkill but a PIC18F24K22 does RGB led's with no hassle, using 3 of the CCP modules.
    And in the UK its only £1.98, 4pence more than a 16F628. I have an example that i can post if you want it.

  4. #4
    Join Date
    Jul 2009
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Oh Dear. My head is spinning. HPWM RGB LEDs What to choose?

    Demon: Yes I had thought of that although perhaps I should have been a little less hasty. I probably don't mean background, I realize that I can simply put the mibam routine in the appropriate place (i.e. the waiting for an IR input loop) and take advantage of it's low cpu use. But I suspect that in the end a hardware approach is the best and so BH, I think I will go for those. I would love to see your example. It leaves opportunities for expansion. After all, we are all waiting for our Raspis are we not?

  5. #5
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default Re: Oh Dear. My head is spinning. HPWM RGB LEDs What to choose?

    May I ask how many RGB LEDs you're using? I've done Sony SIRC control of a single RGB LED with 6-bit (64 step) gamma corrected brightness levels spanning 8-bit (256 step) soft' PWM levels, but I used small tight isochronous assembly code.
    Attached Images Attached Images  

  6. #6
    Join Date
    Jul 2009
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Oh Dear. My head is spinning. HPWM RGB LEDs What to choose?

    I'm only after 3 channels of control for the moment. I want to add IR control and maybe some potentiometers but no doubt I will want to hook it up to some sort of serial connection at some point.
    Last edited by jimseng; - 19th March 2012 at 12:23.

  7. #7
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Oh Dear. My head is spinning. HPWM RGB LEDs What to choose?

    Go get you one of thes...
    http://www.ebay.com/itm/IR-Remote-Co...item415872b777
    or even better get one of the packages that include 5 meters of 5050 RGB LED's in a strip. Amazing and fun to play with.

    I just got a kit with 5M LED strip or around $20usd to add lighting to my daughters doll house. I plan on doing my own controller eventually.

    The remote allows you to select any range of colors and brightness of the RGB led strip.
    I popped the controller open and it looks to have a Vreg, small microcontroller, 3 driver transistors (or FET's), an IR sensor. One could trace out the schematic, burn your own PIC and replace the one on the board to get control of the code and not have to do your own circuit board.

    You could also monitor the three RGB channels and see what PWM signals give which colors.

    just a thought
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  8. #8
    Join Date
    Jul 2009
    Posts
    33


    Did you find this post helpful? Yes | No

    Default Re: Oh Dear. My head is spinning. HPWM RGB LEDs What to choose?

    Heckler
    Ha! That is exactly what I have got. (well a slightly different but very similar UK version) I was planning to use the fets to drive the LEDs and steal the 5v rail etc. That is why I was trying to get it to work on a smaller pic than the 28 pin but I think there is room in the box for a 28 pin if I am neat and tidy. I opened mine up and removed the MCU which I promptly lost between the floorboards but I was intending to do my own prog so I can use potentiometers. Unfortunately I think I am going to have to go with a 28 pin with HWPWM to achieve it all though. No doubt I will blow it up at some point.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts