PWM frequency for Rabbit 3000

I’m trying to use my Rabbit 3000 PWM to output a signal of 38 kHz. However, it only seems to be able to output a maximum of 10 kHz. If I set PWM_SPREAD, that puts it about 43 kHz. Is there any way to make the output exactly 38 kHz with a 50% duty cycle?

did you resolve this problem?

can you explain me how?

[QUOTE=epris;1623]did you resolve this problem?

can you explain me how?[/quote]

The PWM is clocked from Timer A9 so you need to set Timer A9 to get the PWM frequency. Once that is set, you can vary the pulse width with the PWM registers.

Frequency = Timer Clock / ( (TAT9R+1) * 1024)

Where the Timer clock is either peripheral clock or the periphaeral clock/2.

You should be able to use the pwm_init() function to set up the base frequency.

If your clock is too low (<38MHz), you will have to turn on the pulse spreading. When enabling pulse spreading give pwm_init() the desired frequency divided by four.

Aaron

Aaron

yes,

i read about pulse spreading and i have a question.
Spread signal is produced with a (frequence x 4) over a single pwm channel or It is needed to combine (may be sum?) signals produced by four pwm channels?