PWM and Capture inputs !!!!

Started by Vimal Amin in LPC200014 years ago 1 reply

I need PWM (double edge) and capture on PWM timer itself. So I refered User manual of LPC2132. I found on page...

I need PWM (double edge) and capture on PWM timer itself. So I refered User manual of LPC2132. I found on page 181: ----------------------------------------------------------------- 15.1 Features: . . . ? Four 32-bit capture channels take a snapshot of the timer value when an input signal transitions. A capture event may also optionally generate an interrupt. -----------------------------


Help on PWM basic code

Started by madbaxyh in LPC20007 years ago 15 replies

Hello everyone! i'm testing PWM single edge of my LPC2148, after reading the user manual i came up with this code. It should work at 1KHz with...

Hello everyone! i'm testing PWM single edge of my LPC2148, after reading the user manual i came up with this code. It should work at 1KHz with duty 50% (XTAL=10MHz,MSEL=6, PSEL=1) but it doesn't. i've watched the behavior through PWM module of KEIL uVision simulator and it seems to work, but in real, nothing appears in the osciloscope. can someone tell me what I'm missing? #include


Best way of synchronizing Timers 0, 1 & PWM?

Started by Duncan Entwisle in LPC200016 years ago
PWM

I'm going to use the PWM and Timer 1 to generate signals for driving a display, however that requires that the timers for the PWM &...

I'm going to use the PWM and Timer 1 to generate signals for driving a display, however that requires that the timers for the PWM & Timer 1 start at the same instance - i.e. that they're in sync. with each other. I could offset the values the first time round, replacing them


PWM Register PWMEMR

Started by Klausdia in LPC200015 years ago 1 reply

I am developing a PWM on the LPC2294 with Keil PKARM, and I am facing a problem using the PWM example of Keil. They are using the...

I am developing a PWM on the LPC2294 with Keil PKARM, and I am facing a problem using the PWM example of Keil. They are using the register PWMEMR, that is not described in the datasheet of Phillips. I contacted the support of Keil. They told me, the example was an older versio


LPC2138 PWM

Started by tah2k in LPC200014 years ago

Hi all- I am working on some motor control 'stuff' using the PWM and the A/D. I have configured the PWM to be single edge controlled...

Hi all- I am working on some motor control 'stuff' using the PWM and the A/D. I have configured the PWM to be single edge controlled with a 25KHz frequency. I would like to trigger an A/D reading slightly before the falling edge of the pulse. Is there any thoughts on how to configure the LPC2138 to generate an interrupt to take an A/D reading slightly


PWM Question

Started by jens_alsig in LPC200013 years ago 1 reply

Hi, I have to control a RC servo and a small DC motor. The RC servo requires a pulse every 20 mS. The pulse has to be between 1.5 mS and 2.5...

Hi, I have to control a RC servo and a small DC motor. The RC servo requires a pulse every 20 mS. The pulse has to be between 1.5 mS and 2.5 mS, if I remember correct. The DC motor has to have a switch frequency between 20 kHz and 25 kHz. The duty cycle have to be between 0 % and 100 %. (99 % is also ok) Now my problem is how to configure the PWM module, especially the PWM Match 0 regis...


Re: PWM

Started by Ravi in LPC200012 years ago

I could able to generate PWM of constant width, but then how to modulate the width with sine wave amplitude ? whether I have to make PWMMR1 =3D...

I could able to generate PWM of constant width, but then how to modulate the width with sine wave amplitude ? whether I have to make PWMMR1 =3D sinewave amplitude in ISR routine? In that case I may not achieve carrier freq of 45 Khz Bcoz I have to change MR1 in after each PWM pulse. Is there any other way to do that Ravi =A0 On Tue, 12 Feb 2008 Paul Curtis wrote : > Hi, > > > Hi Paul,


Phase Shifted PWM (LPC1759)

Started by micr...@ymail.com in LPC20009 years ago
PWM

