
ROBOT . HEAD to TOE
Product User’s Manual –
SD02C
c. To get higher 8 bits, rotate/shift the 16 bits value 8 times to the right.
1 1 0 1 0 1 1 0 0 1 1 1 0 1 1 0
0 1 1 0 1 0 1 1 0 0 1 1 1 0 1 1
1 0 1 1 0 1 0 1 1 0 0 1 1 1 0 1
1 1 0 1 1 0 1 0 1 1 0 0 1 1 1 0
0 1 1 0 1 1 0 1 0 1 1 0 0 1 1 1
1 0 1 1 0 1 1 0 1 0 1 1 0 0 1 1
1 1 0 1 1 0 1 1 0 1 0 1 1 0 0 1
1 1 1 0 1 1 0 1 1 0 1 0 1 1 0 0
0 1 1 1 0 1 1 0 1 1 0 1 0 1 1 0
d. After rotated/shifted 8 times, AND the value with 0x00FF and save it into an 8 bits
variable.
0111011011010110
2
AND
0000000011111111
2
= 0000000011010110
2
= 11010110 (higher 8 bits)
e. To get lower 8 bits, AND the same 16 bits encoder value with 0x00FF and save it into
another 8 bits variable.
1101011001110110
2
AND 0000000011111111
2
= 0000000001110110
2
= 01110110
2
(lower 8 bits)
f. Send ‘T’ to SD02C first. Then send the higher 8 bits, followed by the lower 8 bits.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved