THE DESIGN CYCLE
■ BY FRED EADY
ADVANCED TECHNIQUES FOR DESIGN ENGINEERS
CONTROLLING HOMEBREWED DEVICES
WITH A PS DUALSHOCK 3
There are some things in
life that must be done.
This project is one of
them. How can any red-blooded geek or nerd
resist the siren song
emanating from the
multitude of buttons and
joysticks that reside on
the island of PlayStation
DualShock 3? This month,
we will begin an odyssey
that will take us to the
villages, towns, and cities
of a province called USB,
which resides in the land
of PlayStation. We will
travel on a Microchip
PIC32MX fueled by the
Microchip Application
Libraries' free USB stack.
Along the way, funds for
our travels will be
provided by Ellisys and
the Microchip X series of
C compilers and IDEs.
By the time we arrive at
our destination, you will
be an experienced USB
traveler. In addition, you
will have also mastered
the USB ways of the
PlayStation DualShock 3
controller.
THE PLAYSTATION
DUALSHOCK 3
There isn’t much I can tell you
about the physical PlayStation
DualShock 3 that you don’t already
know. Besides, we humans are
already programmed to push buttons
and wiggle joysticks. In that we want
to manipulate the PlayStation
DualShock 3 with USB bits of our
choosing, we’ll take a look at what is
going on inside of the DualShock 3.
The best way to get the skinny
on the DualShock 3 USB speak is to
smell the PlayStation 3’s cooking.
Our DualShock 3 USB sniffer is the
Ellisys USB Explorer 200 you see
standing on its four rubber feet in
Photo 1. I used my laptop and a free
program called MotioninJoy to
awaken the DualShock 3. The USB
Explorer 200 captures the DualShock
3 USB data stream by sitting between
the MotioninJoy application and the
PS3’s USB interface. A typical
Explorer 200 USB session capture
can be seen in Screenshot 1.
To get a good idea about what
we need to code to connect with the
DualShock 3, we’ll use the Explorer
200 to sniff out the PS3’s USB
descriptors. The Microchip USB stack
automagically retrieves the PS3
descriptors at enumeration time.
A quick look at Screenshot 2
tells us that the PS3 is bus powered
and would like to use the maximum
■ PHOTO 1. Other than capturing every little nuance of a USB data stream, I am
able to use the Ellisys USB Explorer to record those data streams for further
analysis. All you have to do is load and run a copy of the free Ellisys Visual
USB application to view my recorded USB data stream captures with your PC.
54
May 2013