|
/*--------------------------------------------------------------------------*/
/* +-------------+------------+------+ */
/* Commands | Host writes | Host reads | | */
/* -------- +-----+-------+------+-----+ | */
/* | ID | data | data | | Note | */
/* +-----------------------------------+-----+-------+------+-----+------+ */
/* | Enter programming mode | 'P' | | | 13d | 1 | */
/* | Report autoincrement address | 'a' | | | 'Y' | | */
/* | Set address | 'A' | ah al | | 13d | 2 | */
/* | Write program memory, low byte | 'c' | dd | | 13d | 3 | */
/* | Write program memory, high byte | 'C' | dd | | 13d | 3 | */
/* | Issue Page Write | 'm' | | | 13d | | */
/* | Read program memory | 'R' | |dd(dd)| | 4 | */
/* | Write data memory | 'D' | dd | | 13d | | */
/* | Read data memory | 'd' | | dd | | | */
/* | Chip erase | 'e' | | | 13d | | */
/* | Write lock bits | 'l' | dd | | 13d | | */
/* | Write fuse bits | 'f' | dd | | 13d | 11 | */
/* | Read fuse and lock bits | 'F' | | dd | | 11 | */
/* | Leave programming mode | 'L' | | | 13d | 5 | */
/* | Select device type | 'T' | dd | | 13d | 6 | */
/* | Read signature bytes | 's' | | 3*dd | | | */
/* | Return supported device codes | 't' | | n*dd | 00d | 7 | */
/* | Return software identifier | 'S' | | s[7] | | 8 | */
/* | Return sofware version | 'V' | |dd dd | | 9 | */
/* | Return hardware version | 'v' | |dd dd | | 9 | */
/* | Return programmer type | 'p' | | dd | | 10 | */
/* | Set LED | 'x' | dd | | 13d | 12 | */
/* | Clear LED | 'y' | dd | | 13d | 12 | */
/* | Universial command | ':' | 3*dd | dd | 13d | | */
/* | New universal command | '.' | 4*dd | dd | 13d | | */
/* | Special test command | 'Z' | 2*dd | dd | | | */
/*--------------------------------------------------------------------------*/
/* +-------------+------------+------+ */
/* 命令 | Host writes | Host reads | | */
/* -------- +-----+-------+------+-----+ | */
/* | ID | data | data | | Note | */
/* +-----------------------------------+-----+-------+------+-----+------+ */
/* | 进入编程模式 | 'P' | | | 13d | 1 | */
/* | 报告自动增量地址 | 'a' | | | 'Y' | | */
/* | 地址设置 | 'A' | ah al | | 13d | 2 | */
/* | 写程序存储器, 低8位字节 | 'c' | dd | | 13d | 3 | */
/* | 写程序存储器, 高8位字节 | 'C' | dd | | 13d | 3 | */
/* | 页写?? | 'm' | | | 13d | | */
/* | 读程序存储器 | 'R' | |dd(dd)| | 4 | */
/* | 写数据存储器 | 'D' | dd | | 13d | | */
/* | 读数据存储器 | 'd' | | dd | | | */
/* | 片擦除 | 'e' | | | 13d | | */
/* | 写lock字节 | 'l' | dd | | 13d | | */
/* | 写熔丝位 | 'f' | dd | | 13d | 11 | */
/* | 读熔丝位和锁定位 | 'F' | | dd | | 11 | */
/* | 退出编程模式 | 'L' | | | 13d | 5 | */
/* | 器件型号选择 | 'T' | dd | | 13d | 6 | */
/* | 读芯片标志位 | 's' | | 3*dd | | | */
/* | 报告支持器件型号 | 't' | | n*dd | 00d | 7 | */
/* | 返回软件标示 | 'S' | | s[7] | | 8 | */
/* | 返回编程器firmwear版本 | 'V' | |dd dd | | 9 | */
/* | 返回编程器硬件版本 | 'v' | |dd dd | | 9 | */
/* | 返回编程模式 | 'p' | | dd | | 10 | */
/* | 指示灯点亮 | 'x' | dd | | 13d | 12 | */
/* | 指示灯熄灭 | 'y' | dd | | 13d | 12 | */
/* | 通用命令 | ':' | 3*dd | dd | 13d | | */
/* | 新的通用命令 | '.' | 4*dd | dd | 13d | | */
/* | 特殊测试命令 | 'Z' | 2*dd | dd | | | */
/* +-----------------------------------+-----+-------+------+-----+------+ */
/* +-----------------------------------+-----+-------+------+-----+------+ */
/* */
/* NOTE 1 */
/* The Enter programming mode command MUST be sent one time prior to */
/* the other commands, with the exception of the 't', 'S', 'V', 'v' */
/* and 'T' commands. The 'T' command must be sent before this command */
/* (see note 6). */
/* For programmers supporting both parallel and serial programming */
/* mode this command enters parallel programming mode. For programmers */
/* supporting only serial programming mode, this command enters serial */
/* programming mode. */
/* NOTE 2 */
/* The ah and al are the high and low order bytes of the address. For */
/* parallel programmers this command issues the Load Address Low/High */
/* Byte command. For serial programmers the address byte is stored for */
/* use by the Read/Write commands. */
/* NOTE 3 */
/* For parallel programmers this command issues the Program Flash */
/* command. For serial programmers this command iussues the Write */
/* Program Memory Command. For devices with byte-wide program memories */
/* only the low byte command should be used. */
/* NOTE 4 */
/* The contents of the program memory at the address given by the 'A' */
/* command are written to the serial port in binary form. For byte */
/* wide memories one byte is written. For 16 bit memories two bytes */
/* are written,MSB first. */
/* NOTE 5 */
/* This command must be executed after the programming is finished. */
/* NOTE 6 */
/* The select device type command must be sent before the enter */
/* programming command */
/* NOTE 7 */
/* The supported device codes are returned in binary form terminated */
/* by 0x00. */
/* NOTE 8 */
/* This return a 7 character ASCII string identifying the programmer. */
/* For the development board it is "AVR DEV", for the parallel */
/* programmer it is "AVR PPR" and for the in-curcuit programmer it is */
/* "AVR ICP". */
/* NOTE 9 */
/* The software/hardware version are returned as two ASCII numbers. */
/* NOTE 10 */
/* This command should be used to identify the programmer type. The */
/* return value is 'S' for serial (or SPI) programmers or 'P' for */
/* parallel programmers. */
/* NOTE 11 */
/* The write fuse bits command are available only on parallel */
/* programmers and only for AVR devices (device code < 0x80). The host */
/* should use the return programmer type command to determine the */
/* programmer type, do not use the "AVR PPR" idenifier because other */
/* programmers may be available in the future. */
/* NOTE 12 */
/* Currently only the AVR development board has LEDs. The other boards */
/* must implement this commands as NOPs. */
/* NOTE 13 */
/* Devices using Page Mode Programming write one page of flash memory */
/* before issuing a Page Mode Write Pulse. */
/******************************************************************************
/*NOTE 1:对于支持并行和串行编程模式的编程器,此命令将进入并行编程模式。对于只支持
/*串行编程的编程的编程器,此命令进入串行编程模式
/******************************************************************************
/*NOTE 2: ah和al是地址的高8位和低8位字节。对并行编程器此命令表示 载入地址低位/高位
/*命令。对于串行编程器地址字节利用Read/Write命令存储
*/
/******************************************************************************
/*NOTE 3:对于并行编程器此命令表示为写FLASH存储器命令,对于串行编程器,此命令表示写
/*程序存储器命令。对于带有bye-wide程序储存器的器件,只用其低位字节命令。
/******************************************************************************
/*NOTE 4:'A'命令等到的地址所对应的程序储存器的数据以二进制格式发送到串口。对于byte-
/*wide存储器只写一个字节.对于16位的存储器写两位字节,高位先.
/******************************************************************************
/*NOTE 5:当编程结束,此命令马上被执行
/******************************************************************************
/*NOTE 6:器件型号选择命令必须在进入编程命令之前发送.
/******************************************************************************
/*NOTE 7:二进制格式返回支持器件代码,以0x00结束.
/******************************************************************************
/*NOTE 8:此命令返回 7个字符串鉴别编程器的,对于开发板,此字符串为"AVR DEV",对于并行
/*编程器次字符串是"AVR PPR",对于ISP编程器为"AVR ICP"(一般看到了的是AVRISP,所以我翻
/*译成ISP编程器)
/******************************************************************************
/*NOTE 9:两个ASCII数字,返回软件和硬件版本
/******************************************************************************
/*NOTE 10:此命令被用来识别编程器的型号,返回"S"为串行编程器,"P"为并行编程器.
/******************************************************************************
/*NOTE 11:写熔丝位命令只有在并行编程器上才有效,而且只争对AVR部分器件.上位机会用
/*编程器返回的型号命令来决定编程器模式.不要利用"AVR PPR" ,因为其他的编程器将来可能
/*会支持写熔丝位
/******************************************************************************
/*NOTE 12:当前只有AVR开发板有指示灯.其他的板必须执行此命令(内容为空)
/******************************************************************************
/*NOTE 13:用页写模式编程的器件在一个页写模式脉冲之后写flash存储器的一页.
/******************************************************************************
/* Device Support List */
/* +--------+----------+------+-------+------+------+------+-------+ */
/* | Device |Signature | Code | Flash |EEProm| Lock | Fuse | PMode | */
/* +--------+----------+------+-------+------+------+------+-------+ */
/* | tiny12 | 1E 90 05 | 0x55 | R/W | R/W | R/W | R/W | Byte | */
/* | tiny15 | 1E 90 06 | 0x56 | R/W | R/W | R/W | R/W | Byte | */
/* | | | | | | | | | */
/* | S1200 | 1E 90 01 | 0x13 | R/W | R/W | W | NA | Byte | */
/* | | | | | | | | | */
/* | S2313 | 1E 91 01 | 0x20 | R/W | R/W | W | NA | Byte | */
/* | S2323 | 1E 91 02 | 0x48 | R/W | R/W | R/W | R/W | Byte | */
/* | S2333 | 1E 91 05 | 0x34 | R/W | R/W | R/W | R/W | Byte | */
/* | S2343 | 1E 91 03 | 0x4C | R/W | R/W | R/W | R/W | Byte | */
/* | | | | | | | | | */
/* | S4414 | 1E 92 01 | 0x28 | R/W | R/W | W | NA | Byte | */
/* | S4433 | 1E 92 03 | 0x30 | R/W | R/W | R/W | R/W | Byte | */
/* | S4434 | 1E 92 02 | 0x6C | R/W | R/W | R/W | R/W | Byte | */
/* | | | | | | | | | */
/* | S8515 | 1E 93 01 | 0x38 | R/W | R/W | W | NA | Byte | */
/* | S8535 | 1E 93 03 | 0x68 | R/W | R/W | R/W | R/W | Byte | */
/* | | | | | | | | | */
/* |mega83 | 1E 93 05 | 0x65 | R/W | R/W | R/W | R/W | Page | */
/* |mega103 | 1E 97 01 | 0x41 | R/W | R/W | R/W | R/W | Page | */
/* |mega161 | 1E 94 01 | 0x60 | R/W | R/W | R/W | R/W | Page | */
/* |mega163 | 1E 94 02 | 0x64 | R/W | R/W | R/W | R/W | Page | */
/* | | | | | | | | | */
/* |mega8 | 1E 93 07 | 0x76 | R/W | R/W | R/W | R/W | Page | */
/* |mega16 | 1E 94 03 | 0x74 | R/W | R/W | R/W | R/W | Page | */
/* |mega32 | 1E 95 02 | 0x72 | R/W | R/W | R/W | R/W | Page | */
/* |mega128 | 1E 97 02 | 0x43 | R/W | R/W | R/W | R/W | Page | */
/* |mega8515| 1E 93 06 | 0x3A | R/W | R/W | R/W | R/W | Page | */
/* +--------+----------+------+-------+------+------+------+-------+ */
/* */
/* 一些说明: */
/* ------- */
/* Signature - Device Signature Byte */
/* Code - Unique device code used by AVRProg to identify device */
/* Flash - Flash size in bytes */
/* EEProm - EEProm size in bytes */
/* Lock - Lockbits */
/* Fuse - Fusebits */
/* PMode - Indicates if device uses byte or page programming mode */
/* R/W - Read and Write Access */
/* R - Read Access Only */
/* W - Write Access Only */
/* NA - Not Accessible */
/* Signature - 器件标识字节 */
/* Code - AVRProg识别器件型号所用的唯一的代码 */
/* Flash - Flash空间 */
/* EEProm - EEProm 空间 */
/* Lock - 锁定位 */
/* Fuse - 熔丝位 */
/* PMode - 说明器件使用字节写还是页写编程模式 */
/* R/W - 允许读写 */
/* R - 只读 */
/* W - 只写 */
/* NA - 禁止读写 */ |
|