AVRISP-MKII Clone Programmer Project

Macros
V2ProtocolConstants.h File Reference

## Macros

#define | CMD_SIGN_ON 0x01
#define | CMD_SET_PARAMETER 0x02
#define | CMD_GET_PARAMETER 0x03
#define | CMD_OSCCAL 0x05
#define | CMD_LOAD_ADDRESS 0x06
#define | CMD_FIRMWARE_UPGRADE 0x07
#define | CMD_RESET_PROTECTION 0x0A
#define | CMD_ENTER_PROGMODE_ISP 0x10
#define | CMD_LEAVE_PROGMODE_ISP 0x11
#define | CMD_CHIP_ERASE_ISP 0x12
#define | CMD_PROGRAM_FLASH_ISP 0x13
#define | CMD_READ_FLASH_ISP 0x14
#define | CMD_PROGRAM_EEPROM_ISP 0x15
#define | CMD_READ_EEPROM_ISP 0x16
#define | CMD_PROGRAM_FUSE_ISP 0x17
#define | CMD_READ_FUSE_ISP 0x18
#define | CMD_PROGRAM_LOCK_ISP 0x19
#define | CMD_READ_LOCK_ISP 0x1A
#define | CMD_READ_SIGNATURE_ISP 0x1B
#define | CMD_READ_OSCCAL_ISP 0x1C
#define | CMD_SPI_MULTI 0x1D
#define | CMD_XPROG 0x50
#define | CMD_XPROG_SETMODE 0x51
#define | STATUS_CMD_OK 0x00
#define | STATUS_CMD_TOUT 0x80
#define | STATUS_RDY_BSY_TOUT 0x81
#define | STATUS_SET_PARAM_MISSING 0x82
#define | STATUS_CMD_FAILED 0xC0
#define | STATUS_CMD_UNKNOWN 0xC9
#define | STATUS_CMD_ILLEGAL_PARAM 0xCA
#define | STATUS_ISP_READY 0x00
#define | STATUS_CONN_FAIL_MOSI 0x01
#define | STATUS_CONN_FAIL_RST 0x02
#define | STATUS_CONN_FAIL_SCK 0x04
#define | STATUS_TGT_NOT_DETECTED 0x10
#define | STATUS_TGT_REVERSE_INSERTED 0x20
#define | PARAM_BUILD_NUMBER_LOW 0x80
#define | PARAM_BUILD_NUMBER_HIGH 0x81
#define | PARAM_HW_VER 0x90
#define | PARAM_SW_MAJOR 0x91
#define | PARAM_SW_MINOR 0x92
#define | PARAM_VTARGET 0x94
#define | PARAM_SCK_DURATION 0x98
#define | PARAM_RESET_POLARITY 0x9E
#define | PARAM_STATUS_TGT_CONN 0xA1
#define | PARAM_DISCHARGEDELAY 0xA4

## Detailed Description

Macros for the V2 Protocol Packet Commands and Responses.

## Macro Definition Documentation

## § CMD_CHIP_ERASE_ISP

#define CMD_CHIP_ERASE_ISP 0x12

## § CMD_ENTER_PROGMODE_ISP

#define CMD_ENTER_PROGMODE_ISP 0x10

## § CMD_FIRMWARE_UPGRADE

#define CMD_FIRMWARE_UPGRADE 0x07

## § CMD_GET_PARAMETER

#define CMD_GET_PARAMETER 0x03

## § CMD_LEAVE_PROGMODE_ISP

#define CMD_LEAVE_PROGMODE_ISP 0x11

## § CMD_LOAD_ADDRESS

#define CMD_LOAD_ADDRESS 0x06

## § CMD_OSCCAL

#define CMD_OSCCAL 0x05

## § CMD_PROGRAM_EEPROM_ISP

#define CMD_PROGRAM_EEPROM_ISP 0x15

## § CMD_PROGRAM_FLASH_ISP

#define CMD_PROGRAM_FLASH_ISP 0x13

## § CMD_PROGRAM_FUSE_ISP

#define CMD_PROGRAM_FUSE_ISP 0x17

## § CMD_PROGRAM_LOCK_ISP

#define CMD_PROGRAM_LOCK_ISP 0x19

## § CMD_READ_EEPROM_ISP

#define CMD_READ_EEPROM_ISP 0x16

## § CMD_READ_FLASH_ISP

#define CMD_READ_FLASH_ISP 0x14

## § CMD_READ_FUSE_ISP

#define CMD_READ_FUSE_ISP 0x18

## § CMD_READ_LOCK_ISP

#define CMD_READ_LOCK_ISP 0x1A

## § CMD_READ_OSCCAL_ISP

#define CMD_READ_OSCCAL_ISP 0x1C

## § CMD_READ_SIGNATURE_ISP

#define CMD_READ_SIGNATURE_ISP 0x1B

## § CMD_RESET_PROTECTION

#define CMD_RESET_PROTECTION 0x0A

## § CMD_SET_PARAMETER

#define CMD_SET_PARAMETER 0x02

## § CMD_SIGN_ON

#define CMD_SIGN_ON 0x01

## § CMD_SPI_MULTI

#define CMD_SPI_MULTI 0x1D

## § CMD_XPROG

#define CMD_XPROG 0x50

## § CMD_XPROG_SETMODE

#define CMD_XPROG_SETMODE 0x51

## § PARAM_BUILD_NUMBER_HIGH

#define PARAM_BUILD_NUMBER_HIGH 0x81

## § PARAM_BUILD_NUMBER_LOW

#define PARAM_BUILD_NUMBER_LOW 0x80

## § PARAM_DISCHARGEDELAY

#define PARAM_DISCHARGEDELAY 0xA4

## § PARAM_HW_VER

#define PARAM_HW_VER 0x90

## § PARAM_RESET_POLARITY

#define PARAM_RESET_POLARITY 0x9E

## § PARAM_SCK_DURATION

#define PARAM_SCK_DURATION 0x98

## § PARAM_STATUS_TGT_CONN

#define PARAM_STATUS_TGT_CONN 0xA1

## § PARAM_SW_MAJOR

#define PARAM_SW_MAJOR 0x91

## § PARAM_SW_MINOR

#define PARAM_SW_MINOR 0x92

## § PARAM_VTARGET

#define PARAM_VTARGET 0x94

## § STATUS_CMD_FAILED

#define STATUS_CMD_FAILED 0xC0

## § STATUS_CMD_ILLEGAL_PARAM

#define STATUS_CMD_ILLEGAL_PARAM 0xCA

## § STATUS_CMD_OK

#define STATUS_CMD_OK 0x00

## § STATUS_CMD_TOUT

#define STATUS_CMD_TOUT 0x80

## § STATUS_CMD_UNKNOWN

#define STATUS_CMD_UNKNOWN 0xC9

## § STATUS_CONN_FAIL_MOSI

#define STATUS_CONN_FAIL_MOSI 0x01

## § STATUS_CONN_FAIL_RST

#define STATUS_CONN_FAIL_RST 0x02

## § STATUS_CONN_FAIL_SCK

#define STATUS_CONN_FAIL_SCK 0x04

## § STATUS_ISP_READY

#define STATUS_ISP_READY 0x00

## § STATUS_RDY_BSY_TOUT

#define STATUS_RDY_BSY_TOUT 0x81

## § STATUS_SET_PARAM_MISSING

#define STATUS_SET_PARAM_MISSING 0x82

## § STATUS_TGT_NOT_DETECTED

#define STATUS_TGT_NOT_DETECTED 0x10

## § STATUS_TGT_REVERSE_INSERTED

#define STATUS_TGT_REVERSE_INSERTED 0x20