Does anyone have any idea how to get this to run for me on my system?

I cannot just copy and past the code.  I would like to see it work...I have a simulator for the servos. 

Posted on 2008-07-23 19:23:00 by cannsyl
This code is for a PIC microcontroller, this is not x86 assembler and will certainly not run on your PC with a "copy and paste". You will first need a cross-compiler for what looks like it's probably a PIC16F684 from the mnemonics used, then an emulator to run the resulting program. MPLAB is a good place to start...

Posted on 2008-07-23 22:02:49 by donkey
Yep, MPLAB rawks :)
Posted on 2008-07-24 02:30:26 by Homer
could someone comment the code a bit more so that I can understand exactly what is going on?  I know it has some comments, but like what part works which servo and how?  I know there are 12 servos, but I don't know what they are doing when.  thanks for any ideas.
Posted on 2008-07-24 21:15:24 by cannsyl
The PWD_BASE and all PWD_ stuff after it (till 0x32) is used by the program as public global variables (each is byte-sized).
A table of constants is kept in EEPROM (address 0x2100).

After that, everything is completely commented.

Make no illusions that you can understand PIC sourcecode completely for a given chip, unless you've read the WHOLE datasheet.
Oh well, as starters, line-by-line search what the opcode in the current line does, then search the pdf for the meaning of special addresses used. For instance, to understand the line "movwf TMR0", see what the movwf does, and then... read EVERYTHING related to TMR0. It'll be the whole "Timers/watchdogs" section !! Then specifically search for the initial-state of the TMR0 register, and look at the circuitry that relies on it (to see what other special-registers need to be set).

If you're developing something on your own, really make sure you've read the whole datasheet, as there are numerous tiny gotchas: initial pin state/mode on reset, required special-registers to set-up the whole circuitry-network of a pin/feature to work the way you want, bank-selection (know where your RAM data is), ... Reading the whole whitepaper can save you some hair-tearing when things just don't work ^^" .
Posted on 2008-07-28 07:51:57 by Ultrano