ADVANCED TECHNIQUES FOR DESIGN ENGINEERS
■ BY FRED EADY
YOU CAN DO IT WITH THE CHIPKIT MAX32
If you’ve ever designed an electronic gadget that interfaces with some part of
your car, you know that the power system in automobiles is noisier than a
Sunday afternoon NASCAR race. However, despite the abundance of
electrical noise, the car maker has managed to fill your auto’s cabin with a
dazzling array of high tech instrumentation. If you were privy to your car’s
system schematic diagram, you would find that all of that gee-whiz
automotive technology talks on a common data channel that coexists with
the car’s noisy power system. That common data channel is known as a
Controller Area Network. That’s CAN for short.
CAN is an asynchronous serial data communications protocol that excels in noisy environments. You can
think of controller area networks as high speed intelligent
serial communications networks with everything you
wished you could have in a comparable RS-232 connection.
The fact is, a CAN is just as easy to physically implement
as a legacy RS-232 network. The plus of a controller area
network is the intelligence that lies on the other side of
the CAN transceivers.
CANs are not restricted to door panels in
automobiles. Once upon a time, I used CAN to establish a
communication link between a set of electronic toilets. So,
the plan this month is to throw some electrons at the pair
of CAN transceivers that reside on the chipKIT network
shield. To get the electrons routed correctly, we’ll have to
do some bit twiddling on the chipKIT Max32’s
PIC32MX795F512L. In that we won’t be directly designing
a toilet CAN network, things shouldn’t get too stinky.
THE PIC32MX795F512L CAN ENGINE
68 November 2011
The chipKIT Max32 does not natively support
Microchip’s MCP2551 CAN transceivers. However,
housed within the chipKIT Max32’s PIC32MX795F512L is
a CAN module that encompasses two independent CAN
engines: CAN1 and CAN2. Each CAN engine can access
a controller area network bus via an external MCP2551
CAN transceiver. To facilitate the communications
channels, two MCP2551 transceivers have been designed
into the network shield and are the subject of Photo 1.
The transceiver is very easy to physically implement
because it is housed in an industry standard eight-pin
package. In its simplest implementation, this transceiver
requires two connections for power and ground, two
digital signal connections, and two CAN bus connections.
MCP2551 transceivers at the extreme ends of the CAN
bus must have their pins terminated with 120Ω resistors.
The chipKIT network shield’s MCP2551 transceiver
pair is wired as shown in Schematic 1. Although it isn’t
obvious, one of the PIC32MX795F512L’s serial ports
shares the CAN1 input signal lines. That’s why the CAN1
engine’s digital inputs can be jumpered in and out. Note
that only six of the eight transceiver signals are used.
Unlike the MAX232 RS-232 converter, the transceiver
does not require charge pump capacitors. The absence of
charge capacitors and only six physical connections makes
the transceiver easier to physically implement than its RS-
An RS-232’s behind-the-scenes dedicated resources
■ PHOTO 1. Each of the chipKIT Max32's two CAN
engines has its very own MCP2551 CAN transceiver. The
transceiver is to a controller area network as the MAX232
is to an RS-232 link.