Multi servo interrupt program in Mikro Basic converting to PBP


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: Multi servo interrupt program in Mikro Basic converting to PBP

    the original code cycles through 8 servos 2.5ms at a time to give a refresh rate for each servo of 2.5*8 ms (20ms) , the standard servo refresh rate.
    won't your code of 1 servo try to refresh every 2.5 ms ------ the servo won't like that.
    also the flakey timing of oninterrupt will probably give you a twitchy servo .
    dt ints would be more stable
    4mhz won't allow for much resolution for servo commands too, I seem to recall dismal results from similar efforts years ago a twitchy servo is apitb

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Multi servo interrupt program in Mikro Basic converting to PBP

    I am experimenting with this version that uses ccp1 and ccp2. It works really well. It can run 8 servos with a 1uS resolution at 8mhz. What I found important is using a separate power supply for the motors and the pic. Once I started loading the motors, the current could spike over 1 amp and this was resetting the pic and or feeding back into the adc. This caused twitchy and erratic movements.

    The code in this link will not compile until you add a underscore to the variable in the assembly line. I hope to also port this to PBP

    http://www.mikroe.com/forum/viewtopi...7&hilit=+servo

Similar Threads

  1. Mikro Elektronika Basic and PBP
    By queenidog in forum mel PIC BASIC
    Replies: 5
    Last Post: - 24th May 2013, 00:26
  2. Multi timer interrupt question
    By Hylan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th December 2012, 22:27
  3. help converting assembely program
    By ahmed_salah in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 7th August 2008, 15:28
  4. converting assemble to pic basic pro
    By Jhdgkss in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 30th April 2006, 19:55
  5. Multi Interrupt How To ?
    By capitano in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd February 2005, 14:48

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts