Forums

PWM with 60MHz?

Started by gorazd_grkman January 24, 2005

on philips offical web site i found this:

http://www.semiconductors.philips.com/markets/mms/products/microcontro
llers/support/training_education/faq/lpc2100_family/

Q: What is the finest resolution on the LPC210x PWM?
A: The finest resolution is = 1/processor clock max (60MHz). In this
case = 16 ns.

so could some one tell me what i'm doing wrong because, i can't get,
that resolution of PWM on pin.
the max resolution witch i can get is 1.350us

I have PLL multiplier enabled (5) and Cristal is 12MHz
code is:

PWMPR=0x0000; //no prescaler - one cpu clk is one PWM clk
PWMMCR=0x0002; //Reset timer counter register on match0
PWMPCR=0x7E00; //enable each individual PWM, single edge
PWMTCR=0x000A; //Reset TC counter
PWMMR0=0x00001; //set up the PWM period
PWMLER|=0x0000; //Latch the value
PWMTCR=0x0009; //set the TC coutner and enable all PWMs
PINSEL0 = 0x0005800A;
PWMTC=0;




An Engineer's Guide to the LPC2100 Series

No real idea, just some questions:

> the max resolution witch i can get is 1.350us
> I have PLL multiplier enabled (5) and Cristal is 12MHz
> code is:

Do you write 5 or 4 into MSEL ?
With 5, you get 84MHz.

VPBDIV = 0 ?

> PWMPR=0x0000; //no prescaler - one cpu clk is one PWM clk
> PWMMCR=0x0002; //Reset timer counter register on match0
> PWMPCR=0x7E00; //enable each individual PWM, single edge
> PWMTCR=0x000A; //Reset TC counter
> PWMMR0=0x00001; //set up the PWM period
> PWMLER|=0x0000; //Latch the value
^^
|= ???? --
42Bastian Schick