Concern with not being able to use all 16 servos on the PSC board
I noticed that even though you can connect 16 servos to the PSC board while using a BS2px chip you are limited to the amount of word memory you can use.
I tried a program with 16 servos and set a Word variable to each servo and I ran out of space!· Since you need numbers in the range of 250 to 1200 how are you suppost to do this?
How do you set variables in the WORD range·and get·use·of all 16 servos when you are limited in·memory usage.
How do you get around this problem?
Thanks in advance!
Joe··
I tried a program with 16 servos and set a Word variable to each servo and I ran out of space!· Since you need numbers in the range of 250 to 1200 how are you suppost to do this?
How do you set variables in the WORD range·and get·use·of all 16 servos when you are limited in·memory usage.
How do you get around this problem?
Thanks in advance!
Joe··
Comments
·· This has been addressed several times in the past, and it all boils down to not needing a different variable for each servo.· In fact it is possible to use one variable for all 16 servos.· It really depends on how you go about it.· If you need the positions of all the servos in RAM for each servo you could also use the BS2px ScratchPad RAM.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
·· I don't have any pre-existing code as an example, since I have never had to control quite that many servos, but I can certainly elaborate on what I mean.· The closest thing I can compare to would be the Hex Crawler, which, by default has 12 servos and 14 with the Pan/Tilt assembly.
·· In this situation each leg is really only going to have a fixed set of paths for the motions it will use when walking (gait).· These can be set as constants, and then the data sent, one byte at a time to the PSC using the same Work variable.· This is commonly done when more than one servo uses the same basic motions.· Each leg is updated based on the current direction of the leg.· You would need one or two more variables for this routine for tracking which servo was being updated and possibly for speed or offset changes, but you don't need 12 Word variables.· I hope this information helps.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
· PUT (servoChan * 2), Word servoPos
And to retrieve it:
· GET (servoChan * 2), Word servoPos
In your program then, you'd have two working variables: servoChan (a Nib), and servoPos (a Word).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
http://forums.parallax.com/forums/default.aspx?f=10&m=67901