Power Brick Controller User Manual
Connections and Software Setup
55
Hiperface Configuration Example
Serial Encoder Control
– Hiperface
Because there is no explicit clock signal with Hiperface, the serial clock frequency is set 20 times higher
than the bit transmission frequency to “oversample” the input data stream. For the default 9600 baud
transmission of the Hiperface encoder, this clock frequency should be 9.6 x 20 = 192 kHz.
Divide the 100 MHz clock by M=130 ($83) and by 4 (N = 2) to get 192 kHz. triggering on the falling edge
of servo clock without delay. Since this is a “one-shot” read, the selection of the triggering clock edge does
not matter much.
Bit #:
Binary:
Hex ($):
Serial Encoder Command
– Hiperface
The DSPGate3 interface to Hiperface supports three 8-bit command codes:
o
$42 for reporting position.
o
$50 for reporting status
o
$53 for resetting the encoder
These command codes reside in the lower 8 bits of the Serial Encoder Command word. The upper 8 bits
contain the address of the encoder in the interface. The Hiperface protocol permits up to 8 separate encoders
to be “daisy-chained” on a single multi-drop interface. While this can be done, it is expected that each
channel of the Power Brick Controller will be connected to a separate individual encoder, simplifying the
wiring. In this configuration, this address field can either match the encoder’s address value (+ $40), or it
can be set to $FF (broadcast mode).
A Hiperface encoder at user address 0 with odd parity would be set up for one-shot position reporting
Bit #:
Binary:
Hex ($):
PowerBrick[
i
].Chan[
j
].SerialEncCmd = $40427000
or
$FF427000
Encoder
Command
$FF: Broadcast mode
M
o
d
e
T
ri
g
E
n
a
M Divisor
N Divisor
R
es
er
ve
d
C
lo
ck
Ed
ge
Trigger Delay
Protocol
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 0 0 0
0 0 1 0
0 0 1 0 0 0 1 1
0 0 0 0
0 0 0 0 0 0 0 0
0 1 0 0
8
2
2
3
0
0
0
4
0: Rising
1: Falling
= Delay
µsec
x 0.192
Protocol: =4 Hiperface
PowerBrick[0].SerialEncCtrl = $82230004
PowerBrick[0].Chan[0].SerialEncCmd = $40427000
PowerBrick[0].Chan[0].SerialEncEna = 1