Pulse Width Modulator

Started by teunvandeberg in LPC200014 years ago

Hello, I'm trying to use PWM 5 on a LPC2292. How can I select which timer is used for the PWM. Can someone give some...

Hello, I'm trying to use PWM 5 on a LPC2292. How can I select which timer is used for the PWM. Can someone give some example code? I can't get any output on the pin. It is configured as PWM5. We use FreeRTOS so the following code is used to setup Timer 1:


Question about PWM

Started by Hanif, M.A. in LPC200015 years ago

Hello, I was recently trying to use the PWM modulator on the LPC2129. I had problems with using Channel 5 output. A similar...

Hello, I was recently trying to use the PWM modulator on the LPC2129. I had problems with using Channel 5 output. A similar initialization for ch2 and ch6 works (I had taken into consideration the slightly different mode config for ch5 pin). Anyone else had similar problems? Any kn


PWM with dividing

Started by oldulik in LPC200012 years ago 2 replies

Hello all, I'm making with LPC2138, I want to do PWM, but not with same squares, but i want the squares to be different. For example for...

Hello all, I'm making with LPC2138, I want to do PWM, but not with same squares, but i want the squares to be different. For example for length of 255, I want to be first square 10, second square 40, third square 80 etc. I don't know how to do it, in user manual there is nothing about it, there is only how to do pmw with same squares. Does anybody know how to do it?


LPC2103 Timer 3 as PWM Problem!!

Started by Gigi in LPC200012 years ago 2 replies

Please!!! Help me, I have used the example 17 of lpcbook for configure the timer 3 of lpc2103 as a pwm autput but this not work... My...

Please!!! Help me, I have used the example 17 of lpcbook for configure the timer 3 of lpc2103 as a pwm autput but this not work... My major problem is also , in debug mode with keil CARM Not exist the timer 3 peripheric Have you any other example?


how to interface servo motors with lpc2129

Started by aki_...@yahoo.com in LPC20008 years ago 1 reply

hi...can i get some tutorials on interfacing servo motors with lpc2129 using "PWM"... as i m new to tihs field... can i get some sample code to...

hi...can i get some tutorials on interfacing servo motors with lpc2129 using "PWM"... as i m new to tihs field... can i get some sample code to set the PWM for lpc2129 in C.i m using keil uvison3. ------------------------------------


Re: nesting of interrupts

Started by Tom Walsh in LPC200012 years ago

vishal shah wrote: > > I am trying to make use of nesting of interrupts using LPC2138 > controller.I referd AN10381 application note &...

vishal shah wrote: > > I am trying to make use of nesting of interrupts using LPC2138 > controller.I referd AN10381 application note & copied what they > mentioned macro "IENABLE" & "IDISABLE" in my source code.Then called in > the isr of my project i.e. for PWM & AD0.But when i tried to simulate > it i always found the i get trapped in PWM interrupt only. > > can anyone help in handling n


Re: PWM

Started by Ravi in LPC200011 years ago

Hi Do I need to make ISr like below: static i=3D0; PWMMR1 =3D 0; //first edge at the start of pulse cycle void PWMISR (void)=20=20 { if(i>...

Hi Do I need to make ISr like below: static i=3D0; PWMMR1 =3D 0; //first edge at the start of pulse cycle void PWMISR (void)=20=20 { if(i> =3DLookupLength)//SineLookup array length i =3D 0; else i++; PWMMR2 =3D SineLookup[i]; PWMIR |=3D 0x00000001; VICVectAddr =3D 0x00000000; } =A0 On Tue, 12 Feb 2008 Ravi wrote : > I could able to generate PWM of constant width, > but


PWM

Started by Ravi in LPC200011 years ago 3 replies

Dear all, Processor:LPC2148 IDE:WinARM Can any one please explain me how to generate PWM with sinewave and trangular wave. Do I need to make...

Dear all, Processor:LPC2148 IDE:WinARM Can any one please explain me how to generate PWM with sinewave and trangular wave. Do I need to make sinewave lookup table. It has been told me to set sinewave freq for 1 khz carrier wave for 45 Khz Thanx in advance Ravi =A0 =20 =20


PWM Explanation

Started by todd...@hotmail.com in LPC20008 years ago 30 replies
PWM

I keep seeing this snippet of code that is supposed to explain how to generate PWM signals. However, there is no explanation for each of the...

I keep seeing this snippet of code that is supposed to explain how to generate PWM signals. However, there is no explanation for each of the keywords (e.g. PWM1TCT). I've read the user manual, but am having a difficult time figuring out valid values. Can anyone provide a detailed explanation for how to generate the associated values (e.g. (0x2 < < 8)). I'm new to the nxp uC, and am looking for


CTCR modes description for PWM not clear for 23xx, 24xx

Started by Alex in LPC20008 years ago 2 replies
PWM

Hi Below is the description of the CTCR register for PWM in 23xx, 24xx. ----------------------------------------------------------- Table...

Hi Below is the description of the CTCR register for PWM in 23xx, 24xx. ----------------------------------------------------------- Table 486: PWM Count control Register (PWM1CTCR - address 0xE001 8004) bit description Bit Symbol Value Description Reset 1:0 Counter/Timer Mode 00 Timer Mode: the TC is incremented when the Prescale Counter matches the Prescale Register. 01 Counter ...


PWM example for LPC210x and IAR

Started by "R. Wimmer" in LPC200013 years ago

