Information

dsPIC33F/PIC24H PROGRAMMING SPECIFICATION
DS70152H-page 26 © 2010 Microchip Technology Inc.
4.2.6 READC COMMAND
The READC command instructs the programming
executive to read N Configuration registers or Device
ID registers, starting from the 24-bit address specified
by Addr_MSB and Addr_LS. This command can only
be used to read 8-bit or 16-bit data.
When this command is used to read Configuration
registers, the upper byte in every data word returned by
the programming executive is 0x00 and the lower byte
contains the Configuration register value.
Expected Response (4 + 3 * (N
1)/2 words
for N odd):
0x1100
2 + N
Configuration register or Device ID Register 1
...
Configuration register or Device ID Register N
4.2.7 READP COMMAND
The READP command instructs the programming
executive to read N 24-bit words of code memory,
starting from the 24-bit address specified by Addr_MSB
and Addr_LS. This command can only be used to read
24-bit data. All data returned in the response to this
command uses the packed data format described in
Section 4.2.2 “Packed Data Format”.
Expected Response (2 + 3 * N/2 words for N even):
0x1200
2 + 3 * N/2
Least significant program memory word 1
...
Least significant data word N
Expected Response (4 + 3 * (N
1)/2 words
for N odd):
0x1200
4 + 3 * (N
1)/2
Least significant program memory word 1
...
MSB of program memory word N (zero padded)
15 12 11 8 7 0
Opcode Length
N Addr_MSB
Addr_LS
Field Description
Opcode 0x1
Length 0x3
N Number of 8-bit Configuration registers
or Device ID registers to read
(maximum of 256).
Addr_MSB MSB of 24-bit source address.
Addr_LS Least Significant 16 bits of 24-bit
source address.
Note: Reading unimplemented memory will
cause the programming executive to
reset. Please ensure that only memory
locations present on a particular device
are accessed.
15 12 11 8 7 0
Opcode Length
N
Reserved Addr_MSB
Addr_LS
Field Description
Opcode 0x2
Length 0x4
N Number of 24-bit instructions to read
(maximum of 32768).
Reserved 0x0
Addr_MSB MSB of 24-bit source address.
Addr_LS Least Significant 16 bits of 24-bit
source address.
Note: Reading unimplemented memory will
cause the programming executive to
reset. Please ensure that only memory
locations present on a particular device
are accessed.