beautypg.com

Digilent MX4cK User Manual

Page 11

background image

Cerebot MX4cK Reference Manual

www.digilentinc.com

page 11 of 35

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.



accessed through the JC connector if they're
not being used to control a servo.

RC Servos use a pulse width modulated
signal, PWM, to control the servo position.
The 16-bit timers in the PIC32 microcontroller
have the ability to generate PWM signals using
the output compare registers. However, it is
also possible to use timer interrupts to
accomplish this same thing. Using timer
interrupts allows a single timer to be used to
control the signal timing for all eight servo
connectors.

The servo connectors on the Cerebot MX4cK
board are intended to be driven using timer
interrupts rather than directly by the pulse
width modulators in the internal timers. This
frees the pulse width modulators for other
uses, such as DC motor speed control.
Digilent has a reference design available that
illustrates using timer interrupts to control
signal timing for the PWM signals to control RC
servos.

When using the chipKIT MPIDE development
environment, the Servo library can be used to
drive servos attached to these connectors. The
symbols PIN_S1 through PIN_S8 can be used
to specify the servo connectors being used.

The following give the correspondence
between servo connector, MPIDE digital pin
number, and microcontroller I/O Port register
and bit position:

• S1 – PIN_S1, digital pin 16, RG12
• S2 – PIN_S2, digital pin 17, RG13
• S3 – PIN_S3, digital pin 18, RG14
• S4 – PIN_S4, digital pin 19, RG15
• S5 – PIN_S5, digital pin 20, RG0
• S6 – PIN_S6, digital pin 21, RG1
• S7 – PIN_S7, digital pin 22, RF0
• S8 – PIN_S8, digital pin 23, RF1


There are three options for supplying power to
the servo connections:

• A common power bus (BRD_VU) for the

Cerebot MX4cK and servos

• Separate on-board power busses for the

Cerebot MX4cK (BRD_VU) and the servos
(VS)

• An on-board power bus for the Cerebot

MX4cK (BRD_VU) and an external power
bus for servos


For the first case above: Install a shorting
block on jumper JP1 to connect the VS servo
power bus to the BRD_VU power bus. The
servo power bus is then powered from the
same source as the BRD_VU power bus.
Powering a large number of servos from USB
power is not recommended. Pin header
jumpers and shorting blocks such as JP1 are
rated for a maximum of 2A of current. USB
power (J12 in the USB, DBG, or URT
positions) should only be used to power a
couple of servos to avoid exceeding the
500mA that a USB device is allowed to use.

For the second case above: Remove the
shorting block from jumper JP2 to make the VS
servo power bus independent from the
BRD_VU bus. Attach the servo power supply
to screw terminal connector J5.

Finally, for very high servo current applications,
a separate power bus external to the Cerebot
MX4cK can be used to provide servo power. In
this case, remove the shorting block on JP1,
tie the external servo power bus ground to the
Cerebot MX4cK ground through the ground
terminal on J10, and use pin 1 on the servo
connectors to bring the servo control signals
out to the servos. The servo power and
ground connections are made off-board.

The on-board servo power bus can be used to
provide a maximum of 2A to each servo
connector and 5A total to all servo connectors.

5V Signal Compatibility


The PIC32 microcontroller operates at 3.3V.
And the I/O pins provide 3.3V logic levels. It is
possible, in some circumstances, to use the