This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PWM generation with 89c2051

Hello, I am using 89c2051 ic for RGB dimming light .
As there is no PWM pin on IC I wnat to know how can I genrate my PWM for dimming effect of LEDs.how canI use two times for generation of three pulses. I will be higly obliged for any suggestion

Parents
  • I need colour mixing of RGB lights . so rate would be 100HZ.maximum
    NOOO, it would be 120Hz MINIMUM or the most sensitive person will see flicker.

    Actually i have no choice for my controller as I want to use available one with me i.e 89c2051
    you are at a loss, without a PCA you will not be able to control 3 PWMs (RGB) concurrently for more than a very few LEDs.

    and as I am comfirtable with C programming I want to program it in C.
    in C you will not be able to do it for more than a very few LEDs.

    anyhow, the method is:
    for 1/2ms unblank the appropiate colors
    for 1ms unblank the appropiate colors
    for 2ms unblank the appropiate colors
    for 4ms unblank the appropiate colors

    the above requires very fast code, for more than a few LEDs I have always had to resort to assembler

    this gives you a resolution of 4 bits per color

    How many LEDs do you want to contol.

    Erik

Reply
  • I need colour mixing of RGB lights . so rate would be 100HZ.maximum
    NOOO, it would be 120Hz MINIMUM or the most sensitive person will see flicker.

    Actually i have no choice for my controller as I want to use available one with me i.e 89c2051
    you are at a loss, without a PCA you will not be able to control 3 PWMs (RGB) concurrently for more than a very few LEDs.

    and as I am comfirtable with C programming I want to program it in C.
    in C you will not be able to do it for more than a very few LEDs.

    anyhow, the method is:
    for 1/2ms unblank the appropiate colors
    for 1ms unblank the appropiate colors
    for 2ms unblank the appropiate colors
    for 4ms unblank the appropiate colors

    the above requires very fast code, for more than a few LEDs I have always had to resort to assembler

    this gives you a resolution of 4 bits per color

    How many LEDs do you want to contol.

    Erik

Children
No data