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.
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.
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.
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.
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.
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.
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.
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.
Bookmarks