Driving my hexapod servos using STAMP and PSCU

Hi - I'm coming back to Stamp after quite a while away, and obviously a lot has changed! - but what has not is my being an ignoramus !

I'm working with an old Propeller Servo control unit (PSCU), which I'm just starting to find my way around coupled to my trusty stamp board of education (Incidental to my question does anyone know how I can get another? - looks like this little chap is discontinued )

I can happily make my servo controller pick up commands to move a servo, but what I really want to do is to control a 12 servo hexapod of my own devising. this means sending a lot of specific servo sequences. each of 12 servos needs to be controlled in one of 3 states (back forward centre) for each stage of the walk. potentially this makes for a string of subroutines and a lot of messy coding.

Is there a way to control variables according to some sort of data string ? - my thought is to define 12 variables for each servo corresponding to each of the 3 states. In this way I could control each servo using the same loop of code, by simply reading a string of data which sets variables.

e.g. if the numeric is the servo and the letter is B-back f-forward c - ctr. then 1,b,2,f etc. would be read to set servo one back and servo 2, but the next time the string is modified 1,f,2,b which would be read to reverse the process. Sample code would be brilliant !


The hexapod is half built at the moment, but looking good - see the picture - my intent for later phases is to expand to a 3DOF leg with 18 servos hence my desire for another PSCU - the alternative is to use the arduino equivalent I guess, but not sure how to drive that from my Stamp.