User`s guide
Controller Area Network
This lab manual will detail the initial hardware setup for Lab 7. The following is a step by step processes needed to
successfully set up the CAN related Hardware as well as discuss Safety related Issues that should be addressed
before the use of the device.
SAFETY
1. Before Use of this device, please review and become familiar with CAN related topics, as this will speed
up the process of setup and troubleshooting that may result from use of the CAN system.
2. Voltage levels in this lab are not excessive, but caution must be exercised due to the high amount of
current flow through the system. The device must be connected to a power supply that can safely limit
current to a safe level before use by students. Unacceptable sources of power such as a car battery should
not be used with this device.
3. Ensure that the blocks holding the car up are secure and car wheels have at least a 1 inch clearance from
the device platform.
4. Do not short any connections on the device. This may result in a fire hazard.
5. Check all connections before the device is turned out.
6. Students should not have access to inner workings of car, unless specified by the instructor.
GOAL
By doing this lab assignment, you will:
1. Learn about the Controller Area Network Interface on the C8051F040 development board
2. Utilize the CAN Transmit and Receive Protocol to communicate with the PIC microcontroller in the R/C car
3. Understand specific applications of CAN in different industries
4. Comprehend CAN Protocols & Hardware
5. Employ NI hardware and LabVIEW software to develop a Graphical User Interface for Data Acquisition and
take advantage of a provided LabVIEW VI program to assist in debugging
PREPARATION
References: C8051F04x.pdf 8051 C8051F04X Reference Manual, Ch. 5, 8, 18, CAN library documentation and
C8051F04x-DK.pdf C8051F04x Development Kit User’s Guide, both found on the MPS web page
Write a C program that is free from syntax errors (i.e., it should assemble without error messages)
REQUIRED MATERIAL
Hardware Requirements
o Two 8051F040 Development Boards with USB SiLabs MCU Programming Adapters
o CAN-Controlled R/C Car (with lights, horn, drive motor, steering servomotor, etc.)
o Meter Box with 3 meters and Control Box with switches and potentiometers.
o 5 Volt DC power supply
LabVIEW Requirements
o CAN-viewer-MPS.vi
o CAN-sender-MPS.vi