Unable to C-code futaba RS301CR motors controlled by a pic 18F4520

rs301cr-302cd-manual.pdf (614790Bytes)

I've been trying to make a haptic glove controlled robot hand. The motors used to control the robot hand are Futaba RS301CR motors and are to be controlled using a pic.18F4520 . However my experience in coding is very limited, so i havent been able to figure the C code to initialize control for the motors.

motors: futaba RS301CR

 I have attached the datasheet for the motors. Would appreciate help with the coding or any other helpful information.

datasheet, rs485

according to the datasheet you provided the servo works off the rs485 protocol. if you read the data sheet it details the RS485 protocol instruction to use to assign servo ID. if you work out how to apply the RS485 protocol you can use the commands it gives you to move and address the servo.

I think you need to explain

I think you need to explain more about your design. I looked at the manual, and these servos (they are not simple motors) speak a data communications protocol based on RS485. They are designed to be used in conjuction with a controller (Futaba RPU-10). The RPU-10 provides an RS232 interface you a computer, and translates to the RS485 protocol to talk to the servos. If you are talking to more than one servo, you will need some sort of relay box to connect them all.

Do you have the RPU-10? If not, you will have to look up the RS485 protocol, understand the required logic levels and rules of communication, and create a circuit to interface to your servos.

Whether you have the RPU-10 or not, the communications required to control your servo are described in the manual. These are the rules you will have to follow with your code in order to send commands to and receive data from your servos. This is fairly sophisticated stuff, and you say that your experience with coding is very limited. Are you sure you haven’t bitten off more than you can chew?

thanx

i was waiting for proper responses besfore i gave more detail. i’m using a RS485 developer from mikroelektronika to send teh commands to the motors. i’vechecked the rs485 developer and it works fine. just that the mtos are pretty complex. il post the code later on. still trying to see if i can get it to work.

thanx :slight_smile: