Any one used the axe031 servo driver

Denzel

Senior Member
I mentioned a while back that I decided to use the axe031 servo driver for my project...
Im new to the one wire bus and the whole i2c commands.
The problem I am having is that the servos will not goto the centre even though the supplied code:

i2cslave $c2, i2cslow, i2cbyte
writei2c 63, (128)
writei2c 64, (128)
writei2c 65, (128)
stop

does not make the servos goto the centre. I understand that many servos vary and that this is a common error however the servos will not go to their left or right limits. To be honest im just really really confused and Ive tried a lot of things.

Ive tried increasing the position of the servo by 1 so that it inches its way from left to right however at a certain point a long way before its internal stops it stops and goes back to the other end.

here is the code im using...

symbol servo1 = 63 'base register servo 1
symbol servo1p = 85 'positive register servo 1
symbol servo1n = 105 'negative register servo 1
symbol offset = 50
symbol base = w1

main:
i2cslave $c2, i2cslow,i2cbyte
writei2c servo1,(base)
pause 1000
do
debug
base = base + 5
writei2c servo1,(base)
loop

and here is the data sheet...
http://www.robot-electronics.co.uk/htm/sd21tech.htm

thanks
 

100317

New Member
I have briefly checked the link. I noticed that you always use 'writei2c servo1, (base)'. In my opinion you must use either 'writei2c servo1p,(base)' (positively) or 'Writei2c servo1n,(base)' (negatively).

Regards,
Hans
 

Technical

Technical Support
Staff member
You've defined base as a word variable, but you can only send a byte to register 63. At some point it will overflow.

Don't worry about the offset registers to start with, just use:
writei2c servo1,(0)
for maximum one side
writei2c servo1,(255)
for other side
writei2c servo1,(128)
the middle

If these do not work there must be a hardware issue somewhere.
 

Denzel

Senior Member
well...

When I use that code. the servo seems to want to run past its internal stops at 0 and doesn't go the full length at 255. and therefore the center position is not 128.
but I will continue playing none the less
thanks
 
Top