ADVANCED VEHICLE TECHNOLOGIES, Inc.

AVT-85x
Firmware Version Descriptions
Updated: 22 November 2022

Version 0.1
Initial release: 24 May 2010
Refer to AVT-85x User's Manual for complete information.


Version 0.2
Limited release: 24 May 2010
Taken from version 0.1.

Special for a customer. Lots of changes.
Refer to the special version of the User's Manual for complete information. Manual available on request.


Version 0.3
General release: 30 July 2010
Taken from version 0.1

VPW mode only:
Added the function: "Mask/Match/Respond." New commands:
5x 75: Query/define the mask bytes. Default values are $FF. Maximum of $0C bytes.
5x 76: Query/define the match bytes. Default values are $00. Maximum of $0C bytes.
5x 77: Query/define the response bytes. Default values are $00. Maximum of $0F bytes.
5x 78: Query/disable/enable the function. Default is disabled.
Operational description: Define the mask bytes, define the match bytes, define the response, and enable the command. When any message is received from the VPW network (including messages transmitted to the network by this device), each byte of the message is logically "ANDed" with a mask byte and compared to the match byte. This is done in byte order starting with the first byte of the message. If the message is shorter than the number of defined mask and match bytes the test immediately fails. The message can be equal to or longer than the defined number of mask and match bytes. If all match bytes compare successfully then the response is executed as a command by the AVT-85x interface. The manual will be updated as soon as possible. Questions ?? - contact me.

CAN mode only:
Changes to ISO15765 processing algorithms. If the AVT-85x unit is transmitting a multi-frame message to the CAN network and it receives a flow control frame with value $00 in the separation time field, the AVT-85x interface will transmit CAN frames as quickly as it can. Empirical measurements indicate approximately 275 microseconds between CAN frames.
(Note: in previous versions of firmware, if the AVT-85x interface received a $00 in the flow control separation time, it would set that value to $01 milliseconds.) In cases where the receiving module sets the flow control separation time to $00, the rate of transfer can, theoretically, be improved by a factor 3 or more.


Version 0.8 (0B)
General release: 6 December 2010
Taken from version 0.3

Corrected problems in how LIN receive buffers were processed.
Corrected problems in LIN periodic messages.
CAN mode: Added the "ATD Monitor" function. Refer to the manual supplement: AVT-85x ATD Monitor.


Version 0.9 (0B)
General release: ~22 January 2011
Taken from released version 0.8 (0B).

Changed the ATD Monitor function to only look at messages that have been ISO15765 processed. In other words, the function only operates on messages when ISO15765 mode is enabled.


Version 1.0 (0A)
General release: ~12 April 2011
Taken from released version 0.9 (0B)

CAN mode: Added a new ISO 15765 processing mode. ISO 15765 processing now has three modes: Mode0 is completely disabled. Mode1 is what existed previously which is all message passing through the AVT-85x interface were assumed to be and subjected to ISO 15765 processing. The new Mode2 requires the user specify a receive (from the CAN network) ID. Only those messages matching that ID are subjected to ISO 15765 processing. As for transmitting messages onto the CAN network - in Mode0 and Mode2 - if bit4 of the CAN channel byte of the transmit command is set (=1) then the message is ISO 15765 formatted before being transmitted. If bit4 is clear (=0) then the message is transmitted onto the CAN network "as-is".
As of 14 April 2011, the AVT-85x User's Manual has been updated and posted to reflect all the changes up to and including those of this version release.


Version 1.1 (0A)
General release: 16 May 2011
Taken from released version 1.0 (0A)

VPW: corrected two issues with Vpw_error2 bit0.
KWP operations (in CAN mode and KWP mode).
Corrected an issue where the AVT-85x would rarely transmit an extra byte onto the K-line after completing the transmit message.


Version 1.3 (0E)
General release: 19 September 2012
Taken from version 1.1 (0A)

Never really released. See version 1.4 (0A), below.


Version 1.4 (0A)
General release: 14 November 2012
Taken from version 1.1 and 1.3 (and other intermediate un-released versions)

The following changes were made to CAN mode operations:

Added the ability to have both physical layers installed on the board for CAN4. Added the 7x 45 command to select the CAN4 physical layer.
(Note that this requires additional hardware on the board. This was only done as a demo for a customer.)
71 45 - status query
72 45 00 - both disabled.
72 45 01 - single wire CAN (SWC) enabled.
72 45 02 - two wire CAN enabled.

Added the 7x 46 command to supress CAN0 and CAN4 "22 5F 3B" and "22 5F 7B" error responses from a non-zero block flow control frame.
71 46 - status query
72 46 00 - disable those error reports
72 46 01 - enable those error reports (default)

Corrected an error in sending 29-bit CAN received messages to the host with time stamps enabled.

The "SRR" bit is now always set to "don't care" for the acceptance masks, if in 29-bit mode and the register mode is 2 or 4.

Added the "7x 3F" command to include a transmit pacing timer for all transmissions from CAN0 and CAN4.
The default value is "00" which means no delay.
71 3F - status query, both CAN channels
72 3F 00 - status query for CAN0
72 3F 04 - status query for CAN4
73 3F 00 xx - set CAN0 pacing timer to "xx" milliseconds
73 3F 04 xx - set CAN4 pacing timer to "xx" milliseconds

Fixed some errors in the CAN0 and CAN4 pacing timer.

Changed the error code for a failure to transmit a CAN message.
It was: 22 34 xx.
It is now: 22 8C xx

Fixed a code flow problem processing a CAN transmit command that was pending.

Special CAN function for a customer.
Added the "7x 40" command to disable/enable the special CAN periodic message function I call "ARC":
ARC = asynchronous rolling counter
PROTVAL = protected value
CNTRCMD = contactor command
The user sets up a periodic message. The user writes/updates CNTRCMD. Each time the periodic message is set to transmit I update the ARC bits, read CNTRCMD bits, add them, 2's complement them, the result is PROTVAL. I write the updated PROTVAL into the periodic message and transmit the periodic message.
The CAN frame is:
byte1, bits 5:4 are CNTRCMD
byte1, bits 3:2 are ARC
byte2, bits 1:0 are PROTVAL

The following changes were made to LIN mode operations:

Added the LIN slave periodic message function. When an ID byte is received, the LIN periodic messages are searched. If a periodic message is found that is enabled, is a slave, and the ID byte matches that message is loaded into the transmit buffer and the transmit manager takes over to transmit it.
Modified the "73 1A 05 0x" and "74 1A 05 0x 0y" commands.
The last byte can have values 0, 1, 2, or 3.
0 = both LIN periodic functions are disabled.
1 = regular LIN periodic function is enabled
2 = slave LIN periodic function is enabled
3 = both regular and slave LIN periodic functions are enabled.

Put in a checksum test in the periodic message load routines. A checksum is computed and appended only if checksums are enabled. Previously it was automatic.


Version 1.5 (0A)
General release: 10 February 2013
Taken from released version 1.4 (0A)

The following change was made to LIN mode operations.
Added the "5x 6F" command to control the LIN slave transmit ack or echo function.
51 6F - query for status
52 6F 00 - transmit ack and echo disabled [default]
52 6F 01 - transmit ack enabled
52 6F 02 - transmit echo enabled


Version 1.6 (0C)
General release: 21 October 2013
Taken from version 1.5 (0A)

CAN mode: added a short delay after sending a large CAN message to the host.

CAN mode: added the Rolling UPper nibble function (RUP) to all periodic messages of CAN0 and CAN4.
This function is exclusive of the "ARC" function. Brief RUP function description:
When a CAN periodic message is enabled for "RUP". The upper nibble of CAN data byte 6 is incremented and data byte 7 is the J1850 computed checksum of bytes 0 to 6 of that frame.

Added the 7x 47 command to control the RUP function.
73 47 0x yy: RUP status for channel CANx and periodic message yy.
74 47 0x yy 0z: Set RUP status for channel CANx and periodic message yy to value z; where z = 0 is disabled and z = 1 is enabled.

KWP (stand alone and in CAN): Added the Mask, Match, Respond (MMR) function to KWP mode in both stand alone and CAN modes. When enabled, messages received from the network are masked by the mask byte(s) (masking is a bit-by-bit logical AND process). They are then checked to see if they match the match byte(s). If a match is detected, the stored response command is put into the command buffer and processed as a regular command. I will put a full description of this function into the manual as soon as I can.

Summary of the MMR commands:
5x 75: Mask byte(s).
51 75: query for mask byte(s).
5x 75 rr ss tt ... : set the mask bytes.

5x 76: Match byte(s).
51 76: query for match byte(s).
5x 76 rr ss tt ... : set the match bytes

5x 77: Response byte(s).
51 77: query for response byte(s).
5x 77 rr ss tt ... : set response byte(s).

5x 78: MMR function control.
51 78: MMR function status query.
52 78 00: Disable MMR function.
52 78 01: Enable MMR function.


Version 1.7 (0A)
Limited release: 24 October 2013
Taken from version 1.6 (0C)

Special for one customer. Requires hardware modification.
ATD input channel 1 is routed to ECT0 input and runs pulse accumulator channel "B" (PACB) - a 16-bit counter.
ATD input channel 2 is external PACB reset input. When the specified edge is detected, reset PACB.
CAN messages time stamped from PACB show the elapsed time from PACB reset to received CAN frame.
Changed all ECT0 functions to ECT2.
ECT0 is now PACB input.
Moved time stamp bits.
Changed the '5x 08' command allow selection of time stamp sources:
0: time stamps disabled.
1: time stamps enabled, internal 1 msec timer
2: time stamps enabled, CAN uses baud clock
3: time stamps enabled, external timer


Version 1.7 (0C)
General release: 1 April 2014
Taken from version 1.6 (0C)

All modes. "Wrapped" both the "Fifo2w" and "Fifo1r" routines to disable interrupts when reading and writing the external FIFOs. Done to solve a problem with 'extra' bytes showing up in the data stream from the AVT-85x interface to the host when the internal baud rate was running at 921.6 kbaud and a relatively heavy CAN bus traffic.
Also removed an unused variable and related command.


Version 1.8 (0A)
Limited release: 5 May 2014.
Taken from version 1.7 (0A)

Special for one customer.
Added one byte (seconds) to the CAN message time stamp.


Version 1.8 (0B)
Limited release: 15 June 2014
Taken from version 1.8 (0A)

Special for one customer.
Added the '52 40 02' command. This will echo all transmitted messages to the user, including periodic messages.
If the message being reported to the user is a transmit message, bit0 of the CAN channel number will be set.
Hence, a CAN channel number:
0 means a message received from the network on CAN0.
1 means a message transmitted to the network from CAN0.
4 means a message received from the network on CAN4.
5 means a message transmitted to the network from CAN4.


Version 1.8 (0C)
Limited release: 11 July 2014
Taken from version 1.8 (0B)

Special for one customer.
Bug fixes.


Version 1.8 (0D)
Limited release: 27 August 2014
Taken from version 1.8 (0C)

Special for one customer.
Updates to allow this firmware to run on new rev. "D" and then rev. "F" hardware.


Version 1.8 (0E)
Limited release: 17 September 2014
Taken from version 1.8 (0D)

Special for one customer.
Modifications to accommodate operations in the event there is/are CAN bus errors.
Throw out transmit commands if a bus error condition is present and other actions.


Version 1.8 (0F)
Limited release: 5 June 2015
Taken from version 1.8 (0E)

Special for one customer.
Marked: "Do Not Use."


Version 1.8 (10)
Limited release: 6 June 2015
Taken from version 1.8 (0E)

Special for one customer.
Extensive work to prevent lost bytes to user under heavy load.
Added the "Tx_cnt_avail" function to determine if enough room is available to store the response to the user.
Changed CANx_fifox to be an exact integer multiple of CAN frames.
Added CANx lost frame counter.
Measured execution times for various CAN routines.


Version 1.8 (11)
Limited release: 11 June 2015
Taken from version 1.8 (10)

Special for one customer.
Interim test version. Only send lost frame report if number of lost frames exceeds 250 (decimal).
Corrected an error in "Tx_cnt_avail" function.


Version 1.8 (12)
Limited release: 15 June 2015
Taken from version 1.8 (11)

Special for one customer.
Removed the '7x 17' command.
Removed the '7x 13 command.
Added a user defined threshold and 'time since last loss' to the lost frame counter function.
Do not allow lost frame counter to roll over.
Added calls to 'Tx_cnt_avail' to the following commands:
'7x 0C', '7x 18', '7x 1A', '7x 1B', and '7x 1C'
New command is '7x 50'.
Command summary:

71 50:
status query

73 50 xx yy:
xx = 00: threshold function disabled.
xx = 01 to FF: lost frame counter threshold.
yy = 00: timer function disabled.
yy = 01 to FF: timer setting.


Version 1.8 (13)
Limited release: 28 April 2016
Taken from version 1.8 (12)

Special for one customer.
Corrections to CAN0 and CAN4 receive managers for length of packet and computation of appropriate header byte(s).


Version 1.8 (14)
Limited release: 29 September 2016
Taken from version 1.8 (13)

Special for one customer.
Removed a lot of un-used code and functions. See firmware development file notes.
Added the "RC3" special function.
Added the related "RC3" commands: '7x 51', '7x 53' and '7x 54'.
Corrected the 'wired-or' outputs for LIN1 and LIN0.


Version 1.8 (15)
Limited release: 18 October 2016
Taken from version 1.8 (14)

Special for one customer.
Removed all "ATD" related code and variables.
Added a "reset and restore" command for CAN0 and CAN4.
'21 1A' - reset and restore CAN0.
'21 1B' - reset and restore CAN4.
Added new responses for those two commands.
'91 1A' and '91 1B' are success responses.
Corrected a bug in the periodic message manager.


Version 1.9 (0A)
General release: pending as of 11 May 2014
Taken from version 1.7 (0C)

Added the new "Counter And Checksum" function (CAC) for both CAN0 and CAN4 and all periodic messages.
Updated the User's Manual with a brief discussion of all three special functions for all CAN periodic messages.


Version 2.0 (0A)
General release: 24 June 2014
Taken from version 1.9 (0A)

Corrected an error in the ARC function.
No other changes.


Version 2.1 (0A)
General release: 6 August 2014
Taken from version

Changes developed for new AVT-853 board revision "D".
External resonator now fixed at 8.0000 MHz (removed all references to a 4.0000 MHz resonator).
Port K7 now used to detect AVT-853 rev. "D" hardware platform.
CAN mode:
Corrected the '7x 45' command.
Removed the '7x 17' command.
Removed the '5x 6E' command.
Modified the '7x 47' command to allow variable length command with variable positions for Rolling Upper Nibble and associated CRC byte. See next release for complete description of '7x 47' command.


Version 2.1 (0B)
General release: 16 August 2014
Taken from version 2.1 (0A)

Corrected the initialization of Port P6. Corrected the '7x 45' command for correct selection of CAN4 physical layer.
Changed the '7x 47' command to specify the location of the Rolling UPper nibble (RUP) and select if the CRC byte is present or not.
Complete description of the new '7x 47' command:

73 47 0x yy status query, report channel x, msg yy

74 47 0x yy 0v
x: channel
0: CAN0
4: CAN4
yy: msg number $01 to $20
v: op mode
0: disabled
1: enabled - data byte7 is CRC location

