© 1997-2013 Designer Systems
Page 5 of 8
INTERFACE 13.04.13 Revision 1.00
Calculating binary bit values:
The registers used above use the binary notation to allow the control of servo operation, reversal, soft-start & speed selection. Each regis-
ter is made up of eight (8) bits, which can be set or cleared to produce the desired operation, the individual bits having a value associated
with them as follows:
128
64
32
16
8
4
2
1
If we take for example one of the servo control registers we can see it is made up of four (4) separate bits A, B, C & D plus a four bit
value SSSS:
Servo 1 control
R1
A
B
C
D
S
S
S
S
A = Operate (0 – Servo disabled 1 – Servo enabled)
B = Reverse (0 – Servo normal 1 – Servo reversed)
C = Soft-start control (0 – Disabled 1 – Enabled)
D = Speed control (0 – Disabled 1 – Enabled)
S..S = Servo speed value 0 to 15 (0 = slowest)
Each bit is defined to control a particular function for the servo it controls, so if for example we wanted to enable servo 1 we would need
to set bit ‘A’ which controls the servo operation. We know from the bit values defined above that the value associated with the ‘A’ bit is
128, so by writing this value to register 1 we can enable servo 1. If we need to enable additional functions such as the speed control - ‘D’
- as well as the servo enable, the value of this bit is added to the value written to the register i.e. 128 + 16 = 144. In addition we could
also add a speed value of 5 that would make the total value 128 + 16 + 5 = 149.
Figure 1.0 (I
2
C write protocol)
ST
AR
T
AC
K
AC
K
SCX18 ADDRESS
REGISTER
ADDRESS
0
1 1 1
A1 A0
1
R
/
W
=
0
AC
K
DATA
BYTE
ST
O
P
Multiple bytes may be written before the ‘STOP’ condition. Data is written into registers starting at ‘REGISTER ADDRESS’, then ‘REGISTER AD-
DRESS’ +1, then ‘REGISTER ADDRESS’ +2 etc.
Each byte transfer is acknowledged ‘ACK’ by the SCX18 until the ‘STOP’ condition.
Figure 1.1 (I
2
C read protocol)
S
T
A
R
T
A
C
K
A
C
K
SCX18 ADDRESS
REGISTER
ADDRESS
A
C
K
DATA
BYTE 1
S
T
O
P
S
T
A
R
T
A
C
K
GPM ADDRESS
N
A
C
K
DATA
BYTE 2
0
1 1 1
A1 A0
1
R
/
W
=
0
0
1
1 1
A1 A0
1
R
/
W
=
1
‘DATA BYTE 1 & 2’ are register values returned from the SCX18. Each byte written is acknowledged ‘ACK’ by the SCX18 , every byte read is
acknowledged ‘ACK’ by the I
2
C Master. A Not-acknowledge ‘NACK’ condition is generated by the I
2
C Master when it has finished reading.