cancel
Showing results for 
Search instead for 
Did you mean: 

PWM4 problem

jgil
Associate II
Posted on September 04, 2003 at 05:23

PWM4 problem

3 REPLIES 3
jgil
Associate II
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

chris_baragnon
Associate II
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 ]
jgil
Associate II
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 .