8-bit
Microcontrollers
Application Note
Rev. 8015B-AVR-02/06
AVR069: AVRISP mkII Communication Protocol
Features
General commands
ISP commands
Return values
Parameters
1 Introduction
This document describes the AVRISP mkII protocol. The firmware is distributed
with AVR Studio 4.12 or later. Download the latest AVR Studio from the Atmel web
site,
http://www.atmel.com/products/AVR/.
The definition of all commands, responses, parameters and other defined values
can be found in chapter 6.1.
All device specific values can be found in the XML part description files. See
chapter 4 for how to find the parameter values for AVRISP mkII.
Figure 1-1. AVRISP mkII
2
AVR069
8015B-AVR-02/06
2 USB Communication
The communication between the AVRISP mkII and the PC is done through its USB
interface. The USB interface utilizes two bulk endpoints; one IN and one OUT. The
USB descriptors can be found in chapter 6.2.
2.1 Packet Format
The PC sends commands to the AVRISP mkII, which responds with an answer. Each
command will generate an answer.
Both commands and answers can be larger than the maximum packet size for the
bulk endpoints, so a command or answer can be split into several IN/OUT packets. A
short packet indicates the end of a command or answer.
The commands and their respective answers are described in chapter 3.
2.2 USB Driver
In order to communicate with the AVRISP mkII, a driver must be installed on the host
computer. A driver can be written from scratch or by using a driver development kit.
AVR Studio 4 bundles a USB driver licensed from Jungo (
www.jungo.com). By
obtaining a license from Jungo, 3rd party software can access the same driver as
AVR Studio. The user can then use both AVR Studio and other tools without
changing drivers.
Note: Firmware upgrades for AVRISP mkII can only be uploaded with the dedicated upgrade
software bundled with AVR Studio. This requires that the driver supplied with AVR Studio to be
installed.
3 Commands
This section describes all commands that can be entered to the AVRISP mkII, and all
the possible responses that each command can give back to the host.
For all commands, the AVRISP mkII will return an answer with an answer ID that is
equal to the command ID. The first byte in a command is always the command ID, the
first byte in an answer is always the answer ID.
3.1 General Commands
3.1.1 CMD_SIGN_ON
This command returns a unique signature string for the AVRISP mkII with this
implementation of the protocol.
Table 3-1
. Command format
Field Size Value Description
Command ID 1 byte CMD_SIGN_ON Command id
AVR069
3
8015B-AVR-02/06
Table 3-2. Answer format
Field Size Value Description
Answer ID 1 byte CMD_SIGN_ON Answer id
Status 1 byte STATUS_CMD_OK
This command will always
return STATUS_CMD_OK
Signature length 1 byte 10 Length of signature string
10 bytes
“AVRISP_MK2”
The signature string (not null
terminated)
3.1.2 CMD_SET_PARAMETER
The host can set a multitude of parameters in the AVRISP mkII. See the 3.4:
Parameters for a description of each parameter. All parameters are one-byte values.
Table 3-3
. Command format
Field Size Value Description
Command ID 1 byte CMD_SET_PARAMETER Command id
Parameter ID 1 byte
Value 1 byte
Table 3-4
. Answer format
Field Size Value Description
Answer ID 1 byte CMD_SET_PARAMETER Answer id
Status 1 byte
STATUS_CMD_OK or
STATUS_CMD_FAILED
A status value indicating the
result of the operation
3.1.3 CMD_GET_PARAMETER
The host can also read different parameters from the AVRISP mkII.
Table 3-5
. Command format
Field Size Value Description
Command ID 1 byte CMD_GET_PARAMETER Command id
Parameter ID 1 byte Which parameter to get
Table 3-6
. Answer format if command succeeds
Field Size Value Description
Answer ID 1 byte CMD_GET_PARAMETER Answer id
Status 1 byte STATUS_CMD_OK
A status value indicating
success
Signature length 1 byte The parameter value
Table 3-7
. Answer format if fails
Field Size Value Description
Answer ID 1 byte CMD_GET_PARAMETER Answer id

ATAVRISP2

Mfr. #:
Manufacturer:
Microchip Technology / Atmel
Description:
Programmers - Processor Based AVR INSystem mkII Programming Kit
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet