LIN Serial Analyzer User's Guide Rev2.0: 2008 Microchip Technology Inc. DS51675B
LIN Serial Analyzer User's Guide Rev2.0: 2008 Microchip Technology Inc. DS51675B
• 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.
NOTICE TO CUSTOMERS
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the page number. The numbering convention for the DS number is
“DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the
document.
For the most up-to-date information on development tools, see the MPLAB® IDE on-line help.
Select the Help menu, and then Topics to open a list of available on-line help files.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
LIN Serial Analyser. Items discussed in this chapter include:
• Document Layout
• Conventions Used in this Guide
• Recommended Reading
• The Microchip Web Site
• Customer Support
• Document Revision History
DOCUMENT LAYOUT
This document describes how to use the LIN Serial Analyser. The manual layout is as
follows:
• Chapter 1. “LIN Serial Analyser Overview” – What the LIN Serial Analyser is,
what makes it a desirable development tool and what features are available.
• Chapter 2. “Getting Started – Quick Setup” – Describes the supplies needed to
set up and begin to use the LIN Serial Analyser.
• Chapter 3. “LIN Serial Analyser PC Program” – Describes the primary
elements of the interface.
• Appendix A. “LIN Serial Analyzer Technical Information” – Provides the
detailed schematic of the LIN Serial Analyser.
DOCUMENTATION CONVENTIONS
Description Represents Examples
Arial font:
Italic characters Referenced books MPLAB® IDE User’s Guide
Emphasized text ...is the only compiler...
Initial caps A window the Output window
A dialog the Settings dialog
A menu selection select Enable Programmer
Quotes A field name in a window or “Save project before build”
dialog
Underlined, italic text with A menu path File>Save
right angle bracket
Bold characters A dialog button Click OK
A tab Click the Power tab
N‘Rnnnn A number in verilog format, 4‘b0010, 2‘hF1
where N is the total number of
digits, R is the radix and n is a
digit.
Text in angle brackets < > A key on the keyboard Press <Enter>, <F1>
Courier New font:
Plain Courier New Sample source code #define START
File names autoexec.bat
File paths c:\mcc18\h
Keywords _asm, _endasm, static
Command-line options -Opa+, -Opa-
Bit values 0, 1
Constants 0xFF, ‘A’
Italic Courier New A variable argument file.o, where file can be
any valid file name
Square brackets [ ] Optional arguments mcc18 [options] file
[options]
Curly brackets and pipe Choice of mutually exclusive errorlevel {0|1}
character: { | } arguments; an OR selection
Ellipses... Replaces repeated text var_name [,
var_name...]
Represents code supplied by void main (void)
user { ...
}
RECOMMENDED READING
This user’s guide describes how to use LIN Serial Analyser. Other useful documents
are listed below. The following Microchip documents are available and recommended
as supplemental reference resources.
It is recommended that you become familiar with the documents listed below before
using the LIN Serial Analyser.
PICkit™ Serial Analyzer User’s Guide (DS51647)
LIN Specification Package 2.1
© LIN Consortium, 2006. http://www.lin-subbus.org.
LIN Network for Vehicle Applications – Surface Vehicle Recommended Practice
(J2602/1)
© SAE 2006. http://www.sae.org.
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
• Development Systems Information Line
Customers should contact their distributor, representative or field application engineer
(FAE) for support. Local sales offices are also available to help customers. A listing of
sales offices and locations is included in the back of this document.
Technical support is available through the web site at: http://support.microchip.com.
1.2 HIGHLIGHTS
This chapter discusses:
• LIN Serial Analyser Contents
• LIN Serial Analyser Development Tool
• LIN Serial Analyser Hardware
• LIN Serial Analyser Software
Optional
Power
Supply
PC
LIN Tool
Status LEDs
USB Port
Terminal
Block
Screws
Auxiliary Network
Power Connection
1.6.2 Firmware
The LIN Serial Analyser firmware is explained in Chapter 9. “PICkit™ Serial Analyzer
Firmware” of the “PICkit™ Serial Analyzer User’s Guide” (DS51647).
2.2 USING THE LIN SERIAL ANALYZER FOR THE FIRST TIME
The LIN Serial Analyser is shipped preprogrammed and ready for use. The user needs
to supply:
• A wiring harness with appropriate connections to its system network
• A power supply (nominal 13.8V)
Before making any connections, the software must be installed on the host system. The
user must have administrator level rights to install some of the required programs. For
more information, see Section 2.3 “Software Installation”.
Power is supplied either through the round, power plug or the terminal block. The
positive and negative terminals and power plug are common. Supplied power must be
in the range of 8.0V to 30.0V with a nominal value of 12.0-14.4V. Less than 5.0 mA of
current is required to power the LIN transceiver section of the unit.
Internal jumper, E1, configures the unit as either a master or slave node. A 1.0 kΩ bus
pull-up resistor is enabled when E1 is connected across A and B. With the jumper
removed, an internal 30 kΩ resistor is retained.
The unit is configured as a master node as shipped.
Note: The LIN Serial Analyser program requires the Microsoft® .NET Framework
version 2.0.
The PC host program is uninstalled with the control panel’s add/remove utility.
Note: Only available, plugged in USB ports are displayed by the pull-down menu.
If the correct serial port is not displayed, verify that the USB hardware is
correctly installed.
5. In the menu’s text box, type the appropriate baud rate value.
6. Click OK.
7. Verify operation by selecting one of the preset messages from the Master
Message area.
Bus activity is indicated by the analyzer’s yellow BUSY light flickering.
A message will be displayed in the Bus Transaction window with:
• A time-stamp
• The correct ID parity bits
• The calculated checksum
• Any detected error conditions
Pull-Down
Menus
Start/Stop
Logging
Button
Transaction
Window
Master
Message
Group Box
Status Bar
3.3.1 TimeStamp
This field of the Transaction window displays the time, in seconds, since the last frame
was received. The value is reset to zero when the window is cleared.
The value can also be cleared by clicking on the “TimeStamp” column label.
3.3.2 ID (Identifier)
This field displays the ID byte, including the upper two parity bits.
3.3.3 Data
From zero to eight data bytes are displayed in this field. The data is in the hexadecimal
format (without the leading characters, ‘0x’), with the bytes separated by spaces.
3.3.4 Checksum
The last field of a frame is the checksum. The checksum contains the inverted, eight-bit
sum with carry, over all data bytes or all data bytes and the protected identifier.
3.3.5 ChkSumType
This field indicates whether a “classic” or “enhanced” equation was used for the check-
sum calculation. For messages sent via the Master Message group box, the type of
calculation is configured in the checksum portion of the Master Message group box
(see Section 3.8.3 “Checksum Group”).
• Classic – Checksum calculation over the data bytes only. Used for the master
request frame, slave response frame and communications with LIN 1.x slaves.
An eight-bit sum with carry is equivalent to the sum of all values and subtracts
255 every time the sum is greater than or equal to 256.
• Enhanced – Checksum calculation over the data bytes and the protected identifier
byte. Used for communication with LIN 2.x slaves.
The checksum is calculated both ways when a message frame is received. A match is
displayed either as “Classic” or “Enhanced”. If neither result matches the incoming
data, “ERROR” is displayed.
3.3.6 Baud
This field shows the actual, calculated bit rate observed during the Auto-Baud Detect
period of the current frame.
3.3.7 Errors
This field displays any of the error types described in this section. If multiple errors are
detected, only one is displayed.
3.3.7.1 PARITY
The parity is calculated on the frame identifier bits as shown in Equation 3-1.
3.3.7.2 TX BIT
A slave or master node that is transmitting a bit on the bus also monitors the bus. A TX
bit error is when the bit or byte value that is received is different from the bit or byte
value that is transmitted.
3.3.7.3 CHECKSUM
A checksum error is when the inverted modulo-256 sum over all received data bytes
and the protected identifier (when using enhanced checksum) and the received
checksum byte field does not result in $FF.
3.3.7.4 FRAMING
A byte field framing error is when the ninth bit after a valid Start bit is dominant. This
check does not apply to the Break character.
3.3.7.5 NO ANSWER
This value displays when a new Break/Sync/ID header was detected, but no data was
received within the bus time-out period.
3.3.7.6 BREAK
This displays when data characters were received before a valid Sync Break header
was detected.
3.3.7.8 SWBREAK
This value displays when a valid Sync Break is not detected by the UART. A Break was
“assumed” because the first byte received was 0x00, but without a framing error.
3.4.2 Save
The “Save” dialog box saves configuration and master message frames, displayed
in the “Master Frames” field, to a previously selected *.ini file (see
Section 3.8.1 “Master Frames Field”.) By default, the dialog box populates the
file name that was last used in the previous session.
To display the dialog box, go to the pull-down menus at the top of the user interface and
select File>Save.
3.4.3 Save As
The “Save As” dialog box saves or appends configuration and master message
frames, displayed in the “Master Frames” field, to a preselected file (see
Section 3.8.1 “Master Frames Field”). The default file name is the last used file from
the previous session.
To display the dialog box, shown in Figure 3-3, go to the pull-down menus at the top of
the user interface and select File>Save As.
3.4.5 Exit
Selecting File>Exit terminates the LIN Serial Analyser software program.
Note: The “COM port” drop-down list box displays only available, plugged-in USB
ports. If the correct serial port is not displayed in the menu, verify that the
USB hardware is correctly installed.
The menu also sets the baud rate to apply to master transactions.
The “Timeout in mS” text box displays the current time-out value for a message frame
and may be modified by the user. To enable the time-out value to vary with the baud
rate, enter a value of 0.
WARNING
Importing a file into the “Slave Response Frames” field overwrites any content that pre-
viously had been in that field.
1. From the pull-down menus, select File>Open. The “Open” dialog box appears.
2. In the dialog box’s list box, select the desired *.ini file.
3. Click Open.
3.5.4.3.1 ID
The “ID” element displays the identifier byte that is compared to identifier bytes
received from the bus. The ID is entered without the upper two parity bits. Parity is cal-
culated and appended when the message frame is stored in the inernal buffer memory.
The acceptable range of values is 00 to 3F hex (0 to 63 decimal).
3.5.4.3.2 DATA
The “Data” portion of the “Slave Response Frames” field displays zero to eight-byte val-
ues, separated by spaces. This are the actual bytes sent over the bus in response to a
recognized ID.
3.6.4 Filters
This opens a window to display all messages received through the Transaction window
but are sorted by ID number. The window is ‘live’ and shows current bus traffic. New
message frames received will overwrite previous data. This is useful in monitoring con-
stanly changes data.
3.6.5 Transmit
This option selects the Transmit Only mode. No received messages are displayed in
the Transaction window.
“Checksu
Group
Message
Controls
WARNING
Importing a file into the “Master Frames” field overwrites any content that previously
had been in that field.
1. From the pull-down menus, select File>Open. The “Open” dialog box appears.
2. In the dialog box’s list box, select the desired *.ini file.
3. Click Open.
To send a message:
1. In the “Master Frames” field, select the content to be sent by doing one of the
following:
• To select adjacent rows of content – Click on the first row, scroll down to the
last row and hold down <Shift> while clicking.
• To select non-adjacent rows of content – Hold down <Ctrl> while clicking each
row.
2. Click Send.
The highlighted message content is sent, working top-to-bottom through the
“Master Frames” field.
The message is sent once. (For information on continually sending the
highlighted message content, see Section 3.8.3 “Checksum Group”.)
3.8.1.3.1 ID
The “ID” element displays the identifier byte to be sent without the upper two parity bits.
Parity is calculated and appended at send time unless the application is in the Debug
mode (see Section 3.6.1 “Debug Mode”).
The acceptable range of values is 00 to 3F hex (0 to 63 decimal).
3.8.1.3.2 DATA
The “Data” portion of the “Master Frames” field displays zero to eight-byte values,
separated by spaces.
Note: Due to service latency time in the Windows operating system environment,
the minimum time interval may be as high as 200 ms, regardless of desired
time set in the control box. Intervals less than 200 ms will be serviced as
fast as possible, but may not be less than the operating system minimum.
J1
D2 1N4004 1N4148WX-TP
DS51675B-page 28
LED1 Blue LED 4.7K R1
1 VBAT VBB VDD
2 LBUS
GND D3
3 LED2 Yellow LED 470 R2
D1 C1 C2 C3 C4
7
10 MF .01 MF U1 R5 R7
1.0 MF .01 MF LED3 Green LED 470 R4
100K 100K
VDD 3
P6SMB43AT3G E1 R3 1K
VBAT
1 2 VCC
R6 0
2
6 CS/WAKE 4
LIN TX 1
D4 C5 RX 8
220 pF 5 FAULT/TXE
GND
1
3 MCP2021-500
2 MMBZ27VCLT1G
P1
BUSY
FAULT/TXE
CSWAKE
TX
RX
LIN_ATTACH
VCC
17
J2 U2
1 26 18
MCLR/VPP/RE3 RB0/INT0/AN12
19
LIN SERIAL ANALYZER SCHEMATIC
VDD
2 VCC C6 22 pF RB1/INT1/AN10
6 20
3 OSC1/CLKIN RB2/AN8/INT2/VMO
4 21
RB3/AN9/VPO
Y1 22
PICkitTM 2
5 RB4/AN11/KBI0
23
6 C7 20 MHz 7 RB5/KBI1/PGM VCC
24
OSC2/CLKOUT/RA6 RB6KBI2/PGC
C8 22 pF 25
0.1 MF RB7/KBI3/PGD
8 D5
RC0/T1OSO/T13CKI P2
9 1N4004
RC1/T1OSI/UOE
27 10
RA0/AN0 RC2/CCP1
28 11 1
LIN Serial Analyzer User’s Guide Rev2.0
PIC18F2450-QFN
16
I S
ID Field Element ...................................................... 20 Save As Function ..................................................... 15
Installing Software...................................................... 9 Save Function .......................................................... 14
Internet Address......................................................... 3 Setup COM port Function ........................................ 16
Setup Menu.............................................................. 16
L Log File ............................................................. 17
LIN Serial Analyzer User Interface........................... 11 Setup COM port ................................................ 16
Listen (Filter) Function ............................................. 18
Log File Function ..................................................... 17
06/25/07