i3dm:
i understand what you mean. yes im chaging the data to sbus2 format.
lets assume i need to read 50 bytes into a buffer into ardu1 and send that buffer to ardu2. how complicated is that via spi? perhaps should consider i2c?
had a thought about your porblem and I think you might just be able to be able to achive what you whant to do using the software serial (AltSoftSerial lib) as medium to transfer data between the arduinos.
in pseudo code I would try something like this:
/////////ardu1 (RC jet turbine (serial 9 bit 100k))
union {
uint16_t in;
uint8_t bytes[2];
} data;
//initialise 9 bit hw serial
Serial90.begin(100000);
//initialise AltSoftSerial
altSerial.begin(19200);
if(Serial90.available()){
//read incoming data
data.in = Serial90.read();
//transmit data to ardu2
altSerial.write(data.bytes[1]&0x01); //to send only 9th bit
altSerial.write(data.bytes[0]);
}
/////////ardu2 (futaba Sbus2 (serial 8 bit 100k).)
union {
uint16_t in;
uint8_t bytes[2];
} data;
//initialise hw Serial
Serial.begin(100000, SERIAL_8E2); //SBUS uses inverted serial logic with baud rate of 100000, 8 data bits, even parity bit, and 2 stop bits. will need additional hw for inverting logic
//initialise AltSoftSerial
altSerial.begin(19200);
if(altSerial.available()){
//read incoming data
data.bytes[1] = altSerial.read();
data.bytes[0] = altSerial.read();
//re-package 'data.in' for Sbus2 transmit
//
//
//output data onto Sbus2 bus
Serial.write(Sbus2_data);
}
be aware that with this pseudo code you may face some syncing issues as the RX ardu2 has no means of determining whether the FIRST data its receiving is 'byte[0]' or 'byte[1]' (you would face the same challenge with other transfer media as well btw!) but there are ways to fixing that...