dsPIC33F/PIC24H PROGRAMMING SPECIFICATION
4.3.1.3
QE_Code Field
TABLE 4-4:
QE_Code FOR NON-QUERY
COMMANDS
The QE_Code is a byte in the first word of the
response. This byte is used to return data for query
commands and error codes for all other commands.
QE_Code
Description
0x0
0x1
0x2
No error.
When the programming executive processes one of the
two query commands (QBLANKor QVER), the returned
opcode is always PASS and the QE_Code holds the
query response data. The format of the QE_Code for
both queries is shown in Table 4-3.
Verify failed.
Other error.
4.3.1.4
Response Length
The response length indicates the length of the
programming executive’s response in 16-bit words.
This field includes the 2 words of the response header.
TABLE 4-3:
Query
QE_Code FOR QUERIES
QE_Code
With the exception of the response for the READP
command, the length of each response is only 2 words.
QBLANK 0x0F = Code memory is NOT blank
0xF0 = Code memory is blank
The response to the READPcommand uses the packed
instruction word format described in Section 4.2.2
“Packed Data Format”. When reading an odd number
of program memory words (N odd), the response to the
READPcommand is (3 * (N + 1) / 2 + 2) words. When
reading an even number of program memory words
(N even), the response to the READPcommand is (3 *
N / 2 + 2) words.
QVER
0xMN, where programming executive
software version = M.N
(i.e., 0x32 means software version 3.2).
When the programming executive processes any
command other than a Query, the QE_Code repre-
sents an error code. Supported error codes are shown
in Table 4-4. If a command is successfully processed,
the returned QE_Code is set to 0x0, which indicates
that there was no error in the command processing. If
the verify of the programming for the PROGPor PROGC
command fails, the QE_Code is set to 0x1. For all other
programming executive errors, the QE_Code is 0x2.
DS70152D-page 54
Preliminary
© 2007 Microchip Technology Inc.