disabling PWM & I2C on P0.02 and P0.03 on a LPC2103

Started by Csaba Zvekan in LPC200011 years ago 1 reply

I am having difficulties disabling the multiplexed stuff on P0.2 & P0.3. I am trying to use it as a simple GPIO pins. I tried disabling the...

I am having difficulties disabling the multiplexed stuff on P0.2 & P0.3. I am trying to use it as a simple GPIO pins. I tried disabling the I2C and PWM with these two commands but it won't work I2C_I2CONCLR = 0x0; // Disable I2C PWM_MCR = 0x0; // Match Control register off Now this might be totally wrong , please remember "newbi" here . I have a dimmed led on P0.2 when I probe it ...


Selecting PWM Function forcing output low by default?

Started by lpcphil in LPC200013 years ago 4 replies

Hi, I'm using the LPC213X and the PWM controller using PWM2 as a double-edge controlled output. It seems that no matter what I do, as soon as...

Hi, I'm using the LPC213X and the PWM controller using PWM2 as a double-edge controlled output. It seems that no matter what I do, as soon as the GPIO pin (P0.7) is configured for PWM2, the output goes hard low. This is very undesirable for my application. I need this pin to stay high and I cannot seem to figure out if there is anyway to prevent this from happening. The following code is...


LPC2214 PWM configuration problem(s)

Started by Remis Norvilis in LPC200015 years ago

I'm having difficulty setting up a PWM output for a LPC2214 (P0.21 pin as PWM5 single-edge output) for a 50% duty cycle continuous pulse....

I'm having difficulty setting up a PWM output for a LPC2214 (P0.21 pin as PWM5 single-edge output) for a 50% duty cycle continuous pulse. I've seen a Keil LPC21xx example referencing a "PWMEMR" register (at address 0xE001403C) used to set the state of the match outputs. I can't find any reference to this in IAR or Philips documentation. The curious


Is PWM capture/measurement without interrupts possible?

Started by Neil Jansen in LPC200012 years ago 3 replies

Hi, On my LPC2103 I'm trying to measure the on-time of three PWM signals from an LM4970 chip. The only way I know to do this is to use...

Hi, On my LPC2103 I'm trying to measure the on-time of three PWM signals from an LM4970 chip. The only way I know to do this is to use a timer/capture and interrupts; I'm wondering if there's a way to do it without interrupts. Here's my code with interrupts: Using Timer0, set up pins as follows: CAP0.0 - on falling edge, update T0CR0 with current timer/counter value CAP0.1 - on falli...


[LPC2148] R/C Servo's and PWM/Timers

Started by gussy_27 in LPC200011 years ago 2 replies

Hi All! I am a long time user of Atmels 8bit AVR range, but only recently have jumped into the wold of ARM, the LPC2xxx range...

Hi All! I am a long time user of Atmels 8bit AVR range, but only recently have jumped into the wold of ARM, the LPC2xxx range specifically. I am having a little bit of trouble deciphering the NXP datasheet and understanding the match, capture and pwm functions. What I want to do is to capture 6 R/C Servo inputs (PPM) and then control 4 R/C servos (a 1ms to 2ms pulse every 20ms). If a ...


LPC2129 PWM

Started by lehighuboy in LPC200015 years ago 1 reply

I'm using the Keil uVision IDE tool and the LPC2129. My question is about setting up single edge hardware PWMs. Someone previously ...

I'm using the Keil uVision IDE tool and the LPC2129. My question is about setting up single edge hardware PWMs. Someone previously posted the following code: REG(PWM0_PR)=0x0000; //no prescaler - one cpu clk is one PWM clk REG(PWM0_MCR)=0x0002; //Reset timer counter register


Using PWM output as clock source

Started by c_hall2001 in LPC200014 years ago

I was designing a board with an LPC2138 and 2 ADC's. The ADC's require a 27Mhz clock. Is there any problem with using one of the PWM ...

