The Hercules LaunchPads of Texas Instruments have two (or three) CAN controllers.
It is possible to learn the CAN protocol and have real messages flowing with the LaunchPad and only three jellybean components.
This series explains how the standard TI examples work, but it goes further than that.
I'll also be looking at the signals with an oscilloscope and logic analyzer.
My first post in this series, Probing your Hercules LaunchPad CAN bus Part 1,
explains the minimal hardware required to get the example working on the LaunchPads (a resistor and two diodes).
In the second one, Probing your Hercules LaunchPad CAN bus Part 2, I check out the example project.
It's a step by step explanation of the CAN controller configuration and a code walk-trough.
This third post shows the hardware setup, and also the results on a logic analyzer and an oscilloscope.
Setup for the Hercules LaunchPad Make II
CAN1 and CAN2 are available on J10 of the second generation of Hercules LaunchPads.
J10 is on the long edge of the PCB and matches the standard breadboard grid.
The wiring is consistent with this Siemens App Note: AP2921 On-Board Communication via CAN without Transceiver.
There are three signals worth probing:
- the transmit signal of CAN1
- the transmit signal of CAN2
- the common bus signal that has the combination of the two TX signals.
This signals is also the RX signal for all connected controllers
(you can also see this from the image above. The two diodes act as a discrete OR gate).
Setup for the Hercules LaunchPad Make I
On the first generation, all signals are available on J10 (this time, J10 is one of the BoosterPack connectors).
(spot the typo in the TI schematic )
Everything works the same as for the MK II LaunchPad. The only difference is that the pins are at a different location.
Probing the signals with Logic Analyzer and Scope
I'm using two affordable instruments here.
My oscilloscope is a second hand Rigol DS1052E.
My logic analyzer is a Papilio Pro. This FPGA development board from Gadget Factory has two duties at Cumps Castle:
I'm using it as my FPGA proto board. It's very good at that
As probe, I use a Mueller 250 MHz probe with the 'ground spring' methodology.
That's kind of overkill when you're working with a breadboard - but it does give a cleaner square wave.
I've posted a short review of that 250 MHz probe:
and also a review on the ground spring probing technique, but that semms to got lost in the internets
These images show what the CAN signals look like. If you look up the CAN specification, you can follow along.
The three signal on the logic analyzer:
Some stats of CAN1 Transmit signal:
The CAN BUS signal on the oscilloscope:
and some stats on the CAN BUS signal:
I've also attached the OpenLogic Sniffer's project to this article, and the raw data of the capure as .CSV file.
If you have jawi's OLS client, you can look at the data.
Maybe I'll try a conversation between 3 CANs, or make the 2 LaunchPads talk together over CAN. That 'll happen when I need such a set-up.
I may also beg TI to send a few real can drivers, so that I can set up an industry compliant CAN bus.
And if someone would please develop a CAN protocol analyzer for the LogicSniffer. Please?