PWM for LPC175x

Questions on other types of hardware and getting it talking to the ARM CPU
basicchip
Posts: 759
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

PWM for LPC175x

Postby basicchip » Sat Mar 14, 2015 9:21 pm

>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: 759
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: PWM for LPC175x

Postby basicchip » Sat Mar 14, 2015 9:24 pm

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 150 times


Return to “Other Hardware interfaces”

Who is online

Users browsing this forum: No registered users and 1 guest