Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
lpc1768 motor control pwm example
#1

MCPWM in LPC17xx Motor Control PWM can be used to control AC and DC motors. It can also be used for many other purposes which require timing, counting, comparing or capturing. The MCPWM is used for generating audio signals in the 2d game console as the general PWM is used for color generation. And I will be discussing as to how it works and how to initialize it.

There are 3 MCPWM channels in LPC1768. Each channel contains its own 32-bit timer, 32-bit Limit register, 32-bit Match register, 10-bit deadtime register and 32-bit capture register. And there will be two output pins for each channel named A and B. The A and B outputs will be complementary to each other. Here the Limit register sets the TOP value of the timer. Hence the timer counts from 0 to the Limit value. So one can set the PWM frequency by choosing a correct prescaler (clock frequency divider) and the limit value.

There are two modes, one is edge aligned and the other is center aligned mode. In edge aligned mode, the timer will count upwards from 0 to limit and goes back to 0 and the output toggles when the timer value matches with the match register or the limit register. In center aligned mode, the timer will count upwards from 0 to limit and then counts downward from limit to 0 and the output toggles only when the timer value matches the match register value. If you are looking for a phase correct mode, then you should use center aligned mode.

You can even set the passive polarity of the output. If you select passive polarity state as LOW, then the MCPWM output signal will be LOW until the timer value matches the match register value and will be HIGH from the time when match occurs till the timer value matches the limit register value. If the polarity state is selected as HIGH, then the reverse will happen.
Reply

#2

Hi am DEVAN i would like to get details on lpc1768 motor control pwm example My friend Mr.Rajan said lpc1768 motor control pwm example will be available here and now i am living at CHENNAI and i last studied in the college of RAJALAKSHMI COLLEGE OF Engineering ..and now am working as R & D Engineer I need help on MOTOR CONTROL APPLICATION USING LPC1768 PWM PORTS WITH CKTS
Reply



[-]
Quick Reply

Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.