A.5
USB COMMUNICATIONS PROTOCOL
The USB protocol used by the PICkit 1 Flash Starter Kit is a very simple
command/response type protocol. Multiple commands can be put together to fill the 8
bytes of a USB packet. If a command cannot fill the 8 bytes and it is not desired to use
a second command to fill the packet, the packet should be padded with ‘Z’ to indicate
no operation.
A.5.1
Commands
? ‘C’ <word> – Configuration Memory Write mode. Word parameter ignored. Use
‘W’ to write to configuration memory.
? ‘c’ – Download Command Table. 15 bytes to follow (two 8 byte packets) containing
the 6-bit commands in the following order:
- Load Configuration memory
- Load data for Program memory
- Load data for EE Data memory
- Read data from Program memory
- Increment Address
- Begin programming (internally timed)
- Begin programming (externally timed)
- End programming (externally timed)
- Bulk Erase Program memory
- Bulk Erase EE Data memory
The last 4 commands are undefined but the second data packet will be filled out.
?
?
?
?
?
?
?
?
?
?
?
?
?
?
‘D’ <byte> – Write EE Data memory. Data is passed as the byte.
‘E’ – Bulk Erase Program memory
‘e’ – Bulk Erase Data memory
‘g’ – Get n bytes from device (n is a word)
‘I’ <word> – Increment Address N times. N is passed as word.
‘P’ – Enter Programming mode. Turns V PP and V DD on.
‘p’ – Exit Programming mode. Turns V DD and V PP off.
‘R’ – Read Program memory. ‘R’ always returns 4 words. If the end of PGM
memory is reached, it pads with 0’s. It is the responsibility of the host software to
determine if padding occurred by keeping track of the program counter.
‘r ’ – Read EE Data memory. ‘r ’ always returns 8 bytes. If the end of Data memory
is reached, it pads with 0’s. It is the responsibility of the host software to determine
if padding occurred by keeping track of the program counter.
‘S’ <program memory length, data memory length> – Calculates Program
Memory Checksum and Data Memory Checksum. The checksum is calculated on
the first N p words of the program memory and the first N d bytes of the data
memory. N p and N d are both words passed as the length parameter. The return
value is 3 bytes in length: the first word is the Program Memory Checksum, and
the last byte is the Data Memory Checksum.
‘t’ – Transmit n bytes to device (n is a word)
‘V’ <byte> – Power and special feature control. The byte following command is
used to control. V DD power to the target and to enable/disable a 2.5 kHz 50%
square wave.
‘v’ – Return version information. The following bytes are returned:
<Major><Minor><Dot>.
‘W’ <word> – Write Program Memory. Loads the write latch, sends the write
command and increments to the next address.
? 2004 Microchip Technology Inc.
DS40051D-page 29
相关PDF资料
DV164120 KIT STARTER PICKIT 2
DV164121 KIT PICKIT 2 DEBUG EXPRESS
DV164122 ANALYZER SRL PICKIT W/DEMO BOARD
DV164131 KIT STARTER PICKIT 3
DV164132 KIT EVAL F1 FOR PIC12F1/PIC16F1
DV243003 KIT STARTER FOR SRL MEM PRODUCTS
DVA1001 ADAPTER FOR PIC16F716 18DIP
DVA1004 DEVICE ADAPTER 8/14/20DIP
相关代理商/技术参数
DV164101 制造商:Microchip Technology Inc 功能描述:TOOLS: FLASH MICROCONTROLLER (
DV164102 功能描述:开发板和工具包 - 无线 rfPICkit RoHS:否 制造商:Arduino 产品:Evaluation Boards 工具用于评估:AT32UC3L 核心:AVR32 频率: 接口类型:USB 工作电源电压:5 V
DV164120 功能描述:电路内置调试器 PICkit 2 8/14/20P Flash RoHS:否 制造商:Microchip Technology 产品:In-Circuit Debugger Kits 工具用于评估:PIC MCUs, dsPIC DSCs 用于:07-00024, AC164113 核心:dsPIC, PIC 接口类型:USB 工作电源电压:3 V to 5 V
DV164121 功能描述:电路内置调试器 PICkit 2 Debug Express RoHS:否 制造商:Microchip Technology 产品:In-Circuit Debugger Kits 工具用于评估:PIC MCUs, dsPIC DSCs 用于:07-00024, AC164113 核心:dsPIC, PIC 接口类型:USB 工作电源电压:3 V to 5 V
DV164121 制造商:Microchip Technology Inc 功能描述:ICPICKIT2 PROGRAMMER/DEBUGGER ((NW))
DV164121+TEFLCST3 制造商:Microchip Technology Inc 功能描述:KIT PICKIT2+FLOWCODE-HOME BUNDLE 制造商:Microchip Technology Inc 功能描述:ICD, PICKIT 2, FLOW CODE, PIC, DSPIC 制造商:Microchip Technology Inc 功能描述:ICD, PICKIT 2, DEBUG EXP, FLOW CODE, PIC, DSPIC; Silicon Family Name:PIC12F6xx, PIC16F5xx; Core Architecture:PIC; Core Sub-Architecture:PIC12, PIC18, PIC24; IC Product Type:Debugger / Programmer; Series:PICkit 2 ;RoHS Compliant: Yes
DV164122 功能描述:界面开发工具 PICkit Ser Analyzer RoHS:否 制造商:Bourns 产品:Evaluation Boards 类型:RS-485 工具用于评估:ADM3485E 接口类型:RS-485 工作电源电压:3.3 V
DV164126 功能描述:开发板和工具包 - PIC / DSPIC USB Kit w/ PICkit LowPinCount RoHS:否 制造商:Microchip Technology 产品:Starter Kits 工具用于评估:chipKIT 核心:Uno32 接口类型: 工作电源电压: