Author Topic: Axon - I need an Example Source Code of PWM !  (Read 1854 times)

0 Members and 1 Guest are viewing this topic.

Offline Hasan999Topic starter

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 1
Axon - I need an Example Source Code of PWM !
« 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 !
« Last Edit: December 24, 2009, 04:37:48 PM by Hasan999 »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,585
  • Helpful? 169
    • Society of Robots
Re: Axon - I need an Example Source Code of PWM !
« Reply #1 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.

 

Related Topics

  Subject / Started by Replies Last post
7 Replies
3010 Views
Last post February 09, 2009, 09:17:11 PM
by Admin
16 Replies
3658 Views
Last post August 21, 2009, 07:04:28 PM
by PhilG
0 Replies
1028 Views
Last post October 20, 2009, 07:46:43 PM
by Admin
3 Replies
855 Views
Last post April 03, 2010, 08:23:29 PM
by Admin


Get Your Ad Here