PIC24F16KA101 MICROCHIP [Microchip Technology], PIC24F16KA101 Datasheet

no-image

PIC24F16KA101

Manufacturer Part Number
PIC24F16KA101
Description
Flash Programming Specifications
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC24F16KA101-I/MQ
Manufacturer:
SIEMENS
Quantity:
43
Part Number:
PIC24F16KA101-I/SS
Manufacturer:
MICROCHIP
Quantity:
4 500
Part Number:
PIC24F16KA101-I/SS
0
Part Number:
PIC24F16KA101T-I/MQ
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC24F16KA101T-I/SS
Manufacturer:
MICROCHIR
Quantity:
20 000
1.0
This document defines the programming specifications
for the PIC24FXXKAXXX family of 16-bit micro-
controller devices. This is required only for developing
programming support for the PIC24FXXKAXXX family.
Users of any one of these devices should use the
development tools that are already supporting the
device programming.
The programming specifications are specific to the
following devices:
• PIC24F08KA101
• PIC24F16KA101
• PIC24F08KA102
• PIC24F16KA102
• PIC24F04KA200
• PIC24F04KA201
2.0
This
programming the PIC24FXXKAXXX family of devices:
• In-Circuit Serial Programming™ (ICSP™)
• Enhanced In-Circuit Serial Programming
The ICSP programming method is the most direct
method for programming the device. However, it is also
the slower of the two methods. It provides native,
low-level programming capability to erase, program,
and verify the device.
Section 3.0 “Device Programming – ICSP” describes
the ICSP method.
The Enhanced ICSP method is a faster method, which
takes advantage of the programming executive as
illustrated in Figure 2-1. The programming executive
provides the necessary functionality to erase, program
and verify the device through a command set. The com-
mand set allows the programmer to program the
PIC24FXXKAXXX devices without having to deal with
the low-level programming protocols of the device.
Section 4.0 “Device Programming – Enhanced
ICSP” describes the ICSP method using the
programming executive.
© 2008 Microchip Technology Inc.
(Enhanced ICSP)
PIC24FXXKAXXX Flash Programming Specifications
section
DEVICE OVERVIEW
PROGRAMMING OVERVIEW
OF THE PIC24FXXKAXXX
FAMILY
describes
the
two
methods
Advance Information
PIC24FXXKAXXX
of
FIGURE 2-1:
2.1
All devices in the PIC24FXXKAXXX family are
3.3V supply designs. The core, the peripherals and the
I/O pins operate at 3.3V. The device can operate from
1.8V to 3.6V.
2.2
There are two methods of entering the Programming
mode (either ICSP or Enhanced ICSP):
• Low-Voltage ICSP Entry
• High-Voltage ICSP Entry
When the MCLR/V
applying V
device gets reset, and on applying the Program-
ming mode entry sequence on the PGCx and
PGDx pins, the device enters the Programming
mode.
To enter the Programming mode, if the MCLR
function of the MCLR/V
disabled or is already disabled, a voltage V
should be applied on V
This is equivalent to applying V
device gets reset. On applying the Programming
mode entry sequence on PGCx and PGDx pins,
the device enters the Programming mode.
Programmer
Power Requirements
Entering Programming Mode
Overview
SS
on MCLR (low-voltage entry), the
PROGRAMMING SYSTEM
OVERVIEW FOR ENHANCED
ICSP™ METHOD
PP
/RA5 pin is used as MCLR by
PP
PP
/RA5 pin needs to be
(high-voltage entry).
PIC24FXXKAXXX
On-Chip Memory
Programming
SS
Executive
on MCLR; the
DS39919A-page 1
IHH

Related parts for PIC24F16KA101

PIC24F16KA101 Summary of contents

Page 1

... PIC24FXXKAXXX family. Users of any one of these devices should use the development tools that are already supporting the device programming. The programming specifications are specific to the following devices: • PIC24F08KA101 • PIC24F16KA101 • PIC24F08KA102 • PIC24F16KA102 • PIC24F04KA200 • PIC24F04KA201 2.0 PROGRAMMING OVERVIEW ...

Page 2