Hi there ) I'm trying to build a phase shifted PWM controller with LPC1759. I get full phase shifted pwm in pwm mode with PWM2, PWM4 and...

Hi there ) I'm trying to build a phase shifted PWM controller with LPC1759. I get full phase shifted pwm in pwm mode with PWM2, PWM4 and PWM6 in dual edge mode. PWM1 is single edge by default... Outputs PWM1 PWM2 (symmetric of PWM1) PWM4 PWM6 (Symmetric of PWM4) PWM frequency is directed by PWM0 which commands the rising edge of PWM1... After that I tried to add delay in the symm...


Using PWM output to drive ESC

Started by Sumit Bhatnagar in LPC200011 years ago

I have an AVR based ESC(Electronic speed controller). I would like to use the PWM signal generated by LPC2148 and use this PWM signal as th...

I have an AVR based ESC(Electronic speed controller). I would like to use the PWM signal generated by LPC2148 and use this PWM signal as th input for the ESC which will drive a BLDC motor. I had a few questions: 1) Is it possible to drive the AVR based ESC and the motor with an external PWM signal from the LPC2148. 2) The PWM signal from the LPC2148 is a 3.3V signal. Will the AVR b...


PWM of lpc23xx for SVM Motor Control

Started by naderus2000 in LPC200011 years ago 5 replies
PWM

Hi, i want to know how can i use the PWM unit of LPC23xx for handle center align feature for SVM motor control? is there any way to insert...

Hi, i want to know how can i use the PWM unit of LPC23xx for handle center align feature for SVM motor control? is there any way to insert some deadtime between PWM's channels? Thanks.


PWM output behaviour

Started by pe1rcl in LPC200011 years ago 6 replies

Aloha, I'm pwm oto drive 3 led's (RGB). I'm using PWM1, PWM2 and PWM5 output of an lpc2148. The pwm outputs work well, but only if the...

Aloha, I'm pwm oto drive 3 led's (RGB). I'm using PWM1, PWM2 and PWM5 output of an lpc2148. The pwm outputs work well, but only if the pwmmr value is not equal to 0 or to the pwmmr0 register. When these values are selected i have a 0% or 100% dutycycle, but unpredictable which one. Also the behaviour this behaviour differs from which output is selected. Do i something wrong, or is...


Generating PWM in LPC2129

Started by ranjani krishnan in LPC200012 years ago 1 reply

hai, I am new to this ARM LPC2129. I want to generate 6 PWm signals for the MOSFET driver to control my motor. Can anyone tell how to set...

hai, I am new to this ARM LPC2129. I want to generate 6 PWm signals for the MOSFET driver to control my motor. Can anyone tell how to set the frequency of PWM signals.What is the relation between the value given in MR0 register(given in hexadecimal value) and frequency ?How to generate 6PWM signals with 60 degree delay? regards, ranjani Rangarajan Varadan wr


LPC2366 PWM ~1uS low going glitch

Started by bobtransformer in LPC20009 years ago 8 replies

Hi guys... In my timer0 interrupt, when I try to turn the PWM output back into a GPIO (Fast GPIO) and set it high, I sometimes get a 1...

Hi guys... In my timer0 interrupt, when I try to turn the PWM output back into a GPIO (Fast GPIO) and set it high, I sometimes get a 1 microsecond low going glitch. Even if I read the pin first to make sure I am not catching the PWM in the middle of a LOW portion of a cycle first. The external circuitry does not want to see this short glitch. Any thoughts ?? A better way maybe ? Th...


PWM dutyCyle

Started by Ravi in LPC200011 years ago

 Hi all,I'm working on LPC2148 for PWM generation.below is part of code used for configuration/setting of PWM modulePWMPCR = 0x00001000; //Enable...

 Hi all,I'm working on LPC2148 for PWM generation.below is part of code used for configuration/setting of PWM modulePWMPCR = 0x00001000; //Enable single edge controlled PWM4PWMMCR = 0x00000003; //Reset timer on MR0 match & generate interruptPWMPR = 0x00000004; //prescaler valuePWMMR0 = 0x00000064; //30Khz cycle ratePWMMR4 = 0x00000032; //Dutycycle = 50%PWMTCR = 0x00000002; //Reset timer c


