Serout to serial servo


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Joe and I must be good!!! You went from not being able to make an LED blink to having the leg move very quickly

    Take a look at the flow of your code.

    I see it GOSUBing right to END. I do not see any place that LOOPs.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    49


    Did you find this post helpful? Yes | No

    Default

    The code is for the left and right leg. I am using gosub to make the leg move in different angle.
    I am not sure either this is the correct way but I am just trying a lot of time to makes thing correct.

    The angle of the leg move up to gosub R2a then it stall. The servo is holding the position and not moving to other angle.

    Am I doing the right thing?

    One more thing. I got this when I compiled the code -

    Warn Isobot1.ASM 893 :[102] code cross bounadry @800h
    Warn Isobot1.ASM 1549 :[102] code cross bounadry @1000h


    What is that mean.
    Last edited by azmax100; - 30th July 2009 at 03:06.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    One of your questions and maybe future questions is answered here.
    http://www.picbasic.co.uk/forum/showthread.php?t=11116

    your code.

    If that is just the leg routine and you have more then I do not see a problem there. And with it only getting part way through it....

    Kind of sounds like it good be a power supply problem causing a brown out. Can you monitor the voltage coming into the PIC? Maybe add if you do not have one a capacitor or two between VSS and VDD.

    At this point a schematic, configs and the whole code might help us figure it out. I am guessing you did rewrite this as Joe suggested and loose the BS2 stuff?
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I am guessing you did rewrite this as Joe suggested and loose the BS2 stuff?
    He didn't remove the include "BS2 stuff" and replace it with include "modedefs.bas" but he is using PBP nomenclature now. He is getting there.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I glossed over the part about being a trouble. Everything Joe said and I will add...
    Pick a subject that you " think" you know. Then find someone that wants to learn it. Try teaching them or help them with a problem. You will quickly find out how much you really know. May not be as much as you thought.

    For me this forum is a learning tool. So keep trying new things and share your problems.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    49


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Sorry for late reply.

    I check the batteries in fact I fully charge it and try it again with additional
    main: in the code but the problem remain the same.

    Actually I am hacking an Isobot Robot.

    Here's the video:

    By the way thanks to all who answered to this forum.

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by azmax100 View Post
    Hi,


    Actually I am hacking an Isobot Robot.

    Here's the video:

    By the way thanks to all who answered to this forum.
    Hey isn't that Michael Jackson ? looks like it's ready to do some Kung Foo . . ., teach that thing to moonwalk . . . What was the problem again? Oh yeah, servo stalls. Maybe it is losing the data connection when it goes into those antics, bad wire, bad connection . . . Try enabling WDT in case micro is locking up. You have a lot of PAUSE 1000 in your code. I would change them to for next loops, or better yet make a subroutine for next with say 0 to 100 pause 10 and when you move on to using interrupts your code will respond much faster. In thinking about it, I would move those serial routines to use HSEROUT and hardware serial routines, instead of all those bit banging serout2 commands.
    Last edited by Archangel; - 7th August 2009 at 17:57.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. serial ports, the servo control.
    By m.nobre in forum Serial
    Replies: 0
    Last Post: - 7th December 2009, 16:16
  3. More Servo Woes
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 13th May 2009, 08:40
  4. Serial Servo Spider
    By gandora in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st May 2007, 06:48
  5. Keypad unlock (as in garage door possibly)
    By Fred in forum Code Examples
    Replies: 5
    Last Post: - 2nd April 2006, 04:26

Members who have read this thread : 1

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

Posting Permissions

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