PIC24FXXKAXXX 2.3 Pin Diagrams Figure 2-2 provides the pin diagrams PIC24FXXKAXXX family. FIGURE 2-2: PIN DIAGRAMS 14-Pin SPDIP, SOIC 20-Pin SPDIP, SOIC 28-Pin PDIP, SOIC 28-Pin QFN DS39919A-page 2 Table 2-1 provides the pins that are required for programming (indicated ...

Page 3

... TABLE 2-4: PIC24FXXKA1XX Device PIC24F08KA101 map for the PIC24F16KA101 PIC24F08KA102 PIC24F16KA102 Note: An erase operation can be performed on one, four or eight words at a time and a program operation can be performed on one word at a time. Advance Information CONFIGURATION REGISTER ...

Page 4

PIC24FXXKAXXX FIGURE 2-3: PROGRAM MEMORY MAP Note 1: The address boundaries for user Flash code memory are device dependent (see Table 2-3). 2: PIC24F04KA2XX devices have no data EEPROM. DS39919A-page 4 000000h User Flash Code Memory (5632 x 24-bit) AFEh/15FEh/2BFEh ...

Page 5

DEVICE PROGRAMMING – ICSP The ICSP method is a special programming protocol that allows reading and writing PIC24FXXKAXXX device family memory. ICSP is the most direct method used to program a device; however, Enhanced ICSP is faster. The ICSP ...

Page 6

PIC24FXXKAXXX 3.2.1 SIX SERIAL INSTRUCTION EXECUTION The SIX control code allows PIC24FXXKAXXX family assembly instructions. When the SIX code is received, the CPU is suspended for 24 clock cycles as the instruction is then clocked into the internal buffer. Once ...

Page 7

FIGURE 3-2: SIX SERIAL EXECUTION PGCx PGDx Execute PC – 1, Fetch SIX Only for Control Code Program Memory Entry ...

Page 8

PIC24FXXKAXXX 3.3 Entering ICSP Mode 3.3.1 LOW-VOLTAGE ICSP ENTRY As illustrated in Figure 3-4, the following processes are involved in entering ICSP Program/Verify mode using MCLR: 1. MCLR is briefly driven high, then low 32-bit key sequence is ...

Page 9

Flash Memory Programming in ICSP Mode 3.4.1 PROGRAMMING OPERATIONS The NVMCON register controls the Flash memory write and erase operations. To program the device, set the NVMCON register to select the type of erase operation (see Table 3-2) or ...

Page 10

PIC24FXXKAXXX TABLE 3-4: SERIAL INSTRUCTION EXECUTION FOR CHIP ERASE Command Data (Binary) (Hex) Step 1: Exit the Reset vector. 0000 000000 NOP 0000 040200 GOTO 0000 000000 NOP Step 2: Set the NVMCON to erase the entire program memory. 0000 ...

Page 11

FIGURE 3-7: PACKED INSTRUCTION WORDS IN W0: LSW0 W1 MSB1 W2 LSW1 W3 LSW2 W4 MSB3 W5 LSW3 TABLE 3-5: SERIAL INSTRUCTION EXECUTION FOR WRITING CODE MEMORY Command Data (Binary) (Hex) Step 1: Exit the Reset ...

Page 12

PIC24FXXKAXXX TABLE 3-5: SERIAL INSTRUCTION EXECUTION FOR WRITING CODE MEMORY (CONTINUED) Command Data (Binary) (Hex) Step 5: Set the Read Pointer (W6) and load the (next set of) write latches. 0000 EB0300 CLR 0000 000000 NOP 0000 BB0BB6 TBLWTL 0000 ...

Page 13

FIGURE 3-8: PROGRAM CODE MEMORY FLOW LoopCount = LoopCount + 1 © 2008 Microchip Technology Inc. PIC24FXXKAXXX Start LoopCount = 0 Configure Device for Writes Load 2 Bytes to Write ...

Page 14

PIC24FXXKAXXX 3.7 Writing Data EEPROM Figure 3-9 illustrates the flow of programming the data EEPROM memory. The procedure is the same as writing code memory. The only difference is that only one word is programmed in each operation. When writing ...

Page 15

TABLE 3-6: INSTRUCTION EXECUTION FOR WRITING DATA EEPROM Data Command (Hex) (Binary) Step 1: Exit the Reset vector. 0000 000000 NOP 0000 040200 GOTO 0000 000000 NOP Step 2: Set the NVMCON to program 1 data word. 0000 24004A MOV ...

Page 16

PIC24FXXKAXXX 3.8 Writing Configuration Registers The procedure for writing the Configuration registers is the same as for writing code memory. The only differ- ence is that, only one word is programmed in each operation. When writing Configuration registers, one word ...

Page 17

TABLE 3-8: SERIAL INSTRUCTION EXECUTION FOR WRITING CONFIGURATION REGISTERS Command Data (Binary) (Hex) Step 1: Exit the Reset vector. 0000 000000 NOP 0000 040200 GOTO 0000 000000 NOP Step 2: Initialize the Write Pointer (W7) for the TBLWT instruction. 0000 ...

Page 18

PIC24FXXKAXXX 3.9 Reading Code Memory To read the code memory, execute a series of TBLRD instructions and clock out the data using the REGOUT command. Table 3-9 provides the ICSP programming details for reading code memory. In Step 1, the ...

Page 19

Reading Data EEPROM Memory The procedure for reading data EEPROM memory is the same as reading the code memory. The only differ- ence is that the 16-bit data words are read instead of the 24-bit words. TABLE 3-10: SERIAL ...

Page 20

PIC24FXXKAXXX 3.11 Reading Configuration Memory The procedure for reading a Configuration register is the same as reading the code memory. The only difference is that the 16-bit data words are read (with the upper byte read being all ‘0‘s) instead ...

Page 21

Verifying Code Memory, Data EEPROM Memory and Configuration Registers To verify the code memory, read the code memory space and compare it with the copy held in the programmer’s buffer. To verify the data EEPROM and Configuration registers, follow ...

Page 22

PIC24FXXKAXXX TABLE 3-12: SERIAL INSTRUCTION EXECUTION FOR READING THE APPLICATION ID WORD Command Data (Binary) (Hex) Step 1: Exit Reset vector. 0000 000000 NOP 0000 040200 GOTO 0000 000000 NOP Step 2: Initialize TBLPAG and the Read Pointer (W0) for ...

Page 23

DEVICE PROGRAMMING – ENHANCED ICSP This section describes the programming of the device through Enhanced ICSP and the programming executive. The programming executive resides in the executive memory (separate from user memory space), and is executed when Enhanced ICSP ...

Page 24

PIC24FXXKAXXX 4.2 Confirming the Presence of the Programming Executive Before beginning programming, confirm programming executive is stored in the executive memory and perform the following: 1. Enter In-Circuit Serial Programming mode (ICSP). 2. Read the unique Application ID Word stored ...

Page 25

FIGURE 4-3: ENTERING ENHANCED ICSP™ MODE USING LOW-VOLTAGE ENTRY P6 P14 MCLR V DD PGDx PGCx P18 FIGURE 4-4: ENTERING ENHANCED ICSP™ MODE USING HIGH-VOLTAGE ENTRY PGDx PGCx P18 4.4 Blank Check The term ...

Page 26

PIC24FXXKAXXX 4.5.2 PROGRAMMING VERIFICATION After the code memory is programmed, the contents of the memory can be verified to ensure that the programming is successful. Verification requires the code memory to be read back and compared with the copy held ...

Page 27

FIGURE 4-6: FLOWCHART FOR PROGRAMMING DATA EEPROM Start RemainingWords = 256 (100h) BaseAddress = 0 Send PROGD Command to Program BaseAddress Is PROGD response PASS? Yes RemainingWords = RemainingWords – 1 BaseAddress = BaseAddress + 02h Are No RemainingWords ‘0’? ...

Page 28

PIC24FXXKAXXX 4.7.3 CODE-PROTECT CONFIGURATION BITS The FBS and FGS Configuration registers are special Configuration registers which control the code protection for the boot segment and general segment, respectively. For each segment, two forms of code protection are provided. One form ...

Page 29

TABLE 4-2: PIC24FXXKAXXX FAMILY CONFIGURATION BITS DESCRIPTION (CONTINUED) Bit Field Register DSWDTPS<3:0> FDS<3:0> DSZPBOR FDS<6> FCKSM<1:0> FOSC<7:6> FNOSC<2:0> FOSCSEL<2:0> Oscillator Selection bits FWDTEN FWDT<7> GSS0 FGS<1> GWRP FGS<0> ICS<1:0> FICD<1:0> Note 1: Applies only to the 28-pin device. 2: The ...

Page 30

PIC24FXXKAXXX TABLE 4-2: PIC24FXXKAXXX FAMILY CONFIGURATION BITS DESCRIPTION (CONTINUED) Bit Field Register IESO FOSCSEL<7> (1) I2C1SEL FPOR<4> (2) MCLRE FPOR<7> OSCIOFNC FOSC<2> POSCMD<1:0> FOSC<1:0> POSCFREQ<1:0> FOSC<4:3> PWRTEN FPOR<3> RTCCKSEL FDS<5> SOSCSEL FOSC<5> WDTPRE FWDT<4> WDTPOST<3:0> FWDT<3:0> WINDIS FWDT<6> Note 1: ...

Page 31

FIGURE 4-7: CONFIGURATION BIT PROGRAMMING FLOW ConfigAddress = ConfigAddress + 2 4.8 Exiting the Enhanced ICSP Mode To exit the Program/Verify mode, remove V MCLR illustrated in Figure 4-8. For exiting interval P16 should elapse between ...

Page 32

PIC24FXXKAXXX 5.0 THE PROGRAMMING EXECUTIVE This section describes the programming executive communication, programming executive commands, programming responses, programming programming executive to memory and programming verification. 5.1 Programming Executive Communication The programmer and the programming executive have a master-slave relationship, where ...

Page 33

TIME-OUTS The programming executive does not use the Watch- dog Timer or time-out for transmitting responses to the programmer. If the programmer does not follow the flow control mechanism using PGCx, as described in Section 5.1.1 “Communication Interface and ...

Page 34

PIC24FXXKAXXX 5.2.2 PACKED DATA FORMAT When 24-bit instruction words are transferred across the 16-bit SPI interface, they are packed to conserve space using the format illustrated in Figure 5-5. This format minimizes the traffic over the SPI and provides the ...

Page 35

COMMAND DESCRIPTIONS The commands supported by the programming executive are described in Section 5.2.5 “SCHECK Command” through Section 5.2.13 Command”. 5.2.5 SCHECK COMMAND Opcode Length Field Description Opcode 0h Length 1h The SCHECK command instructs the ...

Page 36

PIC24FXXKAXXX 5.2.8 READP COMMAND Opcode Length N Reserved Addr_MSB Addr_LS Field Description Opcode 2h Length 4h N Number of 24-bit instructions to read (max. of 32768). Reserved 0h Addr_MSB MSb of 24-bit source address. Addr_LS ...

Page 37

Expected Response (2 words): 1F00h 0002h Note: Refer to Table 2-4 for data EEPROM memory size information. 5.2.11 PROGP COMMAND Opcode Length Reserved Addr_MSB Addr_LS D_1 D_2 ... D_48 Field Description Opcode 5h Length 33h ...

Page 38

PIC24FXXKAXXX 5.2.13 QVER COMMAND Opcode Length Field Description Opcode Bh Length 1h The QVER command queries the version of the programming executive software stored in the test memory. The “version.revision” information is returned in the response‘s QE_Code ...

Page 39

QE_Code Field 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 of the other commands. When the programming executive processes one ...

Page 40

PIC24FXXKAXXX TABLE 5-5: PROGRAMMING THE PROGRAMMING EXECUTIVE Command Data (Binary) (Hex) Step 1: Exit Reset vector and erase the executive memory. 0000 000000 NOP 0000 040200 GOTO 0000 000000 NOP Step 2: Initialize pointers to read Diagnostic Words for storage ...

Page 41

TABLE 5-5: PROGRAMMING THE PROGRAMMING EXECUTIVE (CONTINUED) Command Data (Binary) (Hex) Step 10: Load W0:W2 with the next two words of packed programming executive code. 0000 2<LSW0>0 MOV 0000 2<MSB1:MSB0>1 MOV 0000 2<LSW1>2 MOV Step 11: Set the Read Pointer ...

Page 42

PIC24FXXKAXXX TABLE 5-5: PROGRAMMING THE PROGRAMMING EXECUTIVE (CONTINUED) Command Data (Binary) (Hex) Step 18: Load the saved Diagnostic Words in last eight write latches. 0000 BB1A86 TBLWTL 0000 000000 NOP 0000 000000 NOP 0000 BB1A87 TBLWTL 0000 000000 NOP 0000 ...

Page 43

TABLE 5-6: READING EXECUTIVE MEMORY Command Data (Binary) (Hex) Step 1: Exit the Reset vector. 0000 000000 NOP 0000 040200 GOTO 0000 000000 NOP Step 2: Initialize TBLPAG and the Read Pointer (W6) for TBLRD instruction. 0000 200800 MOV 0000 ...

Page 44

... Table 6-1 provides the Device ID for each device; Table 6-2 provides the Device ID registers; Table 6-3 describes the bit field of each register. TABLE 6-1: DEVICE IDs Device ID DEVID PIC24F08KA101 0D08h PIC24F16KA101 0D01h PIC24F08KA102 0D0Ah PIC24F16KA102 0D03h PIC24F04KA200 0D02h PIC24F04KA201 0D00h ...

Page 45

AC/DC CHARACTERISTICS AND TIMING REQUIREMENTS TABLE 7-1: STANDARD OPERATING CONDITIONS Standard Operating Conditions Operating Temperature: 0°C to +70°C and programming: +25°C is recommended. Param Symbol Characteristic No. D111 V Supply Voltage During Programming DD D112 I Programming Current on ...

Page 46

PIC24FXXKAXXX TABLE 7-1: STANDARD OPERATING CONDITIONS (CONTINUED) Standard Operating Conditions Operating Temperature: 0°C to +70°C and programming: +25°C is recommended. Param Symbol Characteristic No. Delay Between PGDx ↓ by Programming P20 T 11 DLY Executive and First PGCx↑ of Reception ...

Page 47

Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families ...

Page 48

W ORLDWIDE AMERICAS ASIA/PACIFIC Corporate Office Asia Pacific Office 2355 West Chandler Blvd. Suites 3707-14, 37th Floor Chandler, AZ 85224-6199 Tower 6, The Gateway Tel: 480-792-7200 Harbour City, Kowloon Fax: 480-792-7277 Hong Kong Technical Support: Tel: 852-2401-1200 http://support.microchip.com Fax: 852-2401-3431 ...

Related keywords