75 47 0x yy 0v wz
x: channel
0: CAN0
4: CAN4
yy: msg number $01 to $20
v: op mode
0: disabled
2: Mode2
w: 0: do not include the crc byte
1: include the crc byte
z: location of counter, 0 to 6, or 7 (depending if CRC byte is present or not)


Version 2.1 (0C)
General release: 17 August 2014
Taken from version 2.1 (0B)

Changed the '7x 47' command to specify the location of the rolling nibble (instead of the CRC byte).


Version 2.2 (0A)
General release: 22 September 2014
Taken from version 2.1 (0C)

Put in a 'sequential' feature for LIN Slave Periodic Messages.
The function is automatic based on message ID. If more than one periodic message has the same ID, then they will be transmitted sequentially.


Version 2.2 (0C)
General release: 29 October 2014
Taken from version 2.2 (0A)

Added a 'Rolling Nibble' function to LIN periodic messages.
When enabled, it inserts a 2-bit rolling counter into bits 1:0 of data byte 2 (bytes are zero based).
Added the 7x 49 command to control this new function. The command is described here.
73 49 05 0x - Status query.
'x' is the periodic message number, $1 to $A.
74 49 05 0x 0y - Command to control the status.
'x' is the periodic message number, $1 to $A.
'y' = 0 = disable the function.
'y' = 1 = enable the function.


Version 2.2 (0F)
General release: 31 December 2014
Taken from version 2.2 (0C)

Corrected some configuration issues related to the new "D" and "F" hardware platforms.


Version 2.2 (10)
Temporary release: 10 January 2015
Taken from version 2.2 (0F)

Temporary release preceding version 2.2 (11).


Version 2.2 (11)
General release: 12 January 2015
Taken from version 2.2 (0F)

Affects CAN0 and CAN4 only. Added a function to 'pause' periodic messages when an ISO15765 transaction is in-progress.
Transmission of all periodic messages, for that channel, will be halted after a First Frame is transmitted until the last Consecutive Frame is received. Periodic messages will immediately resume when the ISO15765 transaction terminates (either successfully or from an error). The function operates on each CAN channel independently.
Added the 7x 1F command to control the function. The command is described here.
71 1F - Status query, both channels.
72 1F 0x - Status query, channel 'x'.
'x' is the CAN channel, $0 or $4.
73 1F 0x 0y - Command to control the status.
'x' is the CAN channel, $0 or $4.
'y' = 0 = disable the function.
'y' = 1 = enable the function.

Changes were made to several transmit routines and managers. These changes were to prevent 'backed-up' periodic messages from hogging the CAN transmit buffer and preventing transmit commands from being executed. A form of priority is now given to transmit commands.

This firmware is still being tested. Contact me if you want a copy of it for testing.


Version 2.3 (0A)
General release: 9 February 2015
Taken from version 2.2 (0B)

All changes from 2.2 (0C), 2.2 (0F), and 2.2 (11) are included in this new release.

This is a major new release. There were many changes.
The biggest change was to include support for the second LIN channel that is found on the AVT-853 board revisions "D" and "F".

Notes:
- Only AVT-853 board revisions "D" and "F" (and later) have the second LIN channel.
- AVT-852 (USB interface) does not have hardware support for the second LIN channel.
- The board revision level is written in copper on the bottom of the board.
- The rev. level written in the white block on the top of the board is the circuit configuration.

The existing LIN channel found on all revisions of the AVT-852 and AVT-853 boards is now known as LIN1 (channel 5).
The "new" second LIN channel is known as LIN0 (channel 7).

When in CAN mode, LIN1 and KWP operations are mutually exclusive since they share one hardware channel and transceiver.
When in CAN mode, LIN0 can operate any time. It is independent of LIN1 and KWP.
The format of a number of configuration commands were changed to accommodate the new LIN0. Those commands include: 5x 01; 5x 06; 5x 08; 5x 19; 5x 24; 5x 28; 5x 40; 5x 5A; 5x 66; 5x 6F; 5x 69.

Some existing commands could not be shared between LIN1 and LIN0. Therefore, new commands for LIN0 were developed.

I removed the 5x 3C command.
I removed the 7x 32 command.
Both seemed useless to me and I doubt anyone uses them.

I reviewed the User's Manual and made changes where necessary in the discussion sections.
Completely re-organized the CAN command section to include all CAN, LIN1, KWP, and LIN0 commands. I removed the separate sections "LIN - in CAN mode" and "KWP - in CAN mode". All Commands are in one Section (16, at present) and all Responses are in Section 16.1. I provide detailed information about the format for all transmit commands and all configuration commands. For every configuration command I note (in bold) what channel or channels the command applies to. If there is no channel indication, then the command is for the "interface" versus for a specific channel.


Version 2.4 (0A)
Limited release: 31 March 2015
Taken from version 2.3 (0A)

Major changes to the number and organization of CAN periodic messages. There are now $64 (100 decimal) CAN periodic messages in total. They are allocated to the four groups (CAN0 group1, CAN0 group2, CAN4 group1, and CAN4 group2). The default allocation is such as to make it backward compatible with previous versions. They can be dynamically allocated to the four groups.
Added two new commands, "7x 4C" and "7x 4D" to allocate the periodic messages among the four groups.
Refer to the User's manual for a complete description of the organization of the CAN periodic messages and the use of the two new commands.

The manual has been updated and posted.


Version 2.5 (0A)
General release: 22 May 2015
Taken from version 2.4 (0A)

Added the CAN Increment Byte (CIB) function and the associated "7x 4E" command.
Refer to the User's manual for a complete description of the function and command.

The manual has been updated and posted.


Version 2.5 (0B)
General release: 27 May 2015
Taken from version 2.5 (0A)

Put in a change to the CIB function. The increment is $0F. If the counter was at $70, it should jump to $8F.


Version 2.5 (0C)
General release: 12 June 2015
Taken from version 2.5 (0B)

Added the RC2 (Rolling Counter 2) function and the associated "7x 4F" command.
Refer to the User's manual for a complete description of the function and command.

The manual has been updated and posted.


Version 2.5 (0D)
General release: 17 June 2015
Taken from version 2.5 (0C)

Added the RC3 (Rolling Counter 3) function and the associated "7x 51" command.
Refer to the User's manual for a complete description of the function and command.

The manual has been updated and posted.
Added the "5x 7D" command to inhibit LIN bus noise errors. These are the 25 86 ... error responses. Specifically, if the error is "noise" only, the error response is suppressed and the error condition is cleared.


Version 2.5 (0E)
Limited release: 25 September 2015
Taken from version 2.5 (0D)

Done for one customer.
Added the '06' option to the '52 63 xx' command.
This gives a master clock interval of 2.56 msec


Version 2.5 (0F)
Limited release: 12 October 2015
Taken from version 2.5 (0E)

Done for one customer.
In CAN mode; added ability to preserve order of transmit commands.
If bit 5 of the channel byte, is set, then only transmit buffer0 is used, thus preserving the order of transmit commands.


Version 2.5 (11)
General release: unknown, possibly 23 April 2016
Taken from version 2.5 (0D)

Done for one customer.
Changed the organization of EEPROM space to provide additional "auto start" space.


Version 2.6 (0A)
Limited release: 14 October 2015
Taken from version 2.5 (0D)

This version was never fully released. It was quickly replaced by version 2. 6 (0B) described below.


Version 2.6 (0B)
General release: 22 October 2015
Taken from version 2.6 (0A)

Reduced the total number of CAN periodic messages to $58 (88 decimal).
Needed to do this to recover some needed RAM space.

Significant changes to the firmware to prevent loss of data when operating in an environment requiring very high data throughput.
If there is not enough bandwidth to move data to the control computer, CAN frames are discarded. Implemented a lost CAN frame counter.
If the lost frame counter exceeds the threshold, a report is issued to the control computer.
Implemented a lost CAN frame timer. When the timer expires, if the lost frame counter is not zero, a report is issued to the control computer.
Added the "7x 50" command to query and set the lost frame timer.

71 50: query for the threshold value and timer value
73 50 xx yy:
'xx' = 00, lost frame threshold function is disabled (default)
'xx' = 01 to FF lost frame counter threshold value
'yy' = 00, lost frame timer function is disabled (default)
'yy' = 01 to FF, timer function in milliseconds

Added selection value '06' to the '52 63 xx' command.
'06' sets master timer to 2.56 msec

Added the 'bit5' option for a CAN transmit command.
If 'bit5' is set, only CAN transmit buffer0 is used. This preserves the order of CAN transmit commands.

Added the LIN1 Digital Output (DO) function to the firmware and a corresponding hardware modification (rev. FE) for LIN1 (channel 5).
Digital output is U1 pin #109, PortP7, routed to connector P3 pin #10.

The new LIN1 Digital Output commands are:

51 89: LIN1 (channel 5) Digital Output status query
52 89 00: function disable
52 89 01: function enabled

51 8A: LIN1 (channel 5) Digital Output setup query
54 8A rr 0x yy: function setup
rr: LIN ID of message to 'look' for.
x: offset into the data field, zero based.
yy: mask value

T he logic for the LIN1 (channel 5) digital output function.
The new logic is:
if (byte AND mask) == mask
then output = 1, high
else output = 0, low


Version 2.7 (0A)
Limited release: 31 January 2016
Taken from version 2.6 (0B)

Added the new LIN1 Special Function (LSF).
The user specifies an expected LIN byte sequence.
The user specifies whether each byte in the sequence is receive or transmit (relative to the AVT-85x interface).
The enable command takes effect as soon as the LIN bus is idle.
When the function is enabled, all LIN1 (channel 5) functions are disabled. This includes transmit, receive, periodic, and slave periodic functions.
The function commences as soon as a break is received. A synch byte is then expected.
After the synch byte is received, every byte received from the LIN bus is compared to the expected value from the user defined sequence. Bytes designated to be transmitted are done so as specified in the sequence.
If anything happens that is not exactly as specified, the function is aborted and the "21 92" error response is sent to the control computer.
If the function completes correctly, the success report "52 8B F0" is sent to the control computer.
The function watchdog timer resets every time a byte is received from the network.
If the watchdog timer expires, the function aborts and the "21 92" error response is sent to the control computer.

Summary of new LSF commands

LSF disable/enable command
-----
51 8B: status query
52 8B 00: disable the function
52 8B 01: enable the function

LSF byte sequence command
-----
51 8C: query for the byte sequence
5x 8C rr ss ... "rr ss ..." is the user specified byte sequence

LSF byte rcv/xmt map
-----
51 8D: query for the map
53 8D rr ss: bit map specifying if each byte is receive or transmit. Bit0 is the first byte on the network (after the synch byte). A '0' bit means expected receive byte. A '1' bit means transmit the corresponding byte.

LSF watchdog timer reset value
-----
51 8E: query for the reset value (default = 0x14, 20 milliseconds)
52 8E rr: set the watchdog reset value to 'rr' milliseconds


Version 2.8 (0A)
Limited release: 24 February 2016
Taken from version 2.6 (0B)

Special for one customer and their modified hardware.
Added the '5x 8E' command to control the K-line switches and the CAN bus termination.


Version 2.8 (0B)
Limited release: 13 March 2016
Taken from version 2.8 (0A)

Special for one customer and their modified hardware.
Updated the '5x 8E' command to add one more switch.
Removed the LIn1 Digital Output function.
Removed the related '5x 89' and '5x 8A' commands and related variables.


Version 2.9 (0A)
Limited release: 31 March 2016
Taken from version 2.7 (0A)

Special for one customer.
Completely re-organized CAN periodic message structure.
Modified all CAN periodic message routines.
Added a new byte to the CAN periodic message structure.
Added the CAN "RC4" special function.
Added the '7x 52' command for the "RC4" special function.
"RC4" special function summary: 4-bit counter, upper nibble, byte in data field is specified. J1850 CRC is used and stored in the byte after the counter.

'7x 52' command summary. For CAN periodic message only.

73 52 0x yy: status query
'x' is CAN channel number
'yy' is periodic message number.

74 52 0x yy 0v: command
'x' is CAN channel number
'yy' is periodic message number.
v = 0: disable function
v = 1: enable function

75 52 0x yy 0v rt

'x' is CAN channel number
'yy' is periodic message number.
v = 0: disable function
v = 1: enable function
r = 0: counter is lower nibble
r = 1: counter is upper nibble
t = location of counter, 0 to 6 (in data field, zero based indexing)


Version 2.9 (0B)
Limited release: 28 June 2016
Taken from version 2.9 (0A)

Updated the "ABX" '7x 3A' command to allow specifying the start address and to allow specifying the byte count.
Command summary:

71 3A:
Status query, both channels.

72 3A 0x:
Status query for channel 'x'.

73 3A 0x 0y:
Disable/enable command.
x = CAN channel number.
y = 0; disable the function.
y = 1; enable the function.

75 3A 0x 0y mm nn:
x = CAN channel number.
y = 0; disable the function.
y = 1; enable the function.
mm nn: start address. Address range: $0000 to $3FFF. (Limited to page $38.)

77 3A 0x 0y mm nn pp qq:
x = CAN channel number.
y = 0; disable the function.
y = 1; enable the function.
mm nn: start address. Address range: $0000 to $3FFF. (Limited to page $38.)
pp qq: byte count. Byte count range $0001 to $8000.


Version 2.9 (0C)
Limited release: 25 September 2016
Taken from version 2.9 (0B)

Re-vamped and corrected the LIN1 Digital Output function.
There was a flaw in the update routine. I only call the digital output manager after the buffer is closed/full. That means I only check the receive buffer once.


Version 2.9 (0D)
Limited release: 15 February 2017.
Taken from version 2.9 (0C)

Updated the LIN1 Digital Output function, '5x 89' command.

Command summary:

51 89:
Status query.

52 89 00:
Disable the function.

52 89 01:
Enable the function. If a message matching the criteria is found, the digital output is update and the message is passed to the user.
(Same operation as previous firmware version.)

52 89 02:
Enable the function. If a message matching the criteria is found, the digital output is update and the message is discarded.


Version 2.9 (0E)
General release: 6 April 2017
Taken from version 2.9 (0D)

Added the 'XOR' checksum function to KWP mode. KWP checksum command is now:
51 4B: status query.
52 4B 00: checksum is simple sum.
52 4B 01: checksum is 2's complement of sum.
52 4B 02: checksum is XOR.


Version 2.9 (0F)
General release: 8 April 2017
Taken from version 2.9 (0E)

Added the digital output function to CAN mode.
Same as LIN1 digital output function, same output, except for CAN (both channels).
Added two new related commands.
7x 5A: CAN digital output setup.
72 5A 0x - status query

76 5A 0x 0r rr 0s tt - set-up
x = CAN channel 0 or 4
rrr = 11-bit ID
s = byte offset into data field 0 to 7
tt = mask and match value

78 5A 0x rr rr rr rr 0s tt - set-up
x = CAN channel 0 or 4
rrrrrrrr = 29-bit ID
s = byte offset into data field 0 to 7
tt = mask and match value

7x 5B: CAN digital output disable/enable
--------
72 5B 0x - status query

73 5B 0x 0r
x = CAN channel 0 or 4
r = 0 = disable
r = 1 = enable, send rcvd message to user
r = 2 = enable, do not send rcvd message to user


Version 2.9 (10)
General release: 10 May 2017
Taken from version 2.9 (0F)

Updated the 7x 5A command to allow either bit-wise mask and match or single byte match only (no mask).
78 5A 0x rr rr rr rr st vv - set-up
x = CAN channel 0 or 4
rrrrrrrr = 29-bit ID
s = 0 if bit-wise mask and match
s = 1 if byte wise match only
t = byte offset into data field 0 to 7
vv = mask and match value


Version 2.9 (11)
General release: 28 August 2017
Taken from version 2.9 (10)

Added a new routine for CAN0 when processing an ISO15765 message, received flow control frame where the block size is not zero. I want to see all the flow control frame parameters.


Version 2.9 (12)
General release: 9 September 2017
Taken from version 2.9 (11)

Added new LIN Special Function #2 (LSF2).
Note that LIN "counter 0" function is LIN Special Function #1 (LSF1).
Added the 5x 7F command to CAN mode command processor for the new LSF2.
For LIN1 periodic messages. Data byte1, upper nibble, is 4-bit counter. Data byte 2, is J1850 CRC.
Had to reorganize LIN periodic messages to add control2 byte.

5x 7F command
-------
53 7F 0x 0y status query, msg yy

54 7F 0x 0y 0z set msg yy, status z
x: channel number: 5 or 7
y: msg number $01 to $0A
z: op mode
0: special function #2 disabled
1: special function #2 enabled


Version 3.0 (0A)
General release: 26 February 2018
Taken from version 2.9 (12)

Both CAN0 and CAN4 channels affected.
Corrected the ISO15765 function so that a received flow control frame with non-zero block size is properly handled.
The two error responses: '22 5F 3B' and '22 5F 7B' were removed.
The '7x 46' command was removed.


Version 3.1 (0A)
General release: 2 April 2018
Taken from version 3.0 (0A)

Added new Short LIN (SLIN) function to LIN1 (channel 5, pin #7 of the D15 Network connector).
This new function, when enabled, operates as follows:
It uses LIN1 (channel 5, pin #7 of the D15 Network connector).
Comm parameters are set to: 2400 baud, 1 start bit, 8 data bits, 1 odd parity bit, 1 stop bit.
Every frame is constructed as: break symbol (13 to 14 bit times); 13 data bytes, checksum byte (using classic LIN algorithm).
Note: This is NOT LIN. It uses the LIN1 channel, but the frame construction is NOT LIN.
Periodic message $0A (ten, decimal) has been modified to accept a 13 data byte message.
Two new commands were added to support this new function:

51 90: status query
52 90 00: disable the function
52 90 01: enable the function

51 91: query for periodic message $0A data field.
5x 91 rr ss ... : set periodic message $0A data to 'rr ss ...' maximum of $0D (13 decimal) data bytes allowed


Version 3.2 (0A)
General release: 6 May 2018
Taken from version 3.1 (0A)

KWP mode (both in CAN mode and stand alone).
Added the '52 30 yy' command. That command will send a 'yy' millisecond break symbol onto the K-line. When the command is issued, the first response is '62 30 yy' to indicate the command was processed and the break symbol has started. When the break symbol duration is complete, the AVT-85x will respond with '62 30 00' to indicate the break symbol has completed and normal operations are resumed.
Note that the accuracy of the break symbol duration is +0 and -1 millisecond.

The manual has been updated and posted.


Version 3.2 (0B)
General release: 8 May 2018
Taken from version 3.2 (0A)

Changed the '52 30 yy' command to immediately start the break symbol without regard to the status of the K-line or any activity on the K-line.
Any open receive buffer(s) are immediately closed. Any transmit activity is immediately aborted.
(Previous version waited for no K-line activity.)
No manual change.


Version 3.3 (0A)
General release: 27 May 2018
Taken from version 3.2 (0B)

Corrected the error handling for the '7x 38' store ABX data command.
No manual change.


Version 3.4 (0A)
General release: 19 June 2018
Taken from version 3.3 (0A)

Changed the LIN1 Digital Output function to include a 'match only' option.
Previously it only operated as 'mask and match'.
Changed the '5x 89' command to include the choice between 'mask and match' or 'match only'.

Manual has been updated and posted.


Version 3.5 (0A)
General release: 10 September 2018
Taken from version 3.4 (0A)

Added the new Counterx function (also known as LIN special function #4) to LIN0 and LIN1 channels.
This new function allows the user to specify the size and location of a counter to a LIN periodic message.

The manual has been updated and posted.


Version 3.6 (0A)
General release: 18 October 2018
Taken from version 3.5 (0A)

Removed a wait call in both LIN0 and LIN1 receive buffer processing routines.
If a message (frame) received from the LIN bus, but it can not be forwarded to the client (not enough room in FIFO2), then that frame is discarded.
The AVT-85x interface does not 'wait' to see if room becomes available.
A one-byte lost frame counter is incremented (and can roll-over).
When communications with the client is re-established, the AVT-85x will issue a lost frame error response.
For LIN0, the new error response is '22 5C yy'.
Similarly for LIN1 the response is: '22 5D yy'.
Note that 'yy' can roll-over and if it is '00', then no error response will be issued.

The manual has been updated and posted.


Version 3.7 (0A)
General release: 13 December 2018
Taken from version 3.6 (0A)

Renamed the previous "Digital Output" function to "Digital Output 1" function (or "DO1").
Changed the memory assigned to the "DO1" function.
Now using common memory for all modes.
Added the new "Digital Output 2" function (or "DO2").
The user specifies the ID of the message this to which function is to be applied.
The user specifies the starting byte of the data field (0 to 7).
The user specifies the 'mask' byte(s).
The user specifies the 'match' byte(s).
The user specifies the channel (0, 4, or 5) to which the function is to be applied.
When a frame is received on that channel, with the specified ID, if there are sufficient bytes to perform the operation, the data is logically (bit-wise) 'AND'ed with the 'mask byte(s)'.
The result is then compared to the 'match' byte(s). If there is an exact match, the digital output is driven high (+5 vdc).
Else, the digital output is driven low.
The received message is then either passed to the user or discarded, as specified by the user.

Added the '5x 96', '5x 97', '5x 98', and '5x 99' commands to support the new "DO2" function.

Quick summary of new commands.

Mask Bytes
---------------
51 96 -- Query for mask bytes.
5x 96 rr ss ... -- Set mask bytes to 'rr ss ...'

Match Bytes
----------------
51 97 -- Query for match bytes.
5x 97 rr ss ... -- Set match bytes to 'rr ss ...'

Message ID
----------------
51 98 -- Query for message ID.
53 98 0t rr -- Set LIN message ID
t -- channel number: 0, 4, 5
rr -- LIN ID
55 98 0t 0r ss -- Set CAN 11-bit message ID
t -- channel number: 0, 4, 5
r ss -- CAN 11-bit ID

57 98 0t rr ss tt vv -- Set CAN 29-bit message ID
t -- channel number: 0, 4, 5
rr ss tt vv -- CAN 29-bit ID

Manual has been updated.


Version 3.8
Limited release: 21 May 2019
Taken from version 3.7 (0A)

Urgent request from one customer.
Added the CAN periodic message RC6 special function and related '7x 5F' command.

Manual has been updated.


Version 3.9
General release: 26 May 2019
Taken from version 3.8 (0A)

Added the CAN periodic message RC5 special function and related '7x 5D' and '7x 5E' commands.

Manual has been updated and posted.


Version 4.0 (0A)
General release: 6 August 2019
Taken from version 3.9 (0A)

Corrected the '7x 18' periodic message setup command for VPW.  It was incorrectly checking for a maximum command length of $0C.  The real maximum command length is $0D.

The manual was not updated.


Version 4.2 (0B)
General release: 9 April 2020
Taken from version 4.0 (0A)

Added "format byte processing" to KWP operations while in CAN mode and in stand alone mode.
Format byte processing is based on ISO 14230-2 (1999).
When enabled, the total length of the K-line 'message' is computed according to the rules of ISO 14230-2 and the receive buffer is closed when that length message is received, or a time-out occurs.
When in CAN mode, format byte processing is enabled using the '5x 28' command and specifying channel 6 (KWP operations).
When in KWP stand alone mode, format byte processing is enabled using the '5x 28' command.
Two new error responses were added:
21 11 indicates a KWP loss of arbitration for attempts 1 or 2.
21 12 indicates a KWP loss of arbitration for attempt 3; the transmit message is discarded.

The manual has been updated.


Version 4.4 (0B)
General release: 25 February 2022
Taken from version 4.2 (0B)

Added the '5x 0A' command to set a LIN ID filter.
Implemented the LIN ID filter function into the LIN receive manager.

The manual was not updated.


Version 4.5 (0A)
General release: 28 July 2022
Taken from version 4.2 (0B)

Added two new look-up tables to the RC6 special function (part of CAN periodic messages).
Related to the '7x 5F' command.
Added two new options to the '7x 5F' command.
1: TA_01 (existed previosly)
2: Klemmen_01 (existed)
3: Motor_01 (new)
4: Uss_01 (new)

Added the '21 0F' error response if the rc6 control bits are not in the range '000' to '011'.

The manual was not updated.


Version 4.6 (0A)
General release: 8 October 2022
Taken from version 4.5 (0A)

Added one more new look-up table to the RC6 special function (part of CAN periodic messages).
An option of the '7x 5F' command.
New option: 5: ORUG_01

The manual was not updated.


Version 4.7 (0A)
General release: 22 November 2022
Taken from version 4.6 (0A)

Added one more new look-up table to the RC6 special function (part of CAN periodic messages).
An option of the '7x 5F' command.
New option: 6: USER
This is a 'user defined' table.
Added the new '7x 60' command to define the 'user defined' look-up table for the '7x 5F' command option 6.

The manual has been updated and posted.


Version x.x
General release: xxx
Taken from version xxx

xxx


Version x.x
General release: xxx
Taken from version xxx

xxx


Version x.x
General release: xxx
Taken from version xxx

xxx


Version x.x
General release: xxx
Taken from version xxx

xxx


Version x.x
General release: xxx
Taken from version xxx

xxx


Version x.x
General release: xxx
Taken from version xxx

xxx


Version x.x
General release: xxx
Taken from version xxx

xxx




As always:
-- If you find a problem in the firmware - let me know.
-- If you find a problem in the manual - let me know.
I will fix any and all problems as quickly as I can. As soon as I know of them.




Site Map