I was designing a board with an LPC2138 and 2 ADC's. The ADC's require a 27Mhz clock. Is there any problem with using one of the PWM outputs to supply this clock? Do the LCP outputs provide a clean enough output at this speed to work like an oscillator? It would save some board space but I wasn't sure if there was a downside. TIA


PWM width detection

Started by hdxlh74 in LPC200014 years ago 9 replies

Does anyone have any code examples of how I can use a LPC2138 to detect the width of the positive pulse in a PWM signal. I know I can use the...

Does anyone have any code examples of how I can use a LPC2138 to detect the width of the positive pulse in a PWM signal. I know I can use the timer circuit and detect the rising and falling edges do some math and determine the width. I am very new to micro controllers and some code examples or guidance would be greatly appreciated. Thanks J Parham


WDT, PWM, RTC

Started by Mukund Deshmukh in LPC200013 years ago 1 reply

Hi, I have uploaded GRLCD.zip to yahoo file section. This is graphic LCD (KS107/108 chip set) driver and compiles under GCC. I have couple of...

Hi, I have uploaded GRLCD.zip to yahoo file section. This is graphic LCD (KS107/108 chip set) driver and compiles under GCC. I have couple of small doubt for LPC2138. Can I use WDT or RTC timers to generate 100 milsec interrupt? Can I use PWM as counter? Best Regards, Mukund Deshmukh. Beta Computronics Pvt Ltd 10/1, IT Park, Parsodi, Nagpur-440022 Cell - 9422113746 --------------...


why these codes can't work?

Started by armnewbie in LPC200014 years ago
PWM

