RX-64 and Arduino

Hi guys,

I found old post on old forum on connecting and an RX-64 to arduino uno using a 485 driver chip. (http://arduino.cc/forum/index.php/topic,22674.0.html). When I power up the RX-64 it flickers which is normal so it seems ok. Furthermore a friend of mine once used it with the USB2Dynamixel.

I want to make my own controller with the 485 driver chip as mentioned in the old topic. I used the same setup like in the old post (with chip SN75176BP). Connected arduino and RX-64 to commen input source 13 Volts (I tried feeding arduino with USB jack too, same results).

I've been testing the chip SN75176BP by sending and receiving bits, this worked. I've been testing with sending single bytes too, and the chip seems to send and receive the bytes well.

Next I try to lighten the LED of the RX-64. Problem: I got the RX-64 from a friend, ID and BaudRate saved in EEPROM are unknown. I used the ID 0xFE which is broadcasting so I bypass the unknown ID. The baudrate is still unknown, I tried the standard ones as well as less standard ones, no result. I simply can't manage to set up any communication.

Anyone who has a magic hint? It would be a great help guys. I hope I described my problem good enough. Picture below setup (sorry for bad quality) and my code.

Thanks a lot in advance,
Kind regards
G

// Define/preallocate parameters
int i = 0;
byte startAddress;
byte servoID= 0xfe; //0xfe which is broadcast mode
byte ledOn = 0x01;
byte ledOff = 0x00;

//_______________________________________//
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// Run setup Function
void setup() {
Serial.begin(57600);
Serial.flush();
pinMode(2,OUTPUT);
digitalWrite(2,LOW);
}

//___________________________________________________________________
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// Run main Function
void loop() {
delay(10);
activateServos(servoID, ledOn);
delay(1000);
activateServos(servoID, ledOff);
delay(1000);
}

//_____________________________________________________//%%%%%%%%%%%%%%%%%%%%%%%

//Function Definitions
//___________________________________________________________________
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%

void activateServos (byte servoID, byte newValue){
startAddress = 0X19; // Turning on led
int checksum_ACK;
byte notchecksum;
byte reading;

checksum_ACK = servoID + 0x04 + 0x03 + startAddress + newValue;
notchecksum = ~checksum_ACK;
digitalWrite(2,HIGH); // Notify max485 transciever to accept tx
delay(50); // Allow this to take effect
Serial.write(byte(0xFF)); // 1.These 2 bytes are 'start message'
Serial.write(byte(0xFF)); // 2.These 2 bytes are 'start message'
Serial.write(servoID); // 3.Address 1 is target servo or 0xfe which is broadcast mode
Serial.write(byte(0x04)); // 4.Length of string
Serial.write(byte(0x03)); // 5.Ping read write or syncwrite 0x01,2,3,83
Serial.write(startAddress); // 6.Start address for data to be written
Serial.write(newValue); // 7.Turning on signal
Serial.write(notchecksum); //8. the notchecksum
delay(100); // allow last byte to go through
digitalWrite(2,LOW);
}

Snapshot_20120301_4.JPG

No magic hints? :slight_smile: