3J Series VDC Module

3J Series VDC Module
Programmers Manual
Grayhill PN: 3JUM1115-1
ECN #: 386039
Revisions
A
B
C
D
E
Original Release
Added joystick 8-way explanation. Added Figure 1
Added explanation of commands needed to be send from a
diagnostic tool source address
Corrected description of Name fields in section 4.6
Corrected priority value in Sec 3.1.5.
Corrected PGN value in Sec 3.5.2
Grayhill Confidential
Page 1
7/16/2009
8/27/2009
04/15/2010
10/26/2011
12/21/2012
12/21/2012
Table of Contents
1.
Overview ................................................................................................................................3
Reference Documents .......................................................................................................3
2.
Functionality...........................................................................................................................3
2.1. Power Up Sequence ..........................................................................................................4
2.2. Run Mode...........................................................................................................................4
2.2.1.
Joystick, Encoder, Keypress Data - Transmit .............................................................4
2.2.2.
Backlights - Received .................................................................................................4
3.
Communications ....................................................................................................................4
3.1. Message Header Description .............................................................................................4
3.1.1.
Priority .........................................................................................................................4
3.1.2.
Data Page ...................................................................................................................5
3.1.3.
Protocol Data Unit (PDU), PDU Format (PF), PDU Specific (PS) ..............................5
3.1.4.
Source Address ..........................................................................................................5
3.1.5.
Data Length.................................................................................................................5
3.1.6.
Data.............................................................................................................................5
3.1.7.
Parameter Group Number ..........................................................................................5
3.2. Bitfield Location and Byte Ordering ....................................................................................5
3.3. VDC Source Address .........................................................................................................6
3.4. Physical Layer ....................................................................................................................6
3.5. Standard Messages ...........................................................................................................6
3.5.1.
VDC Data Message ....................................................................................................7
3.5.2.
Backlight Intensity .......................................................................................................8
3.5.3.
Configuration and Control ...........................................................................................8
3.5.4.
Proprietary ID Message ..............................................................................................8
4.
Configuration and Control ......................................................................................................9
4.1. Backlight Intensity
128 (80h) .........................................................................................9
4.2. Set Source Address
224 (E0h)......................................................................................9
4.3. Set PGN for Encoder Data 225 (E1h) ............................................................................9
4.4. Set VDC Transmit Data Priority 226 (E2h)....................................................................10
4.5. Set VDC Data Transmission Period 227 (E3h) .............................................................10
4.6. Changing J1939 NAME Fields* 228 (E4h) ....................................................................10
4.7. Change ECUID Command* 229 (E5)........................................................................11
4.8. Change ECUID Field Data* 230 (E6h) ......................................................................11
4.9. Backlight Diagnostics* 232 (E8h) .................................................................................11
4.10.
Encoder Configuration* 233 (E9h)............................................................................12
5.
J1939 Messages..................................................................................................................12
5.1. Address Claimed ..............................................................................................................12
5.2. PGN Request ...................................................................................................................14
5.2.1.
ECU Identification Information ..................................................................................14
5.2.2.
Software Identification...............................................................................................15
5.3. Acknowledgement Message ............................................................................................15
1.1.
Grayhill Confidential
Page 2
12/21/2012
1.
Overview
This document describes the functionality and communication of the Grayhill Video Display
Controller (VDC) Module.
1.1.
Reference Documents
The following documents are referenced within this document.
o
o
o
o
o
2.
SAE-J1939
SAE-J1939/11
SAE-J1939/21
SAE-J1939/71
SAE-J1939/81
Functionality
An example encoder/joystick module is illustrated in Figure 1. Modules with the encoder push
button have the button mapped to button 6 of the CAN message. For modules with a joystick,
the joystick is an 8-way where, for example, moving the joystick to the upper right will cause
the bit fields for the X-axis and Y-axis to both have a value of 0b01. Refer to section 3.5.1.
Figure 1.
Grayhill Confidential
Page 3
12/21/2012
2.1.
Power Up Sequence
Upon first power up, the backlights are illuminated at full brightness for one second. This
serves as a visual test that the module is powered and functional. Then the VDC module
sends out an Address Claimed message. If there is a Name contention and the VDC
module loses arbitration, it will either send another Address Claimed message with a new
source address if the VDC module is using Dynamic Addressing otherwise it will send out
the Cannot Claim Address message. If the VDC module is using Dynamic Addressing and
cannot find an unused source address it will then send the Cannot Claim Address
message. If a VDC module sends out the Cannot Claim Address message it will not enter
Run Mode (it will not transmit or act upon any messages).
2.2.
Run Mode
2.2.1. Joystick, Encoder, Keypress Data - Transmit
Joystick, encoder, and key information are sent on a single message every 100ms or upon
a change in status with a minimum period of 20ms. The VDC’s PGN, priority and
transmission period are configurable at runtime.
2.2.2. Backlights - Received
The VDC module constantly monitors the backlight message and adjusts the brightness
accordingly.
3.
Communications
3.1.
Message Header Description
The following illustrates the format of the CAN message ID. A brief description of each
field follows.
Figure 2
3.1.1. Priority
This 3-bit field is used to define the priority during arbitration. ‘000’ is the highest priority and
is usually associated with high-speed control messages. Low priority is used for non-critical
configuration and information messages.
Grayhill Confidential
Page 4
12/21/2012
3.1.2. Data Page
This 1-bit field defines on which data page (0 or 1) the message is defined in the J1939
specification. Page 0 contains the messages that are presently defined, while Page 1 is for
future expansion according to J1939.
3.1.3. Protocol Data Unit (PDU), PDU Format (PF), PDU Specific (PS)
This 8-bit field determines the format of the message and is one of the fields that determine
the Parameter Group Number of the message (see Figure 2). If the value is between 0 and
239, the message is a PDU 1 Format message. These messages are sent to specific
addresses. The PDU Specific (PS) field is the Destination Address (DA). If the value is
between 240 and 255, the message is a PDU 2 Format message. These messages are not
sent to a specific address, but are instead broadcast to the entire network. The PS then
becomes the Group Extension (GE) field.
3.1.4. Source Address
This 8-bit field is the source address of the device that sent the message.
3.1.5. Data Length
The number of data bytes in the message.
3.1.6. Data
Up to 8 bytes of data. The first five items are placed into the CAN 29-bit extended identifier
in the format shown in figure 2. Most messages are intended to be broadcast messages, or
PDU 2 Format, where the message is not sent to a particular address. The J1939
specification defines PDU Format and PDU Specific values for many messages by
specifying the message Parameter Group Numbers.
3.1.7. Parameter Group Number
J1939 defines allowable messages by their Parameter Group Number (PGN). The
Parameter Group Number is a 3-byte value that uniquely defines the message purpose. A
PGN has the following format: If the PDU Format value for a message is less than 240,
then the last 8 bits of the PGN are set to ‘0’. The specification gives the decimal equivalent
of the PGNs. To obtain the PF and PS values to use for a specific message, convert the
decimal value from the specification to hexadecimal and use the last two bytes. These
values can then be used to either send messages on the network or to request messages
from other source addresses.
3.2.
Bitfield Location and Byte Ordering
The byte and bit ordering and location within the data field are the same as to what’s called
out in J1939. The first data byte is sent first and is referenced as Byte 1, 0x01 in the
example below. The LSB of the data bytes are on the right and are referenced as Bit 1.
The convention used to locate a parameter in the data field is the same as specified in
SAE-J1939/71. The format used is “R.x” where R is the byte number and x is the starting
bit number within the byte. The length is the number of bits starting at this point.
Grayhill Confidential
Page 5
12/21/2012
In the event of a byte or a multi-byte length parameter the format becomes “R-S” where R
is the start byte location and the data occupies bytes R through S.
Examples:
Start
Length
Description
4.3
3 bits
Ex. Parameter between 0..6, where 7 is ‘don’t care”
Location 4.3 with a length of 3 bits would have the value of 1 as illustrated below using the
above data frame example.
Byte 4 = 0x67 = 0b01100111. The bold value is the three bit field holding a value of 0b001
A 16 bit word starting at byte location 2 would be represented by the following example.
Start
Length
Description
2-3
2 bytes
Ex. Parameter between 0..65534, where 65535 is ‘don’t care’
3.3.
VDC Source Address
The source address of the Grayhill standard VDC module shall default to 241 (F1h). This
may be modified either dynamically if the VDC module is Self Configurable and with the
Commanded Address message in accordance with J1939-81. The new source address
value shall be stored in non-volatile memory. The ability to change the source address will
allow multiple standard VDC modules to coexist in the same system.
3.4.
Physical Layer
The bit rate and signal lines shall comply with J1939/11 with a bit rate of 250kbps using an
82C251 or equivalent CAN transceiver. The connector shall be a 4 pin Deutsch equivalent
with the following pin out:
1.
2.
3.
4.
3.5.
Power
Ground
CAN_H
CAN_L
Standard Messages
Most of the VDC module’s functionality is done using only two PGNs. These are the VDC
Data Message, and the Control PGN using Proprietary A PDU1 format (PF = 239). The
Control PGN uses byte 1 of the data field to determine the meaning of the rest of the data.
Grayhill Confidential
Page 6
12/21/2012
3.5.1. VDC Data Message
PF – 255
PS - 3
PGN – 65283 (FF03h)
Direction - Transmit
Priority – 6
Data Length - 8
Transmission Rate – 100ms or on change, not to exceed 20ms
Value
Start Length Description
00 - Not pushed right
01 – Pushed right
1.1 2 bits
Joystick 1 X-Axis Right
10 - Unused
11 - Not available
00 - Not pushed left
01 – Pushed left
1.3 2 bits
Joystick 1 X-Axis Left
10 - Unused
11 - Not available
00 – Not pushed up
01 – Pushed up
1.5 2 bits
Joystick 1 Y-Axis Up
10 - Unused
11 - Not available
00 – Not pushed down
01 – Pushed down
1.7 2 bits
Joystick 1 Y-Axis Down
10 - Unused
11 - Not available
Value between 0 and TOP, inclusive. See
Encoder Configuration in Sec 4.10 for
2-3 2 bytes Encoder data
definition of TOP.
65,535 – Not available
00 - Button not pressed
01 - Button pressed
4.1 2 bits
Button 1 Status
10 - Unused
11 - Not available
Same
4.3 2 bits
Button 2 Status
Same
4.5 2 bits
Button 3 Status
Same
4.7 2 bits
Button 4 Status
Same
5.1 2 bits
Button 5 Status
Same
5.3 2 bits
Button 6 Status
All bits set
5.5 4 bits
Unused
All
bits set
6-8 3 bytes Unused
Diagonal pushes of the joystick will cause both the corresponding X and Y directions to
indicate a push.
Bits of unused buttons shall default to 0b11.
See Encoder Configuration in Sec. 4.10 for definition of TOP.
Grayhill Confidential
Page 7
12/21/2012
3.5.2. Backlight Intensity
PF – 239, Proprietary A PDU1 Format
PS – DA, The Source Address of the VDC module. Default value: 241 (F1h)
PGN = (PF * 256) = 61184
Direction - Receive
Data Length – 8
Start
Length
Desc.
Value
Backlight
1.1
1 Byte
128
Intensity
2.1
1 Byte
Unused
255 – Not Available
0 – Off
Backlight
3.1
1 Byte
254 - Brightest
Intensity
255 – Not Available
4.1
6 bytes
Unused
255 – Not Available
3.5.3. Configuration and Control
PF – 239, Proprietary A PDU1 Format
PS – DA, The Source Address of the VDC module. Default value: 241 (F1h)
PGN = (PF * 256) = 61184
Direction - Receive
Data Length – 8
Start
Length
Desc.
Configuration and
Control Command
Configuration and
Control Data
Values
224 – 254 Control Byte Command as
described in Sec. 4
1.1
1 Byte
2.1
5 Bytes
7.1
1 Byte
Key Byte 1
0x55
8.1
1 Byte
Key Byte 2
0xAA
0 – 255
*note – If either Key Byte is incorrect the command will be ignored.
**note – Commands marked with an asterisk require the message be send from a source
address of 249 (0xF9).
3.5.4. Proprietary ID Message
PGN – 65408 (FF80h), Proprietary B PDU2 Format
Priority – 7
Data Length - 8
Transmission Rate – Upon request
Start
Length
Desc.
Values
Proprietary Unit ID
0 – 255. If all eight bytes are 255 then the
1.1
8 Byte
Message
ID is considered unprogrammed.
Grayhill Confidential
Page 8
12/21/2012
4.
Configuration and Control
Changing the configuration and how the VDC module behaves is done with the Configuration
and Control message described in Sec 3.5.3. The first byte serves as the command byte.
Where applicable, changes take effect immediately and are stored in non-volatile memory
unless otherwise noted.
*All data indicated as ‘xx’ is ‘Don’t Care’
4.1.
Backlight Intensity
Data Field
Start
Length
Desc.
Backlight
Intensity
Unused
1.1
1 Byte
2.1
1 Byte
3.1
1 Byte
Backlight
Intensity
4.1
6 bytes
Unused
128
(80h)
Value
128 (80h)
255 – Not Available
0 – Off
254 – Brightest
255 – Not Available
255 – Not Available
Example: Sending the following message to a module having an address of 0x85 will set
the backlight brightness to 50%.
ID=18EF8521, LEN=8, Data=0x80, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
4.2.
Set Source Address
Data field
Byte 1
Byte 2
E0h
dd
Byte 3
xx
224
Byte 4
xx
Byte 5
xx
Byte 6
xx
Byte 7
55h
(E0h)
Byte 8
AAh
dd - Has a value between 0 and 255 and is the new source address
xx – Don’t Care. Should be FFh following J1939 convention
55h – Low byte of 16 bit key
AAh – High byte of 16 bit key
4.3.
Set PGN for Encoder Data
Data field
Byte 1
Byte 2
E1h
aa
Byte 3
bb
Byte 4
xx
225
Byte 5
xx
Byte 6
xx
Byte 7
55h
(E1h)
Byte 8
AAh
aa – The least significant byte of the new PGN. Valid Range: 0..255
bb - The most significant byte of the new PGN. Valid Range: 0..255
xx – Don’t Care. Should be FFh following J1939 convention
55h – Low byte of 16 bit key
AAh – High byte of 16 bit key
Grayhill Confidential
Page 9
12/21/2012
4.4.
Set VDC Transmit Data Priority
Data field
Byte 1
Byte 2
E2h
New Pri
Byte 3
xx
Byte 4
xx
226
Byte 5
xx
Byte 6
xx
Byte 7
55h
(E2h)
Byte 8
AAh
New Pri – The new priority. Valid Range: 0..7
xx – Don’t Care. Should be FFh following J1939 convention
55h – Low byte of 16 bit key
AAh – High byte of 16 bit key
4.5.
Set VDC Data Transmission Period
Data field
Byte 1
Byte 2
E3h
dd
Byte 3
xx
Byte 4
xx
Byte 5
xx
227
Byte 6
xx
Byte 7
55h
(E3h)
Byte 8
AAh
dd – The value multiplied by 10ms, Valid range: 2..255 yielding between 20ms to 2.54
seconds. A value of zero disables the message from being sent periodically and is only sent
upon a status change.
xx – Don’t Care. Should be FFh following J1939 convention
55h – Low byte of 16 bit key
AAh – High byte of 16 bit key
4.6.
Changing J1939 NAME Fields*
Data field
Byte 1
Byte 2
E4h
subcmd
Byte 3
db0
Byte 4
db1
228
Byte 5
db2
Byte 6
xx
Byte 7
55h
(E4h)
Byte 8
AAh
subcmd – Represents the field within the name to change.
db0, db1, db2 – Data bytes associated with the sub command, LSB to MSB respectively.
xx – Don’t Care. Should be FFh following J1939 convention
55h – Low byte of 16 bit key
AAh – High byte of 16 bit key
Sub Commands
Sub Cmd
Field
0
ID
1
ECU Instance
2
Function Instance
3
Function
5
Vehicle System
4
Vehicle System Instance
6
Industry Group
7
Arbitrary Addr. Capable
Description
21 bits of db0..2
Bits 3..1 of Byte 5 (Most Significant at 3)
Bits 8..4 of Byte 5 (Most Significant at 8)
Bits 8..1 of Byte 6 (Most Significant at 8)
Bits 8..2 of Byte 7 (Most Significant at 8)
Bits 4..1 of Byte 8 (Most Significant at 4)
Bits 7..5 of Byte 8 (Most Significant at 7)
Bit 8 of Byte 8
Refer to J1939 base document for field value ranges and relationships.
*Must be send using a source address of 249 (0xF9).
Grayhill Confidential
Page 10
12/21/2012
4.7.
Change ECUID Command*
Data field
Byte 1
Byte 2
E5h
0..2
Byte 3
dd
Byte 4
xx
229
Byte 5
xx
Byte 6
xx
Byte 7
55h
(E5)
Byte 8
AAh
0 – Selects ECUID Part Number to change
1 – Selects ECUID Location to change
2 – Selects ECUID Type to change
dd – Number of ASCII characters in the field, max of 64
*Must be send using a source address of 249 (0xF9).
4.8.
Change ECUID Field Data*
Data field
Byte 1
Byte 2
E6h
Byte 3
230
Byte 4
Byte 5
Byte 6
1 to 7 bytes of ASCII Data
Byte 7
(E6h)
Byte 8
* No Key used in bytes 7 and 8
*Must be send using a source address of 249 (0xF9).
4.9.
Backlight Diagnostics*
Data field
Byte 1
Byte 2
E8h
DIAG
Byte 3
xx
232
Byte 4
xx
Byte 5
xx
Byte 6
xx
Byte 7
55h
(E8h)
Byte 8
AAh
DIAG – A non-zero value, with the exception of FFh, causes the module to blink all of the
backlights on for about one second to serve as a visual tool that the module is powered up
and the backlights are functioning properly. A value of zero bypasses this routine and, in
turn, speeds up the bootup process. If the value is equal to FFh the command is ignored.
Bytes 3 through 6 should be set to FFh for possible future expandability.
*Must be send using a source address of 249 (0xF9).
Grayhill Confidential
Page 11
12/21/2012
4.10. Encoder Configuration*
Data field
Byte 1
Byte 2
E9h
PARAM
233
Byte 3
ROLL OVR
Byte 4
xx
Byte 5
Byte 6
DATA
Byte 7
55h
(E9h)
Byte 8
AAh
PARAM –
o
SET VAL (Param = 0): Manually sets the encoder value to the value in Data. Must
be in the range from 0 to TOP. If value is greater than TOP then the value of TOP
is used. This data is not stored in non-volatile memory
o
TOP (Param = 1): TOP is the maximum value the encoder will count up to. Values
range from 4 to 65534 with the default = 255.
o
INIT VAL (Param = 2): Changes the initial value after boot to the value in Data.
This data is stored in non-volatile memory. It does not manually change the
encoder’s value.
o
ROLL OVR – A non-zero value, with the exception of FFh, causes the value to roll
over back to zero when incremented passed TOP or from zero to TOP when
decremented below zero, otherwise the count remains at zero or TOP.
o
DATA - Input data used in setting of the parameters.
*Must be send using a source address of 249 (0xF9).
5.
J1939 Messages
The following messages are defined in the J1939 documents and are implemented in the VDC
module.
5.1.
Address Claimed
PF – 238, Address Claimed
PS – 255, The destination address should always be the Global Address
PGN = (PF * 256) = 60928
Direction - Transmit
Data Length – 8
Transmission Rate – Upon boot or whenever requested
Start
Length
Desc.
Values
21
1.1
21 Bits
Identity Number
3.6
11 Bits
Manufacturers Code
5.1
3 Bits
ECU Instance
0 (Default)
5.4
5 Bits
Function Instance
0 (Default)
6.1
8 Bits
Function
135 (VDC module, Default) *
7.1
1 Bit
Reserved
0 (Defined by SAE)
7.2
7 Bits
Vehicle System
0 (Default) *
8.1
4 Bits
Vehicle System
Instance
0 (Default)
Grayhill Confidential
Page 12
0 to 2 -1
294 (Assigned to Grayhill by SAE)
12/21/2012
8.5
3 Bits
Industry Group
8.8
1 Bit
Arbitrary Address
Capable
0 = Global (Default) *
1 = On-Highway Equipment
2 = Agricultural and Forestry Equipment
3 = Construction Equipment
4 = Marine
5 = Industrial-Process Control-Stationary
6 & 7 = Reserved
0 = Not Capable
1 = Capable (Default)
*Refer to J1939 base document for the Function value based on the Industry Group and
Vehicle System combinations
Grayhill Confidential
Page 13
12/21/2012
5.2.
PGN Request
PF – 234, PGN Request
PS – DA, The Source Address of the VDC module to respond or the Global Address
PGN = (PF * 256) = 59904
Direction - Receive
Data Length – 3
Start
Length
Desc.
Values
Byte 1 of PGN being
1.1
1 Byte
0 to 255
requested (LSB)
Byte 2 of PGN being
2.1
1 Byte
0 to 255
requested
Byte 3 of PGN being
3.1
1 Byte
0
requested (MSB)
The following are the supported PGN’s that can be requested from the VDC module. If the
request is unsupported the VDC module shall respond with a NACK (Refer to J1939-21).
5.2.1. ECU Identification Information
PGN = 64965
Direction - Transmit
Data Length – Variable
Transmission Rate – Upon Request
Multi Packet Transerred – Yes
Start
Length
Desc.
A
<=200
ECU Part Number
B
<=200
ECU Serial Number
C
<=200
ECU Location
D
<=200
ECU Type
Values *
Ex. “3JYY1001-1”
Ex. “123456”
Ex. “CAB”
“VDC MODULE”
*All fields asterisk delimited
Grayhill Confidential
Page 14
12/21/2012
5.2.2. Software Identification
PGN = 65242 (0xFEDA)
Direction - Transmit
Data Length – Variable
Transmission Rate – Upon Request
Multi Packet Transerred – Yes
5.3.
Start
Length
1
1 Byte
2-N
Variable
Desc.
Number of software
fields
Software ID field
Values
1 to 125
ASCII characters. Each field delimited with
an asterisk and up to 200 characters
Acknowledgement Message
PF = 232 (0xE8)
PS = DA
PGN = 64965 (0xE800)
Direction - Transmit
Data Length – 8
Transmission Rate – Upon appropriate response
Start
Length
Desc.
Values *
0 = Postive Acknowledgement
1 = Negative Acknowledgement
1
1 Byte
Control Byte
2 = Access Denied
3 = Cannot Respond
2
1 Byte
Group Function
3-5
3 Bytes
Reserved by SAE
6-8
3 Bytes
Parameter Group being
Acknowledged
Refer to SAE-J1939-21
This message is send in response to a PGN Request of an unsupported PGN with the
Control Byte having a value of one.
Grayhill Confidential
Page 15
12/21/2012