TB3180 LIN Analyzer Library Demo 90003180A
TB3180 LIN Analyzer Library Demo 90003180A
Authors: Daniel Erhan - Wait for the bus to respond. This delay is only
Gaurang Gunde for the demo (better visualization). It will not
be needed in the final application.
Microchip Technology Inc.
• Clean up before exiting:
- Stop the continuous bus read process.
INTRODUCTION - Disconnect from the USB device.
Refer to the LIN_Library_API_Demo.zip file to get
Many customers need to develop a customized user
access to the source code through a NetBeans™
interface for the LIN communication protocol in a short
project for better understanding.
time and with reduced costs. Microchip provides a Java
LIN library API which gives customers flexibility to
develop their own interface. FRAME INFORMATION
This document explains how to use the library to create The LINWorkingFrame class allows the application
a customized user front-end to interface with the LIN developer to retrieve the following information about a
Analyzer Tool (P/N APGDT001). LIN Frame transaction:
• Frame ID
DEMO DESCRIPTION • Baud rate
• Time-stamp
In this demo, the Master (LIN Analyzer Tool) is
• The frame data payload along with the checksum
transmitting two frames with ID = 05h (PID = 85h) and
• Error status
eight data bytes + checksum byte at 19200 bps baud
rate. The error status variable is called
m_OnReceive_error. This reports the following
Also, it shows how the connection with the tool is
error conditions on the bus, if any:
established and how the message is listened back from
the bus. • 0 – No error
• 1 – Bus time-out error
• 3 – Timer error (in the firmware)
DEMO STRUCTURE • 4 – Status error (in the firmware)
In order to get successful transactions on the LIN bus • 5 – Event marker error
using the Java LIN library API, the demo needs to have • 6 – Next frame header received error
the following code flow: The developer can leverage the above elements to
• Select and initialize the lowest level report necessary error conditions when designing a
communication protocol from the host. In this custom GUI.
demo USB is used since the LIN Analyzer Tool
interfaces as a USB device. STEPS
• Initialize the LIN DLL Library by passing in the
communication reference. The following presents the steps required for creating a
• Add a listener to the model to observe the LIN new application and running it successfully:
frames on the bus. Frame data can be retrieved 1. Install Java JDK v8 software (see References
through the LINWorkingFrame object. for download page).
- Log LIN Frame information on the console.
2. Install NetBeans v8.2 software (see References
• Library Initialization:
for download page).
- Start the LIN continuous read process.
- Initialize the Serial Analyzer hardware Tool. 3. Install LIN Serial Analyzer v3.0.0 software (see
• Initialization ends here. The custom application References for download page).
can be written after this step: 4. Create LIN_Library_API_Demo folder on the
- Change the baud rate. local drive C:\
- Transmit a LIN Frame with the Master as the
publisher. This can be done repeatedly as
desired by the user.
11. Select all the .jar files from that folder using
SHIFT + click command, and then press the
Open button (see Figure 4).
TROUBLESHOOTING
1. Check if the LIN Serial Analyzer tool is externally
powered when the text below is seen in the
Output window (see Figure 8).
Software
Java SE JDK 8 and NetBeans IDE 8.2 Cobundle:
http://www.oracle.com/technetwork/java/javase/
downloads/jdk-netbeans-jsp-142931.html
CONCLUSION
This technical brief provides the minimum steps
required to create a simple console application demo,
where messages are sent and monitored on the LIN
bus using the LIN Analyzer Tool.
• Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
• There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
• Microchip is willing to work with the customer who is concerned about the integrity of their code.
• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
QUALITY MANAGEMENT SYSTEM © 2018, Microchip Technology Incorporated, All Rights Reserved.
ISBN: 978-1-5224-2775-9
CERTIFIED BY DNV
== ISO/TS 16949 ==