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

How generate PWM using AT89c52

Dear friends,

i am ghanshyam gajjar. i have interface CS5460A to AT89c52. And generate PWM by using the AT89c52.
I have no idea for how to generate the PWM using the AT89c52 because it has no any pwm channel.
it is posible for using timer.
please give me answer.

Thanks.
ghanshyam gajjar.

Parents Reply Children
  • erik malund wrote:
    T2 is far more flexible...

    This is correct. One can use Timer2 (or Timer0 ;) ).

    erik malund wrote:
    T2 ... has "PWM capability"

    Timer 2 of AT89C52 has "Programmable Clock Out" capability, but it is NOT PWM capability. Programmable Clock Out produce always 50% duty with adjustable clock frequence:

    A 50% duty cycle clock can be programmed to come out on P1.0, as shown in Figure 5. This pin, besides being a regular I/O pin, has two alternate functions. It can be programmed to input the external clock for Timer/Counter 2 or to output a 50% duty cycle clock ranging from 61 Hz to 4 MHz at a 16 MHz operating frequency.
    

  • Mm... Forum engine is really pure. Data sheet quote in my previous post should be look like:

    A 50% duty cycle clock can be programmed to come out on
    P1.0, as shown in Figure 5. This pin, besides being a regular
    I/O pin, has two alternate functions. It can be
    programmed to input the external clock for Timer/Counter 2
    or to output a 50% duty cycle clock ranging from 61 Hz to 4
    MHz at a 16 MHz operating frequency.
    

    And a post in "Preview" mode looks not like the same post finally. :-(

    P.S. To ghanshyam gajjar. Atmel's document "At89C52 Data Sheet" says:

    Not Recommended for New Designs. Use AT89S52

    But AT89S52 hasn't PWM implementation too. :-(

  • is to use a chip with a PCA

    Erik

  • "Data sheet quote in my previous post should be look like"

    You're using the wrong tags!

    The 'pre' tags are just for quoting code - not "normal" text.
    Try italic instead...

  • Please learn to use the correct tags.

    Otherwise, it makes your posts very difficult for us to read.

  • Andy Neil wrote:
    You're using the wrong tags!.. Try italic instead.

    Mallard McChin wrote:
    Please learn to use the correct tags.

    Otherwise, it makes your posts very difficult for us to read.

    Yes, you are right. I do learn it. And I misdo sometimes - so do I learn. ;)

    But!
    1. It is not possible to correct own post. :-(
    2. Ok, there is "Preview". But (see my previous post) "Preview" shows the text otherwise as finally "Post" (try it - you will see ;) ).
    3. Yes, it's a good idea to use Italic for quotation, to make an accent etc. And to use Bold to highlight the names. But except Bold, Italic and

    source code tag
    

    there is... nothing more! I suggest it looks better if a quotation has an other background color as main text - and I have tried to use < pre > tag...

    Ok, one used earlier a typewriter and was happy, :) Shakespeare hasn't even it. :D
    But there was in those days no forums... ;)

    Sorry for offtop. And to be grumble about forum engine.