Forums

why these codes can't work?

Started by armnewbie May 12, 2006
I want to get a 1000HZ PWM.
@15MHz VPB Clock
codes like this

void ini_pwm()
{

PINSEL0 =0x02<<14; /* Enable P0.7 as PWM output */
PWMPR=0x00;
PWMMCR=0x02;
PWMPCR=0x0400;
PWMMR0=0x16E360;
PWMMR2=PWMMR0/2;
PWMLER=0x05;
PWMTCR=0x02;
PWMTCR=0x09;
}

An Engineer's Guide to the LPC2100 Series