I want to get a 1000HZ PWM. @15MHz VPB Clock codes like this void ini_pwm() { PINSEL0 =0x02 < Protect your PC from spy ware with

I want to get a 1000HZ PWM. @15MHz VPB Clock codes like this void ini_pwm() { PINSEL0 =0x02 < Protect your PC from spy ware with


PWM6 is not working

Started by in LPC200015 years ago

Hi all. I try to use PWM6 on LPC2292/4. That simple program should have generate PWM wawe on PWM6 output. But, anything is wrong in the...

Hi all. I try to use PWM6 on LPC2292/4. That simple program should have generate PWM wawe on PWM6 output. But, anything is wrong in the program, becouse PWM6 is not working. Please, tell me, what is wrong ? Thanks for any advice or ideas. #include "lpc229x.h" int main() //Single edge PWM { PCB_PINSEL0 |= (1 << 19); /


LPC2103 and EMI noise susceptibilty etc...

Started by bobtransformer in LPC200011 years ago 4 replies

Do any of you intelligent guys had experience with EMI noise susceptibility of LPC parts in high dV/dT environments ?? In this case, I'm...

Do any of you intelligent guys had experience with EMI noise susceptibility of LPC parts in high dV/dT environments ?? In this case, I'm talking about a fairly well bypassed LPC2103 with PWM driving an optocoupled FET driver, but in some cases at high power I see the micro PWM frequency change in frequency, (and sometimes other problems). I am wondering if maybe the RESET line can get a...


float in interrupt function?

Started by ed_hage in LPC200015 years ago 21 replies

I am using a LPC2106-board from Olimex to drive two motors via PWM. I have a simple interrupt-function for the PWM which reads the duty...

I am using a LPC2106-board from Olimex to drive two motors via PWM. I have a simple interrupt-function for the PWM which reads the duty cycle variable and then sets the DC. This does not work. In the example beneath MR6 does give a good duty cycle (but is fixed!! so no pracitcal use), and when I use the float DC1 (as in MR4) it does not work. This i


PWM

Started by Jack Xu in LPC200015 years ago 2 replies

Hi all, I try to use PWM2 on LPC2210. pclk is 5MHz PCONP has default value:0x7FFFE; I add following code before start PWM:...

Hi all, I try to use PWM2 on LPC2210. pclk is 5MHz PCONP has default value:0x7FFFE; I add following code before start PWM: REG(PINSEL0)=0x800A8005;/*Set p0.7, p0.8, and p0.9 as PWM2, PWM4, PWM6*/ REG(IO0DIR)|=0x00000380;//set PWM2, PWM4,PWM6 as output


UART0, TC0, PWM & ADC at once on LPC2132

Started by soren_t_hansen in LPC200014 years ago 3 replies

Hi there Im making a system where I'm using all the above mentioned interrupts. I have had the TC0, PWM and the ADC running nicely until...

Hi there Im making a system where I'm using all the above mentioned interrupts. I have had the TC0, PWM and the ADC running nicely until now, but when I add the UART0 the TC0 goes dead (it's running a 1 Khz clock) I want the UART0 to give me interrupts when it receives a byte and only when that occours. When I send data I don't want to receive any


LPC2103 GPIO interfering with PWM

Started by soufeazie in LPC200013 years ago 2 replies

Hello, I am trying to control a small dc motor along with two servos using an LPC2103. I am having a strange problem where the servos go crazy...

Hello, I am trying to control a small dc motor along with two servos using an LPC2103. I am having a strange problem where the servos go crazy when the dc motor is actuated. This dc motor is driven by an h-bridge circuit, so it is controlled with 2 GPIO pins from the microcontroller. I chose pin 8 and pin 9 because it didn't look like they interfered with the pins needed for PWM. Could so...


PWM glitch possible when setting new duty-cycle value?

Started by joconradt in LPC200011 years ago 4 replies

Hi LPC users, I am programming LPC2103 in a motor control application using PWM on timer0. I have set T0_MR3 to specify the cycle length...

Hi LPC users, I am programming LPC2103 in a motor control application using PWM on timer0. I have set T0_MR3 to specify the cycle length (let's say 1000 timer ticks) and I am using T0_MR2 to specify the duty cycle for the motor output on Mat0.2 (P0.16). That all works well Smile I am concerned about the following scenario: the motor is set to a duty cycle of 700, but I want to reduce the...


pwm question

Started by aaajbell in LPC200012 years ago 6 replies

Hello, I want to implement a PWM on an ARM2103 from Futurelec.com which can perform a leap tick algorithm for more precise control of...

Hello, I want to implement a PWM on an ARM2103 from Futurelec.com which can perform a leap tick algorithm for more precise control of frequency around 42800Hz. (Longer term, I'll want to vary the frequency in small increments of about 1/10Hz around 42800Hz and also vary the duty cycle) The leap tick algorithm I want to use approximates a frequency much like we use days to measure the yearl...


LPC2xxx ARMwizard v1.4 freeware applicaton to setup the mcu registers (update)

Started by Alex in LPC20009 years ago 3 replies

ARMwizard updated to version 1.4 What is new a.. Added the PWM settings tab to set all the registers of pulse width modulation b.. The...

ARMwizard updated to version 1.4 What is new a.. Added the PWM settings tab to set all the registers of pulse width modulation b.. The last loaded configuration file (.sav) is stored and used as default path/name when you restart the application and press load configuration. [Simon B.] c.. The PR register of Timers, MR0 register of PWM and CLKDIV of ADC have a right click function to...


Dead time insertion - LPC213XX PWM

Started by Mukund Deshmukh in LPC200011 years ago 26 replies

Dear All, I have created 3 PWM sine wave outputs on LPC2136. Any idea how to create 3 more complimentary output with dead time insertion from...

Dear All, I have created 3 PWM sine wave outputs on LPC2136. Any idea how to create 3 more complimentary output with dead time insertion from driving a 3 phase MOSFET bridge? Warm Regards, Mukund Deshmukh, Beta Computronics Pvt Ltd. 10/1 IT Park, Parsodi, Nagpur -440022 India. Web site - http://betacomp.com Meet us at Booth I102, Taipei PLAS 2008, Sept 18-22 , Taiwan. ----------...