Skip to main content
Visitor II
September 4, 2003
Question

PWM4 problem

  • September 4, 2003
  • 3 replies
  • 1056 views
Posted on September 04, 2003 at 05:23

PWM4 problem

    This topic has been closed for replies.

    3 replies

    jgilAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 11:55

    Hello.

    I am using uPSD 3200.

    I'm trying to use the channel PWM4, but frequency calculations don't match.

    I write:

    PWMVP (0xAA) = 0x02 // Variable PWM Period Reg

    PWMVPW (0xAB) = 0x01; // Variable PWM Pulse Width

    sfr PSCL1L (0xB3) = 0x00; // Variable PWM Prescaler low

    sfr PSCL1H (0xB4) = 0x00; // Variable PWM Prescaler high

    The fosc=16Mhz.

    But the output frecuency is 121Hz when i think that fout=4Mhz.

    Why?

    More. i write

    PWMVP (0xAA) = 0x64; // Variable PWM Period Reg

    PWMVPW (0xAB) = 0x32; // Variable PWM Pulse Width

    And changing PWMVPW the pulse width don´t change.

    Thank you very much

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 11:55

    hello

    I was using the PWM4 one time to generate a clock of 9 MHZ but after I stoped to use it.

    maybe the attached file can help you.

    totof.

    [ This message was edited by: totof on 30-08-2003 00:20 ]
    jgilAuthor
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 11:55

    Hello.

    Thank you for your answer. I test it at the DK3200 and working ok. But it doesn´t work on a microcontroller what i buyed. I tested the oscillator.

    Thank you .