Re: Doubts on LPC2129

Started by Joel Winarske in LPC200012 years ago 3 replies

ranjani krishnan wrote: > I am new to this ARM LPC2129. I want to generate 6 PWm signals for the MOSFET driver to control my motor. Sample code...

ranjani krishnan wrote: > I am new to this ARM LPC2129. I want to generate 6 PWm signals for the MOSFET driver to control my motor. Sample code for PWm generation is available in net.Can anyone tell how to set the frequency of PWM signals.What is the relation between the value given in MR0 register(given in hexadecimal value) and frequency ?How to generate 6PWM signals with 60 degree delay?I


Doubts on LPC2129

Started by ranjani krishnan in LPC200012 years ago

hai, I am new to this ARM LPC2129. I want to generate 6 PWm signals for the MOSFET driver to control my motor. Sample code for PWm generation...

hai, I am new to this ARM LPC2129. I want to generate 6 PWm signals for the MOSFET driver to control my motor. Sample code for PWm generation is available in net.Can anyone tell how to set the frequency of PWM signals.What is the relation between the value given in MR0 register(given in hexadecimal value) and frequency ?How to generate 6PWM signals with 60 degree delay?I also referred the user ...


PWM Duty Cycle

Started by Ravi in LPC200011 years ago 14 replies

Hi all, I'm working on LPC2148 for PWM generation. Below is part of code used for setting of PWM module. PWMPCR =3D 0x00001000; //Enable...

Hi all, I'm working on LPC2148 for PWM generation. Below is part of code used for setting of PWM module. PWMPCR =3D 0x00001000; //Enable single edge controlled PWM4 PWMMCR =3D 0x00000003; //Reset timer on MR0 match,generate interrupt PWMPR =3D 0x00000004; //prescaler value PWMMR0 =3D 0x00000064; //30Khz cycle rate (crystal 12Mhz) PWMMR4 =3D 0x00000032; //Dutycycle =3D 50% PWMTCR =3D 0x00...


Pwm disabled if serial's not attached?

Started by -=Quequero=- in LPC200014 years ago

Hello all, I'm having a strange problem with an LPC2138 (Olimex board H2138), my PWM outputs are working fine, but if serial cable is not...

Hello all, I'm having a strange problem with an LPC2138 (Olimex board H2138), my PWM outputs are working fine, but if serial cable is not attached to the board, PWM signal is not generated. When I attach the cable... It works correctly.... Has someone an idea about this behaviour? The same happens with UART0/1 disabled. Thanx a lot to everyone, have a nice


PWM6 on LPC2148 does not work

Started by c_budelmann in LPC200011 years ago 1 reply

Hi, I'm using a Olimex LPC2148 board, and have a problem with the pwm output on PWM6. PWM on all other channels works fine, only the pin...

Hi, I'm using a Olimex LPC2148 board, and have a problem with the pwm output on PWM6. PWM on all other channels works fine, only the pin 0.9 PWM6 does not work. My code contains only the start up code, and the following lines: PWMMR0 = 1023; // set upper edge value PWMLER |= (1 <


PWM Conflicts with ADC on LPC2148

Started by "Ben...@yahoo.com [lpc2000]" in LPC20005 years ago 1 reply

I am using the LPC2148 with a 12MHz crystal using a 5 multiplier to have 60MHz CCLK. PCLK running at same frequency as CCLK. I had some working...

I am using the LPC2148 with a 12MHz crystal using a 5 multiplier to have 60MHz CCLK. PCLK running at same frequency as CCLK. I had some working software triggered ADC code. When I added a PWM output with a match interrupt, the ADC always returns 0 (the PWM output is working correctly) I can't figure out why this is happening. Any help would be appreciated Here is a link to the PastBin for the co...