PWM for LPC175x

Questions on other types of hardware and getting it talking to the ARM CPU
Post Reply
basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

PWM for LPC175x

Post by basicchip »

>frim help line

I need some more help. The Csample.c program has
case 5:
printf("Ramp thru PWM on LED\n");
for (i=0; i<256; i++) PWM (10,255-i,200);
break;
but P0.10 is not pwm type, and the LED is P2.10. All the pwm type pins on a LPC1751 are on ports other than 0.
How can I use the PWM(pin,cycle,ms) command on a LPC1751



basicchip
Posts: 1090
Joined: Fri Oct 19, 2012 2:39 am
Location: Weeki Watchee, FL
Contact:

Re: PWM for LPC175x

Post by basicchip »

We haven't written a version of HWPMW.h for the LPC175x

PWM for these NXP parts, sets up 1 timer to count to a terminal match value and then reset to 0 to count again.

Other match values will set/clear the match output. You have to program the PINSEL register to output the match output.

We did this in BASIC for those parts and you can use that as an example
HWPWM17.bas
(2.21 KiB) Downloaded 855 times

Post Reply