LPC17XX PWM iSSUE

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC17XX PWM iSSUE

503 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wilbur He on Sun Mar 01 07:33:57 MST 2015
Hi all, I have met some problem on using PWM to control the servo. I have defined two functions which is servo1turn and servo2turn, however i can't my them run properly at the same time
but if I delete one, the other one will work.

How should I solve this? add a delay? (but I don't want to add too much delay in my program)


ps: the code in servoturn is just the configuration of the pwm pins, for servo1 I used MR2, for servo2 I used MR3
Labels (1)
0 Kudos
5 Replies

473 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wilbur He on Sun Mar 01 08:09:54 MST 2015
~
0 Kudos

473 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wilbur He on Sun Mar 01 08:08:31 MST 2015
Problem Solved!! I should be more careful about the same mistake i made few days ago when I wrote the servoturn code today. Thank you very much!!!
0 Kudos

473 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sun Mar 01 07:57:08 MST 2015

Quote: Wilbur He
the last problem few days ago is because my pwm configuration had a mistake. today's problem is I can't put them in the main like I posted above



:D

Unfortunately it's the same problem  :((

Your second init function is deleting your first init function setup  :)

So the issue is still: setting and deleting bits  :O
0 Kudos

473 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Wilbur He on Sun Mar 01 07:44:33 MST 2015
the last problem few days ago is because my pwm configuration had a mistake. today's problem is I can't put them in the main like I posted above
0 Kudos

473 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sun Mar 01 07:41:01 MST 2015
Is this the same issue as in your other thread?

http://www.lpcware.com/content/forum/pwm-cannot-run-same-time
0 Kudos