Society of Robots - Robot Forum

Software => Software => Topic started by: Hasan999 on December 24, 2009, 04:33:41 PM

Title: Axon - I need an Example Source Code of PWM !
Post by: Hasan999 on December 24, 2009, 04:33:41 PM
After 6 hours of messing around with PWM... I still can't figure out how to control different Servo's simultaneously.

I can rotate the servo using:

PWM_timer3_Set_E4(1500);
delay_ms(1000);

BUT that 1500 is not 1.5ms center... its all messed up, I was just different values there to get some logic out of it.. but !!!!!!! nevermind...

I really need to see some sample Code for example a Biped? or Robotic Arm? using PWM etc to control the Servos.

Sheesh, why is it so complicated ???...why not "THIS CODE" for this "microcontroller and servo"  ???

(im using Axon Microcontroller (16MHz) and using HS-422 Servo)

Thanks a lot in advance  :(

EDIT: Also, pls let me know, when to use delay_cycles(); and delay_ms(); ?...what exactly is delay_cycles?
Thanks !
Title: Re: Axon - I need an Example Source Code of PWM !
Post by: Admin on December 26, 2009, 12:30:03 AM
If you search the forum, and even look at the Axon examples page, you'll find a lot of PWM code examples.

That being said, have you looked into WebbotLib? It'll make life easier for you I think.