If you do not activate the debug function, you can use the pins as you want (except pin Rx that must be connected to the inverted SBUS signal)
In order to select other pins and/or in a different sequence, you can do the following:
1) select the arduino pins you want to used and the combination pin/channel
2) Convert the Arduino pin number into a CPU port and bit using the tabel below:
Note : this table is based on schematic from this link
http://arduino.cc/en/uploads/Main/Ardui ... ematic.pdf
pin port bit Hex
Tx D 1 0x02
2 D 2 0x04
3 D 3 0x08
4 D 4 0x10
5 D 5 0x20
6 D 6 0x40
7 D 7 0x80
8 B 0 0x01
9 B 1 0x02
10 B 2 0x04
11 B 3 0x08
12 B 4 0x10
13 B 5 0x20
A0 C 0 0x01
A1 C 1 0x02
A2 C 2 0x04
A3 C 3 0x08
A4 C 4 0x10
A5 C 5 0x20
A6 C 6 0x40
A7 C 7 0x80
3) Each pin being used to control a servo has to be initialised as output and with an initial value = zero.
To do so, change the lines assigning a values to register DDRx (x being B, C, D) and to register PORTx.
Set a 1 in a bit from Register DDRx when the corresponding pin has to be an output (so has to control a servo) and a 0 otherwise.
Instruction looks like DDRB |= 0b00010011 ; It is used to force to 1 (=output) the pins where there is a 1 after the "b" and let the other unchanged.
A register contains 8 bits, bit 0 being the one most to the right, and bit 7 is the one just after the "b".
So e.g. DDRB |= 0b00010011 means that in port B, bit 0, 1, 4 would be as output; it is arduino pins 8, 9 and12.
The intructions about PORTx look like PORTB &= 0b11101100 ; // set PB0, PB1, PB4 to 0
This instruction force to zero each output where the bit is 0. You can see that the 1 and 0 are just reversed compared to the DDRx instruction.
If you want, you could use this instruction instead PORTB &= ~0b00010011 ;
Adding a "~" has for effect that all 0/1 are inverted and so you can use the same value for DDRx and PORTx.
Total there are 4 x 3 = 12 lines to change. Those are the lines that you already changed (for DDRC and PORTC)
4) Then you have to change those lines:
// sequence for frame 1 (arduino pin=PORT) 2=D2 3=D3 4=D4 5=D5 6=D6 7=D7 8=B0 9=B1
static uint8_t servoPin1B[] = { 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x01 , 0x01, 0x02 , 0x02 } ; // each value will toggle a pin
static uint8_t servoPin1C[] = { 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 } ; // each value will toggle a pin
static uint8_t servoPin1D[] = { 0x04 , 0x04 , 0x08 , 0x08 , 0x10 , 0x10 , 0x20 , 0x20 , 0x40 , 0x40 , 0x80 , 0x80 , 0x00 , 0x00 , 0x00 , 0x00 } ; // each value will toggle a pin
// sequence for frame 2 (arduino pin=PORT) A0=C0 A1=C1 A2=C2 A3=C3 A4=C4 A5=C5 Tx=D1 12=B4
static uint8_t servoPin2B[] = { 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x10 , 0x10 } ; // each value will toggle a pin
static uint8_t servoPin2C[] = { 0x01 , 0x01 , 0x02 , 0x02 , 0x04 , 0x04 , 0x08 , 0x08 , 0x10 , 0x10 , 0x20 , 0x20 , 0x00 , 0x00 , 0x00 , 0x00 } ; // each value will toggle a pin
static uint8_t servoPin2D[] = { 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x02 , 0x02 , 0x00 , 0x00 } ; // each value will toggle a pin
I try to explain how.
The first 3 lines (with a "1" in the name ; e.g. servoPin1B) are for the channels 1 to 8; the last 3 lines are for the channels 9 to 16.
After the sign "=" you have 16 values (e.g. 0x04). In fact it is twice the number of servos because there are 2 values (after each other) per servo.
The first 2 values are for the channel 1 (or 9) the next 2 are for the channel 2 (or 10) ,...
The 2 values are always the same; each value says the Arduino which output has to be changed. As the output is initially LOW, the first values forces the output to High and the second value to LOW again. This is the pulse that is send to the servo.
In order to change this part, you could start puting all values (16 * 3 * 2) to zero (so starting with no change at all).
Then imagine that you want that channel 1 would be on arduino A2. Looking in the table above for A2 you find:
A2 C 2 0x04
So for channel 2 you have to update some values in the first 3 lines.
Because A2 is on port C, you will have to modify the line with "servoPin1B[]"
Because it is the channel 1 you have to modify the first 2 values.
Because A2 correspond to bit 2, you have to set the value to the hex value 0x04 (= in binary 0b00000100).
For channel 2 you proceed in the same way but you fill the third and four values, ...
For channesl 9 - 16 you filleach time one of the last 3 lines.
That all. You can check that my explanation correspond to the current code.
If this is not clear, let me know.