Hi all,
I am testing with a lpc2138 and Keil qvision4. I've written this very simple test program:
#include <lpc21xx.h> /* LPC21xx definitions */ void main() {PINSEL0 |= 0x000A8000; VPBDIV = 0x00000100; PWMPR = 0x00000000; PWMPCR = 0x00005454; PWMMR0 = 0x00000700; PWMMR1 = 0x00000020; PWMMR2 = 0x00000060; PWMMR3 = 0x00000120; PWMMR4 = 0x00000160; PWMMR5 = 0x00000220; PWMMR6 = 0x00000260; PWMMCR = 0x00000002; PWMLER = 0x7F; PWMTCR = 0x02; PWMTCR = 0x09; while(1); }
the problem i have now is that i want lets say PWM channel 2 pulse twice or 3 times within the 700 PWMR0. so what i want is PWM2 10Khz PWM4 20Khz and PWM6 at 40Khz. Anyone know if this can be done?
Thanks in advance Thomas