Software PWM for AT89C2051

Status
Not open for further replies.

crankler

Junior Member level 2
Joined
Dec 21, 2010
Messages
23
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,283
Activity points
1,479
Is it possible to generate 2 pwm outputs from at89c2051? the pwm output should be configured from 5 - 10% duty cycle..
 

yes, with the help of timers you can generate 2 pwm.

What is the frequency of the pwm?
 
yes, with the help of timers you can generate 2 pwm.

What is the frequency of the pwm?

it may not be as efficient or accurate when changing the pwm at regular intervals
 
What is the frequency of the pwm?

let's say 20 kHz, what should be the value of crystal oscillator to use?

it may not be as efficient or accurate when changing the pwm at regular intervals

why? i was planning to have an interval 10 seconds and minimum of 8 duty cycles to choose from
 
Reactions: gella

    gella

    Points: 2
    Helpful Answer Positive Rating
i will be using 12kHz crystal oscillator.. what will be the frequency for 8-bit pwm output?

---------- Post added at 02:59 ---------- Previous post was at 02:56 ----------

..i mean 11.0592kHz oscillator
 
Reactions: gella

    gella

    Points: 2
    Helpful Answer Positive Rating
frequency is not concerned to crystal oscillator, but the timer values corresponding to the max frequency it can generate
 
i will be using 12kHz crystal oscillator.. what will be the frequency for 8-bit pwm output?

---------- Post added at 02:59 ---------- Previous post was at 02:56 ----------

..i mean 11.0592kHz oscillator

It is not either 12kHz or 11.0592 kHz. It is 12MHz and 11.0592MHz
 
Reactions: gella

    gella

    Points: 2
    Helpful Answer Positive Rating
frequency is not concerned to crystal oscillator, but the timer values corresponding to the max frequency it can generate

what do you mean by timer values.. i'm using 11.0592 MHz crystal oscillator
 
Reactions: gella

    gella

    Points: 2
    Helpful Answer Positive Rating
THE MAXIMUM VALUES SUPPORTED BY PWM REGISTERS... there will be pwm registers, where we load the timer values for ON and OFF values and you vary the duty cycle...
 
Reactions: gella

    gella

    Points: 2
    Helpful Answer Positive Rating
Can you please post a working sample program for PWM control? One which can control the brightness of an led, and maybe with a schematic?

I seem to have problems with interrupt.. Can I use polling instead?

Thanks!!!
 

Can you please post a working sample program for PWM control? One which can control the brightness of an led, and maybe with a schematic?

I seem to have problems with interrupt.. Can I use polling instead?

Thanks!!!


check this attachmevt
Ajitkumar
 

Attachments

  • uCTrainerKit.pdf
    264 KB · Views: 174

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…