3 phase sine wave PWM generation from LPC2148

Started by blue...@gmail.com in LPC20007 years ago 1 reply

i am using lpc2148,MCB2140 board from keil.com to generate 3 phase sine pwm to drive a Smart power module... but i am not been able to provide...

i am using lpc2148,MCB2140 board from keil.com to generate 3 phase sine pwm to drive a Smart power module... but i am not been able to provide the exact type of sine wave pwm with phase shift of 120 deg,and 240 deg respectively with the help of software programming,can anybody help me with this thing,i am actually totally new to this field but i tried to write a program myself to do it.. also he...


ADC & PWM

Started by Ravi in LPC200011 years ago

Hi all CPU=3DLPC2148 crystal =3D 12 Mhz PLL =3D 4 Following pgm I wrote to get PWM freq 1.2 Khz, but it is generating=20 1.5 Khz, with...

Hi all CPU=3DLPC2148 crystal =3D 12 Mhz PLL =3D 4 Following pgm I wrote to get PWM freq 1.2 Khz, but it is generating=20 1.5 Khz, with correct duty cycle of 50%. I want ADC should start conversion after start of each PWM cycle (after matching MR0) but when I measure freq across LED I get 750 Hz with duty cycle 50% Can anyone help me Thanx in advance int main (void) {=09 VPBDIV =3D...


PWM example?

Started by volodymyr_tymchyshyn in LPC200015 years ago 1 reply

Can somebody post the sample code on how to setup PWM. LPC documentation is not very clear. Thanks! ...

Can somebody post the sample code on how to setup PWM. LPC documentation is not very clear. Thanks!


PWM, change frequency during runtime

Started by tomfeller69 in LPC200014 years ago 3 replies

Hi I have a question about the PWMPR Register (frequency, LPC2292). To generate a ramp for an stepper motor, i want change the...

Hi I have a question about the PWMPR Register (frequency, LPC2292). To generate a ramp for an stepper motor, i want change the frequency during the runtime of the PWM. The Question is: When i change the PWMPR to another value when the PWM is enabled, at which state/time is the new PWMPR active ? Thanks & best regards


PWM issue with LPC2366

Started by zvonkobharije in LPC200011 years ago 1 reply

I'm setting up PWM to make a simple AFSK modem. Though I think i'm initializing PWM the right way, but there's no output. Here's the...

I'm setting up PWM to make a simple AFSK modem. Though I think i'm initializing PWM the right way, but there's no output. Here's the code: PCONP |= PCONP_PCPWM1; // turn it on! PCLKSEL1 &= ~(BIT(13) | BIT(12)); // pclk = cclk PCLKSEL1 |= BIT(12); PINSEL4 &= ~(BIT(1) | BIT(0)); // set GPIO P2.0 to PWM1.1 PINSEL4 |= BIT(0); // set GPIO P2.0 to PWM1.1 PWM1TCR = PWM1TCR_Cou...


capture pwm missing

Started by dasb...@... in LPC200014 years ago 1 reply

Hello group, I have one problem in capture of PWM, i.e, sometimes exist missing the capture of PWM. I'm using the LPC2129!! My...

Hello group, I have one problem in capture of PWM, i.e, sometimes exist missing the capture of PWM. I'm using the LPC2129!! My interrupt function is the following void capture (void) { if(T1IR & TIR_CR0I){ //interrupt no chanel0 (eixo dos xx) T1IR = TIR_CR0I; acel_cap_eixo_x()


Synchronising timer output and assembly code

Started by conhalk in LPC200014 years ago

Hello, I am using the lpc2138 and i read an external port while a timer and the PWM output two waveforms like this timer: _ _ _ _ ...

Hello, I am using the lpc2138 and i read an external port while a timer and the PWM output two waveforms like this timer: _ _ _ _ _| |_| |_| |_| |_| pwm: _ _ _| |_____| |_____| this code section is written in assembly, and timer and pwm are reset as shown below so that the waveforms and code can be PERFECTE


4 x phase shift PWM modulation with LPC2138

Started by xoldikx in LPC20009 years ago 2 replies

Hello to all, Im still newbie here, I need help with PWM modulation on LPC2138. I want to riding stepper motor, I have a driver L6203, in one...

Hello to all, Im still newbie here, I need help with PWM modulation on LPC2138. I want to riding stepper motor, I have a driver L6203, in one piece of this driver there are 2 transistors, so I need 2 this drivers to riding one motor. But I want to ride motor as unipolar, so I need 4 double edge controlled pwm chanels, but procesor allow only 3 double edged controlled chanels. When I use sing...


PWM on LPC2103 w/o interrupt

Started by "r. w." in LPC200013 years ago 3 replies

Hello, I try to implement on the LPC2103 a PWM with the auxiliary match register 3 as recommended in the user manual. But I do not want to...

Hello, I try to implement on the LPC2103 a PWM with the auxiliary match register 3 as recommended in the user manual. But I do not want to use an interrupt routine for that. How can this done? Does anybody have an example which can be shared or "a more detailed how to"? Thank you ..richard


PWM generation

Started by santosh pn in LPC20008 years ago 2 replies

Hi, Can anyone help me with some sample code generate pwm signal on P1_21 for LPC-2468 .... Thanks in advance, S Love To Live Live ...

Hi, Can anyone help me with some sample code generate pwm signal on P1_21 for LPC-2468 .... Thanks in advance, S Love To Live Live To Love PN


Three Phase control

Started by Todd Gilbert in LPC20009 years ago 1 reply
PWM

The LPX2364/65/66/67/68 Product data sheet has this bulleted text: "One PWM/timer block with support for three-phase motor control." How is this...

The LPX2364/65/66/67/68 Product data sheet has this bulleted text: "One PWM/timer block with support for three-phase motor control." How is this accomplished in the PWM code? I've yet to find an example. ------------------------------------


LPC1768 : RS485 and PWM1 do not work together ?

Started by Fabian in LPC20008 years ago 2 replies
PWM

Hi everybody, just before trying it, could you confirm me that is possible to do working RS485 function and PWM function in same times on...

Hi everybody, just before trying it, could you confirm me that is possible to do working RS485 function and PWM function in same times on the port 2 ? P2.0 and P2.1 for RS485 P2.3 for a pwm or may be this functions are mutually exclusive ? Thanks a lot Fabian ------------------------------------


PWM isr

Started by icapapindi in LPC200013 years ago 1 reply
PWM

Hi !! I'm trying to generate a PWM interrupt on match MR0 with this code: PCB_PINSEL0 |= 0x00028000; GPIO0_IODIR = 0x00008000; ...

Hi !! I'm trying to generate a PWM interrupt on match MR0 with this code: PCB_PINSEL0 |= 0x00028000; GPIO0_IODIR = 0x00008000; GPIO0_IOSET = 0x00008000; VICVectAddr8 = (unsigned)IRQ_Routine; VICVectCntl8 = 0x00000028; VICIntEnable = 0x00000100; PCB_PINSEL0 |= 0x00028008; PWM_PR = 0x00000000; ...


LPC2138 timer config for Full bridge phase control ..

Started by donwillwonthe in LPC200014 years ago

Anybody tried this ?? I've looked at it and it seems its theoretically impossible. It seems one can get all the channels but no means of...

Anybody tried this ?? I've looked at it and it seems its theoretically impossible. It seems one can get all the channels but no means of inserting phase slip between the two PWM channels. But Im often wrong - all these 6 nice PWM channels - must be good for something ? Rgds Don


PWM on Mat3_0 HELP

Started by Gigi in LPC200012 years ago 1 reply

Hello, I would use a Pin P0_21 of a Lpc2103 as a PWM output I have write any code but it not work! can anyone help me i do not see the...

Hello, I would use a Pin P0_21 of a Lpc2103 as a PWM output I have write any code but it not work! can anyone help me i do not see the error... this is my code int main(void) { VPBDIV = 0x00000002; PINSEL1 |= 0x00000800; T3PR = 0x0000001E; T3TCR = 0x00000002; T3MCR = 0x00000600; T3MR3 = 0x00000101; ...


R: Re: PWM

Started by Fabio Filippa in LPC200012 years ago

Well, I've not do such application but if I've understand you like to change the duty-cycle of the PWM output wave accordling to some...

Well, I've not do such application but if I've understand you like to change the duty-cycle of the PWM output wave accordling to some sinewave rule. If this is your work I can think as a first try to set a timer and scan a look-up table builded with values that following the sinewave fashion. =20 Just my 2 cents, don't know in detail your application then I can't do more precise thinking ab...


PWM on LPC24xx

Started by Herbert Demmel in LPC200011 years ago 3 replies

Hi, I seem to have problems to understand the PWM (although it's not the first time I've set one up for the LPC2xxx family). I run the uC...

Hi, I seem to have problems to understand the PWM (although it's not the first time I've set one up for the LPC2xxx family). I run the uC with 72MHz and have set the PCLK for PWM0 to divide by 8. So I would expect to get a 300 Hz signal (with a duty cycle of 50%) out of P3.16, but in fact I get 290 (???) Hz, I don't understand why. In the specific case it's not a problem not to have ...


Starting with PWM lpc2148

Started by "ernst.cozijnsen" in LPC200011 years ago 2 replies

Hi All, I'm trying to start with PWM to fade my leds but to be honnest i feel like reading swahili if i go through the manual from the 2148...

Hi All, I'm trying to start with PWM to fade my leds but to be honnest i feel like reading swahili if i go through the manual from the 2148 ;-) I also looked at the code of jcwren butt ehh nope i cannot get any further on this part. The most difficult i find is that i dont really understand how the registers work and i cannot find a good explination abot this. Could somebody provide ...


Using PWM on an LPC2101

Started by rfkd07 in LPC200011 years ago 5 replies

Hey there, unfortunately I have quite some troubles when trying to use PWM on pin P0.8 (MAT2.1) of my LPC2101 controller (without the use...

Hey there, unfortunately I have quite some troubles when trying to use PWM on pin P0.8 (MAT2.1) of my LPC2101 controller (without the use of interrupts). The following code is what I have until now: // Configure P0.8 PINSEL0 &= ~(3 <


PWM and Timer

Started by Charly in LPC200013 years ago 1 reply
PWM

Hi.=20 Have anyone tried to run both PWM and Timer at the same time? pwm0 and timer0 or 1? are there any relatinship between the...

Hi.=20 Have anyone tried to run both PWM and Timer at the same time? pwm0 and timer0 or 1? are there any relatinship between the two=20 functions? any related registers? cw ------------------------ Yahoo! Groups Sponsor --------------------~--> =20 Everything you need is one=A0click away.=A0 Make Yahoo! your home page=A0no= w. http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/dN_tlB/TM