Society of Robots - Robot Forum
Software => Software => Topic started by: Alhazar on July 30, 2008, 09:41:25 PM
-
I am planning on building a omni bot and was looking at this page. The source at the bottom is for PIC is there a way to decompile it and load it onto an axon?
-
There's no source posted :) There's also no link posted.
Anyway, you can decompile it, but you'll get assembly code.. As long as it uses no hardware functions (PWM, timers, interrupts) it can be ported manually to the AVR platform. With a lot of knowledge of both platforms, you can probably also port the hardware functions.
I've done it once, and it was the last time I will attempt such an endeavour.
-
Opps forgot to add the links Page http://www.societyofrobots.com/robot_omni_wheel.shtml Source http://www.societyofrobots.com/downloads/fuzzy_C_source_code.zip
-
That's C dude. No decompiling needed, just porting.
I was talking about a hex level port.
-
i didnt have visual studio on this system i was browsing on my ppc and couldnt open the file my bad
-
You don't need Visual Studio to open C code for PIC.
Any editor such as VIM would do. What you need is a compiler, actually.
-
Just study the file fuzzy.c for a bit until it makes sense.
If I remember right, the code was written so that I give it three control variables:
maximum servo speed
robot rotational speed (about its axis)
angle to translate to (move straight or sideways)
There is also a trig lookup table. The Axon also has a lookup table in SoR_utils.h, but its mostly untested.
-
i've been looking thought the code and jsp2_Util_fuz.h is including 3 headers that weren't in the zip file, 16f877.h and adc.h which i got off of online but its also calling for a 877reg.h but i cant seem to find that file or references to it using google at all....
-
are you going to be using an avr?
some of those your refering to may be pic specific
-
I was using bloodshed, i dl'd avr but havent played with it yet. i found the 2 others just cant find the 877reg.h
I installed AVR and did a search for the 877reg.h file but found nothing.
-
no i mean what mcu will you be using?
atmega?
16f877.h and 877reg.h are pic specific you wont find them around avr stuff
to get all the avr files download avrlib
-
877reg.h is just for PIC's and doesn't contain any algorithms specific for omni-wheel robots.
I've attached the files.
-
Ok, i was just curious as to what was all in it Thanks ^_^