Forum: µC & Digital Electronics LPC 2129 PWM problem

Author: Anand B. (Company: Self) (abhavikatti)
Posted on:
Attached files:

Rate this post
0 useful
not useful
Hi all

I am working on single edge PWM generation on LPC 2129 .The summary o my 
work is as below

1)I am able to see PWM output on Pin 33(PWM 4).it is as per my clock 
settings.No problem still here.

2)In the PWM ISR,I am setting 2 flags and in the main loop of the code 
,and based on these flag values I am dynamically changing PWM4 rate by 
changing PWMMR0 ;PWMMR4 PWMLER registers.

3)These above mentioned changes are not reflected in the scope output.I 
dont see my modified rate settings on the scope.

Attached is the code.Please help me.


Author: Anand B. (Company: Self) (abhavikatti)
Posted on:

Rate this post
1 useful
not useful
The stuff is working fine. I have to use volatile qualifiers for flags 
used in ISR and in  main loop.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.