Hello, I try to get a PWM output on pin 0.8 with IAR, but had no luck yet. The Keil software has register like #define PWMLER ...

Hello, I try to get a PWM output on pin 0.8 with IAR, but had no luck yet. The Keil software has register like #define PWMLER (*((volatile unsigned long *) 0xE0014050)) which I can not find in the LPC2103 manual. The IAR I seem to be different. This is how far I got: PINSEL0 |= 0x20; // select pin 0.08 PWM4 function T0TCR_bit.CR; // counter reset T0PR = PWM_PCLK_D...


PWM glitch

Started by douglasbolton in LPC200015 years ago 1 reply

I'm running 4 pwm channels in single edge operation. I am sometimes not getting the shadow register latched into the match...

I'm running 4 pwm channels in single edge operation. I am sometimes not getting the shadow register latched into the match registers. If I use the following code I sometimes get a glitch where the latch register doesn't cause the the value to get loaded into the match register.


Re: LPC2103 problem

Started by Marcus Andreotti in LPC20009 years ago

" PINSEL0 |= 0x00028000; " Do you guarantee what value PINSEL0 was before starting main()? Have you tried make PINSEL0 a value instead of...

" PINSEL0 |= 0x00028000; " Do you guarantee what value PINSEL0 was before starting main()? Have you tried make PINSEL0 a value instead of 'or-ing' it? You may be surprised... Just my 2 cents... Marcus On Tue, Sep 21, 2010 at 12:41 AM, schucasso wrote: > Hello, > > I have a problem with PWM on LPC2103 P0.7 connected to MAT2.0. PWM signal > although works fine on


PWM demodulation

Started by Peter Gray in LPC200014 years ago 2 replies

On other microcontrollers I've used, it was possible to start a single timer on a rising edge, and capture-and-reset on a falling edge...

On other microcontrollers I've used, it was possible to start a single timer on a rising edge, and capture-and-reset on a falling edge (to capture the pulse time). It doesn't look like this method is available on the (for example) LPC2131. What would be a good mechanism for these microcontrollers? Start two timers, feed the PWM to two pins, have


Missing PWM Match Interrupt

Started by stephen_osborn_co in LPC200013 years ago

I have been reading the errata and many of the messages on this board and still cannot find out what is going on. I have a PWM match...

I have been reading the errata and many of the messages on this board and still cannot find out what is going on. I have a PWM match interrupt (FIQ) that happens about every 300 system clock cycles or 5uS. The ISR takes about 2.2uS as indicated by the GPIO that is high during the ISR. I set a test at the beginning of the ISR to look at another timer value and if it has be greater than 4...


PWM Problem

Started by vineet jain in LPC200013 years ago 4 replies

Hi all, I am having difficulties with initiating the PWM. Here's the code to enable PWM4 single edge on LPC2104 at 11.0592 Mhz. PINSEL0 =...

Hi all, I am having difficulties with initiating the PWM. Here's the code to enable PWM4 single edge on LPC2104 at 11.0592 Mhz. PINSEL0 = 0x00020000; PWMPR = 0x7FF; PWMPCR = 0x00001000; PWMMCR = 0x00002000; PWMMR0 = 0x00002000; PWMMR4 = 0x00001000; PWMLER = 0x00000010; PWMTCR = 0x00000002; PWMTCR = 0x00000009; Anything I am missing. Th...


Anyone run this little LPC2138 puppy flat chat ?

Started by donwillwonthe in LPC200014 years ago

I need 60MHz onto the PWM timer/counter so I get something like 20nSec resolution of a PWM output. Ive solved my own full bridge phase ...

I need 60MHz onto the PWM timer/counter so I get something like 20nSec resolution of a PWM output. Ive solved my own full bridge phase control circuit but now pushing the poor little LPC2138 a little hard for the resolution. Would love to know if someone has "gone where this man fears to tread" !! Rgds Don W


Re: PWM

Started by Paul Curtis in LPC200011 years ago

Hi, > Dear all, > Processor:LPC2148 > IDE:WinARM > Can any one please explain me how to generate PWM > with sinewave and trangular...

Hi, > Dear all, > Processor:LPC2148 > IDE:WinARM > Can any one please explain me how to generate PWM > with sinewave and trangular wave. > Do I need to make sinewave lookup table. > It has been told me to set sinewave freq for 1 khz > carrier wave for 45 Khz Person: Me Opinion: My own Hell, I love these questions--so many degrees of freedom, even after you've decoded what was mea


PWM with olimex lpc2106-mt pcb - how to?

Started by killtheclock in LPC200015 years ago 4 replies

Hi all, I have an olimex lpc2106-mt pcb and try to program a PWM without success. The Docu is not especially detailed (I...

Hi all, I have an olimex lpc2106-mt pcb and try to program a PWM without success. The Docu is not especially detailed (I think). I tried a lot of register settings(for hours). All I get is a single 88.64 ms pulse on PWM4 at reset that does not change with the match register


help for read PWM

Started by Anonymous in LPC200015 years ago 2 replies
PWM

Hello, someone know how read pwm (i.e. detect if the value read (in CR0, CR1 and CR2) is rising edge or falling edge), since I...

Hello, someone know how read pwm (i.e. detect if the value read (in CR0, CR1 and CR2) is rising edge or falling edge), since I have interrupts enable in both transitions. My idea is the IOPIN register read only the current state when the pins are defined as I/O but this pins a