0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
70592C

70592C

  • 厂商:

    MICROCHIP

  • 封装:

  • 描述:

    70592C - High-Performance, 16-bit Microcontrollers - Microchip Technology

  • 数据手册
  • 价格&库存
70592C 数据手册
PIC24HJXXXGPX06A/X08A/X10A Data Sheet High-Performance, 16-bit Microcontrollers © 2011 Microchip Technology Inc. DS70592C 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 of its kind on the market today, when used in the intended manner and under normal conditions. There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. Microchip is willing to work with the customer who is concerned about the integrity of their code. Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.” • • Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, PIC32 logo, rfPIC and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, UniWinDriver, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. © 2011, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. ISBN: 978-1-61341-015-8 Microchip received ISO/TS-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified. DS70592C-page 2 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A High-Performance, 16-bit Microcontrollers Operating Range: • Up to 40 MIPS operation (@ 3.0-3.6V): - Industrial temperature range (-40°C to +85°C) - Extended temperature range (-40°C to +125°C) • Up to 20 MIPS operation (@ 3.0-3.6V): - High temperature range (-40°C to +150°C) On-Chip Flash and SRAM: • Flash program memory, up to 256 Kbytes • Data SRAM, up to 16 Kbytes (includes 2 Kbytes of DMA RAM) System Management: • Flexible clock options: - External, crystal, resonator, internal RC - Fully integrated PLL - Extremely low jitter PLL • Power-up Timer • Oscillator Start-up Timer/Stabilizer • Watchdog Timer with its own RC oscillator • Fail-Safe Clock Monitor • Reset by multiple sources High-Performance CPU: • • • • • • • • • • • • • Modified Harvard architecture C compiler optimized instruction set 16-bit wide data path 24-bit wide instructions Linear program memory addressing up to 4M instruction words Linear data memory addressing up to 64 Kbytes 71 base instructions: mostly 1 word/1 cycle Sixteen 16-bit General Purpose Registers Flexible and powerful Indirect Addressing modes Software stack 16 x 16 multiply operations 32/16 and 16/16 divide operations Up to ±16-bit data shifts Power Management: • On-chip 2.5V voltage regulator • Switch between clock sources in real time • Idle, Sleep and Doze modes with fast wake-up Direct Memory Access (DMA): • 8-channel hardware DMA • 2 Kbytes dual ported DMA buffer area (DMA RAM) to store data transferred via DMA: - Allows data transfer between RAM and a peripheral while CPU is executing code (no cycle stealing) • Most peripherals support DMA Timers/Capture/Compare/PWM: • Timer/Counters, up to nine 16-bit timers: - Can pair up to make four 32-bit timers - One timer runs as Real-Time Clock with external 32.768 kHz oscillator - Programmable prescaler • Input Capture (up to eight channels): - Capture on up, down or both edges - 16-bit capture input functions - 4-deep FIFO on each capture • Output Compare (up to eight channels): - Single or Dual 16-Bit Compare mode - 16-bit Glitchless PWM mode Interrupt Controller: • • • • • • • • • 5-cycle latency Up to 61 available interrupt sources Up to five external interrupts Seven programmable priority levels FIve processor exceptions Digital I/O: Up to 85 programmable digital I/O pins Wake-up/Interrupt-on-Change on up to 24 pins Output pins can drive from 3.0V to 3.6V Up to 5.5V output with open drain configuration on 5V tolerant pins with an external pull-up • 4 mA sink on all I/O pins © 2011 Microchip Technology Inc. DS70592C-page 3 PIC24HJXXXGPX06A/X08A/X10A Communication Modules: • 3-wire SPI (up to two modules): - Framing supports I/O interface to simple codecs - Supports 8-bit and 16-bit data - Supports all serial clock formats and sampling modes • I2C™ (up to two modules): - Full Multi-Master Slave mode support - 7-bit and 10-bit addressing - Bus collision detection and arbitration - Integrated signal conditioning - Slave address masking • UART (up to two modules): - Interrupt on address bit detect - Interrupt on UART error - Wake-up on Start bit from Sleep mode - 4-character TX and RX FIFO buffers - LIN bus support - IrDA® encoding and decoding in hardware - High-Speed Baud mode - Hardware Flow Control with CTS and RTS • Enhanced CAN (ECAN™ module) 2.0B active (up to two modules): - Up to eight transmit and up to 32 receive buffers - 16 receive filters and 3 masks - Loopback, Listen Only and Listen All Messages modes for diagnostics and bus monitoring - Wake-up on CAN message - Automatic processing of Remote Transmission Requests - FIFO mode using DMA - DeviceNet™ addressing support Analog-to-Digital Converters: • Up to two Analog-to-Digital Converter (ADC) modules in a device • 10-bit, 1.1 Msps or 12-bit, 500 ksps conversion: - Two, four, or eight simultaneous samples - Up to 32 input channels with auto-scanning - Conversion start can be manual or synchronized with one of four trigger sources - Conversion possible in Sleep mode - ±1 LSb max integral nonlinearity - ±1 LSb max differential nonlinearity CMOS Flash Technology: • • • • • Low-power, high-speed Flash technology Fully static design 3.3V (±10%) operating voltage Industrial and extended temperature Low-power consumption Packaging: • 100-pin TQFP (14x14x1 mm and 12x12x1 mm) • 64-pin TQFP (10x10x1 mm) • 64-pin QFN (9x9x0.9 mm) Note: See the device variant tables for exact peripheral features per device. DS70592C-page 4 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A PIC24H PRODUCT FAMILIES The PIC24H Family of devices is ideal for a wide variety of 16-bit MCU embedded applications. The device names, pin counts, memory sizes and peripheral availability of each device are listed below, followed by their pinout diagrams. PIC24H Family Controllers Output Compare Std. PWM I/O Pins (Max)(2) DMA Channels Input Capture Timer 16-bit RAM(1) (KB) Program Flash Memory (KB) Packages PT, MR PF, PT PT, MR PF, PT PT, MR PF, PT PT, MR PF, PT PT, MR PF, PT PT, MR PF, PT PF, PT Codec Interface UART ADC I2C™ 1 2 2 2 2 2 2 2 2 2 2 2 2 Device Pins PIC24HJ64GP206A PIC24HJ64GP210A PIC24HJ64GP506A PIC24HJ64GP510A PIC24HJ128GP206A 64 100 64 100 64 64 64 64 64 128 128 128 128 128 128 256 256 256 8 8 8 8 8 8 8 8 16 16 16 16 16 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ADC, 18 ch 1 ADC, 32 ch 1 ADC, 18 ch 1 ADC, 32 ch 1 ADC, 18 ch 1 ADC, 32 ch 1 ADC, 18 ch 1 ADC, 32 ch 1 ADC, 18 ch 1 ADC, 32 ch 1 ADC, 18 ch 1 ADC, 32 ch 2 ADC, 32 ch 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 CAN 0 0 1 1 0 0 1 1 0 0 0 0 2 SPI 53 85 53 85 53 85 53 85 53 85 53 85 85 PIC24HJ128GP210A 100 PIC24HJ128GP506A 64 PIC24HJ128GP510A 100 PIC24HJ128GP306A 64 PIC24HJ128GP310A 100 PIC24HJ256GP206A 64 PIC24HJ256GP210A 100 PIC24HJ256GP610A 100 Note 1: 2: RAM size is inclusive of 2 Kbytes DMA RAM. Maximum I/O pin count includes pins shared by the peripheral functions. © 2011 Microchip Technology Inc. DS70592C-page 5 PIC24HJXXXGPX06A/X08A/X10A Pin Diagrams 64-Pin QFN(1) RG13 RG12 RG14 RG0 RG1 RF1 RF0 VDD VCAP(3) OC8/CN16/RD7 OC7/CN15/RD6 OC6/IC6/CN14/RD5 OC5/IC5/CN13/RD4 OC4/RD3 OC3/RD2 OC2/RD1 = Pins are up to 5V tolerant 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 RG15 AN16/T2CK/T7CK/RC1 AN17/T3CK/T6CK/RC2 SCK2/CN8/RG6 SDI2/CN9/RG7 SDO2/CN10/RG8 MCLR SS2/CN11/RG9 VSS VDD AN5/IC8/CN7/RB5 AN4/IC7/CN6/RB4 AN3/CN5/RB3 AN2/SS1/CN4/RB2 PGEC3/AN1/VREF-/CN3/RB1 PGED3/AN0/VREF+/CN2/RB0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 PIC24HJ64GP206A(2) PIC24HJ128GP206A PIC24HJ256GP206A 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 PGEC2/SOSCO/T1CK/CN0/RC14 PGED2/SOSCI/T4CK/CN1/RC13 OC1/RD0 IC4/INT4/RD11 IC3/INT3/RD10 IC2/U1CTS/INT2/RD9 IC1/INT1/RD8 VSS OSC2/CLKO/RC15 OSC1/CLKIN/RC12 VDD SCL1/RG2 SDA1/RG3 U1RTS/SCK1/INT0/RF6 U1RX/SDI1/RF2 U1TX/SDO1/RF3 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 PGEC1/AN6/OCFA/RB6 PGED1/AN7/RB7 AVDD AVSS U2CTS/AN8/RB8 AN9/RB9 TMS/AN10/RB10 TDO/AN11/RB11 VSS VDD TCK/AN12/RB12 TDI/AN13/RB13 U2RTS/AN14/RB14 AN15/OCFB/CN12/RB15 U2RX/SDA2/CN17/RF4 U2TX/SCL2/CN18/RF5 Note 1: 2: 3: The metal plane at the bottom of the device is not connected to any pins and should be connected to VSS externally. The PIC24HJ64GP206A device does not have the SCL2 and SDA2 pins. Refer to Section 2.3 “CPU Logic Filter Capacitor Connection (Vcap)” for proper connection to this pin. DS70592C-page 6 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A Pin Diagrams (Continued) 64-Pin QFN(1) RG13 RG12 RG14 RG0 RG1 RF1 RF0 VDD VCAP(2) OC8/CN16/RD7 OC7/CN15/RD6 OC6/IC6/CN14/RD5 OC5/IC5/CN13/RD4 OC4/RD3 OC3/RD2 OC2/RD1 = Pins are up to 5V tolerant 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 RG15 AN16/T2CK/T7CK/RC1 AN17/T3CK/T6CK/RC2 SCK2/CN8/RG6 SDI2/CN9/RG7 SDO2/CN10/RG8 MCLR SS2/CN11/RG9 VSS VDD AN5/IC8/CN7/RB5 AN4/IC7/CN6/RB4 AN3/CN5/RB3 AN2/SS1/CN4/RB2 PGEC3/AN1/VREF-/CN3/RB1 PGED3/AN0/VREF+/CN2/RB0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 PIC24HJ128GP306A 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 PGEC2/SOSCO/T1CK/CN0/RC14 PGED2/SOSCI/T4CK/CN1/RC13 OC1/RD0 IC4/INT4/RD11 IC3/INT3/RD10 IC2/U1CTS/INT2/RD9 IC1/INT1/RD8 VSS OSC2/CLKO/RC15 OSC1/CLKIN/RC12 VDD SCL1/RG2 SDA1/RG3 U1RTS/SCK1/INT0/RF6 U1RX/SDI1/RF2 U1TX/SDO1/RF3 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 PGEC1/AN6/OCFA/RB6 PGED1/AN7/RB7 AVDD AVSS U2CTS/AN8/RB8 AN9/RB9 TMS/AN10/RB10 TDO/AN11/RB11 VSS VDD TCK/AN12/RB12 TDI/AN13/RB13 U2RTS/AN14/RB14 AN15/OCFB/CN12/RB15 U2RX/SDA2/CN17/RF4 U2TX/SCL2/CN18/RF5 Note 1: 2: The metal plane at the bottom of the device is not connected to any pins and should be connected to VSS externally. Refer to Section 2.3 “CPU Logic Filter Capacitor Connection (Vcap)” for proper connection to this pin. © 2011 Microchip Technology Inc. DS70592C-page 7 PIC24HJXXXGPX06A/X08A/X10A Pin Diagrams (Continued) 64-Pin QFN(1) RG13 RG12 RG14 RG0 RG1 C1TX/RF1 C1RX/RF0 VDD VCAP(2) OC8/CN16/RD7 OC7/CN15/RD6 OC6/IC6/CN14/RD5 OC5/IC5/CN13/RD4 OC4/RD3 OC3/RD2 OC2/RD1 = Pins are up to 5V tolerant 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 RG15 AN16/T2CK/T7CK/RC1 AN17/T3CK/T6CK/RC2 SCK2/CN8/RG6 SDI2/CN9/RG7 SDO2/CN10/RG8 MCLR SS2/CN11/RG9 VSS VDD AN5/IC8/CN7/RB5 AN4/IC7/CN6/RB4 AN3/CN5/RB3 AN2/SS1/CN4/RB2 PGEC3/AN1/VREF-/CN3/RB1 PGED3/AN0/VREF+/CN2/RB0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 PIC24HJ64GP506A PIC24HJ128GP506A 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 PGEC2/SOSCO/T1CK/CN0/RC14 PGED2/SOSCI/T4CK/CN1/RC13 OC1/RD0 IC4/INT4/RD11 IC3/INT3/RD10 IC2/U1CTS/INT2/RD9 IC1/INT1/RD8 VSS OSC2/CLKO/RC15 OSC1/CLKIN/RC12 VDD SCL1/RG2 SDA1/RG3 U1RTS/SCK1/INT0/RF6 U1RX/SDI1/RF2 U1TX/SDO1/RF3 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 PGEC1/AN6/OCFA/RB6 PGED1/AN7/RB7 AVDD AVSS U2CTS/AN8/RB8 AN9/RB9 TMS/AN10/RB10 TDO/AN11/RB11 VSS VDD TCK/AN12/RB12 TDI/AN13/RB13 U2RTS/AN14/RB14 AN15/OCFB/CN12/RB15 U2RX/SDA2/CN17/RF4 U2TX/SCL2/CN18/RF5 Note 1: 2: The metal plane at the bottom of the device is not connected to any pins and should be connected to VSS externally. Refer to Section 2.3 “CPU Logic Filter Capacitor Connection (Vcap)” for proper connection to this pin. DS70592C-page 8 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A Pin Diagrams (Continued) 64-Pin TQFP RG13 RG12 RG14 RG0 RG1 RF1 RF0 VDD VCAP(2) OC8/CN16/RD7 OC7/CN15/RD6 OC6/IC6/CN14/RD5 OC5/IC5/CN13/RD4 OC4/RD3 OC3/RD2 OC2/RD1 = Pins are up to 5V tolerant 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 RG15 AN16/T2CK/T7CK/RC1 AN17/T3CK/T6CK/RC2 SCK2/CN8/RG6 SDI2/CN9/RG7 SDO2/CN10/RG8 MCLR SS2/CN11/RG9 VSS VDD AN5/IC8/CN7/RB5 AN4/IC7/CN6/RB4 AN3/CN5/RB3 AN2/SS1/CN4/RB2 PGEC3/AN1/VREF-/CN3/RB1 PGED3/AN0/VREF+/CN2/RB0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 PIC24HJ64GP206A PIC24HJ128GP206A PIC24HJ256GP206A PGEC2/SOSCO/T1CK/CN0/RC14 PGED2/SOSCI/T4CK/CN1/RC13 OC1/RD0 IC4/INT4/RD11 IC3/INT3/RD10 IC2/U1CTS/INT2/RD9 IC1/INT1/RD8 VSS OSC2/CLKO/RC15 OSC1/CLKIN/RC12 VDD SCL1/RG2 SDA1/RG3 U1RTS/SCK1/INT0/RF6 U1RX/SDI1/RF2 U1TX/SDO1/RF3 Note 1: 2: This pin is not present on the PIC24HJ64GP206A device. Refer to Section 2.3 “CPU Logic Filter Capacitor Connection (Vcap)” for proper connection to this pin. © 2011 Microchip Technology Inc. PGEC1/AN6/OCFA/RB6 PGED1/AN7/RB7 AVDD AVSS U2CTS/AN8/RB8 AN9/RB9 TMS/AN10/RB10 TDO/AN11/RB11 VSS VDD TCK/AN12/RB12 TDI/AN13/RB13 U2RTS/AN14/RB14 AN15/OCFB/CN12/RB15 U2RX/SDA2(1)/CN17/RF4 U2TX/SCL2(1)/CN18/RF5 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 DS70592C-page 9 PIC24HJXXXGPX06A/X08A/X10A Pin Diagrams (Continued) 64-Pin TQFP RG13 RG12 RG14 RG0 RG1 RF1 RF0 VDD VCAP(1) OC8/CN16/RD7 OC7/CN15/RD6 OC6/IC6/CN14/RD5 OC5/IC5/CN13/RD4 OC4/RD3 OC3/RD2 OC2/RD1 = Pins are up to 5V tolerant 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 RG15 AN16/T2CK/T7CK/RC1 AN17/T3CK/T6CK/RC2 SCK2/CN8/RG6 SDI2/CN9/RG7 SDO2/CN10/RG8 MCLR SS2/CN11/RG9 VSS VDD AN5/IC8/CN7/RB5 AN4/IC7/CN6/RB4 AN3/CN5/RB3 AN2/SS1/CN4/RB2 PGEC3/AN1/VREF-/CN3/RB1 PGED3/AN0/VREF+/CN2/RB0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 PIC24HJ128GP306A PGEC2/SOSCO/T1CK/CN0/RC14 PGED2/SOSCI/T4CK/CN1/RC13 OC1/RD0 IC4/INT4/RD11 IC3/INT3/RD10 IC2/U1CTS/INT2/RD9 IC1/INT1/RD8 VSS OSC2/CLKO/RC15 OSC1/CLKIN/RC12 VDD SCL1/RG2 SDA1/RG3 U1RTS/SCK1/INT0/RF6 U1RX/SDI1/RF2 U1TX/SDO1/RF3 Note 1: Refer to Section 2.3 “CPU Logic Filter Capacitor Connection (Vcap)” for proper connection to this pin. PGEC1/AN6/OCFA/RB6 PGED1/AN7/RB7 AVDD AVSS U2CTS/AN8/RB8 AN9/RB9 TMS/AN10/RB10 TDO/AN11/RB11 VSS VDD TCK/AN12/RB12 TDI/AN13/RB13 U2RTS/AN14/RB14 AN15/OCFB/CN12/RB15 U2RX/SDA2/CN17/RF4 U2TX/SCL2/CN18/RF5 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 DS70592C-page 10 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A Pin Diagrams (Continued) 64-Pin TQFP RG13 RG12 RG14 RG0 RG1 C1TX/RF1 C1RX/RF0 VDD VCAP(1) OC8/CN16/RD7 OC7/CN15/RD6 OC6/IC6/CN14/RD5 OC5/IC5/CN13/RD4 OC4/RD3 OC3/RD2 OC2/RD1 = Pins are up to 5V tolerant 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 RG15 AN16/T2CK/T7CK/RC1 AN17/T3CK/T6CK/RC2 SCK2/CN8/RG6 SDI2/CN9/RG7 SDO2/CN10/RG8 MCLR SS2/CN11/RG9 VSS VDD AN5/IC8/CN7/RB5 AN4/IC7/CN6/RB4 AN3/CN5/RB3 AN2/SS1/CN4/RB2 PGEC3/AN1/VREF-/CN3/RB1 PGED3/AN0/VREF+/CN2/RB0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 PIC24HJ64GP506A PIC24HJ128GP506A PGEC2/SOSCO/T1CK/CN0/RC14 PGED2/SOSCI/T4CK/CN1/RC13 OC1/RD0 IC4/INT4/RD11 IC3/INT3/RD10 IC2/U1CTS/INT2/RD9 IC1/INT1/RD8 VSS OSC2/CLKO/RC15 OSC1/CLKIN/RC12 VDD SCL1/RG2 SDA1/RG3 U1RTS/SCK1/INT0/RF6 U1RX/SDI1/RF2 U1TX/SDO1/RF3 Note 1: Refer to Section 2.3 “CPU Logic Filter Capacitor Connection (Vcap)” for proper connection to this pin. © 2011 Microchip Technology Inc. PGEC1/AN6/OCFA/RB6 PGED1/AN7/RB7 AVDD AVSS U2CTS/AN8/RB8 AN9/RB9 TMS/AN10/RB10 TDO/AN11/RB11 VSS VDD TCK/AN12/RB12 TDI/AN13/RB13 U2RTS/AN14/RB14 AN15/OCFB/CN12/RB15 U2RX/SDA2/CN17/RF4 U2TX/SCL2/CN18/RF5 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 DS70592C-page 11 PIC24HJXXXGPX06A/X08A/X10A Pin Diagrams (Continued) 100-Pin TQFP = Pins are up to 5V tolerant 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 AN28/RE4 AN27/RE3 AN26/RE2 RG13 RG12 RG14 AN25/RE1 AN24/RE0 AN23/CN23/RA7 AN22/CN22/RA6 RG0 RG1 RF1 RF0 VDD VCAP(1) OC8/CN16/RD7 OC7/CN15/RD6 OC6/CN14/RD5 OC5/CN13/RD4 IC6/CN19/RD13 IC5/RD12 OC4/RD3 OC3/RD2 OC2/RD1 RG15 VDD AN29/RE5 AN30/RE6 AN31/RE7 AN16/T2CK/T7CK/RC1 AN17/T3CK/T6CK/RC2 AN18/T4CK/T9CK/RC3 AN19/T5CK/T8CK/RC4 SCK2/CN8/RG6 SDI2/CN9/RG7 SDO2/CN10/RG8 MCLR SS2/CN11/RG9 VSS VDD TMS/RA0 AN20/INT1/RA12 AN21/INT2/RA13 AN5/CN7/RB5 AN4/CN6/RB4 AN3/CN5/RB3 AN2/SS1/CN4/RB2 PGEC3/AN1/CN3/RB1 PGED3/AN0/CN2/RB0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 75 74 73 72 71 70 69 68 67 66 65 64 VSS PGEC2/SOSCO/T1CK/CN0/RC14 PGED2/SOSCI/CN1/RC13 OC1/RD0 IC4/RD11 IC3/RD10 IC2/RD9 IC1/RD8 INT4/RA15 INT3/RA14 VSS OSC2/CLKO/RC15 OSC1/CLKIN/RC12 VDD TDO/RA5 TDI/RA4 SDA2/RA3 SCL2/RA2 SCL1/RG2 SDA1/RG3 SCK1/INT0/RF6 SDI1/RF7 SDO1/RF8 U1RX/RF2 U1TX/RF3 PIC24HJ64GP210A PIC24HJ128GP210A PIC24HJ128GP310A PIC24HJ256GP210A 63 62 61 60 59 58 57 56 55 54 53 52 51 Note 1: Refer to Section 2.3 “CPU Logic Filter Capacitor Connection (Vcap)” for proper connection to this pin. PGEC1/AN6/OCFA/RB6 26 PGED1PGED1/AN7/RB7 27 VREF-/RA9 28 VREF+/RA10 29 30 AVDD 31 AVSS 32 AN8/RB8 33 AN9/RB9 34 AN10/RB10 35 AN11/RB11 36 VSS VDD 37 38 TCK/RA1 U2RTS/RF13 39 40 U2CTS/RF12 41 AN12/RB12 42 AN13/RB13 43 AN14/RB14 44 AN15/OCFB/CN12/RB15 45 VSS 46 VDD 47 IC7/U1CTS/CN20/RD14 48 IC8/U1RTS/CN21/RD15 49 U2RX/CN17/RF4 50 U2TX/CN18/RF5 DS70592C-page 12 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A Pin Diagrams (Continued) 100-Pin TQFP = Pins are up to 5V tolerant 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 AN28/RE4 AN27/RE3 AN26/RE2 RG13 RG12 RG14 AN25/RE1 AN24/RE0 AN23/CN23/RA7 AN22/CN22/RA6 RG0 RG1 C1TX/RF1 C1RX/RF0 VDD VCAP(1) OC8/CN16/RD7 OC7/CN15/RD6 OC6/CN14/RD5 OC5/CN13/RD4 IC6/CN19/RD13 IC5/RD12 OC4/RD3 OC3/RD2 OC2/RD1 RG15 VDD AN29/RE5 AN30/RE6 AN31/RE7 AN16/T2CK/T7CK/RC1 AN17/T3CK/T6CK/RC2 AN18/T4CK/T9CK/RC3 AN19/T5CK/T8CK/RC4 SCK2/CN8/RG6 SDI2/CN9/RG7 SDO2/CN10/RG8 MCLR SS2/CN11/RG9 VSS VDD TMS/RA0 AN20/INT1/RA12 AN21/INT2/RA13 AN5/CN7/RB5 AN4/CN6/RB4 AN3/CN5/RB3 AN2/SS1/CN4/RB2 PGEC3/AN1/CN3/RB1 PGED3/AN0/CN2/RB0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 VSS PGEC2/SOSCO/T1CK/CN0/RC14 PGED2/SOSCI/CN1/RC13 OC1/RD0 IC4/RD11 IC3/RD10 IC2/RD9 IC1/RD8 INT4/RA15 INT3/RA14 VSS OSC2/CLKO/RC15 OSC1/CLKIN/RC12 VDD TDO/RA5 TDI/RA4 SDA2/RA3 SCL2/RA2 SCL1/RG2 SDA1/RG3 SCK1/INT0/RF6 SDI1/RF7 SDO1/RF8 U1RX/RF2 U1TX/RF3 PIC24HJ64GP510A PIC24HJ128GP510A 63 62 61 60 59 58 57 56 55 54 53 52 51 Note 1: Refer to Section 2.3 “CPU Logic Filter Capacitor Connection (Vcap)” for proper connection to this pin. © 2011 Microchip Technology Inc. PGEC1/AN6/OCFA/RB6 PGED1/AN7/RB7 VREF-/RA9 VREF+/RA10 AVDD AVSS AN8/RB8 AN9/RB9 AN10/RB10 AN11/RB11 VSS VDD TCK/RA1 U2RTS/RF13 U2CTS/RF12 AN12/RB12 AN13/RB13 AN14/RB14 AN15/OCFB/CN12/RB15 VSS VDD IC7/U1CTS/CN20/RD14 IC8/U1RTS/CN21/RD15 U2RX/CN17/RF4 U2TX/CN18/RF5 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 DS70592C-page 13 PIC24HJXXXGPX06A/X08A/X10A Pin Diagrams (Continued) 100-Pin TQFP = Pins are up to 5V tolerant 100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 AN28/RE4 AN27/RE3 AN26/RE2 RG13 RG12 RG14 AN25/RE1 AN24/RE0 AN23/CN23/RA7 AN22/CN22/RA6 C2RX/RG0 C2TX/RG1 C1TX/RF1 C1RX/RF0 VDD VCAP(1) OC8/CN16/RD7 OC7/CN15/RD6 OC6/CN14/RD5 OC5/CN13/RD4 IC6/CN19/RD13 IC5/RD12 OC4/RD3 OC3/RD2 OC2/RD1 RG15 VDD AN29/RE5 AN30/RE6 AN31/RE7 AN16/T2CK/T7CK/RC1 AN17/T3CK/T6CK/RC2 AN18/T4CK/T9CK/RC3 AN19/T5CK/T8CK/RC4 SCK2/CN8/RG6 SDI2/CN9/RG7 SDO2/CN10/RG8 MCLR SS2/CN11/RG9 VSS VDD TMS/RA0 AN20/INT1/RA12 AN21/INT2/RA13 AN5/CN7/RB5 AN4/CN6/RB4 AN3/CN5/RB3 AN2/SS1/CN4/RB2 PGEC3/AN1/CN3/RB1 PGED3/AN0/CN2/RB0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 VSS PGEC2/SOSCO/T1CK/CN0/RC14 PGED2/SOSCI/CN1/RC13 OC1/RD0 IC4/RD11 IC3/RD10 IC2/RD9 IC1/RD8 INT4/RA15 INT3/RA14 VSS OSC2/CLKO/RC15 OSC1/CLKIN/RC12 VDD TDO/RA5 TDI/RA4 SDA2/RA3 SCL2/RA2 SCL1/RG2 SDA1/RG3 SCK1/INT0/RF6 SDI1/RF7 SDO1/RF8 U1RX/RF2 U1TX/RF3 PIC24HJ256GP610A 64 63 62 61 60 59 58 57 56 55 54 53 52 51 Note 1: Refer to Section 2.3 “CPU Logic Filter Capacitor Connection (Vcap)” for proper connection to this pin. PGEC1/AN6/OCFA/RB6 PGED1/AN7/RB7 VREF-/RA9 VREF+/RA10 AVDD AVSS AN8/RB8 AN9/RB9 AN10/RB10 AN11/RB11 VSS VDD TCK/RA1 U2RTS/RF13 U2CTS/RF12 AN12/RB12 AN13/RB13 AN14/RB14 AN15/OCFB/CN12/RB15 VSS VDD IC7/U1CTS/CN20/RD14 IC8/U1RTS/CN21/RD15 U2RX/CN17/RF4 U2TX/CN18/RF5 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 DS70592C-page 14 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A Table of Contents PIC24H Product Families....................................................................................................................................................................... 5 1.0 Device Overview ........................................................................................................................................................................ 17 2.0 Guidelines for Getting Started with 16-Bit Microcontrollers........................................................................................................ 23 3.0 CPU............................................................................................................................................................................................ 27 4.0 Memory Organization ................................................................................................................................................................. 33 5.0 Flash Program Memory.............................................................................................................................................................. 63 6.0 Reset ......................................................................................................................................................................................... 69 7.0 Interrupt Controller ..................................................................................................................................................................... 73 8.0 Direct Memory Access (DMA) .................................................................................................................................................. 117 9.0 Oscillator Configuration ............................................................................................................................................................ 127 10.0 Power-Saving Features............................................................................................................................................................ 137 11.0 I/O Ports ................................................................................................................................................................................... 145 12.0 Timer1 ...................................................................................................................................................................................... 147 13.0 Timer2/3, Timer4/5, Timer6/7 and Timer8/9 ............................................................................................................................ 149 14.0 Input Capture............................................................................................................................................................................ 155 15.0 Output Compare....................................................................................................................................................................... 157 16.0 Serial Peripheral Interface (SPI)............................................................................................................................................... 161 17.0 Inter-Integrated Circuit™ (I2C™).............................................................................................................................................. 167 18.0 Universal Asynchronous Receiver Transmitter (UART) ........................................................................................................... 175 19.0 Enhanced CAN (ECAN™) Module........................................................................................................................................... 181 20.0 10-bit/12-bit Analog-to-Digital Converter (ADC) ....................................................................................................................... 209 21.0 Special Features ...................................................................................................................................................................... 221 22.0 Instruction Set Summary .......................................................................................................................................................... 229 23.0 Development Support............................................................................................................................................................... 237 24.0 Electrical Characteristics .......................................................................................................................................................... 241 25.0 High Temperature Electrical Characteristics ............................................................................................................................ 285 26.0 Packaging Information.............................................................................................................................................................. 293 Appendix A: Migrating from PIC24HJXXXGPX06/X08/X10 Devices to PIC24HJXXXGPX06A/X08A/X10A Devices ....................... 303 Appendix B: Revision History............................................................................................................................................................. 304 Index ................................................................................................................................................................................................. 307 The Microchip Web Site ..................................................................................................................................................................... 311 Customer Change Notification Service .............................................................................................................................................. 311 Customer Support .............................................................................................................................................................................. 311 Reader Response .............................................................................................................................................................................. 312 Product Identification System ............................................................................................................................................................ 313 © 2011 Microchip Technology Inc. DS70592C-page 15 PIC24HJXXXGPX06A/X08A/X10A TO OUR VALUED CUSTOMERS It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and enhanced as new volumes and updates are introduced. If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via Email at docerrors@microchip.com or fax the Reader Response Form in the back of this data sheet to (480) 792-4150. We welcome your feedback. Most Current Data Sheet To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at: http://www.microchip.com You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page. The last character of the literature number is the version number, (e.g., DS30000A is version A of document DS30000). Errata An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of silicon and revision of document to which it applies. To determine if an errata sheet exists for a particular device, please check with one of the following: • Microchip’s Worldwide Web site; http://www.microchip.com • Your local Microchip sales office (see last page) When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are using. Customer Notification System Register on our web site at www.microchip.com to receive the most current information on all of our products. DS70592C-page 16 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A 1.0 Note: DEVICE OVERVIEW This data sheet summarizes the features of the PIC24HJXXXGPX06A/X08A/X10A family of devices. However, it is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to the latest family reference sections of the “dsPIC33F/PIC24H Family Reference Manual”, which is available from the Microchip web site (www.microchip.com). This makes these families suitable for a wide variety of high-performance digital signal control applications. The devices are pin compatible with the dsPIC33F family of devices, and also share a very high degree of compatibility with the dsPIC30F family devices. This allows easy migration between device families as may be necessitated by the specific functionality, computational resource and system cost requirements of the application. The PIC24HJXXXGPX06A/X08A/X10A device family employs a powerful 16-bit architecture, ideal for applications that rely on high-speed, repetitive computations, as well as control. The 17 x 17 multiplier, hardware support for division operations, multi-bit data shifter, a large array of 16-bit working registers and a wide variety of data addressing modes, together provide the PIC24HJXXXGPX06A/X08A/X10A Central Processing Unit (CPU) with extensive mathematical processing capability. Flexible and deterministic interrupt handling, coupled with a powerful array of peripherals, renders the PIC24HJXXXGPX06A/X08A/X10A devices suitable for control applications. Further, Direct Memory Access (DMA) enables overhead-free transfer of data between several peripherals and a dedicated DMA RAM. Reliable, field programmable Flash program memory ensures scalability of applications that use PIC24HJXXXGPX06A/X08A/X10A devices. Figure 1-1 shows a general block diagram of the various core and peripheral modules in the PIC24HJXXXGPX06A/X08A/X10A family of devices, while Table 1-1 lists the functions of the various pins shown in the pinout diagrams. This document contains device specific information for the following devices: • • • • • • • • • • • • • PIC24HJ64GP206A PIC24HJ64GP210A PIC24HJ64GP506A PIC24HJ64GP510A PIC24HJ128GP206A PIC24HJ128GP210A PIC24HJ128GP506A PIC24HJ128GP510A PIC24HJ128GP306A PIC24HJ128GP310A PIC24HJ256GP206A PIC24HJ256GP210A PIC24HJ256GP610A The PIC24HJXXXGPX06A/X08A/X10A device family includes devices with different pin counts (64 and 100 pins), different program memory sizes (64 Kbytes, 128 Kbytes and 256 Kbytes) and different RAM sizes (8 Kbytes and 16 Kbytes). © 2011 Microchip Technology Inc. DS70592C-page 17 PIC24HJXXXGPX06A/X08A/X10A FIGURE 1-1: PSV and Table Data Access Control Block Interrupt Controller 8 23 23 PCU PCH PCL Program Counter Loop Stack Control Control Logic Logic X RAM Address Latch DMA 16 Address Generator Units Controller 16 PORTB PIC24HJXXXGPX06A/X08A/X10A GENERAL BLOCK DIAGRAM Data Bus 16 DMA Data Latch RAM PORTA 16 16 23 PORTC Address Latch Program Memory EA MUX Data Latch 24 ROM Latch 16 Literal Data PORTD 16 Instruction Decode and Control Control Signals to Various Blocks OSC2/CLKO OSC1/CLKI Timing Generation FRC/LPRC Oscillators Precision Band Gap Reference Voltage Regulator Power-up Timer Oscillator Start-up Timer Power-on Reset Watchdog Timer Brown-out Reset Instruction Reg 16 PORTE 17 x 17 Multiplier 16 x 16 W Register Array 16 PORTF Divide Support 16-bit ALU 16 PORTG VCAP VDD, VSS MCLR Timers 1-9 ADC1,2 ECAN1,2 UART1,2 IC1-8 OC/ PWM1-8 CN1-23 SPI1,2 I2C1,2 Note: Not all pins or features are implemented on all device pinout configurations. See Pin Diagrams for the specific pins and features present on each device. DS70592C-page 18 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A TABLE 1-1: Pin Name AN0-AN31 AVDD AVSS CLKI CLKO PINOUT I/O DESCRIPTIONS Pin Type I P P I O Buffer Type Analog P P Analog input channels. Positive supply for analog modules. This pin must be connected at all times. Ground reference for analog modules. Description ST/CMOS External clock source input. Always associated with OSC1 pin function. — Oscillator crystal output. Connects to crystal or resonator in Crystal Oscillator mode. Optionally functions as CLKO in RC and EC modes. Always associated with OSC2 pin function. ST ST — ST — ST ST ST ST ST ST ST ST ST ST ST ST ST ST ST — Input change notification inputs. Can be software programmed for internal weak pull-ups on all inputs. ECAN1 bus receive pin. ECAN1 bus transmit pin. ECAN2 bus receive pin. ECAN2 bus transmit pin. Data I/O pin for programming/debugging communication channel 1. Clock input pin for programming/debugging communication channel 1. Data I/O pin for programming/debugging communication channel 2. Clock input pin for programming/debugging communication channel 2. Data I/O pin for programming/debugging communication channel 3. Clock input pin for programming/debugging communication channel 3. Capture inputs 1 through 8. External interrupt 0. External interrupt 1. External interrupt 2. External interrupt 3. External interrupt 4. Master Clear (Reset) input. This pin is an active-low Reset to the device. Compare Fault A input (for Compare Channels 1, 2, 3 and 4). Compare Fault B input (for Compare Channels 5, 6, 7 and 8). Compare outputs 1 through 8. CN0-CN23 C1RX C1TX C2RX C2TX PGED1 PGEC1 PGED2 PGEC2 PGED3 PGEC3 IC1-IC8 INT0 INT1 INT2 INT3 INT4 MCLR OCFA OCFB OC1-OC8 OSC1 OSC2 RA0-RA7 RA9-RA10 RA12-RA15 RB0-RB15 RC1-RC4 RC12-RC15 RD0-RD15 RE0-RE7 RF0-RF8 RF12-RF13 RG0-RG3 RG6-RG9 RG12-RG15 I I O I O I/O I I/O I I/O I I I I I I I I/P I I O I I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O ST/CMOS Oscillator crystal input. ST buffer when configured in RC mode; CMOS otherwise. — Oscillator crystal output. Connects to crystal or resonator in Crystal Oscillator mode. Optionally functions as CLKO in RC and EC modes. ST ST ST ST ST ST ST ST ST ST ST ST PORTA is a bidirectional I/O port. PORTB is a bidirectional I/O port. PORTC is a bidirectional I/O port. PORTD is a bidirectional I/O port. PORTE is a bidirectional I/O port. PORTF is a bidirectional I/O port. PORTG is a bidirectional I/O port. Legend: CMOS = CMOS compatible input or output ST = Schmitt Trigger input with CMOS levels Analog = Analog input O = Output P = Power I = Input © 2011 Microchip Technology Inc. DS70592C-page 19 PIC24HJXXXGPX06A/X08A/X10A TABLE 1-1: Pin Name SCK1 SDI1 SDO1 SS1 SCK2 SDI2 SDO2 SS2 SCL1 SDA1 SCL2 SDA2 SOSCI SOSCO TMS TCK TDI TDO T1CK T2CK T3CK T4CK T5CK T6CK T7CK T8CK T9CK U1CTS U1RTS U1RX U1TX U2CTS U2RTS U2RX U2TX VDD VCAP VSS VREF+ VREF- PINOUT I/O DESCRIPTIONS (CONTINUED) Pin Type I/O I O I/O I/O I O I/O I/O I/O I/O I/O I O I I I O I I I I I I I I I I O I O I O I O P P P I I Buffer Type ST ST — ST ST ST — ST ST ST ST ST Description Synchronous serial clock input/output for SPI1. SPI1 data in. SPI1 data out. SPI1 slave synchronization or frame pulse I/O. Synchronous serial clock input/output for SPI2. SPI2 data in. SPI2 data out. SPI2 slave synchronization or frame pulse I/O. Synchronous serial clock input/output for I2C1. Synchronous serial data input/output for I2C1. Synchronous serial clock input/output for I2C2. Synchronous serial data input/output for I2C2. ST/CMOS 32.768 kHz low-power oscillator crystal input; CMOS otherwise. — 32.768 kHz low-power oscillator crystal output. ST ST ST — ST ST ST ST ST ST ST ST ST ST — ST — ST — ST — — — — Analog Analog JTAG Test mode select pin. JTAG test clock input pin. JTAG test data input pin. JTAG test data output pin. Timer1 external clock input. Timer2 external clock input. Timer3 external clock input. Timer4 external clock input. Timer5 external clock input. Timer6 external clock input. Timer7 external clock input. Timer8 external clock input. Timer9 external clock input. UART1 clear to send. UART1 ready to send. UART1 receive. UART1 transmit. UART2 clear to send. UART2 ready to send. UART2 receive. UART2 transmit. Positive supply for peripheral logic and I/O pins. CPU logic filter capacitor connection. Ground reference for logic and I/O pins. Analog voltage reference (high) input. Analog voltage reference (low) input. Analog = Analog input O = Output P = Power I = Input Legend: CMOS = CMOS compatible input or output ST = Schmitt Trigger input with CMOS levels DS70592C-page 20 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A 1.1 Referenced Source This device data sheet is based on the following individual chapters of the “dsPIC33F/PIC24H Family Reference Manual”. These documents should be considered as the general reference for the operation of a particular module or device feature. Note: To access the documents listed below, browse to the documentation section of the PIC24HJ256GP610A product page on the Microchip web site (www.microchip.com) or by selecting a family reference manual section from the following list. In addition to parameters, features, and other documentation, the resulting page provides links to the related family reference manual sections. • • • • • • • • • • • • • • • • • • • • • • • Section 1. “Introduction” (DS70242) Section 2. “CPU” (DS70245) Section 3. “Data Memory” (DS70237) Section 4. “Program Memory” (DS70238) Section 5. “Flash Programming” (DS70228) Section 6. “Interrupts” (DS70224) Section 7. “Oscillator” (DS70227) Section 8. “Reset” (DS70229) Section 9. “Watchdog Timer and Power-Saving Modes” (DS70236) Section 10. “I/O Ports” (DS70230) Section 11. “Timers” (DS70244) Section 12. “Input Capture” (DS70248) Section 13. “Output Compare” (DS70247) Section 16. “Analog-to-Digital Converter (ADC)” (DS70225) Section 17. “UART” (DS70232) Section 18. “Serial Peripheral Interface (SPI)” (DS70243) Section 19. “Inter-Integrated Circuit™ (I2C™)” (DS70235) Section 21. “Enhanced Controller Area Network (ECAN™)” (DS70226) Section 22. “Direct Memory Access (DMA)” (DS70223) Section 23. “CodeGuard™ Security” (DS70239) Section 24. “Programming and Diagnostics” (DS70246) Section 25. “Device Configuration” (DS70231) Section 26. “Development Tool Support” (DS70240) © 2011 Microchip Technology Inc. DS70592C-page 21 PIC24HJXXXGPX06A/X08A/X10A NOTES: DS70592C-page 22 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A 2.0 GUIDELINES FOR GETTING STARTED WITH 16-BIT MICROCONTROLLERS 2.2 Decoupling Capacitors The use of decoupling capacitors on every pair of power supply pins, such as VDD, VSS, AVDD and AVSS is required. Consider the following criteria when using decoupling capacitors: • Value and type of capacitor: Recommendation of 0.1 µF (100 nF), 10-20V. This capacitor should be a low-ESR and have resonance frequency in the range of 20 MHz and higher. It is recommended that ceramic capacitors be used. • Placement on the printed circuit board: The decoupling capacitors should be placed as close to the pins as possible. It is recommended to place the capacitors on the same side of the board as the device. If space is constricted, the capacitor can be placed on another layer on the PCB using a via; however, ensure that the trace length from the pin to the capacitor is within one-quarter inch (6 mm) in length. • Handling high frequency noise: If the board is experiencing high frequency noise, upward of tens of MHz, add a second ceramic-type capacitor in parallel to the above described decoupling capacitor. The value of the second capacitor can be in the range of 0.01 µF to 0.001 µF. Place this second capacitor next to the primary decoupling capacitor. In high-speed circuit designs, consider implementing a decade pair of capacitances as close to the power and ground pins as possible. For example, 0.1 µF in parallel with 0.001 µF. • Maximizing performance: On the board layout from the power supply circuit, run the power and return traces to the decoupling capacitors first, and then to the device pins. This ensures that the decoupling capacitors are first in the power chain. Equally important is to keep the trace length between the capacitor and the power pins to a minimum thereby reducing PCB track inductance. Note 1: This data sheet summarizes the features of the PIC24HJXXXGPX06A/X08A/X10A family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to the “dsPIC33F/PIC24H Family Reference Manual”. Please see the Microchip web site (www.microchip.com) for the latest dsPIC33F/PIC24H Family Reference Manual sections. 2: Some registers and associated bits described in this section may not be available on all devices. Refer to Section 4.0 “Memory Organization” in this data sheet for device-specific register and bit information. 2.1 Basic Connection Requirements Getting started with the PIC24HJXXXGPX06A/X08A/X10A family of 16-bit Microcontrollers (MCUs) requires attention to a minimal set of device pin connections before proceeding with development. The following is a list of pin names, which must always be connected: • All VDD and VSS pins (see Section 2.2 “Decoupling Capacitors”) • All AVDD and AVSS pins (regardless if ADC module is not used) (see Section 2.2 “Decoupling Capacitors”) • VCAP (see Section 2.3 “CPU Logic Filter Capacitor Connection (Vcap)”) • MCLR pin (see Section 2.4 “Master Clear (MCLR) Pin”) • PGECx/PGEDx pins used for In-Circuit Serial Programming™ (ICSP™) and debugging purposes (see Section 2.5 “ICSP Pins”) • OSC1 and OSC2 pins when external oscillator source is used (see Section 2.6 “External Oscillator Pins”) Additionally, the following pins may be required: • VREF+/VREF- pins used when external voltage reference for ADC module is implemented Note: The AVDD and AVSS pins must be connected independent of the ADC voltage reference source. © 2011 Microchip Technology Inc. DS70592C-page 23 PIC24HJXXXGPX06A/X08A/X10A FIGURE 2-1: RECOMMENDED MINIMUM CONNECTION 0.1 µF Ceramic 2.4 Master Clear (MCLR) Pin The MCLR pin provides for two specific device functions: • Device Reset • Device programming and debugging During device programming and debugging, the resistance and capacitance that can be added to the pin must be considered. Device programmers and debuggers drive the MCLR pin. Consequently, specific voltage levels (VIH and VIL) and fast signal transitions must not be adversely affected. Therefore, specific values of R and C will need to be adjusted based on the application and PCB requirements. VDD VDD R R1 MCLR C PIC24H VSS VDD VDD VSS AVDD AVSS VDD VSS VCAP VSS 0.1 µF Ceramic 0.1 µF Ceramic 10 Ω 0.1 µF Ceramic 0.1 µF Ceramic For example, as shown in Figure 2-2, it is recommended that the capacitor C, be isolated from the MCLR pin during programming and debugging operations. Place the components shown in Figure 2-2 within one-quarter inch (6 mm) from the MCLR pin. 2.2.1 TANK CAPACITORS FIGURE 2-2: On boards with power traces running longer than six inches in length, it is suggested to use a tank capacitor for integrated circuits including MCUs to supply a local power source. The value of the tank capacitor should be determined based on the trace resistance that connects the power supply source to the device, and the maximum current drawn by the device in the application. In other words, select the tank capacitor so that it meets the acceptable voltage sag at the device. Typical values range from 4.7 µF to 47 µF. EXAMPLE OF MCLR PIN CONNECTIONS VDD R R1 JP C MCLR PIC24H 2.3 CPU Logic Filter Capacitor Connection (VCAP) Note 1: A low-ESR (< 5 Ohms) capacitor is required on the VCAP pin, which is used to stabilize the voltage regulator output voltage. The VCAP pin must not be connected to VDD, and must have a capacitor between 4.7 µF and 10 µF, 16V connected to ground. The type can be ceramic or tantalum. Refer to Section 24.0 “Electrical Characteristics” for additional information. The placement of this capacitor should be close to the VCAP. It is recommended that the trace length not exceed one-quarter inch (6 mm). Refer to Section 21.2 “On-Chip Voltage Regulator” for details. R ≤ 10 kΩ is recommended. A suggested starting value is 10 kΩ. Ensure that the MCLR pin VIH and VIL specifications are met. R1 ≤ 470Ω will limit any current flowing into MCLR from the external capacitor C, in the event of MCLR pin breakdown, due to Electrostatic Discharge (ESD) or Electrical Overstress (EOS). Ensure that the MCLR pin VIH and VIL specifications are met. 2: DS70592C-page 24 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A 2.5 ICSP Pins 2.6 External Oscillator Pins The PGECx and PGEDx pins are used for In-Circuit Serial Programming™ (ICSP™) and debugging purposes. It is recommended to keep the trace length between the ICSP connector and the ICSP pins on the device as short as possible. If the ICSP connector is expected to experience an ESD event, a series resistor is recommended, with the value in the range of a few tens of Ohms, not to exceed 100 Ohms. Pull-up resistors, series diodes, and capacitors on the PGECx and PGEDx pins are not recommended as they will interfere with the programmer/debugger communications to the device. If such discrete components are an application requirement, they should be removed from the circuit during programming and debugging. Alternatively, refer to the AC/DC characteristics and timing requirements information in the respective device Flash programming specification for information on capacitive loading limits and pin input voltage high (VIH) and input low (VIL) requirements. Ensure that the “Communication Channel Select” (i.e., PGECx/PGEDx pins) programmed into the device matches the physical connections for the ICSP to MPLAB® ICD 2, MPLAB ICD 3 or MPLAB REAL ICE™. For more information on ICD 2, ICD 3 and REAL ICE connection requirements, refer to the following documents that are available on the Microchip website. • “MPLAB® ICD 2 In-Circuit Debugger User’s Guide” DS51331 • “Using MPLAB® ICD 2” (poster) DS51265 • “MPLAB® ICD 2 Design Advisory” DS51566 • “Using MPLAB® ICD 3 In-Circuit Debugger” (poster) DS51765 • “MPLAB® ICD 3 Design Advisory” DS51764 • “MPLAB® REAL ICE™ In-Circuit Emulator User’s Guide” DS51616 • “Using MPLAB® REAL ICE™” (poster) DS51749 Many MCUs have options for at least two oscillators: a high-frequency primary oscillator and a low-frequency secondary oscillator (refer to Section 9.0 “Oscillator Configuration” for details). The oscillator circuit should be placed on the same side of the board as the device. Also, place the oscillator circuit close to the respective oscillator pins, not exceeding one-half inch (12 mm) distance between them. The load capacitors should be placed next to the oscillator itself, on the same side of the board. Use a grounded copper pour around the oscillator circuit to isolate them from surrounding circuits. The grounded copper pour should be routed directly to the MCU ground. Do not run any signal traces or power traces inside the ground pour. Also, if using a two-sided board, avoid any traces on the other side of the board where the crystal is placed. A suggested layout is shown in Figure 2-3. FIGURE 2-3: SUGGESTED PLACEMENT OF THE OSCILLATOR CIRCUIT Main Oscillator 13 Guard Ring Guard Trace Secondary Oscillator 14 15 16 17 18 19 20 © 2011 Microchip Technology Inc. DS70592C-page 25 PIC24HJXXXGPX06A/X08A/X10A 2.7 Oscillator Value Conditions on Device Start-up If the PLL of the target device is enabled and configured for the device start-up oscillator, the maximum oscillator source frequency must be limited to ≤8 MHz for start-up with PLL enabled to comply with device PLL start-up conditions. This means that if the external oscillator frequency is outside this range, the application must start-up in the FRC mode first. The default PLL settings after a POR with an oscillator frequency outside this range will violate the device operating speed. Once the device powers up, the application firmware can initialize the PLL SFRs, CLKDIV and PLLDBF to a suitable value, and then perform a clock switch to the Oscillator + PLL clock source. Note that clock switching must be enabled in the device Configuration word. 2.8 Configuration of Analog and Digital Pins During ICSP Operations If MPLAB ICD 2, ICD 3 or REAL ICE is selected as a debugger, it automatically initializes all of the A/D input pins (ANx) as “digital” pins, by setting all bits in the AD1PCFGL register. The bits in this register that correspond to the A/D pins that are initialized by MPLAB ICD 2, ICD 3, or REAL ICE, must not be cleared by the user application firmware; otherwise, communication errors will result between the debugger and the device. If your application needs to use certain A/D pins as analog input pins during the debug session, the user application must clear the corresponding bits in the AD1PCFGL register during initialization of the ADC module. When MPLAB ICD 2, ICD 3 or REAL ICE is used as a programmer, the user application firmware must correctly configure the AD1PCFGL register. Automatic initialization of this register is only done during debugger operation. Failure to correctly configure the register(s) will result in all A/D pins being recognized as analog input pins, resulting in the port value being read as a logic ‘0’, which may affect user application functionality. 2.9 Unused I/Os Unused I/O pins should be configured as outputs and driven to a logic-low state. Alternatively, connect a 1k to 10k resistor between VSS and the unused pins. DS70592C-page 26 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A 3.0 CPU 3.1 Data Addressing Overview Note 1: This data sheet summarizes the features of the PIC24HJXXXGPX06A/X08A/X10A family of devices. However, it is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to Section 2. “CPU” (DS70245) of the “dsPIC33F/PIC24H Family Reference Manual”, which is available from the Microchip website (www.microchip.com). 2: Some registers and associated bits described in this section may not be available on all devices. Refer to Section 4.0 “Memory Organization” in this data sheet for device-specific register and bit information. The PIC24HJXXXGPX06A/X08A/X10A CPU module has a 16-bit (data) modified Harvard architecture with an enhanced instruction set and addressing modes. The CPU has a 24-bit instruction word with a variable length opcode field. The Program Counter (PC) is 23 bits wide and addresses up to 4M x 24 bits of user program memory space. The actual amount of program memory implemented varies by device. A single-cycle instruction prefetch mechanism is used to help maintain throughput and provides predictable execution. All instructions execute in a single cycle, with the exception of instructions that change the program flow, the double word move (MOV.D) instruction and the table instructions. Overhead-free, single-cycle program loop constructs are supported using the REPEAT instruction, which is interruptible at any point. The PIC24HJXXXGPX06A/X08A/X10A devices have sixteen, 16-bit working registers in the programmer’s model. Each of the working registers can serve as a data, address or address offset register. The 16th working register (W15) operates as a software Stack Pointer (SP) for interrupts and calls. The PIC24HJXXXGPX06A/X08A/X10A instruction set includes many addressing modes and is designed for optimum C compiler efficiency. For most instructions, the PIC24HJXXXGPX06A/X08A/X10A is capable of executing a data (or program data) memory read, a working register (data) read, a data memory write and a program (instruction) memory read per instruction cycle. As a result, three parameter instructions can be supported, allowing A + B = C operations to be executed in a single cycle. A block diagram of the CPU is shown in Figure 3-1, and the programmer’s model for the PIC24HJXXXGPX06A/X08A/X10A is shown in Figure 3-2. The data space can be linearly addressed as 32K words or 64 Kbytes using an Address Generation Unit (AGU). The upper 32 Kbytes of the data space memory map can optionally be mapped into program space at any 16K program word boundary defined by the 8-bit Program Space Visibility Page (PSVPAG) register. The program to data space mapping feature lets any instruction access program space as if it were data space. The data space also includes 2 Kbytes of DMA RAM, which is primarily used for DMA data transfers, but may be used as general purpose RAM. 3.2 Special MCU Features The PIC24HJXXXGPX06A/X08A/X10A features a 17-bit by 17-bit, single-cycle multiplier. The multiplier can perform signed, unsigned and mixed-sign multiplication. Using a 17-bit by 17-bit multiplier for 16-bit by 16-bit multiplication makes mixed-sign multiplication possible. The PIC24HJXXXGPX06A/X08A/X10A supports 16/16 and 32/16 integer divide operations. All divide instructions are iterative operations. They must be executed within a REPEAT loop, resulting in a total execution time of 19 instruction cycles. The divide operation can be interrupted during any of those 19 cycles without loss of data. A multi-bit data shifter is used to perform up to a 16-bit, left or right shift in a single cycle. © 2011 Microchip Technology Inc. DS70592C-page 27 PIC24HJXXXGPX06A/X08A/X10A FIGURE 3-1: PSV and Table Data Access Control Block Interrupt Controller 8 23 23 PCU PCH PCL Program Counter Loop Stack Control Control Logic Logic 16 X Data Bus PIC24HJXXXGPX06A/X08A/X10A CPU CORE BLOCK DIAGRAM 16 16 Data Latch X RAM Address Latch DMA RAM 16 23 16 Address Latch Address Generator Units DMA Controller Program Memory EA MUX Data Latch 24 ROM Latch 16 Literal Data 16 Instruction Decode and Control Instruction Reg 17 x 17 Multiplier 16 Control Signals to Various Blocks Divide Support 16 x 16 W Register Array 16 16-bit ALU 16 To Peripheral Modules DS70592C-page 28 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A FIGURE 3-2: PIC24HJXXXGPX06A/X08A/X10A PROGRAMMER’S MODEL D15 W0/WREG W1 W2 W3 W4 W5 W6 W7 W8 W9 W10 W11 W12 W13 W14/Frame Pointer W15/Stack Pointer SPLIM Stack Pointer Limit Register Working Registers DO Shadow D0 PUSH.S Shadow Legend PC22 7 TBLPAG 7 PSVPAG 0 0 Data Table Page Address PC0 0 Program Counter Program Space Visibility Page Address 15 RCOUNT 0 REPEAT Loop Counter 15 CORCON 0 Core Configuration Register — — — — — — — DC IPL2 IPL1 IPL0 RA SRL N OV Z C STATUS Register SRH © 2011 Microchip Technology Inc. DS70592C-page 29 PIC24HJXXXGPX06A/X08A/X10A 3.3 CPU Control Registers SR: CPU STATUS REGISTER U-0 — U-0 — U-0 — U-0 — U-0 — U-0 — R/W-0 DC bit 8 R/W-0(2) IPL bit 7 Legend: C = Clear only bit S = Set only bit ‘1’ = Bit is set bit 15-9 bit 8 R = Readable bit W = Writable bit ‘0’ = Bit is cleared Unimplemented: Read as ‘0’ DC: MCU ALU Half Carry/Borrow bit 1 = A carry-out from the 4th low-order bit (for byte sized data) or 8th low-order bit (for word sized data) of the result occurred 0 = No carry-out from the 4th low-order bit (for byte sized data) or 8th low-order bit (for word sized data) of the result occurred IPL: CPU Interrupt Priority Level Status bits(2) 111 = CPU Interrupt Priority Level is 7 (15), user interrupts disabled 110 = CPU Interrupt Priority Level is 6 (14) 101 = CPU Interrupt Priority Level is 5 (13) 100 = CPU Interrupt Priority Level is 4 (12) 011 = CPU Interrupt Priority Level is 3 (11) 010 = CPU Interrupt Priority Level is 2 (10) 001 = CPU Interrupt Priority Level is 1 (9) 000 = CPU Interrupt Priority Level is 0 (8) RA: REPEAT Loop Active bit 1 = REPEAT loop in progress 0 = REPEAT loop not in progress N: MCU ALU Negative bit 1 = Result was negative 0 = Result was non-negative (zero or positive) OV: MCU ALU Overflow bit This bit is used for signed arithmetic (2’s complement). It indicates an overflow of the magnitude which causes the sign bit to change state. 1 = Overflow occurred for signed arithmetic (in this arithmetic operation) 0 = No overflow occurred Z: MCU ALU Zero bit 1 = An operation which affects the Z bit has set it at some time in the past 0 = The most recent operation which affects the Z bit has cleared it (i.e., a non-zero result) C: MCU ALU Carry/Borrow bit 1 = A carry-out from the Most Significant bit (MSb) of the result occurred 0 = No carry-out from the Most Significant bit of the result occurred The IPL bits are concatenated with the IPL bit (CORCON) to form the CPU Interrupt Priority Level. The value in parentheses indicates the IPL if IPL = 1. User interrupts are disabled when IPL = 1. The IPL Status bits are read only when NSTDIS = 1 (INTCON1). U = Unimplemented bit, read as ‘0’ -n = Value at POR x = Bit is unknown (2) REGISTER 3-1: U-0 — bit 15 R/W-0(1) R/W-0(2) R-0 RA R/W-0 N R/W-0 OV R/W-0 Z R/W-0 C bit 0 bit 7-5 bit 4 bit 3 bit 2 bit 1 bit 0 Note 1: 2: DS70592C-page 30 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A REGISTER 3-2: U-0 — bit 15 U-0 — bit 7 Legend: R = Readable bit 0’ = Bit is cleared bit 15-4 bit 3 C = Clear only bit W = Writable bit ‘x = Bit is unknown CORCON: CORE CONTROL REGISTER U-0 — U-0 — U-0 — U-0 — U-0 — U-0 — U-0 — bit 8 U-0 — U-0 — U-0 — R/C-0 IPL3(1) R/W-0 PSV U-0 — U-0 — bit 0 -n = Value at POR ‘1’ = Bit is set U = Unimplemented bit, read as ‘0’ bit 2 bit 1-0 Note 1: Unimplemented: Read as ‘0’ IPL3: CPU Interrupt Priority Level Status bit 3(1) 1 = CPU interrupt priority level is greater than 7 0 = CPU interrupt priority level is 7 or less PSV: Program Space Visibility in Data Space Enable bit 1 = Program space visible in data space 0 = Program space not visible in data space Unimplemented: Read as ‘0’ The IPL3 bit is concatenated with the IPL bits (SR) to form the CPU interrupt priority level. © 2011 Microchip Technology Inc. DS70592C-page 31 PIC24HJXXXGPX06A/X08A/X10A 3.4 Arithmetic Logic Unit (ALU) 3.4.2 DIVIDER The PIC24HJXXXGPX06A/X08A/X10A ALU is 16 bits wide and is capable of addition, subtraction, bit shifts and logic operations. Unless otherwise mentioned, arithmetic operations are 2’s complement in nature. Depending on the operation, the ALU may affect the values of the Carry (C), Zero (Z), Negative (N), Overflow (OV) and Digit Carry (DC) Status bits in the SR register. The C and DC Status bits operate as Borrow and Digit Borrow bits, respectively, for subtraction operations. The ALU can perform 8-bit or 16-bit operations, depending on the mode of the instruction that is used. Data for the ALU operation can come from the W register array, or data memory, depending on the addressing mode of the instruction. Likewise, output data from the ALU can be written to the W register array or a data memory location. Refer to the “16-bit MCU and DSC Programmer’s Reference Manual” (DS70157) for information on the SR bits affected by each instruction. The PIC24HJXXXGPX06A/X08A/X10A CPU incorporates hardware support for both multiplication and division. This includes a dedicated hardware multiplier and support hardware for 16-bit divisor division. The divide block supports 32-bit/16-bit and 16-bit/16-bit signed and unsigned integer divide operations with the following data sizes: • • • • 32-bit signed/16-bit signed divide 32-bit unsigned/16-bit unsigned divide 16-bit signed/16-bit signed divide 16-bit unsigned/16-bit unsigned divide The quotient for all divide instructions ends up in W0 and the remainder in W1. Sixteen-bit signed and unsigned DIV instructions can specify any W register for both the 16-bit divisor (Wn) and any W register (aligned) pair (W(m + 1):Wm) for the 32-bit dividend. The divide algorithm takes one cycle per bit of divisor, so both 32-bit/16-bit and 16-bit/16-bit instructions take the same number of cycles to execute. 3.4.3 MULTI-BIT DATA SHIFTER The multi-bit data shifter is capable of performing up to 16-bit arithmetic or logic right shifts, or up to 16-bit left shifts in a single cycle. The source can be either a working register or a memory location. The shifter requires a signed binary value to determine both the magnitude (number of bits) and direction of the shift operation. A positive value shifts the operand right. A negative value shifts the operand left. A value of ‘0’ does not modify the operand. 3.4.1 MULTIPLIER Using the high-speed 17-bit x 17-bit multiplier, the ALU supports unsigned, signed or mixed-sign operation in several multiplication modes: • • • • • • • 16-bit x 16-bit signed 16-bit x 16-bit unsigned 16-bit signed x 5-bit (literal) unsigned 16-bit unsigned x 16-bit unsigned 16-bit unsigned x 5-bit (literal) unsigned 16-bit unsigned x 16-bit signed 8-bit unsigned x 8-bit unsigned DS70592C-page 32 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A 4.0 Note: MEMORY ORGANIZATION This data sheet summarizes the features of the PIC24HJXXXGPX06A/X08A/X10A family of devices. However, it is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to Section 3. “Data Memory” (DS70237) of the “dsPIC33F/PIC24H Family Reference Manual”, which is available from the Microchip website (www.microchip.com). 4.1 Program Address Space The program address memory space of the PIC24HJXXXGPX06A/X08A/X10A devices is 4M instructions. The space is addressable by a 24-bit value derived from either the 23-bit Program Counter (PC) during program execution, or from table operation or data space remapping as described in Section 4.4 “Interfacing Program and Data Memory Spaces”. User access to the program memory space is restricted to the lower half of the address range (0x000000 to 0x7FFFFF). The exception is the use of TBLRD/TBLWT operations, which use TBLPAG to permit access to the Configuration bits and Device ID sections of the configuration memory space. Memory maps for the PIC24HJXXXGPX06A/X08A/ X10A family of devices are shown in Figure 4-1. The PIC24HJXXXGPX06A/X08A/X10A architecture features separate program and data memory spaces and buses. This architecture also allows the direct access of program memory from the data space during code execution. FIGURE 4-1: PROGRAM MEMORY MAP FOR PIC24HJXXXGPX06A/X08A/X10A FAMILY DEVICES PIC24HJ64XXXXXA GOTO Instruction Reset Address Interrupt Vector Table Reserved Alternate Vector Table PIC24HJ128XXXXXA GOTO Instruction Reset Address Interrupt Vector Table Reserved Alternate Vector Table PIC24HJ256XXXXXA GOTO Instruction Reset Address Interrupt Vector Table Reserved Alternate Vector Table 0x000000 0x000002 0x000004 0x0000FE 0x000100 0x000104 0x0001FE 0x000200 User Memory Space User Program Flash Memory (22K instructions) User Program Flash Memory (44K instructions) User Program Flash Memory (88K instructions) 0x00ABFE 0x00AC00 0x0157FE 0x015800 Unimplemented (Read ‘0’s) Unimplemented (Read ‘0’s) Unimplemented (Read ‘0’s) 0x7FFFFE 0x800000 0x02ABFE 0x02AC00 Reserved Configuration Memory Space Reserved Reserved Device Configuration Registers Device Configuration Registers Device Configuration Registers 0xF7FFFE 0xF80000 0xF80017 0xF80010 Reserved Reserved Reserved DEVID (2) DEVID (2) DEVID (2) 0xFEFFFE 0xFF0000 0xFFFFFE © 2011 Microchip Technology Inc. DS70592C-page 33 PIC24HJXXXGPX06A/X08A/X10A 4.1.1 PROGRAM MEMORY ORGANIZATION 4.1.2 INTERRUPT AND TRAP VECTORS The program memory space is organized in wordaddressable blocks. Although it is treated as 24 bits wide, it is more appropriate to think of each address of the program memory as a lower and upper word, with the upper byte of the upper word being unimplemented. The lower word always has an even address, while the upper word has an odd address (Figure 4-2). Program memory addresses are always word-aligned on the lower word, and addresses are incremented or decremented by two during code execution. This arrangement also provides compatibility with data memory space addressing and makes it possible to access data in the program memory space. All PIC24HJXXXGPX06A/X08A/X10A devices reserve the addresses between 0x00000 and 0x000200 for hard-coded program execution vectors. A hardware Reset vector is provided to redirect code execution from the default value of the PC on device Reset to the actual start of code. A GOTO instruction is programmed by the user at 0x000000, with the actual address for the start of code at 0x000002. PIC24HJXXXGPX06A/X08A/X10A devices also have two interrupt vector tables, located from 0x000004 to 0x0000FF and 0x000100 to 0x0001FF. These vector tables allow each of the many device interrupt sources to be handled by separate Interrupt Service Routines (ISRs). A more detailed discussion of the interrupt vector tables is provided in Section 7.1 “Interrupt Vector Table”. FIGURE 4-2: msw Address 0x000001 0x000003 0x000005 0x000007 PROGRAM MEMORY ORGANIZATION most significant word 23 00000000 00000000 00000000 00000000 Program Memory ‘Phantom’ Byte (read as ‘0’) Instruction Width 16 least significant word 8 0 0x000000 0x000002 0x000004 0x000006 PC Address (lsw Address) DS70592C-page 34 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A 4.2 Data Address Space The PIC24HJXXXGPX06A/X08A/X10A CPU has a separate 16-bit wide data memory space. The data space is accessed using separate Address Generation Units (AGUs) for read and write operations. Data memory maps of devices with different RAM sizes are shown in Figure 4-3 and Figure 4-4. All Effective Addresses (EAs) in the data memory space are 16 bits wide and point to bytes within the data space. This arrangement gives a data space address range of 64 Kbytes or 32K words. The lower half of the data memory space (that is, when EA = 0) is used for implemented memory addresses, while the upper half (EA = 1) is reserved for the Program Space Visibility area (see Section 4.4.3 “Reading Data from Program Memory Using Program Space Visibility”). PIC24HJXXXGPX06A/X08A/X10A devices implement up to 16 Kbytes of data memory. Should an EA point to a location outside of this area, an all-zero word or byte will be returned. All word accesses must be aligned to an even address. Misaligned word data fetches are not supported, so care must be taken when mixing byte and word operations, or translating from 8-bit MCU code. If a misaligned read or write is attempted, an address error trap is generated. If the error occurred on a read, the instruction underway is completed; if it occurred on a write, the instruction will be executed but the write does not occur. In either case, a trap is then executed, allowing the system and/or user to examine the machine state prior to execution of the address Fault. All byte loads into any W register are loaded into the Least Significant Byte. The Most Significant Byte (MSB) is not modified. A sign-extend instruction (SE) is provided to allow users to translate 8-bit signed data to 16-bit signed values. Alternatively, for 16-bit unsigned data, users can clear the Most Significant Byte of any W register by executing a zero-extend (ZE) instruction on the appropriate address. 4.2.1 DATA SPACE WIDTH 4.2.3 SFR SPACE The data memory space is organized in byte addressable, 16-bit wide blocks. Data is aligned in data memory and registers as 16-bit words, but all data space EAs resolve to bytes. The Least Significant Bytes of each word have even addresses, while the Most Significant Bytes have odd addresses. The first 2 Kbytes of the Near Data Space, from 0x0000 to 0x07FF, is primarily occupied by Special Function Registers (SFRs). These are used by the PIC24HJXXXGPX06A/X08A/X10A core and peripheral modules for controlling the operation of the device. SFRs are distributed among the modules that they control, and are generally grouped together by module. Much of the SFR space contains unused addresses; these are read as ‘0’. A complete listing of implemented SFRs, including their addresses, is shown in Table 4-1 through Table 4-33. Note: The actual set of peripheral features and interrupts varies by the device. Please refer to the corresponding device tables and pinout diagrams for device-specific information. 4.2.2 DATA MEMORY ORGANIZATION AND ALIGNMENT To maintain backward compatibility with PIC® MCU devices and improve data space memory usage efficiency, the PIC24HJXXXGPX06A/X08A/X10A instruction set supports both word and byte operations. As a consequence of byte accessibility, all effective address calculations are internally scaled to step through word-aligned memory. For example, the core recognizes that Post-Modified Register Indirect Addressing mode [Ws++] will result in a value of Ws + 1 for byte operations and Ws + 2 for word operations. Data byte reads will read the complete word that contains the byte, using the Least Significant bit (LSb) of any EA to determine which byte to select. The selected byte is placed onto the Least Significant Byte (LSB) of the data path. That is, data memory and registers are organized as two parallel byte-wide entities with shared (word) address decode but separate write lines. Data byte writes only write to the corresponding side of the array or register which matches the byte address. 4.2.4 NEAR DATA SPACE The 8-Kbyte area between 0x0000 and 0x1FFF is referred to as the Near Data Space. Locations in this space are directly addressable via a 13-bit absolute address field within all memory direct instructions. Additionally, the whole data space is addressable using MOV instructions, which support Memory Direct Addressing mode with a 16-bit address field, or by using Indirect Addressing mode using a working register as an Address Pointer. © 2011 Microchip Technology Inc. DS70592C-page 35 PIC24HJXXXGPX06A/X08A/X10A FIGURE 4-3: DATA MEMORY MAP FOR PIC24HJXXXGPX06A/X08A/X10A DEVICES WITH 8 KB RAM MSB Address MSB 2 Kbyte SFR Space 0x0001 SFR Space 0x07FF 0x0801 0x07FE 0x0800 8 Kbyte Near Data Space LSB Address LSB 0x0000 16 bits 8 Kbyte SRAM Space 0x1FFF 0x2001 0x27FF 0x2801 X Data RAM (X) 0x1FFE 0x2000 DMA RAM 0x27FE 0x2800 0x8001 0x8000 Optionally Mapped into Program Memory X Data Unimplemented (X) 0xFFFF 0xFFFE DS70592C-page 36 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A FIGURE 4-4: DATA MEMORY MAP FOR PIC24HJXXXGPX06A/X08A/X10A DEVICES WITH 16 KB RAM MSB Address MSB 2 Kbyte SFR Space 0x0001 SFR Space 0x07FF 0x0801 LSB Address LSB 0x0000 0x07FE 0x0800 8 Kbyte Near Data Space 16 bits 0x1FFF X Data RAM (X) 16 Kbyte SRAM Space 0x3FFF 0x4001 0x47FF 0x4801 DMA RAM 0x1FFE 0x3FFE 0x4000 0x47FE 0x4800 0x8001 0x8000 X Data Unimplemented (X) Optionally Mapped into Program Memory 0xFFFF 0xFFFE 4.2.5 DMA RAM Every PIC24HJXXXGPX06A/X08A/X10A device contains 2 Kbytes of dual ported DMA RAM located at the end of data space. Memory locations in the DMA RAM space are accessible simultaneously by the CPU and the DMA controller module. DMA RAM is utilized by the DMA controller to store data to be transferred to various peripherals using DMA, as well as data transferred from various peripherals using DMA. The DMA RAM can be accessed by the DMA controller without having to steal cycles from the CPU. When the CPU and the DMA controller attempt to concurrently write to the same DMA RAM location, the hardware ensures that the CPU is given precedence in accessing the DMA RAM location. Therefore, the DMA RAM provides a reliable means of transferring DMA data without ever having to stall the CPU. Note: DMA RAM can be used for general purpose data storage if the DMA function is not required in an application. © 2011 Microchip Technology Inc. DS70592C-page 37 DS70592C-page 38 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A TABLE 4-1: SFR Name WREG0 WREG1 WREG2 WREG3 WREG4 WREG5 WREG6 WREG7 WREG8 WREG9 WREG10 WREG11 WREG12 WREG13 WREG14 WREG15 SPLIM PCL PCH TBLPAG PSVPAG RCOUNT SR CORCON DISICNT BSRAM SSRAM Legend: SFR Addr 0000 0002 0004 0006 0008 000A 000C 000E 0010 0012 0014 0016 0018 001A 001C 001E 0020 002E 0030 0032 0034 0036 0042 0044 0052 0750 0752 CPU CORE REGISTERS MAP Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx 0800 xxxx 0000 Program Counter High Byte Register Table Page Address Pointer Register Program Memory Visibility Page Address Pointer Register IPL — — — — — — — — — RA — — — N IPL3 — — OV PSV IW_BSR IW_SSR Z — IR_BSR IR_SSR C — RL_BSR RL_SSR 0000 0000 0000 xxxx 0000 0000 xxxx 0000 0000 Working Register 0 Working Register 1 Working Register 2 Working Register 3 Working Register 4 Working Register 5 Working Register 6 Working Register 7 Working Register 8 Working Register 9 Working Register 10 Working Register 11 Working Register 12 Working Register 13 Working Register 14 Working Register 15 Stack Pointer Limit Register Program Counter Low Word Register — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — DC — — — Repeat Loop Counter Register Disable Interrupts Counter Register x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. © 2011 Microchip Technology Inc. DS70592C-page 39 TABLE 4-2: SFR Name CNEN1 CNEN2 CNPU1 CNPU2 Legend: SFR Addr 0060 0062 0068 006A CHANGE NOTIFICATION REGISTER MAP FOR PIC24HJXXXGPX10A DEVICES Bit 15 CN15IE — — Bit 14 CN14IE — — Bit 13 CN13IE — — Bit 12 CN12IE — — Bit 11 CN11IE — — Bit 10 CN10IE — — Bit 9 CN9IE — CN9PUE — Bit 8 CN8IE — CN8PUE — Bit 7 CN7IE CN23IE CN7PUE Bit 6 CN6IE CN22IE CN6PUE Bit 5 CN5IE CN21IE CN5PUE Bit 4 CN4IE CN20IE CN4PUE Bit 3 CN3IE CN19IE CN3PUE Bit 2 CN2IE CN18IE CN2PUE Bit 1 CN1IE CN17IE CN1PUE Bit 0 CN0IE CN16IE CN0PUE All Resets 0000 0000 0000 0000 CN15PUE CN14PUE CN13PUE CN12PUE CN11PUE CN10PUE CN23PUE CN22PUE CN21PUE CN20PUE CN19PUE CN18PUE CN17PUE CN16PUE x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. TABLE 4-3: SFR Name CNEN1 CNEN2 CNPU1 CNPU2 Legend: SFR Addr 0060 0062 0068 006A CHANGE NOTIFICATION REGISTER MAP FOR PIC24HJXXXGPX08A DEVICES Bit 15 CN15IE — — Bit 14 CN14IE — — Bit 13 CN13IE — — Bit 12 CN12IE — — Bit 11 CN11IE — — Bit 10 CN10IE — — Bit 9 CN9IE — CN9PUE — Bit 8 CN8IE — CN8PUE — Bit 7 CN7IE — CN7PUE — Bit 6 CN6IE — CN6PUE — Bit 5 CN5IE CN21IE CN5PUE Bit 4 CN4IE CN20IE CN4PUE Bit 3 CN3IE CN19IE CN3PUE Bit 2 CN2IE CN18IE CN2PUE Bit 1 CN1IE CN17IE CN1PUE Bit 0 CN0IE CN16IE CN0PUE All Resets 0000 0000 0000 0000 PIC24HJXXXGPX06A/X08A/X10A CN15PUE CN14PUE CN13PUE CN12PUE CN11PUE CN10PUE CN21PUE CN20PUE CN19PUE CN18PUE CN17PUE CN16PUE x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal. TABLE 4-4: SFR Name CNEN1 CNEN2 CNPU1 CNPU2 Legend: SFR Addr 0060 0062 0068 006A CHANGE NOTIFICATION REGISTER MAP FOR PIC24HJXXXGPX06A DEVICES Bit 15 CN15IE — — Bit 14 CN14IE — — Bit 13 CN13IE — — Bit 12 CN12IE — — Bit 11 CN11IE — — Bit 10 CN10IE — — Bit 9 CN9IE — CN9PUE — Bit 8 CN8IE — CN8PUE — Bit 7 CN7IE — CN7PUE — Bit 6 CN6IE — CN6PUE — Bit 5 CN5IE CN21IE CN5PUE Bit 4 CN4IE CN20IE CN4PUE Bit 3 CN3IE — CN3PUE — Bit 2 CN2IE CN18IE CN2PUE Bit 1 CN1IE CN17IE CN1PUE Bit 0 CN0IE CN16IE CN0PUE All Resets 0000 0000 0000 0000 CN15PUE CN14PUE CN13PUE CN12PUE CN11PUE CN10PUE CN21PUE CN20PUE CN18PUE CN17PUE CN16PUE x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal. DS70592C-page 40 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A TABLE 4-5: SFR Name INTCON1 INTCON2 IFS0 IFS1 IFS2 IFS3 IFS4 IEC0 IEC1 IEC2 IEC3 IEC4 IPC0 IPC1 IPC2 IPC3 IPC4 IPC5 IPC6 IPC7 IPC8 IPC9 IPC10 IPC11 IPC12 IPC13 IPC14 IPC15 IPC16 IPC17 INTTREG Legend: SFR Addr 0080 0082 0084 0086 0088 008A 008C 0094 0096 0098 009A 009C 00A4 00A6 00A8 00AA 00AC 00AE 00B0 00B2 00B4 00B6 00B8 00BA 00BC 00BE 00C0 00C2 00C4 00C6 00E0 INTERRUPT CONTROLLER REGISTER MAP Bit 15 NSTDIS ALTIVT — U2TXIF T6IF — — — U2TXIE T6IE — — — — — — — — — — — — — — — — — — — — — — — — — — Bit 14 — DISI DMA1IF U2RXIF DMA4IF — — DMA1IE U2RXIE DMA4IE — — Bit 13 — — AD1IF INT2IF — DMA5IF — AD1IE INT2IE — DMA5IE — T1IP T2IP U1RXIP — CNIP IC8IP T4IP U2TXIP C1IP IC5IP OC7IP T6IP T8IP C2RXIP — — — C2TXIP — — — — — — Bit 12 — — U1TXIF T5IF OC8IF — — U1TXIE T5IE OC8IE — — Bit 11 — — U1RXIF T4IF OC7IF — — U1RXIE T4IE OC7IE — — — — — — — — — — — — — — — — — — — — — — — Bit 10 — — OC4IF OC6IF — — OC4IE OC6IE — — Bit 9 — — OC3IF OC5IF — — OC3IE OC5IE — — OC1IP OC2IP SPI1IP DMA1IP — IC7IP OC4IP U2RXIP C1RXIP IC4IP OC6IP DMA4IP MI2C2IP INT4IP — — U2EIP C1TXIP ILR — — — Bit 8 — — T3IF DMA2IF IC6IF C2IF — T3IE DMA2IE IC6IE C2IE — Bit 7 — — T2IF IC8IF IC5IF C2RXIF C2TXIF T2IE IC8IE IC5IE C2RXIE C2TXIE — — — — — — — — — — — — — — — — — — — — — Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 OSCFAIL INT1EP IC1IF MI2C1IF SPI2IF SI2C2IF U1EIF IC1IE SPI2IE SI2C2IE U1EIE INT0IP DMA0IP T3IP U1TXIP SI2C1IP INT1IP DMA2IP T5IP SPI2EIP DMA3IP IC6IP OC8IP T7IP T9IP C2IP — — — — DMA6IP — — Bit 0 — INT0EP INT0IF SI2C1IF SPI2EIF T7IF — INT0IE SPI2EIE T7IE — All Resets 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 4444 4444 4444 0444 4044 4444 4444 4444 4444 4444 4444 4404 4444 4444 0004 0040 0440 4444 0000 DIV0ERR DMACERR MATHERR ADDRERR STKERR — OC2IF IC7IF IC4IF INT4IF C1TXIF OC2IE IC7IE IC4IE INT4IE C1TXIE — IC2IF AD2IF IC3IF INT3IF DMA7IF IC2IE AD2IE IC3IE INT3IE DMA7IE IC1IP IC2IP SPI1EIP AD1IP MI2C1IP AD2IP OC3IP INT2IP SPI2IP IC3IP OC5IP — SI2C2IP INT3IP — DMA5IP U1EIP DMA7IP — — INT4EP DMA0IF INT1IF DMA3IF T9IF DMA6IF DMA0IE INT1IE DMA3IE T9IE DMA6IE INT3EP T1IF CNIF C1IF T8IF — T1IE CNIE C1IE T8IE — — — — — — — — — — — — — — — — — — — VECNUM INT2EP OC1IF — C1RXIF MI2C2IF U2EIF OC1IE — C1RXIE MI2C2IE U2EIE SPI1IF SPI1EIF SPI1IE SPI1EIE MI2C1IE SI2C1IE x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. © 2011 Microchip Technology Inc. DS70592C-page 41 TABLE 4-6: SFR Name TMR1 PR1 T1CON TMR2 TMR3HLD TMR3 PR2 PR3 T2CON T3CON TMR4 TMR5HLD TMR5 PR4 PR5 T4CON T5CON TMR6 TMR7HLD TMR7 PR6 PR7 T6CON T7CON TMR8 TMR9HLD TMR9 PR8 PR9 T8CON T9CON Legend: SFR Addr 0100 0102 0104 0106 0108 010A 010C 010E 0110 0112 0114 0116 0118 011A 011C 011E 0120 0122 0124 0126 0128 012A 012C 012E 0130 0132 0134 0136 0138 013A 013C TIMER REGISTER MAP Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets 0000 FFFF TGATE TCKPS — TSYNC TCS — 0000 0000 xxxx 0000 FFFF FFFF TGATE TGATE TCKPS TCKPS T32 — — — TCS TCS — — 0000 0000 0000 xxxx 0000 FFFF FFFF TGATE TGATE TCKPS TCKPS T32 — — — TCS TCS — — 0000 0000 0000 xxxx 0000 FFFF FFFF TGATE TGATE TCKPS TCKPS T32 — — — TCS TCS — — 0000 0000 0000 xxxx 0000 FFFF FFFF TGATE TGATE TCKPS TCKPS T32 — — — TCS TCS — — 0000 0000 Timer1 Register Period Register 1 TON — TSIDL — — — — — — Timer2 Register Timer3 Holding Register (for 32-bit timer operations only) Timer3 Register Period Register 2 Period Register 3 TON TON — — TSIDL TSIDL — — — — — — — — — — — — PIC24HJXXXGPX06A/X08A/X10A Timer4 Register Timer5 Holding Register (for 32-bit operations only) Timer5 Register Period Register 4 Period Register 5 TON TON — — TSIDL TSIDL — — — — — — — — — — — — Timer6 Register Timer7 Holding Register (for 32-bit operations only) Timer7 Register Period Register 6 Period Register 7 TON TON — — TSIDL TSIDL — — — — — — — — — — — — Timer8 Register Timer9 Holding Register (for 32-bit operations only) Timer9 Register Period Register 8 Period Register 9 TON TON — — TSIDL TSIDL — — — — — — — — — — — — x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. DS70592C-page 42 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A TABLE 4-7: SFR Name IC1BUF IC1CON IC2BUF IC2CON IC3BUF IC3CON IC4BUF IC4CON IC5BUF IC5CON IC6BUF IC6CON IC7BUF IC7CON IC8BUF IC8CON Legend: SFR Addr 0140 0142 0144 0146 0148 014A 014C 014E 0150 0152 0154 0156 0158 015A 015C 015E INPUT CAPTURE REGISTER MAP Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets xxxx ICI ICI ICI ICI ICI ICI ICI ICI ICOV ICOV ICOV ICOV ICOV ICOV ICOV ICOV ICBNE ICBNE ICBNE ICBNE ICBNE ICBNE ICBNE ICBNE ICM ICM ICM ICM ICM ICM ICM ICM 0000 xxxx 0000 xxxx 0000 xxxx 0000 xxxx 0000 xxxx 0000 xxxx 0000 xxxx 0000 Input 1 Capture Register — — — — — — — — — — — — — — — — ICSIDL ICSIDL ICSIDL ICSIDL ICSIDL ICSIDL ICSIDL ICSIDL — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — ICTMR ICTMR ICTMR ICTMR ICTMR ICTMR ICTMR ICTMR Input 2 Capture Register Input 3 Capture Register Input 4 Capture Register Input 5 Capture Register Input 6 Capture Register Input 7 Capture Register Input 8 Capture Register x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. © 2011 Microchip Technology Inc. DS70592C-page 43 TABLE 4-8: SFR Name OC1RS OC1R OC1CON OC2RS OC2R OC2CON OC3RS OC3R OC3CON OC4RS OC4R OC4CON OC5RS OC5R OC5CON OC6RS OC6R OC6CON OC7RS OC7R OC7CON OC8RS OC8R OC8CON Legend: SFR Addr 0180 0182 0184 0186 0188 018A 018C 018E 0190 0192 0194 0196 0198 019A 019C 019E 01A0 01A2 01A4 01A6 01A8 01AA 01AC 01AE OUTPUT COMPARE REGISTER MAP Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets xxxx xxxx — OCFLT OCTSEL OCM 0000 xxxx xxxx — OCFLT OCTSEL OCM 0000 xxxx xxxx — OCFLT OCTSEL OCM 0000 xxxx xxxx — OCFLT OCTSEL OCM 0000 xxxx xxxx — OCFLT OCTSEL OCM 0000 xxxx xxxx — OCFLT OCTSEL OCM 0000 xxxx xxxx — OCFLT OCTSEL OCM 0000 xxxx xxxx — OCFLT OCTSEL OCM 0000 Output Compare 1 Secondary Register Output Compare 1 Register — — OCSIDL — — — — — — — Output Compare 2 Secondary Register Output Compare 2 Register — — OCSIDL — — — — — — — Output Compare 3 Secondary Register Output Compare 3 Register — — OCSIDL — — — — — — — Output Compare 4 Secondary Register Output Compare 4 Register — — OCSIDL — — — — — — — Output Compare 5 Secondary Register Output Compare 5 Register — — OCSIDL — — — — — — — Output Compare 6 Secondary Register Output Compare 6 Register — — OCSIDL — — — — — — — Output Compare 7 Secondary Register Output Compare 7 Register — — OCSIDL — — — — — — — Output Compare 8 Secondary Register Output Compare 8 Register — — OCSIDL — — — — — — — PIC24HJXXXGPX06A/X08A/X10A x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. DS70592C-page 44 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A TABLE 4-9: SFR Name I2C1RCV I2C1TRN I2C1BRG I2C1CON I2C1STAT I2C1ADD I2C1MSK Legend: SFR Addr 0200 0202 0204 0206 0208 020A 020C I2C1 REGISTER MAP Bit 15 — — — I2CEN ACKSTAT — — Bit 14 — — — — TRSTAT — — Bit 13 — — — I2CSIDL — — — Bit 12 — — — SCLREL — — — Bit 11 — — — IPMIEN — — — Bit 10 — — — A10M BCL — — Bit 9 — — — DISSLW GCSTAT SMEN ADD10 GCEN IWCOL STREN I2COV Bit 8 — — ACKDT D_A Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets 0000 00FF 0000 PEN R_W RSEN RBF SEN TBF 1000 0000 0000 0000 Receive Register Transmit Register Baud Rate Generator Register ACKEN P RCEN S Address Register Address Mask Register x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. TABLE 4-10: SFR Name I2C2RCV I2C2TRN I2C2BRG I2C2CON I2C2STAT I2C2ADD I2C2MSK Legend: SFR Addr 0210 0212 0214 0216 0218 021A 021C I2C2 REGISTER MAP Bit 15 — — — I2CEN ACKSTAT — — Bit 14 — — — — TRSTAT — — Bit 13 — — — I2CSIDL — — — Bit 12 — — — SCLREL — — — Bit 11 — — — IPMIEN — — — Bit 10 — — — A10M BCL — — Bit 9 — — — DISSLW GCSTAT SMEN ADD10 GCEN IWCOL STREN I2COV Bit 8 — — ACKDT D_A Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets 0000 00FF 0000 PEN R_W RSEN RBF SEN TBF 1000 0000 0000 0000 Receive Register Transmit Register Baud Rate Generator Register ACKEN P RCEN S Address Register Address Mask Register x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. TABLE 4-11: SFR Name U1MODE U1STA U1TXREG U1RXREG U1BRG Legend: SFR Addr 0220 0222 0224 0226 0228 UART1 REGISTER MAP Bit 15 UARTEN UTXISEL1 — — Bit 14 — UTXINV — — Bit 13 USIDL UTXISEL0 — — Bit 12 IREN — — — Bit 11 RTSMD UTXBRK — — Bit 10 — UTXEN — — Bit 9 UEN1 UTXBF — — Baud Rate Generator Prescaler Bit 8 UEN0 TRMT Bit 7 WAKE Bit 6 LPBACK Bit 5 ABAUD ADDEN Bit 4 URXINV RIDLE Bit 3 BRGH PERR Bit 2 Bit 1 Bit 0 STSEL URXDA All Resets 0000 0110 xxxx 0000 0000 PDSEL FERR OERR URXISEL UART Transmit Register UART Receive Register x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. © 2011 Microchip Technology Inc. DS70592C-page 45 TABLE 4-12: SFR Name U2MODE U2STA U2TXREG U2RXREG U2BRG Legend: SFR Addr 0230 0232 0234 0236 0238 UART2 REGISTER MAP Bit 15 UARTEN UTXISEL1 — — Bit 14 — UTXINV — — Bit 13 USIDL UTXISEL0 — — Bit 12 IREN — — — Bit 11 RTSMD UTXBRK — — Bit 10 — UTXEN — — Bit 9 UEN1 UTXBF — — Baud Rate Generator Prescaler Bit 8 UEN0 TRMT Bit 7 WAKE Bit 6 LPBACK Bit 5 ABAUD ADDEN Bit 4 URXINV RIDLE Bit 3 BRGH PERR Bit 2 Bit 1 Bit 0 STSEL URXDA All Resets 0000 0110 xxxx 0000 0000 PDSEL FERR OERR URXISEL UART Transmit Register UART Receive Register x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. PIC24HJXXXGPX06A/X08A/X10A TABLE 4-13: SFR Name SPI1STAT SPI1CON1 SPI1CON2 SPI1BUF Legend: SFR Addr 0240 0242 0244 0248 SPI1 REGISTER MAP Bit 15 SPIEN — FRMEN Bit 14 — — SPIFSD Bit 13 SPISIDL — FRMPOL Bit 12 — DISSCK — Bit 11 — DISSDO — Bit 10 — MODE16 — Bit 9 — SMP — Bit 8 — CKE — Bit 7 — SSEN — Bit 6 SPIROV CKP — Bit 5 — MSTEN — — Bit 4 — Bit 3 — SPRE — — Bit 2 — Bit 1 SPITBF FRMDLY Bit 0 SPIRBF — All Resets 0000 0000 0000 0000 PPRE SPI1 Transmit and Receive Buffer Register x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. TABLE 4-14: SFR Name SPI2STAT SPI2CON1 SPI2CON2 SPI2BUF Legend: SFR Addr 0260 0262 0264 0268 SPI2 REGISTER MAP Bit 15 SPIEN — FRMEN Bit 14 — — SPIFSD Bit 13 SPISIDL — FRMPOL Bit 12 — DISSCK — Bit 11 — DISSDO — Bit 10 — MODE16 — Bit 9 — SMP — Bit 8 — CKE — Bit 7 — SSEN — Bit 6 SPIROV CKP — Bit 5 — MSTEN — — Bit 4 — Bit 3 — SPRE — — Bit 2 — Bit 1 SPITBF FRMDLY Bit 0 SPIRBF — All Resets 0000 0000 0000 0000 PPRE SPI2 Transmit and Receive Buffer Register x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. DS70592C-page 46 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A TABLE 4-15: File Name ADC1BUF0 AD1CON1 AD1CON2 AD1CON3 AD1CHS123 AD1CHS0 AD1PCFGH(1) AD1PCFGL AD1CSSH(1) AD1CSSL AD1CON4 Reserved Legend: Note 1: Addr 0300 0320 0322 0324 0326 0328 032A 032C 032E 0330 0332 ADC1 REGISTER MAP Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets xxxx SSRC BUFS — CH0NA PCFG24 PCFG8 CSS24 CSS8 — — PCFG23 PCFG7 CSS23 CSS7 — — PCFG9 CSS25 CSS9 — — — — — PCFG22 PCFG6 CSS22 CSS6 — — — — PCFG21 PCFG5 CSS21 CSS5 — — PCFG20 PCFG4 CSS20 CSS4 — — PCFG3 CSS19 CSS3 — — — — SIMSAM ASAM SAMP BUFM CH123NA CH0SA PCFG19 PCFG18 PCFG17 PCFG2 CSS18 CSS2 PCFG1 CSS17 CSS1 DMABL — — PCFG16 PCFG0 CSS16 CSS0 DONE ALTS CH123SA 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 SMPI ADCS CH123SB — — ADC Data Buffer 0 ADON ADRC — CH0NB — VCFG — — — — — — PCFG29 PCFG13 CSS29 CSS13 — — PCFG28 PCFG12 CSS28 CSS12 — — — — ADSIDL ADDMABM — — — AD12B CSCNA SAMC CH123NB CH0SB PCFG27 PCFG26 PCFG25 PCFG11 PCFG10 CSS27 CSS11 — — CSS26 CSS10 — — FORM CHPS PCFG31 PCFG30 PCFG15 PCFG14 CSS31 CSS15 — — CSS30 CSS14 — — 0334033E x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. Not all ANx inputs are available on all devices. See the device pin diagrams for available ANx inputs. TABLE 4-16: File Name ADC2BUF0 AD2CON1 AD2CON2 AD2CON3 AD2CHS123 AD2CHS0 Reserved AD2PCFGL Reserved AD2CSSL AD2CON4 Reserved Legend: Addr 0340 0360 0362 0364 0366 0368 036A 036C 036E 0370 0372 0374037E ADC2 REGISTER MAP Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets xxxx SSRC BUFS — CH0NA — PCFG8 — CSS8 — — — PCFG7 — CSS7 — — — — — — PCFG6 — CSS6 — — — — — PCFG5 — CSS5 — — — SIMSAM ASAM SAMP BUFM CH123NA CH0SA — PCFG3 — CSS3 — — — — PCFG2 — CSS2 — PCFG1 — CSS1 DMABL — — — PCFG0 — CSS0 DONE ALTS CH123SA 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 SMPI ADCS CH123SB — — — PCFG4 — CSS4 — — — ADC Data Buffer 0 ADON ADRC — CH0NB — — CSS15 — — — VCFG — — — — — CSS14 — — — — — — PCFG13 — CSS13 — — — — — PCFG12 — CSS12 — — — — CSS11 — — — ADSIDL ADDMABM — — — AD12B CSCNA SAMC CH123NB CH0SB — — CSS10 — — — PCFG9 — CSS9 — — PCFG11 PCFG10 FORM CHPS PCFG15 PCFG14 x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. © 2011 Microchip Technology Inc. DS70592C-page 47 TABLE 4-17: File Name Addr DMA0CON 0380 DMA0REQ 0382 DMA0STA DMA0STB DMA0PAD DMA0CNT 0384 0386 0388 038A DMA REGISTER MAP Bit 15 CHEN FORCE Bit 14 SIZE — Bit 13 DIR — Bit 12 HALF — Bit 11 NULLW — Bit 10 — — Bit 9 — — Bit 8 — — Bit 7 — — STA STB PAD — CHEN FORCE — SIZE — — DIR — — HALF — — NULLW — — — — — — — — — — STA STB PAD — CHEN FORCE — SIZE — — DIR — — HALF — — NULLW — — — — — — — — — — STA STB PAD — CHEN FORCE — SIZE — — DIR — — HALF — — NULLW — — — — — — — — — — STA STB PAD — CHEN FORCE — SIZE — — DIR — — HALF — — NULLW — — — — — — — — — — STA STB PAD — CHEN FORCE — SIZE — — DIR — — HALF — — NULLW — — — — — — — — — — STA STB — CNT AMODE — IRQSEL — MODE — CNT AMODE — IRQSEL — MODE — CNT AMODE — IRQSEL — MODE — CNT AMODE — IRQSEL — MODE — CNT AMODE — IRQSEL — MODE Bit 6 — Bit 5 Bit 4 Bit 3 — IRQSEL Bit 2 — Bit 1 Bit 0 All Resets 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 AMODE MODE DMA1CON 038C DMA1REQ 038E DMA1STA DMA1STB DMA1PAD DMA1CNT 0390 0392 0394 0396 PIC24HJXXXGPX06A/X08A/X10A DMA2CON 0398 DMA2REQ 039A DMA2STA DMA2STB DMA2PAD DMA2CNT 039C 039E 03A0 03A2 DMA3CON 03A4 DMA3REQ 03A6 DMA3STA DMA3STB DMA3PAD 03A8 03AA 03AC DMA3CNT 03AE DMA4CON 03B0 DMA4REQ 03B2 DMA4STA DMA4STB DMA4PAD 03B4 03B6 03B8 DMA4CNT 03BA DMA5CON 03BC DMA5REQ 03BE DMA5STA DMA5STB Legend: 03C0 03C2 — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. TABLE 4-17: File Name Addr DMA5PAD 03C4 DMA REGISTER MAP (CONTINUED) Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 PAD — CHEN — SIZE — — DIR — — HALF — — NULLW — — — — — — — — — — STA STB PAD — CHEN FORCE — SIZE — — DIR — — HALF — — NULLW — — — — — — — — — — STA STB PAD — — — — — — — — — — XWCOL7 PPST7 DSADR LSTCH PPST6 CNT XWCOL6 XWCOL5 PPST5 XWCOL4 PPST4 XWCOL3 PPST3 XWCOL2 PPST2 XWCOL1 XWCOL0 PPST1 PPST0 — CNT AMODE — IRQSEL — MODE — CNT AMODE — IRQSEL — MODE Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 DS70592C-page 48 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A DMA5CNT 03C6 DMA6CON 03C8 DMA6STA DMA6STB DMA6PAD 03CC 03CE 03D0 DMA6REQ 03CA FORCE DMA6CNT 03D2 DMA7CON 03D4 DMA7REQ 03D6 DMA7STA DMA7STB 03D8 03DA DMA7PAD 03DC DMA7CNT 03DE DMACS0 DMACS1 DSADR Legend: 03E2 03E4 03E0 PWCOL7 PWCOL6 PWCOL5 PWCOL4 PWCOL3 PWCOL2 PWCOL1 PWCOL0 — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. TABLE 4-18: File Name C1CTRL1 C1CTRL2 C1VEC C1FCTRL C1FIFO C1INTF C1INTE C1EC C1CFG1 C1CFG2 C1FEN1 Addr 0400 0402 0404 0406 0408 040A 040C 040E 0410 0412 ECAN1 REGISTER MAP WHEN C1CTRL1.WIN = 0 OR 1 FOR PIC24HJXXXGP506A/510A/610A DEVICES ONLY Bit 15 — — — — — — — — Bit 14 — — — DMABS — — — — WAKFIL TXBO — — — TXBP — — — Bit 13 CSIDL — — — — FBP RXBP — — — F5MSK F13MSK TXWAR — — RXWAR — — SEG2PH FLTEN9 FLTEN8 F4MSK F12MSK EWARN — — Bit 12 ABAT — Bit 11 — — — FILHIT — — — Bit 10 Bit 9 REQOP — — — — — — IVRIF IVRIE — — WAKIF WAKIE ERRIF ERRIE — — — FIFOIF FIFOIE Bit 8 Bit 7 Bit 6 OPMODE — — Bit 5 Bit 4 — Bit 3 CANCAP ICODE FSA FNRB RBOVIF RBOVIE RBIF RBIE TBIF TBIE Bit 2 — Bit 1 — Bit 0 WIN All Resets 0480 0000 0000 0000 0000 0000 0000 0000 0000 PRSEG FLTEN2 FLTEN1 FLTEN0 F1MSK F9MSK F0MSK F8MSK 0000 FFFF 0000 0000 DNCNT TERRCNT SJW SEG2PHTS FLTEN7 SAM FLTEN6 RERRCNT BRP SEG1PH FLTEN5 FLTEN4 FLTEN3 F2MSK F10MSK 0414 FLTEN15 FLTEN14 FLTEN13 FLTEN12 FLTEN11 FLTEN10 F7MSK F15MSK F6MSK F14MSK C1FMSKSEL1 0418 C1FMSKSEL2 041A Legend: F3MSK F11MSK — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. © 2011 Microchip Technology Inc. DS70592C-page 49 TABLE 4-19: File Name Addr 0400041E C1RXFUL1 C1RXFUL2 C1RXOVF1 C1RXOVF2 C1TR01CO N C1TR23CO N C1TR45CO N C1TR67CO N C1RXD C1TXD Legend: ECAN1 REGISTER MAP WHEN C1CTRL1.WIN = 0 FOR PIC24HJXXXGP506A/510A/610A DEVICES ONLY Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets See definition when WIN = x RXFUL8 RXOVF8 RXFUL7 RXOVF7 TXEN0 TXEN2 TXEN4 TXEN6 RXFUL6 RXOVF6 TX ABAT0 TX ABAT2 TX ABAT4 TX ABAT6 RXFUL5 RXOVF5 TX LARB0 TX LARB2 TX LARB4 TX LARB6 RXFUL4 RXOVF4 TX ERR0 TX ERR2 TX ERR4 TX ERR6 RXFUL3 RXOVF3 TX REQ0 TX REQ2 TX REQ4 TX REQ6 RXFUL2 RXOVF2 RTREN0 RTREN2 RTREN4 RTREN6 RXFUL1 RXOVF1 RXFUL0 RXOVF0 0000 0000 0000 0000 0000 0420 RXFUL15 RXFUL14 RXFUL13 RXFUL12 RXFUL11 RXFUL10 RXFUL9 0428 RXOVF15 RXOVF14 RXOVF13 RXOVF12 RXOVF11 RXOVF10 RXOVF9 0430 0432 0434 0436 0440 0442 TXEN1 TXEN3 TXEN5 TXEN7 TX ABT1 TX ABT3 TX ABT5 TX ABT7 TX LARB1 TX LARB3 TX LARB5 TX LARB7 TX ERR1 TX ERR3 TX ERR5 TX ERR7 TX REQ1 TX REQ3 TX REQ5 TX REQ7 RTREN1 RTREN3 RTREN5 RTREN7 0422 RXFUL31 RXFUL30 RXFUL29 RXFUL28 RXFUL27 RXFUL26 RXFUL25 RXFUL24 RXFUL23 RXFUL22 RXFUL21 RXFUL20 RXFUL19 RXFUL18 RXFUL17 RXFUL16 042A RXOVF31 RXOVF30 RXOVF29 RXOVF28 RXOVF27 RXOVF26 RXOVF25 RXOVF24 RXOVF23 RXOVF22 RXOVF21 RXOVF20 RXOVF19 RXOVF18 RXOVF17 RXOVF16 TX1PRI TX3PRI TX5PRI TX7PRI TX0PRI TX2PRI TX4PRI TX6PRI PIC24HJXXXGPX06A/X08A/X10A 0000 0000 xxxx xxxx xxxx Recieved Data Word Transmit Data Word x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. TABLE 4-20: File Name ECAN1 REGISTER MAP WHEN C1CTRL1.WIN = 1 FOR PIC24HJXXXGP506A/510A/610A DEVICES ONLY Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets Addr 0400041E See definition when WIN = x F3BP F7BP F11BP F15BP SID EID SID EID SID EID SID EID SID SID SID SID SID F2BP F6BP F10BP F14BP F1BP F5BP F9BP F13BP SID — — — — — MIDE MIDE MIDE EXIDE EXIDE EID — — — — EID EID EID EID EID EID EID F0BP F4BP F8BP F12BP — EID 0000 0000 0000 0000 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx C1BUFPNT1 C1BUFPNT2 C1BUFPNT3 C1BUFPNT4 C1RXM0SID C1RXM0EID C1RXM1SID C1RXM1EID C1RXM2SID C1RXM2EID C1RXF0SID C1RXF0EID C1RXF1SID Legend: 0420 0422 0424 0426 0430 0432 0434 0436 0438 043A 0440 0442 0444 x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. TABLE 4-20: File Name C1RXF1EID C1RXF2SID C1RXF2EID C1RXF3SID C1RXF3EID C1RXF4SID C1RXF4EID C1RXF5SID C1RXF5EID C1RXF6SID C1RXF6EID C1RXF7SID C1RXF7EID C1RXF8SID C1RXF8EID C1RXF9SID C1RXF9EID C1RXF10SID C1RXF10EID C1RXF11SID C1RXF11EID C1RXF12SID C1RXF12EID C1RXF13SID C1RXF13EID C1RXF14SID ECAN1 REGISTER MAP WHEN C1CTRL1.WIN = 1 FOR PIC24HJXXXGP506A/510A/610A DEVICES ONLY (CONTINUED) Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets xxxx — — — — — — — — — — — — — — EID EID EID EID EID EID EID EID EID EID EID EID EID EID xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx DS70592C-page 50 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A Addr 0446 0448 044A 044C 044E 0450 0452 0454 0456 0458 045A 045C 045E 0460 0462 0464 0466 0468 046A 046C 046E 0470 0472 0474 0476 0478 047A 047C 047E EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID SID SID SID SID SID SID SID SID SID SID SID SID SID EID — — — — — — — — — — — — — — EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EID EID EID EID EID EID EID EID EID EID EID EID EID EID C1RXF14EID C1RXF15SID C1RXF15EID Legend: x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. © 2011 Microchip Technology Inc. DS70592C-page 51 TABLE 4-21: File Name C2CTRL1 C2CTRL2 C2VEC C2FCTRL C2FIFO C2INTF C2INTE C2EC C2CFG1 C2CFG2 C2FEN1 C2FMSKSEL1 C2FMSKSEL2 Legend: Addr 0500 0502 0504 0506 0508 050A 050C 050E 0510 0512 0514 0518 051A ECAN2 REGISTER MAP WHEN C2CTRL1.WIN = 0 OR 1 FOR PIC24HJ256GP610A DEVICES ONLY Bit 15 — — — — — — — — FLTEN15 Bit 14 — — — DMABS — — — — WAKFIL FLTEN14 TXBO — — — FLTEN13 TXBP — — — FLTEN12 Bit 13 CSIDL — — — — FBP RXBP — — — FLTEN11 F5MSK F13MSK TXWAR — — RXWAR EWARN — — SEG2PH FLTEN10 FLTEN9 FLTEN8 F4MSK F12MSK — — Bit 12 ABAT — Bit 11 — — — FILHIT — — — Bit 10 Bit 9 REQOP — — — — — — IVRIF IVRIE — — WAKIF WAKIE ERRIF ERRIE — — — FIFOIF FIFOIE Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 — — Bit 3 CANCAP ICODE FSA FNRB RBOVIF RBOVIE RBIF RBIE TBIF TBIE Bit 2 — Bit 1 — Bit 0 WIN All Resets 0480 0000 0000 0000 0000 0000 0000 0000 0000 PRSEG FLTEN2 FLTEN1 FLTEN0 F1MSK F9MSK F0MSK F8MSK 0000 FFFF 0000 0000 OPMODE — DNCNT TERRCNT SJW SEG2PHTS FLTEN7 SAM RERRCNT BRP SEG1PH F2MSK F10MSK PIC24HJXXXGPX06A/X08A/X10A FLTEN6 FLTEN5 FLTEN4 FLTEN3 F7MSK F15MSK F6MSK F14MSK F3MSK F11MSK — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. TABLE 4-22: File Name Addr 0500051E C2RXFUL1 C2RXFUL2 C2RXOVF1 C2RXOVF2 ECAN2 REGISTER MAP WHEN C2CTRL1.WIN = 0 FOR PIC24HJ256GP610A DEVICES ONLY Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets See definition when WIN = x RXFUL9 RXFUL8 RXFUL7 RXFUL6 RXOVF6 TX ABAT0 TX ABAT2 TX ABAT4 TX ABAT6 RXFUL5 RXOVF5 TX LARB0 TX LARB2 TX LARB4 TX LARB6 RXFUL4 RXOVF4 TX ERR0 TX ERR2 TX ERR4 TX ERR6 RXFUL3 RXOVF3 TX REQ0 TX REQ2 TX REQ4 TX REQ6 RXFUL2 RXOVF2 RTREN0 RTREN2 RTREN4 RTREN6 RXFUL1 RXOVF1 RXFUL0 RXOVF0 0000 0000 0000 0000 0000 0000 0000 xxxx xxxx xxxx 0520 RXFUL15 RXFUL14 RXFUL13 RXFUL12 RXFUL11 RXFUL10 0522 RXFUL31 RXFUL30 RXFUL29 RXFUL28 RXFUL27 RXFUL26 RXFUL25 RXFUL24 RXFUL23 RXFUL22 RXFUL21 RXFUL20 RXFUL19 RXFUL18 RXFUL17 RXFUL16 0528 RXOVF15 RXOVF14 RXOVF13 RXOVF12 RXOVF11 RXOVF10 RXOVF09 RXOVF08 RXOVF7 TXEN1 TXEN3 TXEN5 TXEN7 TX ABAT1 TX ABAT3 TX ABAT5 TX ABAT7 TX LARB1 TX LARB3 TX LARB5 TX LARB7 TX ERR1 TX ERR3 TX ERR5 TX ERR7 TX REQ1 TX REQ3 TX REQ5 TX REQ7 RTREN1 RTREN3 RTREN5 RTREN7 TX1PRI TX3PRI TX5PRI TX7PRI TXEN0 TXEN2 TXEN4 TXEN6 052A RXOVF31 RXOVF30 RXOVF29 RXOVF28 RXOVF27 RXOVF26 RXOVF25 RXOVF24 RXOVF23 RXOVF22 RXOVF21 RXOVF20 RXOVF19 RXOVF18 RXOVF17 RXOVF16 TX0PRI TX2PRI TX4PRI TX6PRI C2TR01CON 0530 C2TR23CON 0532 C2TR45CON 0534 C2TR67CON 0536 C2RXD C2TXD Legend: 0540 0542 Recieved Data Word Transmit Data Word x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. DS70592C-page 52 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A TABLE 4-23: File Name ECAN2 REGISTER MAP WHEN C2CTRL1.WIN = 1 FOR PIC24HJ256GP610A DEVICES ONLY Addr 0500051E Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets See definition when WIN = x F3BP F7BP F12BP F15BP SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID EID SID SID SID SID SID SID SID SID SID SID SID SID SID SID SID F2BP F6BP F10BP F14BP F1BP F5BP F9BP F13BP SID — — — — — — — — — — — — — — — MIDE MIDE MIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EXIDE EID — — — — — — — — — — — — — — EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID EID F0BP F4BP F8BP F12BP — EID 0000 0000 0000 0000 xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx C2BUFPNT1 C2BUFPNT2 C2BUFPNT3 C2BUFPNT4 C2RXM0SID C2RXM0EID C2RXM1SID C2RXM1EID C2RXM2SID C2RXM2EID C2RXF0SID C2RXF0EID C2RXF1SID C2RXF1EID C2RXF2SID C2RXF2EID C2RXF3SID C2RXF3EID C2RXF4SID C2RXF4EID C2RXF5SID C2RXF5EID C2RXF6SID C2RXF6EID C2RXF7SID C2RXF7EID C2RXF8SID C2RXF8EID C2RXF9SID C2RXF9EID C2RXF10SID C2RXF10EID C2RXF11SID Legend: 0520 0522 0524 0526 0530 0532 0534 0536 0538 053A 0540 0542 0544 0546 0548 054A 054C 054E 0550 0552 0554 0556 0558 055A 055C 055E 0560 0562 0564 0566 0568 056A 056C x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. TABLE 4-23: File Name C2RXF11EID C2RXF12SID C2RXF12EID C2RXF13SID C2RXF13EID C2RXF14SID C2RXF14EID C2RXF15SID C2RXF15EID Legend: ECAN2 REGISTER MAP WHEN C2CTRL1.WIN = 1 FOR PIC24HJ256GP610A DEVICES ONLY (CONTINUED) Addr 056E 0570 0572 0574 0576 0578 057A 057C 057E Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 All Resets xxxx — — — — EID EID EID EID xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx © 2011 Microchip Technology Inc. DS70592C-page 53 EID SID EID SID EID SID EID SID EID SID SID SID SID EID — — — — EXIDE EXIDE EXIDE EXIDE EID EID EID EID PIC24HJXXXGPX06A/X08A/X10A x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. TABLE 4-24: File Name TRISA PORTA LATA ODCA Legend: Note 1: Addr 02C0 02C2 02C4 06C0 PORTA REGISTER MAP(1) Bit 15 TRISA15 RA15 LATA15 ODCA15 Bit 14 TRISA14 RA14 LATA14 ODCA14 Bit 13 TRISA13 RA13 LATA13 — Bit 12 TRISA12 RA12 LATA12 — Bit 11 — — — — Bit 10 TRISA10 RA10 LATA10 — Bit 9 TRISA9 RA9 LATA9 — Bit 8 — — — — Bit 7 TRISA7 RA7 LATA7 — Bit 6 TRISA6 RA6 LATA6 — Bit 5 TRISA5 RA5 LATA5 ODCA5 Bit 4 TRISA4 RA4 LATA4 ODCA4 Bit 3 TRISA3 RA3 LATA3 ODCA3 Bit 2 TRISA2 RA2 LATA2 ODCA2 Bit 1 TRISA1 RA1 LATA1 ODCA1 Bit 0 TRISA0 RA0 LATA0 ODCA0 All Resets F6FF xxxx xxxx 0000 DS70592C-page 54 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. The actual set of I/O port pins varies from one device to another. Please refer to the corresponding pinout diagrams. TABLE 4-25: File Name TRISB PORTB LATB Legend: Note 1: Addr 02C6 02C8 02CA PORTB REGISTER MAP(1) Bit 15 TRISB15 RB15 LATB15 Bit 14 TRISB14 RB14 LATB14 Bit 13 TRISB13 RB13 LATB13 Bit 12 TRISB12 RB12 LATB12 Bit 11 TRISB11 RB11 LATB11 Bit 10 TRISB10 RB10 LATB10 Bit 9 TRISB9 RB9 LATB9 Bit 8 TRISB8 RB8 LATB8 Bit 7 TRISB7 RB7 LATB7 Bit 6 TRISB6 RB6 LATB6 Bit 5 TRISB5 RB5 LATB5 Bit 4 TRISB4 RB4 LATB4 Bit 3 TRISB3 RB3 LATB3 Bit 2 TRISB2 RB2 LATB2 Bit 1 TRISB1 RB1 LATB1 Bit 0 TRISB0 RB0 LATB0 All Resets FFFF xxxx xxxx x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. The actual set of I/O port pins varies from one device to another. Please refer to the corresponding pinout diagrams. TABLE 4-26: File Name TRISC PORTC LATC Legend: Note 1: Addr 02CC 02CE 02D0 PORTC REGISTER MAP(1) Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 — — — Bit 10 — — — Bit 9 — — — Bit 8 — — — Bit 7 — — — Bit 6 — — — Bit 5 — — — Bit 4 TRISC4 RC4 LATC4 Bit 3 TRISC3 RC3 LATC3 Bit 2 TRISC2 RC2 LATC2 Bit 1 TRISC1 RC1 LATC1 Bit 0 — — — All Resets F01E xxxx xxxx TRISC15 TRISC14 TRISC13 TRISC12 RC15 LATC15 RC14 LATC14 RC13 LATC13 RC12 LATC12 x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. The actual set of I/O port pins varies from one device to another. Please refer to the corresponding pinout diagrams. TABLE 4-27: File Name TRISD PORTD LATD ODCD Legend: Note 1: Addr 02D2 02D4 02D6 06D2 PORTD REGISTER MAP(1) Bit 15 TRISD15 RD15 LATD15 ODCD15 Bit 14 TRISD14 RD14 LATD14 ODCD14 Bit 13 TRISD13 RD13 LATD13 ODCD13 Bit 12 TRISD12 RD12 LATD12 ODCD12 Bit 11 TRISD11 RD11 LATD11 ODCD11 Bit 10 TRISD10 RD10 LATD10 ODCD10 Bit 9 TRISD9 RD9 LATD9 ODCD9 Bit 8 TRISD8 RD8 LATD8 ODCD8 Bit 7 TRISD7 RD7 LATD7 ODCD7 Bit 6 TRISD6 RD6 LATD6 ODCD6 Bit 5 TRISD5 RD5 LATD5 ODCD5 Bit 4 TRISD4 RD4 LATD4 ODCD4 Bit 3 TRISD3 RD3 LATD3 ODCD3 Bit 2 TRISD2 RD2 LATD2 ODCD2 Bit 1 TRISD1 RD1 LATD1 ODCD1 Bit 0 TRISD0 RD0 LATD0 ODCD0 All Resets FFFF xxxx xxxx 0000 x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. The actual set of I/O port pins varies from one device to another. Please refer to the corresponding pinout diagrams. TABLE 4-28: File Name TRISE PORTE LATE Legend: Note 1: Addr 02D8 02DA 02DC PORTE REGISTER MAP(1) Bit 15 — — — Bit 14 — — — Bit 13 — — — Bit 12 — — — Bit 11 — — — Bit 10 — — — Bit 9 — — — Bit 8 — — — Bit 7 TRISE7 RE7 LATE7 Bit 6 TRISE6 RE6 LATE6 Bit 5 TRISE5 RE5 LATE5 Bit 4 TRISE4 RE4 LATE4 Bit 3 TRISE3 RE3 LATE3 Bit 2 TRISE2 RE2 LATE2 Bit 1 TRISE1 RE1 LATE1 Bit 0 TRISE0 RE0 LATE0 All Resets 00FF xxxx xxxx © 2011 Microchip Technology Inc. DS70592C-page 55 x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. The actual set of I/O port pins varies from one device to another. Please refer to the corresponding pinout diagrams. TABLE 4-29: File Name TRISF PORTF LATF ODCF(2) Legend: Note 1: Addr 02DE 02E0 02E2 06DE PORTF REGISTER MAP(1) PIC24HJXXXGPX06A/X08A/X10A Bit 15 — — — — Bit 14 — — — — Bit 13 TRISF13 RF13 LATF13 ODCF13 Bit 12 TRISF12 RF12 LATF12 ODCF12 Bit 11 — — — — Bit 10 — — — — Bit 9 — — — — Bit 8 TRISF8 RF8 LATF8 ODCF8 Bit 7 TRISF7 RF7 LATF7 ODCF7 Bit 6 TRISF6 RF6 LATF6 ODCF6 Bit 5 TRISF5 RF5 LATF5 ODCF5 Bit 4 TRISF4 RF4 LATF4 ODCF4 Bit 3 TRISF3 RF3 LATF3 ODCF3 Bit 2 TRISF2 RF2 LATF2 ODCF2 Bit 1 TRISF1 RF1 LATF1 ODCF1 Bit 0 TRISF0 RF0 LATF0 ODCF0 All Resets 31FF xxxx xxxx 0000 x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. The actual set of I/O port pins varies from one device to another. Please refer to the corresponding pinout diagrams. TABLE 4-30: File Name TRISG PORTG LATG ODCG(2) Legend: Note 1: Addr 02E4 02E6 02E8 06E4 PORTG REGISTER MAP(1) Bit 15 TRISG15 RG15 LATG15 ODCG15 Bit 14 TRISG14 RG14 LATG14 ODCG14 Bit 13 TRISG13 RG13 LATG13 ODCG13 Bit 12 TRISG12 RG12 LATG12 ODCG12 Bit 11 — — — — Bit 10 — — — — Bit 9 TRISG9 RG9 LATG9 ODCG9 Bit 8 TRISG8 RG8 LATG8 ODCG8 Bit 7 TRISG7 RG7 LATG7 ODCG7 Bit 6 TRISG6 RG6 LATG6 ODCG6 Bit 5 — — — — Bit 4 — — — — Bit 3 TRISG3 RG3 LATG3 ODCG3 Bit 2 TRISG2 RG2 LATG2 ODCG2 Bit 1 TRISG1 RG1 LATG1 ODCG1 Bit 0 TRISG0 RG0 LATG0 ODCG0 All Resets F3CF xxxx xxxx 0000 x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. The actual set of I/O port pins varies from one device to another. Please refer to the corresponding pinout diagrams. DS70592C-page 56 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A TABLE 4-31: File Name RCON OSCCON CLKDIV PLLFBD OSCTUN Legend: Note 1: 2: Addr 0740 0742 0744 0746 0748 SYSTEM CONTROL REGISTER MAP Bit 15 TRAPR — ROI — — — — Bit 14 IOPUWR Bit 13 — COSC DOZE — — — — Bit 12 — Bit 11 — — DOZEN — — — — Bit 10 — Bit 9 — NOSC FRCDIV — — — — — Bit 8 VREGS Bit 7 EXTR CLKLOCK Bit 6 SWR — Bit 5 SWDTEN LOCK — PLLDIV TUN Bit 4 WDTO — Bit 3 SLEEP CF Bit 2 IDLE — PLLPRE Bit 1 BOR LPOSCEN Bit 0 POR OSWEN All Resets xxxx(1) 0300(2) 3040 0030 0000 PLLPOST x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. RCON register Reset values dependent on type of Reset. OSCCON register Reset values dependent on the FOSC Configuration bits and by type of Reset. TABLE 4-32: File Name NVMCON NVMKEY Legend: Note 1: Addr 0760 0766 NVM REGISTER MAP Bit 15 WR — Bit 14 WREN — Bit 13 WRERR — Bit 12 — — Bit 11 — — Bit 10 — — Bit 9 — — Bit 8 — — Bit 7 — Bit 6 ERASE Bit 5 — Bit 4 — NVMKEY Bit 3 Bit 2 Bit 1 Bit 0 All Resets 0000(1) 0000 NVMOP x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. Reset value shown is for POR only. Value on other Reset states is dependent on the state of memory write or erase operations at the time of Reset. TABLE 4-33: File Name PMD1 PMD2 PMD3 Legend: Addr 0770 0772 0774 PMD REGISTER MAP Bit 15 T5MD IC8MD T9MD Bit 14 T4MD IC7MD T8MD Bit 13 T3MD IC6MD T7MD Bit 12 T2MD IC5MD T6MD Bit 11 T1MD IC4MD — Bit 10 — IC3MD — Bit 9 — IC2MD — Bit 8 — IC1MD — Bit 7 I2C1MD OC8MD — Bit 6 U2MD OC7MD — Bit 5 U1MD OC6MD — Bit 4 SPI2MD OC5MD — Bit 3 SPI1MD OC4MD — Bit 2 C2MD OC3MD — Bit 1 C1MD OC2MD I2C2MD Bit 0 AD1MD OC1MD AD2MD All Resets 0000 0000 0000 x = unknown value on Reset, — = unimplemented, read as ‘0’. Reset values are shown in hexadecimal for PinHigh devices. PIC24HJXXXGPX06A/X08A/X10A 4.2.6 SOFTWARE STACK 4.2.7 DATA RAM PROTECTION FEATURE In addition to its use as a working register, the W15 register in the PIC24HJXXXGPX06A/X08A/X10A devices is also used as a software Stack Pointer. The Stack Pointer always points to the first available free word and grows from lower to higher addresses. It predecrements for stack pops and post-increments for stack pushes, as shown in Figure 4-5. For a PC push during any CALL instruction, the MSB of the PC is zeroextended before the push, ensuring that the MSB is always clear. Note: A PC push during exception processing concatenates the SRL register to the MSB of the PC prior to the push. The PIC24H product family supports Data RAM protection features that enable segments of RAM to be protected when used in conjunction with Boot and Secure Code Segment Security. BSRAM (Secure RAM segment for BS) is accessible only from the Boot Segment Flash code, when enabled. SSRAM (Secure RAM segment for RAM) is accessible only from the Secure Segment Flash code, when enabled. See Table 4-1 for an overview of the BSRAM and SSRAM SFRs. 4.3 Instruction Addressing Modes The Stack Pointer Limit register (SPLIM) associated with the Stack Pointer sets an upper address boundary for the stack. SPLIM is uninitialized at Reset. As is the case for the Stack Pointer, SPLIM is forced to ‘0’ because all stack operations must be word-aligned. Whenever an EA is generated using W15 as a source or destination pointer, the resulting address is compared with the value in SPLIM. If the contents of the Stack Pointer (W15) and the SPLIM register are equal and a push operation is performed, a stack error trap will not occur. The stack error trap will occur on a subsequent push operation. Thus, for example, if it is desirable to cause a stack error trap when the stack grows beyond address 0x2000 in RAM, initialize the SPLIM with the value 0x1FFE. Similarly, a Stack Pointer underflow (stack error) trap is generated when the Stack Pointer address is found to be less than 0x0800. This prevents the stack from interfering with the Special Function Register (SFR) space. A write to the SPLIM register should not be immediately followed by an indirect read operation using W15. The addressing modes in Table 4-34 form the basis of the addressing modes optimized to support the specific features of individual instructions. The addressing modes provided in the MAC class of instructions are somewhat different from those in the other instruction types. 4.3.1 FILE REGISTER INSTRUCTIONS Most file register instructions use a 13-bit address field (f) to directly address data present in the first 8192 bytes of data memory (Near Data Space). Most file register instructions employ a working register, W0, which is denoted as WREG in these instructions. The destination is typically either the same file register or WREG (with the exception of the MUL instruction), which writes the result to a register or register pair. The MOV instruction allows additional flexibility and can access the entire data space. 4.3.2 MCU INSTRUCTIONS The 3-operand MCU instructions are of the form: Operand 3 = Operand 1 Operand 2 where: Operand 1 is always a working register (i.e., the addressing mode can only be Register Direct) which is referred to as Wb. Operand 2 can be a W register, fetched from data memory, or a 5-bit literal. The result location can be either a W register or a data memory location. The following addressing modes are supported by MCU instructions: FIGURE 4-5: 0x0000 15 CALL STACK FRAME 0 Stack Grows Towards Higher Address PC 000000000 PC W15 (before CALL) W15 (after CALL) POP : [--W15] PUSH : [W15++] • • • • • Register Direct Register Indirect Register Indirect Post-Modified Register Indirect Pre-Modified 5-bit or 10-bit Literal Note: Not all instructions support all the addressing modes given above. Individual instructions may support different subsets of these addressing modes. © 2011 Microchip Technology Inc. DS70592C-page 57 PIC24HJXXXGPX06A/X08A/X10A TABLE 4-34: FUNDAMENTAL ADDRESSING MODES SUPPORTED Description The address of the file register is specified explicitly. The contents of a register are accessed directly. The contents of Wn forms the EA. The contents of Wn forms the EA. Wn is post-modified (incremented or decremented) by a constant value. Wn is pre-modified (incremented or decremented) by a signed constant value to form the EA. The sum of Wn and a literal forms the EA. Addressing Mode File Register Direct Register Direct Register Indirect Register Indirect Post-Modified Register Indirect Pre-Modified Register Indirect with Register Offset The sum of Wn and Wb forms the EA. Register Indirect with Literal Offset 4.3.3 MOVE INSTRUCTIONS 4.4 Move instructions provide a greater degree of addressing flexibility than other instructions. In addition to the Addressing modes supported by most MCU instructions, move instructions also support Register Indirect with Register Offset Addressing mode, also referred to as Register Indexed mode. Note: For the MOV instructions, the Addressing mode specified in the instruction can differ for the source and destination EA. However, the 4-bit Wb (Register Offset) field is shared between both source and destination (but typically only used by one). Interfacing Program and Data Memory Spaces The PIC24HJXXXGPX06A/X08A/X10A architecture uses a 24-bit wide program space and a 16-bit wide data space. The architecture is also a modified Harvard scheme, meaning that data can also be present in the program space. To use this data successfully, it must be accessed in a way that preserves the alignment of information in both spaces. Aside from normal execution, the PIC24HJXXXGPX06A/X08A/X10A architecture provides two methods by which program space can be accessed during operation: • Using table instructions to access individual bytes or words anywhere in the program space • Remapping a portion of the program space into the data space (Program Space Visibility) Table instructions allow an application to read or write to small areas of the program memory. This capability makes the method ideal for accessing data tables that need to be updated from time to time. It also allows access to all bytes of the program word. The remapping method allows an application to access a large block of data on a read-only basis, which is ideal for look ups from a large table of static data. It can only access the least significant word of the program word. In summary, the following Addressing modes are supported by move instructions: • • • • • • • • Register Direct Register Indirect Register Indirect Post-modified Register Indirect Pre-modified Register Indirect with Register Offset (Indexed) Register Indirect with Literal Offset 8-bit Literal 16-bit Literal Note: Not all instructions support all the Addressing modes given above. Individual instructions may support different subsets of these Addressing modes. 4.4.1 ADDRESSING PROGRAM SPACE 4.3.4 OTHER INSTRUCTIONS Besides the various addressing modes outlined above, some instructions use literal constants of various sizes. For example, BRA (branch) instructions use 16-bit signed literals to specify the branch destination directly, whereas the DISI instruction uses a 14-bit unsigned literal field. In some instructions, the source of an operand or result is implied by the opcode itself. Certain operations, such as NOP, do not have any operands. Since the address ranges for the data and program spaces are 16 and 24 bits, respectively, a method is needed to create a 23-bit or 24-bit program address from 16-bit data registers. The solution depends on the interface method to be used. For table operations, the 8-bit Table Page register (TBLPAG) is used to define a 32K word region within the program space. This is concatenated with a 16-bit EA to arrive at a full 24-bit program space address. In this format, the Most Significant bit of TBLPAG is used to determine if the operation occurs in the user memory (TBLPAG = 0) or the configuration memory (TBLPAG = 1). DS70592C-page 58 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A For remapping operations, the 8-bit Program Space Visibility register (PSVPAG) is used to define a 16K word page in the program space. When the Most Significant bit of the EA is ‘1’, PSVPAG is concatenated with the lower 15 bits of the EA to form a 23-bit program space address. Unlike table operations, this limits remapping operations strictly to the user memory area. Table 4-35 and Figure 4-6 show how the program EA is created for table operations and remapping accesses from the data EA. Here, P refers to a program space word, whereas D refers to a data space word. TABLE 4-35: PROGRAM SPACE ADDRESS CONSTRUCTION Access Space User User Configuration Program Space Address 0 0xxx xxxx TBLPAG 0xxx xxxx TBLPAG 1xxx xxxx 0 0 PSVPAG xxxx xxxx PC xxxx xxxx xxxx xxx0 Data EA xxxx xxxx xxxx xxxx Data EA xxxx xxxx xxxx xxxx Data EA(1) xxx xxxx xxxx xxxx 0 Access Type Instruction Access (Code Execution) TBLRD/TBLWT (Byte/Word Read/Write) Program Space Visibility (Block Remap/Read) Note 1: User Data EA is always ‘1’ in this case, but is not used in calculating the program space address. Bit 15 of the address is PSVPAG. © 2011 Microchip Technology Inc. DS70592C-page 59 PIC24HJXXXGPX06A/X08A/X10A FIGURE 4-6: DATA ACCESS FROM PROGRAM SPACE ADDRESS GENERATION Program Counter(1) 0 Program Counter 23 bits EA 0 1/0 Table Operations(2) 1/0 TBLPAG 8 bits 24 bits 16 bits Select Program Space Visibility(1) (Remapping) 0 PSVPAG 8 bits 1 EA 0 15 bits 23 bits User/Configuration Space Select Byte Select Note 1: The LSb of program space addresses is always fixed as ‘0’ in order to maintain word alignment of data in the program and data spaces. 2: Table operations are not required to be word-aligned. Table read operations are permitted in the configuration memory space. DS70592C-page 60 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A 4.4.2 DATA ACCESS FROM PROGRAM MEMORY USING TABLE INSTRUCTIONS 2. TBLRDH (Table Read High): In Word mode, it maps the entire upper word of a program address (P) to a data address. Note that D, the ‘phantom byte’, will always be ‘0’. In Byte mode, it maps the upper or lower byte of the program word to D of the data address, as above. Note that the data will always be ‘0’ when the upper ‘phantom’ byte is selected (Byte Select = 1). In a similar fashion, two table instructions, TBLWTH and TBLWTL, are used to write individual bytes or words to a program space address. The details of their operation are explained in Section 5.0 “Flash Program Memory”. For all table operations, the area of program memory space to be accessed is determined by the Table Page register (TBLPAG). TBLPAG covers the entire program memory space of the device, including user and configuration spaces. When TBLPAG = 0, the table page is located in the user memory space. When TBLPAG = 1, the page is located in configuration space. The TBLRDL and TBLWTL instructions offer a direct method of reading or writing the lower word of any address within the program space without going through data space. The TBLRDH and TBLWTH instructions are the only method to read or write the upper 8 bits of a program space word as data. The PC is incremented by two for each successive 24-bit program word. This allows program memory addresses to directly map to data space addresses. Program memory can thus be regarded as two 16-bit, word wide address spaces, residing side by side, each with the same address range. TBLRDL and TBLWTL access the space which contains the least significant data word and TBLRDH and TBLWTH access the space which contains the upper data byte. Two table instructions are provided to move byte or word sized (16-bit) data to and from program space. Both function as either byte or word operations. 1. TBLRDL (Table Read Low): In Word mode, it maps the lower word of the program space location (P) to a data address (D). In Byte mode, either the upper or lower byte of the lower program word is mapped to the lower byte of a data address. The upper byte is selected when Byte Select is ‘1’; the lower byte is selected when it is ‘0’. FIGURE 4-7: TBLPAG ACCESSING PROGRAM MEMORY WITH TABLE INSTRUCTIONS Program Space 23 15 0 02 0x000000 00000000 00000000 00000000 00000000 23 16 8 0 0x020000 0x030000 ‘Phantom’ Byte TBLRDH.B (Wn = 0) TBLRDL.B (Wn = 1) TBLRDL.B (Wn = 0) TBLRDL.W The address for the table operation is determined by the data EA within the page defined by the TBLPAG register. Only read operations are shown; write operations are also valid in the user memory area. 0x800000 © 2011 Microchip Technology Inc. DS70592C-page 61 PIC24HJXXXGPX06A/X08A/X10A 4.4.3 READING DATA FROM PROGRAM MEMORY USING PROGRAM SPACE VISIBILITY 24-bit program word are used to contain the data. The upper 8 bits of any program space location used as data should be programmed with ‘1111 1111’ or ‘0000 0000’ to force a NOP. This prevents possible issues should the area of code ever be accidentally executed. Note: PSV access is temporarily disabled during table reads/writes. The upper 32 Kbytes of data space may optionally be mapped into any 16K word page of the program space. This option provides transparent access of stored constant data from the data space without the need to use special instructions (i.e., TBLRDL/H). Program space access through the data space occurs if the Most Significant bit of the data space EA is ‘1’ and program space visibility is enabled by setting the PSV bit in the Core Control register (CORCON). The location of the program memory space to be mapped into the data space is determined by the Program Space Visibility Page register (PSVPAG). This 8-bit register defines any one of 256 possible pages of 16K words in program space. In effect, PSVPAG functions as the upper 8 bits of the program memory address, with the 15 bits of the EA functioning as the lower bits. Note that by incrementing the PC by 2 for each program memory word, the lower 15 bits of data space addresses directly map to the lower 15 bits in the corresponding program space addresses. Data reads to this area add an additional cycle to the instruction being executed, since two program memory fetches are required. Although each data space address, 0x8000 and higher, maps directly into a corresponding program memory address (see Figure 4-8), only the lower 16 bits of the For operations that use PSV and are executed outside a REPEAT loop, the MOV and MOV.D instructions require one instruction cycle in addition to the specified execution time. All other instructions require two instruction cycles in addition to the specified execution time. For operations that use PSV, which are executed inside a REPEAT loop, there will be some instances that require two instruction cycles in addition to the specified execution time of the instruction: • Execution in the first iteration • Execution in the last iteration • Execution prior to exiting the loop due to an interrupt • Execution upon re-entering the loop after an interrupt is serviced Any other iteration of the REPEAT loop will allow the instruction accessing data, using PSV, to execute in a single cycle. FIGURE 4-8: PROGRAM SPACE VISIBILITY OPERATION When CORCON = 1 and EA = 1: Program Space PSVPAG 02 23 15 0 0x000000 0x010000 0x018000 The data in the page designated by PSVPAG is mapped into the upper half of the data memory space... Data Space 0x0000 Data EA 0x8000 PSV Area ...while the lower 15 bits of the EA specify an exact address within 0xFFFF the PSV area. This corresponds exactly to the same lower 15 bits of the actual program space address. 0x800000 DS70592C-page 62 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A 5.0 FLASH PROGRAM MEMORY Note 1: This data sheet summarizes the features of the PIC24HJXXXGPX06A/X08A/X10A family of devices. However, it is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to Section 5. “Flash Programming” (DS70228) of the “dsPIC33F/PIC24H Family Reference Manual”, which is available from the Microchip website (www.microchip.com). 2: Some registers and associated bits described in this section may not be available on all devices. Refer to Section 4.0 “Memory Organization” in this data sheet for device-specific register and bit information. The PIC24HJXXXGPX06A/X08A/X10A devices contain internal Flash program memory for storing and executing application code. The memory is readable, writable and erasable during normal operation over the entire VDD range. Flash memory can be programmed in two ways: 1. 2. In-Circuit Serial Programming™ (ICSP™) programming capability Run-Time Self-Programming (RTSP) lines for power (VDD), ground (VSS) and Master Clear (MCLR). This allows customers to manufacture boards with unprogrammed devices and then program the digital signal controller just before shipping the product. This also allows the most recent firmware or a custom firmware to be programmed. RTSP is accomplished using TBLRD (table read) and TBLWT (table write) instructions. With RTSP, the user can write program memory data either in blocks or ‘rows’ of 64 instructions (192 bytes) at a time, or single instructions and erase program memory in blocks or ‘pages’ of 512 instructions (1536 bytes) at a time. 5.1 Table Instructions and Flash Programming Regardless of the method used, all programming of Flash memory is done with the table read and table write instructions. These allow direct read and write access to the program memory space from the data memory while the device is in normal operating mode. The 24-bit target address in the program memory is formed using bits of the TBLPAG register and the Effective Address (EA) from a W register specified in the table instruction, as shown in Figure 5-1. The TBLRDL and the TBLWTL instructions are used to read or write to bits of program memory. TBLRDL and TBLWTL can access program memory in both Word and Byte modes. The TBLRDH and TBLWTH instructions are used to read or write to bits of program memory. TBLRDH and TBLWTH can also access program memory in Word or Byte mode. ICSP programming capability allows a PIC24HJXXXGPX06A/X08A/X10A device to be serially programmed while in the end application circuit. This is simply done with two lines for programming clock and programming data (one of the alternate programming pin pairs: PGECx/PGEDx, and three other FIGURE 5-1: ADDRESSING FOR TABLE REGISTERS 24 bits Using Program Counter 0 Program Counter 0 Working Reg EA Using Table Instruction 1/0 TBLPAG Reg 8 bits 16 bits User/Configuration Space Select 24-bit EA Byte Select © 2011 Microchip Technology Inc. DS70592C-page 63 PIC24HJXXXGPX06A/X08A/X10A 5.2 RTSP Operation The PIC24HJXXXGPX06A/X08A/X10A Flash program memory array is organized into rows of 64 instructions or 192 bytes. RTSP allows the user to erase a page of memory, which consists of eight rows (512 instructions) at a time, and to program one row or one word at a time. Table 24-12 displays typical erase and programming times. The 8-row erase pages and single row write rows are edge-aligned, from the beginning of program memory, on boundaries of 1536 bytes and 192 bytes, respectively. The program memory implements holding buffers that can contain 64 instructions of programming data. Prior to the actual programming operation, the write data must be loaded into the buffers in sequential order. The instruction words loaded must always be from a group of 64 boundary. The basic sequence for RTSP programming is to set up a Table Pointer, then do a series of TBLWT instructions to load the buffers. Programming is performed by setting the control bits in the NVMCON register. A total of 64 TBLWTL and TBLWTH instructions are required to load the instructions. All of the table write operations are single-word writes (two instruction cycles) because only the buffers are written. A programming cycle is required for programming each row. For example, if the device is operating at +125°C, the FRC accuracy will be ±5%. If the TUN bits (see Register 9-4) are set to ‘b111111, the minimum row write time is equal to Equation 5-2. EQUATION 5-2: MINIMUM ROW WRITE TIME 11064 Cycles T RW = ----------------------------------------------------------------------------------------------- = 1.435 ms 7.37 MHz × ( 1 + 0.05 ) × ( 1 – 0.00375 ) The maximum row write time is equal to Equation 5-3. EQUATION 5-3: MAXIMUM ROW WRITE TIME 11064 Cycles T RW = ----------------------------------------------------------------------------------------------- = 1.586 ms 7.37 MHz × ( 1 – 0.05 ) × ( 1 – 0.00375 ) Setting the WR bit (NVMCON) starts the operation, and the WR bit is automatically cleared when the operation is finished. 5.4 Control Registers The two SFRs that are used to read and write the program Flash memory are: • NVMCON • NVMKEY The NVMCON register (Register 5-1) controls which blocks are to be erased, which memory type is to be programmed and the start of the programming cycle. NVMKEY is a write-only register that is used for write protection. To start a programming or erase sequence, the user must consecutively write 0x55 and 0xAA to the NVMKEY register. Refer to Section 5.3 “Programming Operations” for further details. 5.3 Programming Operations A complete programming sequence is necessary for programming or erasing the internal Flash in RTSP mode. The processor stalls (waits) until the programming operation is finished. The programming time depends on the FRC accuracy (see Table 24-19) and the value of the FRC Oscillator Tuning register (see Register 9-4). Use the following formula to calculate the minimum and maximum values for the Row Write Time, Page Erase Time and Word Write Cycle Time parameters (see Table 24-12). EQUATION 5-1: PROGRAMMING TIME T --------------------------------------------------------------------------------------------------------------------------7.37 MHz × ( FRC Accuracy ) % × ( FRC Tuning ) % DS70592C-page 64 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A REGISTER 5-1: R/SO-0(1) WR bit 15 U-0 — bit 7 Legend: R = Readable bit -n = Value at POR bit 15 SO = Settable only bit W = Writable bit ‘1’ = Bit is set U = Unimplemented bit, read as ‘0’ ‘0’ = Bit is cleared x = Bit is unknown R/W-0(1) ERASE U-0 — U-0 — R/W-0(1) R/W-0(1) R/W-0(1) (2) NVMCON: FLASH MEMORY CONTROL REGISTER R/W-0(1) WREN R/W-0(1) WRERR U-0 — U-0 — U-0 — U-0 — U-0 — bit 8 R/W-0(1) bit 0 NVMOP WR: Write Control bit 1 = Initiates a Flash memory program or erase operation. The operation is self-timed and the bit is cleared by hardware once operation is complete 0 = Program or erase operation is complete and inactive WREN: Write Enable bit 1 = Enable Flash program/erase operations 0 = Inhibit Flash program/erase operations WRERR: Write Sequence Error Flag bit 1 = An improper program or erase sequence attempt or termination has occurred (bit is set automatically on any set attempt of the WR bit) 0 = The program or erase operation completed normally Unimplemented: Read as ‘0’ ERASE: Erase/Program Enable bit 1 = Perform the erase operation specified by NVMOP on the next WR command 0 = Perform the program operation specified by NVMOP on the next WR command Unimplemented: Read as ‘0’ NVMOP: NVM Operation Select bits(2) 1111 = Memory bulk erase operation (ERASE = 1) or no operation (ERASE = 0) 1110 = Reserved 1101 = Erase General Segment and FGS Configuration Register (ERASE = 1) or no operation (ERASE = 0) 1100 = Erase Secure Segment and FSS Configuration Register (ERASE = 1) or no operation (ERASE = 0) 1011 = Reserved • • • 0100 = Reserved 0011 = Memory word program operation (ERASE = 0) or no operation (ERASE = 1) 0010 = Memory page erase operation (ERASE = 1) or no operation (ERASE = 0) 0001 = Memory row program operation (ERASE = 0) or no operation (ERASE = 1) 0000 = Program or erase a single Configuration register byte These bits can only be reset on a POR. All other combinations of NVMOP are unimplemented. bit 14 bit 13 bit 12-7 bit 6 bit 5-4 bit 3-0 Note 1: 2: © 2011 Microchip Technology Inc. DS70592C-page 65 PIC24HJXXXGPX06A/X08A/X10A 5.4.1 PROGRAMMING ALGORITHM FOR FLASH PROGRAM MEMORY 4. 5. The user can program one row of program Flash memory at a time. To do this, it is necessary to erase the 8-row erase page that contains the desired row. The general process is: 1. 2. 3. Read eight rows of program memory (512 instructions) and store in data RAM. Update the program data in RAM with the desired new data. Erase the page (see Example 5-1): a) Set the NVMOP bits (NVMCON) to ‘0010’ to configure for block erase. Set the ERASE (NVMCON) and WREN (NVMCON) bits. b) Write the starting address of the page to be erased into the TBLPAG and W registers. c) Perform a dummy table write operation (TBLWTL) to any address within the page that needs to be erased. d) Write 0x55 to NVMKEY. e) Write 0xAA to NVMKEY. f) Set the WR bit (NVMCON). The erase cycle begins and the CPU stalls for the duration of the erase cycle. When the erase is done, the WR bit is cleared automatically. Write the first 64 instructions from data RAM into the program memory buffers (see Example 5-2). Write the program block to Flash memory: a) Set the NVMOP bits to ‘0001’ to configure for row programming. Clear the ERASE bit and set the WREN bit. b) Write 0x55 to NVMKEY. c) Write 0xAA to NVMKEY. d) Set the WR bit. The programming cycle begins and the CPU stalls for the duration of the write cycle. When the write to Flash memory is done, the WR bit is cleared automatically. Repeat steps 4 and 5, using the next available 64 instructions from the block in data RAM by incrementing the value in TBLPAG, until all 512 instructions are written back to Flash memory. 6. For protection against accidental operations, the write initiate sequence for NVMKEY must be used to allow any erase or program operation to proceed. After the programming command has been executed, the user must wait for the programming time until programming is complete. The two instructions following the start of the programming sequence should be NOPs, as shown in Example 5-3. EXAMPLE 5-1: ERASING A PROGRAM MEMORY PAGE ; ; Initialize NVMCON ; ; ; ; ; ; ; ; ; ; ; ; ; Set up NVMCON for block erase operation MOV #0x4042, W0 MOV W0, NVMCON ; Init pointer to row to be ERASED MOV #tblpage(PROG_ADDR), W0 MOV W0, TBLPAG MOV #tbloffset(PROG_ADDR), W0 TBLWTL W0, [W0] DISI #5 MOV MOV MOV MOV BSET NOP NOP #0x55, W0 W0, NVMKEY #0xAA, W1 W1, NVMKEY NVMCON, #WR Initialize PM Page Boundary SFR Initialize in-page EA pointer Set base address of erase block Block all interrupts with priority | 0 | can affect the ADC results by approximately 4-6 counts. TABLE 25-17: ADC MODULE SPECIFICATIONS (10-BIT MODE)(3) Standard Operating Conditions: 3.0V to 3.6V (unless otherwise stated) AC CHARACTERISTICS Operating temperature -40°C ≤TA ≤+150°C for High Temperature Param No. Symbol Characteristic Min Typ Max Units Conditions ADC Accuracy (12-bit Mode) – Measurements with external VREF+/VREF-(1) AD23b GERR Gain Error — 3 6 LSb VINL = AVSS = VREFL = 0V, AVDD = VREFH = 3.6V Offset Error — 2 5 LSb VINL = AVSS = VREFL = 0V, AD24b EOFF AVDD = VREFH = 3.6V ADC Accuracy (12-bit Mode) – Measurements with internal VREF+/VREF-(1) AD23b GERR Gain Error — 7 15 LSb VINL = AVSS = 0V, AVDD = 3.6V Offset Error — 3 7 LSb VINL = AVSS = 0V, AVDD = 3.6V AD24b EOFF Dynamic Performance (10-bit Mode)(2) HAD33b FNYQ Input Signal Bandwidth — — 400 kHz — Note 1: These parameters are characterized, but are tested at 20 ksps only. 2: These parameters are characterized by similarity, but are not tested in manufacturing. 3: Injection currents > | 0 | can affect the ADC results by approximately 4-6 counts. © 2011 Microchip Technology Inc. DS70592C-page 291 PIC24HJXXXGPX06A/X08A/X10A TABLE 25-18: ADC CONVERSION (12-BIT MODE) TIMING REQUIREMENTS Standard Operating Conditions: 3.0V to 3.6V (unless otherwise stated) AC CHARACTERISTICS Operating temperature -40°C ≤TA ≤+150°C for High Temperature Param No. HAD50 HAD56 Note 1: Symbol Characteristic Min Typ Max Units Conditions Clock Parameters TAD FCNV ADC Clock Period (1) 147 Conversion Rate — — — — 400 ns Ksps — — Throughput Rate(1) These parameters are characterized but not tested in manufacturing. TABLE 25-19: ADC CONVERSION (10-BIT MODE) TIMING REQUIREMENTS Standard Operating Conditions: 3.0V to 3.6V (unless otherwise stated) AC CHARACTERISTICS Operating temperature -40°C ≤TA ≤+150°C for High Temperature Param No. HAD50 HAD56 Note 1: Symbol Characteristic Min Typ Max Units Conditions Clock Parameters TAD FCNV ADC Clock Period(1) Throughput Rate(1) 104 — — — — 800 ns Ksps — — Conversion Rate These parameters are characterized but not tested in manufacturing. DS70592C-page 292 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A 26.0 26.1 PACKAGING INFORMATION Package Marking Information 64-Lead QFN (9x9x0.9mm) Example XXXXXXXXXX XXXXXXXXXX YYWWNNN 64-Lead TQFP (10x10x1 mm) 24HJ64GP 206A-I/MR e3 0610017 Example XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX YYWWNNN 100-Lead TQFP (12x12x1 mm) PIC24HJ 256GP706A -I/PT e3 0510017 Example XXXXXXXXXXXX XXXXXXXXXXXX YYWWNNN PIC24HJ256 GP710A-I/PT e3 0510017 100-Lead TQFP (14x14x1 mm) Example XXXXXXXXXXXX XXXXXXXXXXXX YYWWNNN PIC24HJ256 GP710A-I/PF e3 0510017 Legend: XX...X Y YY WW NNN e3 * Note: Customer-specific information Year code (last digit of calendar year) Year code (last 2 digits of calendar year) Week code (week of January 1 is week ‘01’) Alphanumeric traceability code Pb-free JEDEC designator for Matte Tin (Sn) This package is Pb-free. The Pb-free JEDEC designator ( e3 ) can be found on the outer packaging for this package. In the event the full Microchip part number cannot be marked on one line, it will be carried over to the next line, thus limiting the number of available characters for customer-specific information. © 2011 Microchip Technology Inc. DS70592C-page 293 PIC24HJXXXGPX06A/X08A/X10A 26.2 Package Details Note: For the most current package drawings, please see the Microchip Packaging Specification located at http://www.microchip.com/packaging DS70592C-page 294 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A Note: For the most current package drawings, please see the Microchip Packaging Specification located at http://www.microchip.com/packaging © 2011 Microchip Technology Inc. DS70592C-page 295 PIC24HJXXXGPX06A/X08A/X10A 64-Lead Plastic Thin Quad Flatpack (PT) – 10x10x1 mm Body, 2.00 mm Footprint [TQFP] Note: For the most current package drawings, please see the Microchip Packaging Specification located at http://www.microchip.com/packaging D D1 E e E1 N b NOTE 1 123 NOTE 2 A c φ A2 α β A1 L L1 Units Dimension Limits Number of Leads Lead Pitch Overall Height Molded Package Thickness Standoff Foot Length Footprint Foot Angle Overall Width Overall Length Molded Package Width Molded Package Length Lead Thickness Lead Width Mold Draft Angle Top Mold Draft Angle Bottom N e A A2 A1 L L1 φ E D E1 D1 c b α β 0.09 0.17 11° 11° 0° – 0.95 0.05 0.45 MIN MILLIMETERS NOM 64 0.50 BSC – 1.00 – 0.60 1.00 REF 3.5° 12.00 BSC 12.00 BSC 10.00 BSC 10.00 BSC – 0.22 12° 12° 0.20 0.27 13° 13° 7° 1.20 1.05 0.15 0.75 MAX Notes: 1. Pin 1 visual index feature may vary, but must be located within the hatched area. 2. Chamfers at corners are optional; size may vary. 3. Dimensions D1 and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed 0.25 mm per side. 4. Dimensioning and tolerancing per ASME Y14.5M. BSC: Basic Dimension. Theoretically exact value shown without tolerances. REF: Reference Dimension, usually without tolerance, for information purposes only. Microchip Technology Drawing C04-085B DS70592C-page 296 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A /HDG 3ODVWLF 7KLQ 4XDG )ODWSDFN 37 ± [[ PP %RG\  PP >74)3@ 1RWH )RU WKH PRVW FXUUHQW SDFNDJH GUDZLQJV SOHDVH VHH WKH 0LFURFKLS 3DFNDJLQJ 6SHFLILFDWLRQ ORFDWHG DW KWWSZZZPLFURFKLSFRPSDFNDJLQJ © 2011 Microchip Technology Inc. DS70592C-page 297 PIC24HJXXXGPX06A/X08A/X10A 100-Lead Plastic Thin Quad Flatpack (PT) – 12x12x1 mm Body, 2.00 mm Footprint [TQFP] Note: For the most current package drawings, please see the Microchip Packaging Specification located at http://www.microchip.com/packaging D D1 e E E1 b N 1 23 NOTE 1 c NOTE 2 α A β φ L Units Dimension Limits Number of Leads Lead Pitch Overall Height Molded Package Thickness Standoff Foot Length Footprint Foot Angle Overall Width Overall Length Molded Package Width Molded Package Length Lead Thickness Lead Width Mold Draft Angle Top Mold Draft Angle Bottom N e A A2 A1 L L1 φ E D E1 D1 c b α β 0.09 0.13 11° 11° 0° – 0.95 0.05 0.45 MIN A1 L1 MILLIMETERS NOM 100 0.40 BSC – 1.00 – 0.60 1.00 REF 3.5° 14.00 BSC 14.00 BSC 12.00 BSC 12.00 BSC – 0.18 12° 12° 0.20 0.23 13° 13° 7° 1.20 1.05 0.15 0.75 MAX A2 Notes: 1. Pin 1 visual index feature may vary, but must be located within the hatched area. 2. Chamfers at corners are optional; size may vary. 3. Dimensions D1 and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed 0.25 mm per side. 4. Dimensioning and tolerancing per ASME Y14.5M. BSC: Basic Dimension. Theoretically exact value shown without tolerances. REF: Reference Dimension, usually without tolerance, for information purposes only. Microchip Technology Drawing C04-100B DS70592C-page 298 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A /HDG 3ODVWLF 7KLQ 4XDG )ODWSDFN 37 ± [[ PP %RG\  PP >74)3@ 1RWH )RU WKH PRVW FXUUHQW SDFNDJH GUDZLQJV SOHDVH VHH WKH 0LFURFKLS 3DFNDJLQJ 6SHFLILFDWLRQ ORFDWHG DW KWWSZZZPLFURFKLSFRPSDFNDJLQJ © 2011 Microchip Technology Inc. DS70592C-page 299 PIC24HJXXXGPX06A/X08A/X10A 100-Lead Plastic Thin Quad Flatpack (PF) – 14x14x1 mm Body, 2.00 mm Footprint [TQFP] Note: For the most current package drawings, please see the Microchip Packaging Specification located at http://www.microchip.com/packaging D D1 e E1 E b N α NOTE 1 1 23 NOTE 2 A c β φ L A1 L1 A2 Units Dimension Limits Number of Leads Lead Pitch Overall Height Molded Package Thickness Standoff Foot Length Footprint Foot Angle Overall Width Overall Length Molded Package Width Molded Package Length Lead Thickness Lead Width Mold Draft Angle Top Mold Draft Angle Bottom N e A A2 A1 L L1 φ E D E1 D1 c b α β 0.09 0.17 11° 11° 0° – 0.95 0.05 0.45 MIN MILLIMETERS NOM 100 0.50 BSC – 1.00 – 0.60 1.00 REF 3.5° 16.00 BSC 16.00 BSC 14.00 BSC 14.00 BSC – 0.22 12° 12° 0.20 0.27 13° 13° 7° 1.20 1.05 0.15 0.75 MAX Notes: 1. Pin 1 visual index feature may vary, but must be located within the hatched area. 2. Chamfers at corners are optional; size may vary. 3. Dimensions D1 and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed 0.25 mm per side. 4. Dimensioning and tolerancing per ASME Y14.5M. BSC: Basic Dimension. Theoretically exact value shown without tolerances. REF: Reference Dimension, usually without tolerance, for information purposes only. Microchip Technology Drawing C04-110B DS70592C-page 300 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A /HDG 3ODVWLF 7KLQ 4XDG )ODWSDFN 3) ± [[ PP %RG\  PP >74)3@ 1RWH )RU WKH PRVW FXUUHQW SDFNDJH GUDZLQJV SOHDVH VHH WKH 0LFURFKLS 3DFNDJLQJ 6SHFLILFDWLRQ ORFDWHG DW KWWSZZZPLFURFKLSFRPSDFNDJLQJ © 2011 Microchip Technology Inc. DS70592C-page 301 PIC24HJXXXGPX06A/X08A/X10A NOTES: DS70592C-page 302 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A APPENDIX A: MIGRATING FROM PIC24HJXXXGPX06/ X08/X10 DEVICES TO PIC24HJXXXGPX06A/ X08A/X10A DEVICES PIC24HJXXXGPX06A/X08A/X10A devices were designed to enhance the PIC24HJXXXGPX06/X08/ X10 families of devices. In general, the PIC24HJXXXGPX06A/X08A/X10A devices are backward-compatible with PIC24HJXXXGPX06/X08/X10 devices; however, manufacturing differences may cause PIC24HJXXXGPX06A/X08A/X10A devices to behave differently from PIC24HJXXXGPX06/X08/X10 devices. Therefore, complete system test and characterization is recommended if PIC24HJXXXGPX06A/X08A/X10A devices are used to replace PIC24HJXXXGPX06/X08/ X10 devices. The following enhancements were introduced: • Extended temperature support of up to +125ºC • Enhanced Flash module with higher endurance and retention • New PLL Lock Enable configuration bit • Added Timer5 trigger for ADC1 and Timer3 trigger for ADC2 © 2011 Microchip Technology Inc. DS70592C-page 303 PIC24HJXXXGPX06A/X08A/X10A APPENDIX B: REVISION HISTORY Revision B (October 2009) The revision includes the following global update: • Added Note 2 to the shaded table that appears at the beginning of each chapter. This new note provides information regarding the availability of registers and their associated bits This revision also includes minor typographical and formatting changes throughout the data sheet text. All other major changes are referenced by their respective section in the following table. Revision A (April 2009) This is the initial release of this document. TABLE B-1: MAJOR SECTION UPDATES Section Name Update Description Added information on high temperature operation (see “Operating Range:”). Updated the last paragraph to clarify the number of cycles that occur prior to the start of instruction execution (see Section 10.2.2 “Idle Mode”). Changed the reference to digital-only pins to 5V tolerant pins in the second paragraph of Section 11.2 “Open-Drain Configuration”. Updated the two baud rate range features to: 10 Mbps to 38 bps at 40 MIPS. “High-Performance, 16-bit Microcontrollers” Section 10.0 “Power-Saving Features” Section 11.0 “I/O Ports” Section 18.0 “Universal Asynchronous Receiver Transmitter (UART)” Section 20.0 “10-bit/12-bit Analog-to-Digital Updated the ADCx block diagram (see Figure 20-1). Converter (ADC)” Section 21.0 “Special Features” Updated the second paragraph and removed the fourth paragraph in Section 21.1 “Configuration Bits”. Updated the Device Configuration Register Map (see Table 21-1). Section 24.0 “Electrical Characteristics” Updated the Absolute Maximum Ratings for high temperature and added Note 4. Updated Power-Down Current parameters DC60d, DC60a, DC60b, and DC60d (see Table 24-7). Added I2Cx Bus Data Timing Requirements (Master Mode) parameter IM51 (see Table 24-36). Updated the SPIx Module Slave Mode (CKE = 1) Timing Characteristics (see Figure 24-12). Updated the Internal LPRC Accuracy parameters (see Table 24-18 and Table 24-19). Updated the ADC Module Specifications (12-bit Mode) parameters AD23a and AD24a (see Table 24-40). Updated the ADC Module Specifications (10-bit Mode) parameters AD23b and AD24b (see Table 24-41). Section 25.0 “High Temperature Electrical Characteristics” “Product Identification System” Added new chapter with high temperature specifications. Added the “H” definition for high temperature. DS70592C-page 304 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A Revision C (March 2011) This revision includes typographical and formatting changes throughout the data sheet text. In addition, all occurrences of VDDCORE have been removed. All other major changes are referenced by their respective section in the following table. TABLE B-2: MAJOR SECTION UPDATES Section Name Update Description The frequency limitation for device PLL start-up conditions was updated in Section 2.7 “Oscillator Value Conditions on Device Start-up”. The second paragraph in Section 2.9 “Unused I/Os” was updated. Section 2.0 “Guidelines for Getting Started with 16-Bit Microcontrollers” Section 4.0 “Memory Organization” The All Resets values for the following SFRs in the Timer Register Map were changed (see Table 4-6): • TMR1 • TMR2 • TMR3 • TMR4 • TMR5 • TMR6 • TMR7 • TMR8 • TMR9 Added Note 3 to the OSCCON: Oscillator Control Register (see Register 9-1). Added Note 2 to the CLKDIV: Clock Divisor Register (see Register 9-2). Added Note 1 to the PLLFBD: PLL Feedback Divisor Register (see Register 9-3). Added Note 2 to the OSCTUN: FRC Oscillator Tuning Register (see Register 9-4). Section 9.0 “Oscillator Configuration” Section 20.0 “10-bit/12-bit Analog-to-Digital Updated the VREFL references in the ADC1 module block diagram (see Figure 20-1). Converter (ADC)” Section 21.0 “Special Features” Added a new paragraph and removed the third paragraph in Section 21.1 “Configuration Bits”. Added the column “RTSP Effects” to the Configuration Bits Descriptions (see Table 21-2). © 2011 Microchip Technology Inc. DS70592C-page 305 PIC24HJXXXGPX06A/X08A/X10A TABLE B-2: MAJOR SECTION UPDATES (CONTINUED) Section Name Section 24.0 “Electrical Characteristics” Update Description Removed Note 4 from the DC Temperature and Voltage Specifications (see Table 24-4). Updated the maximum value for parameter DI19 and added parameters DI28, DI29, DI60a, DI60b, and DI60c to the I/O Pin Input Specifications (see Table 24-9). Removed Note 2 from the AC Characteristics: Internal RC Accuracy (see Table 24-18). Updated the characteristic description for parameter DI35 in the I/O Timing Requirements (see Table 24-20). Updated the ADC Module Specification minimum values for parameters AD05 and AD07, and updated the maximum value for parameter AD06 (see Table 24-39). Added Note 1 to the ADC Module Specifications (12-bit Mode) (see Table 24-40). Added Note 1 to the ADC Module Specifications (10-bit Mode) (see Table 24-41). Added DMA Read/Write Timing Requirements (see Table 24-44). Section 25.0 “High Temperature Electrical Characteristics” Updated all ambient temperature end range values to +150ºC throughout the chapter. Updated the storage temperature end range to +160ºC. Updated the maximum junction temperature from +145ºC to +155ºC. Updated the maximum values for High Temperature Devices in the Thermal Operating Conditions (see Table 25-2). Added Note 3 and updated the ADC Module Specifications (12-bit Mode), removing all parameters with the exception of HAD33a (see Table 25-16). Added Note 3 and updated the ADC Module Specifications (10-bit Mode), removing all parameters with the exception of HAD33b (see Table 25-17). DS70592C-page 306 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A INDEX A AC Characteristics .................................................... 247, 278 ADC Module.............................................................. 281 ADC Module (10-bit Mode) ....................................... 282 ADC Module (12-bit Mode) ....................................... 281 Internal RC Accuracy ................................................ 249 Load Conditions ................................................ 247, 278 ADC Module ADC1 Register Map .................................................... 44 ADC2 Register Map .................................................... 44 Alternate Interrupt Vector Table (AIVT) .............................. 71 Analog-to-Digital Converter............................................... 205 DMA .......................................................................... 205 Initialization ............................................................... 205 Key Features............................................................. 205 Arithmetic Logic Unit (ALU)................................................. 30 Assembler MPASM Assembler................................................... 234 Automatic Clock Stretch.................................................... 166 Customer Change Notification Service............................. 303 Customer Notification Service .......................................... 303 Customer Support............................................................. 303 D Data Address Space........................................................... 33 Alignment.................................................................... 33 Memory Map for PIC24HJXXXGPX06A/X08A/X10A Devices with 16 KB RAM.................................... 35 Memory Map for PIC24HJXXXGPX06A/X08A/X10A Devices with 8 KB RAM...................................... 34 Near Data Space ........................................................ 33 Software Stack ........................................................... 55 Width .......................................................................... 33 DC Characteristics............................................................ 238 Doze Current (IDOZE)................................................ 277 High Temperature..................................................... 276 I/O Pin Input Specifications ...................................... 243 I/O Pin Output........................................................... 277 I/O Pin Output Specifications.................................... 245 Idle Current (IDOZE) .................................................. 242 Idle Current (IIDLE) .................................................... 241 Operating Current (IDD) ............................................ 240 Operating MIPS vs. Voltage ..................................... 276 Power-Down Current (IPD)........................................ 242 Power-down Current (IPD) ........................................ 276 Program Memory.............................................. 246, 277 Temperature and Voltage......................................... 276 Temperature and Voltage Specifications.................. 239 Thermal Operating Conditions.................................. 276 Development Support ....................................................... 233 DMA Module DMA Register Map ..................................................... 45 DMAC Registers ............................................................... 116 DMAxCNT ................................................................ 116 DMAxCON................................................................ 116 DMAxPAD ................................................................ 116 DMAxREQ ................................................................ 116 DMAxSTA................................................................. 116 DMAxSTB................................................................. 116 B Block Diagrams 16-bit Timer1 Module ................................................ 145 ADC1 Module............................................................ 206 Connections for On-Chip Voltage Regulator............. 222 ECAN Module ........................................................... 180 Input Capture ............................................................ 153 Output Compare ....................................................... 155 PIC24H ....................................................................... 18 PIC24H CPU Core ...................................................... 26 PIC24H Oscillator System Diagram.......................... 125 PIC24H PLL .............................................................. 127 Reset System.............................................................. 67 Shared Port Structure ............................................... 143 SPI ............................................................................ 159 Timer2 (16-bit) .......................................................... 149 Timer2/3 (32-bit) ....................................................... 148 UART ........................................................................ 173 Watchdog Timer (WDT) ............................................ 223 C C Compilers MPLAB C18 .............................................................. 234 Clock Switching................................................................. 133 Enabling .................................................................... 133 Sequence.................................................................. 133 Code Examples Erasing a Program Memory Page............................... 64 Initiating a Programming Sequence............................ 65 Loading Write Buffers ................................................. 65 Port Write/Read ........................................................ 144 PWRSAV Instruction Syntax..................................... 135 Code Protection ........................................................ 217, 224 Configuration Bits.............................................................. 217 Description (Table).................................................... 218 Configuration Register Map .............................................. 217 Configuring Analog Port Pins ............................................ 144 CPU Control Register .......................................................... 27 CPU Clocking System....................................................... 126 PLL Configuration ..................................................... 126 Selection ................................................................... 126 Sources..................................................................... 126 E ECAN Module CiFMSKSEL2 register .............................................. 197 ECAN1 Register Map (C1CTRL1.WIN = 0 or 1)......... 46 ECAN1 Register Map (C1CTRL1.WIN = 0)................ 47 ECAN1 Register Map (C1CTRL1.WIN = 1)................ 47 ECAN2 Register Map (C2CTRL1.WIN = 0 or 1)......... 49 ECAN2 Register Map (C2CTRL1.WIN = 0)................ 49 ECAN2 Register Map (C2CTRL1.WIN = 1)................ 50 Frame Types ............................................................ 179 Modes of Operation .................................................. 181 Overview................................................................... 179 ECAN Registers Filter 15-8 Mask Selection Register (CiFMSKSEL2) 197 Electrical Characteristics .................................................. 237 AC..................................................................... 247, 278 Enhanced CAN Module .................................................... 179 Equations Device Operating Frequency.................................... 126 FOSC Calculation..................................................... 126 XT with PLL Mode Example ..................................... 127 Errata .................................................................................. 16 © 2011 Microchip Technology Inc. DS70592C-page 307 PIC24HJXXXGPX06A/X08A/X10A F Flash Program Memory....................................................... 61 Control Registers ........................................................ 62 Operations .................................................................. 62 Programming Algorithm .............................................. 64 RTSP Operation.......................................................... 62 Table Instructions........................................................ 61 Flexible Configuration ....................................................... 217 FSCM Delay for Crystal and PLL Clock Sources ................... 70 Device Resets ............................................................. 70 M Memory Organization ......................................................... 31 Microchip Internet Web Site.............................................. 303 Modes of Operation Disable...................................................................... 181 Initialization ............................................................... 181 Listen All Messages.................................................. 181 Listen Only................................................................ 181 Loopback .................................................................. 181 Normal Operation ..................................................... 181 MPLAB ASM30 Assembler, Linker, Librarian ................... 234 MPLAB Integrated Development Environment Software.. 233 MPLAB PM3 Device Programmer .................................... 236 MPLAB REAL ICE In-Circuit Emulator System ................ 235 MPLINK Object Linker/MPLIB Object Librarian ................ 234 Multi-Bit Data Shifter........................................................... 30 H High Temperature Electrical Characteristics..................... 275 I I/O Ports ............................................................................ 143 Parallel I/O (PIO)....................................................... 143 Write/Read Timing .................................................... 144 I2 C Operating Modes ...................................................... 165 Registers ................................................................... 165 I2C Module I2C1 Register Map ...................................................... 42 I2C2 Register Map ...................................................... 42 In-Circuit Debugger ........................................................... 224 In-Circuit Emulation........................................................... 217 In-Circuit Serial Programming (ICSP) ....................... 217, 224 Input Capture Registers ................................................................... 154 Input Change Notification Module ..................................... 144 Instruction Addressing Modes............................................. 55 File Register Instructions ............................................ 55 Fundamental Modes Supported.................................. 56 MCU Instructions ........................................................ 55 Move and Accumulator Instructions ............................ 56 Other Instructions........................................................ 56 Instruction Set Overview ................................................................... 227 Summary................................................................... 225 Instruction-Based Power-Saving Modes ........................... 135 Idle ............................................................................ 136 Sleep ......................................................................... 135 Internal RC Oscillator Use with WDT ........................................................... 223 Internet Address................................................................ 303 Interrupt Control and Status Registers................................ 75 IECx ............................................................................ 75 IFSx............................................................................. 75 INTCON1 .................................................................... 75 INTCON2 .................................................................... 75 INTTREG .................................................................... 75 IPCx ............................................................................ 75 Interrupt Setup Procedures ............................................... 113 Initialization ............................................................... 113 Interrupt Disable........................................................ 113 Interrupt Service Routine .......................................... 113 Trap Service Routine ................................................ 113 Interrupt Vector Table (IVT) ................................................ 71 Interrupts Coincident with Power Save Instructions.......... 136 N NVM Module Register Map .............................................................. 54 O Open-Drain Configuration................................................. 144 Output Compare ............................................................... 155 P Packaging ......................................................................... 285 Details....................................................................... 288 Marking ..................................................................... 285 Peripheral Module Disable (PMD) .................................... 136 Pinout I/O Descriptions (table)............................................ 19 PMD Module Register Map .............................................................. 54 POR and Long Oscillator Start-up Times ........................... 70 PORTA Register Map .............................................................. 52 PORTB Register Map .............................................................. 52 PORTC Register Map .............................................................. 52 PORTD Register Map .............................................................. 52 PORTE Register Map .............................................................. 53 PORTF Register Map .............................................................. 53 PORTG Register Map .............................................................. 53 Power-Saving Features .................................................... 135 Clock Frequency and Switching ............................... 135 Program Address Space..................................................... 31 Construction ............................................................... 57 Data Access from Program Memory Using Program Space Visibility..................................... 60 Data Access from Program Memory Using Table Instructions ..................................... 59 Data Access from, Address Generation ..................... 58 Memory Map............................................................... 31 Table Read Instructions TBLRDH ............................................................. 59 TBLRDL.............................................................. 59 Visibility Operation ...................................................... 60 Program Memory Interrupt Vector ........................................................... 32 Organization ............................................................... 32 Reset Vector ............................................................... 32 J JTAG Boundary Scan Interface ........................................ 217 DS70592C-page 308 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A R Reader Response ............................................................. 304 Registers ADxCHS0 (ADCx Input Channel 0 Select................. 214 ADxCHS123 (ADCx Input Channel 1, 2, 3 Select) ... 213 ADxCON1 (ADCx Control 1)..................................... 208 ADxCON2 (ADCx Control 2)..................................... 210 ADxCON3 (ADCx Control 3)..................................... 211 ADxCON4 (ADCx Control 4)..................................... 212 ADxCSSH (ADCx Input Scan Select High)............... 215 ADxCSSL (ADCx Input Scan Select Low) ................ 215 ADxPCFGH (ADCx Port Configuration High) ........... 216 ADxPCFGL (ADCx Port Configuration Low)............. 216 CiBUFPNT1 (ECAN Filter 0-3 Buffer Pointer)........... 192 CiBUFPNT2 (ECAN Filter 4-7 Buffer Pointer)........... 193 CiBUFPNT3 (ECAN Filter 8-11 Buffer Pointer)......... 193 CiBUFPNT4 (ECAN Filter 12-15 Buffer Pointer)....... 194 CiCFG1 (ECAN Baud Rate Configuration 1) ............ 190 CiCFG2 (ECAN Baud Rate Configuration 2) ............ 191 CiCTRL1 (ECAN Control 1) ...................................... 182 CiCTRL2 (ECAN Control 2) ...................................... 183 CiEC (ECAN Transmit/Receive Error Count)............ 189 CiFCTRL (ECAN FIFO Control)................................ 185 CiFEN1 (ECAN Acceptance Filter Enable) ............... 192 CiFIFO (ECAN FIFO Status)..................................... 186 CiFMSKSEL1 (ECAN Filter 7-0 Mask Selection)..... 196, 197 CiINTE (ECAN Interrupt Enable) .............................. 188 CiINTF (ECAN Interrupt Flag)................................... 187 CiRXFnEID (ECAN Acceptance Filter n Extended Identifier)........................................... 195 CiRXFnSID (ECAN Acceptance Filter n Standard Identifier).................................................................... 195 CiRXFUL1 (ECAN Receive Buffer Full 1) ................. 199 CiRXFUL2 (ECAN Receive Buffer Full 2) ................. 199 CiRXMnEID (ECAN Acceptance Filter Mask n Extended Identifier) ........................................................... 198 CiRXMnSID (ECAN Acceptance Filter Mask n Standard Identifier) ........................................... 198 CiRXOVF1 (ECAN Receive Buffer Overflow 1) ........ 200 CiRXOVF2 (ECAN Receive Buffer Overflow 2) ........ 200 CiTRBnDLC (ECAN Buffer n Data Length Control) .. 203 CiTRBnEID (ECAN Buffer n Extended Identifier) ..... 202 CiTRBnSID (ECAN Buffer n Standard Identifier) ...... 202 CiTRBnSTAT (ECAN Receive Buffer n Status) ........ 204 CiTRmnCON (ECAN TX/RX Buffer m Control)......... 201 CiVEC (ECAN Interrupt Code).................................. 184 CLKDIV (Clock Divisor)............................................. 130 CORCON (Core Control) ...................................... 29, 76 DMACS0 (DMA Controller Status 0)......................... 121 DMACS1 (DMA Controller Status 1)......................... 123 DMAxCNT (DMA Channel x Transfer Count) ........... 120 DMAxCON (DMA Channel x Control) ....................... 117 DMAxPAD (DMA Channel x Peripheral Address)..... 120 DMAxREQ (DMA Channel x IRQ Select) ................. 118 DMAxSTA (DMA Channel x RAM Start Address A) . 119 DMAxSTB (DMA Channel x RAM Start Address B) . 119 DSADR (Most Recent DMA RAM Address).............. 124 I2CxCON (I2Cx Control) ........................................... 167 I2CxMSK (I2Cx Slave Mode Address Mask) ............ 171 I2CxSTAT (I2Cx Status) ........................................... 169 ICxCON (Input Capture x Control) ............................ 154 IEC0 (Interrupt Enable Control 0) ............................... 87 IEC1 (Interrupt Enable Control 1) ............................... 89 IEC2 (Interrupt Enable Control 2) ............................... 91 IEC3 (Interrupt Enable Control 3) ............................... 93 IEC4 (Interrupt Enable Control 4) ............................... 94 IFS0 (Interrupt Flag Status 0) ..................................... 79 IFS1 (Interrupt Flag Status 1) ..................................... 81 IFS2 (Interrupt Flag Status 2) ..................................... 83 IFS3 (Interrupt Flag Status 3) ..................................... 85 IFS4 (Interrupt Flag Status 4) ..................................... 86 INTCON1 (Interrupt Control 1) ................................... 77 INTCON2 (Interrupt Control 2) ................................... 78 IPC0 (Interrupt Priority Control 0) ............................... 95 IPC1 (Interrupt Priority Control 1) ............................... 96 IPC10 (Interrupt Priority Control 10) ......................... 105 IPC11 (Interrupt Priority Control 11) ......................... 106 IPC12 (Interrupt Priority Control 12) ......................... 107 IPC13 (Interrupt Priority Control 13) ......................... 108 IPC14 (Interrupt Priority Control 14) ......................... 109 IPC15 (Interrupt Priority Control 15) ......................... 109 IPC16 (Interrupt Priority Control 16) ................. 110, 112 IPC17 (Interrupt Priority Control 17) ......................... 111 IPC2 (Interrupt Priority Control 2) ............................... 97 IPC3 (Interrupt Priority Control 3) ............................... 98 IPC4 (Interrupt Priority Control 4) ............................... 99 IPC5 (Interrupt Priority Control 5) ............................. 100 IPC6 (Interrupt Priority Control 6) ............................. 101 IPC7 (Interrupt Priority Control 7) ............................. 102 IPC8 (Interrupt Priority Control 8) ............................. 103 IPC9 (Interrupt Priority Control 9) ............................. 104 NVMCON (Flash Memory Control)............................. 63 OCxCON (Output Compare x Control) ..................... 157 OSCCON (Oscillator Control)................................... 128 OSCTUN (FRC Oscillator Tuning)............................ 132 PLLFBD (PLL Feedback Divisor) ............................. 131 PMD1 (Peripheral Module Disable Control Register 1) ........................................................ 137 PMD2 (Peripheral Module Disable Control Register 2) ........................................................ 139 PMD3 (Peripheral Module Disable Control Register 3) ........................................................ 141 RCON (Reset Control)................................................ 68 SPIxCON1 (SPIx Control 1) ..................................... 161 SPIxCON2 (SPIx Control 2) ..................................... 163 SPIxSTAT (SPIx Status and Control) ....................... 160 SR (CPU Status) .................................................. 28, 76 T1CON (Timer1 Control) .......................................... 146 TxCON (T2CON, T4CON, T6CON or T8CON Control)................................................ 150 TyCON (T3CON, T5CON, T7CON or T9CON Control)................................................ 151 UxMODE (UARTx Mode) ......................................... 174 UxSTA (UARTx Status and Control) ........................ 176 Reset Clock Source Selection .............................................. 69 Special Function Register Reset States ..................... 70 Times.......................................................................... 69 Reset Sequence ................................................................. 71 Resets ................................................................................ 67 S Serial Peripheral Interface (SPI) ....................................... 159 Software Simulator (MPLAB SIM) .................................... 235 Software Stack Pointer, Frame Pointer CALL Stack Frame ..................................................... 55 Special Features............................................................... 217 SPI Module SPI1 Register Map ..................................................... 43 SPI2 Register Map ..................................................... 43 © 2011 Microchip Technology Inc. DS70592C-page 309 PIC24HJXXXGPX06A/X08A/X10A Symbols Used in Opcode Descriptions............................. 226 System Control Register Map............................................................... 54 UART1 Register Map.................................................. 42 UART2 Register Map.................................................. 43 T Temperature and Voltage Specifications AC ..................................................................... 247, 278 Timer1 ............................................................................... 145 Timer2/3, Timer4/5, Timer6/7 and Timer8/9 ..................... 147 Timing Characteristics CLKO and I/O ........................................................... 250 Timing Diagrams 10-bit Analog-to-Digital Conversion (CHPS = 01, SIMSAM = 0, ASAM = 1, SSRC = 111, SAMC = 00001) ....................................... 272 10-bit Analog-to-Digtial Conversion (CHPS = 01, SIMSAM = 0, ASAM = 0, SSRC = 000) ... 272 12-bit Analog-to-Digital Conversion (ASAM = 0, SSRC = 000) ........................ 270 ECAN I/O .................................................................. 266 External Clock ........................................................... 248 I2Cx Bus Data (Master Mode) .................................. 262 I2Cx Bus Data (Slave Mode) .................................... 264 I2Cx Bus Start/Stop Bits (Master Mode) ................... 262 I2Cx Bus Start/Stop Bits (Slave Mode) ..................... 264 Input Capture (CAPx)................................................ 255 OC/PWM ................................................................... 256 Output Compare (OCx) ............................................. 255 Reset, Watchdog Timer, Oscillator Start-up Timer and Power-up Timer ......................................... 251 SPIx Master Mode (CKE = 0).................................... 257 SPIx Master Mode (CKE = 1).................................... 258 SPIx Slave Mode (CKE = 0)...................................... 259 SPIx Slave Mode (CKE = 1)...................................... 260 Timer1, 2 and 3 External Clock................................. 253 Timing Requirements ADC Conversion (10-bit mode) ................................. 283 ADC Conversion (12-bit Mode) ................................. 283 CLKO and I/O ........................................................... 250 External Clock ........................................................... 248 Input Capture ............................................................ 255 SPIx Master Mode (CKE = 0).................................... 279 SPIx Module Master Mode (CKE = 1)....................... 279 SPIx Module Slave Mode (CKE = 0)......................... 280 SPIx Module Slave Mode (CKE = 1)......................... 280 Timing Specifications 10-bit Analog-to-Digital Conversion Requirements ... 273 CAN I/O Requirements ............................................. 266 I2Cx Bus Data Requirements (Master Mode) ........... 263 I2Cx Bus Data Requirements (Slave Mode) ............. 265 Output Compare Requirements ................................ 255 PLL Clock.......................................................... 249, 278 Reset, Watchdog Timer, Oscillator Start-up Timer, Power-up Timer and Brown-out Reset Requirements ......................................... 252 Simple OC/PWM Mode Requirements ..................... 256 SPIx Master Mode (CKE = 0) Requirements ............ 257 SPIx Master Mode (CKE = 1) Requirements ............ 258 SPIx Slave Mode (CKE = 0) Requirements .............. 259 SPIx Slave Mode (CKE = 1) Requirements .............. 261 Timer1 External Clock Requirements ....................... 253 Timer2 External Clock Requirements ....................... 254 Timer3 External Clock Requirements ....................... 254 V Voltage Regulator (On-Chip) ............................................ 222 W Watchdog Timer (WDT)............................................ 217, 223 Programming Considerations ................................... 223 WWW Address ................................................................. 303 WWW, On-Line Support ..................................................... 16 U UART Module DS70592C-page 310 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A THE MICROCHIP WEB SITE Microchip provides online support via our WWW site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software • General Technical Support – Frequently Asked Questions (FAQ), technical support requests, online discussion groups, Microchip consultant program member listing • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • • • • • Distributor or Representative Local Sales Office Field Application Engineer (FAE) Technical Support Development Systems Information Line Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://microchip.com/support CUSTOMER CHANGE NOTIFICATION SERVICE Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip web site at www.microchip.com. Under “Support”, click on “Customer Change Notification” and follow the registration instructions. © 2011 Microchip Technology Inc. DS70592C-page 311 PIC24HJXXXGPX06A/X08A/X10A READER RESPONSE It is our intention to provide you with the best documentation possible to ensure successful use of your Microchip product. If you wish to provide your comments on organization, clarity, subject matter, and ways in which our documentation can better serve you, please FAX your comments to the Technical Publications Manager at (480) 792-4150. Please list the following information, and use this outline to provide us with your comments about this document. TO: RE: Technical Publications Manager Reader Response Total Pages Sent ________ From: Name Company Address City / State / ZIP / Country Telephone: (_______) _________ - _________ Application (optional): Would you like a reply? Y N Literature Number: DS70592C FAX: (______) _________ - _________ Device: PIC24HJXXXGPX06A/X08A/X10A Questions: 1. What are the best features of this document? 2. How does this document meet your hardware and software development needs? 3. Do you find the organization of this document easy to follow? If not, why? 4. What additions to the document do you think would enhance the structure and subject? 5. What deletions from the document could be made without affecting the overall usefulness? 6. Is there any incorrect or misleading information (what and where)? 7. How would you improve this document? DS70592C-page 312 © 2011 Microchip Technology Inc. PIC24HJXXXGPX06A/X08A/X10A PRODUCT IDENTIFICATION SYSTEM To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office. PIC 24 HJ 256 GP6 10 A T I/PT - XXX Microchip Trademark Architecture Flash Memory Family Program Memory Size (KB) Product Group Pin Count Revision Level Tape and Reel Flag (if applicable) Temperature Range Package Pattern b) Examples: a) PIC24HJ256GP210AI/PT: General-purpose PIC24H, 256 KB program memory, 100-pin, Industrial temp., TQFP package. PIC24HJ64GP506AI/PT-ES: General-purpose PIC24H, 64 KB program memory, 64-pin, Industrial temp., TQFP package, Engineering Sample. Architecture: 24 = = = = = = = = = = = = = = 16-bit Microcontroller Flash program memory, 3.3V, High-speed General purpose family General purpose family General purpose family General purpose family 64-pin 100-pin -40° C to+85° C(Industrial) -40° C to+125° C(Extended) -40° C to+150° C(High) 10x10 or 12x12 mm TQFP (Thin Quad Flatpack) 14x14 mm TQFP (Thin Quad Flatpack) 9x9x0.9 mm QFN (Thin Quad Flatpack) Flash Memory Family: HJ Product Group: GP2 GP3 GP5 GP6 06 10 I E H PT PF MR Pin Count: Temperature Range: Package: Pattern: Three-digit QTP, SQTP, Code or Special Requirements (blank otherwise) ES = Engineering Sample © 2011 Microchip Technology Inc. DS70592C-page 313 Worldwide Sales and Service AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://www.microchip.com/ support Web Address: www.microchip.com Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Farmington Hills, MI Tel: 248-538-2250 Fax: 248-538-2260 Indianapolis Noblesville, IN Tel: 317-773-8323 Fax: 317-773-5453 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 Santa Clara Santa Clara, CA Tel: 408-961-6444 Fax: 408-961-6445 Toronto Mississauga, Ontario, Canada Tel: 905-673-0699 Fax: 905-673-6509 ASIA/PACIFIC Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8528-2100 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 China - Chongqing Tel: 86-23-8980-9588 Fax: 86-23-8980-9500 China - Hong Kong SAR Tel: 852-2401-1200 Fax: 852-2401-3431 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China - Shenzhen Tel: 86-755-8203-2660 Fax: 86-755-8203-1760 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 ASIA/PACIFIC India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4123 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 India - Pune Tel: 91-20-2566-1512 Fax: 91-20-2566-1513 Japan - Yokohama Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan - Hsin Chu Tel: 886-3-6578-300 Fax: 886-3-6578-370 Taiwan - Kaohsiung Tel: 886-7-213-7830 Fax: 886-7-330-9305 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 EUROPE Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 UK - Wokingham Tel: 44-118-921-5869 Fax: 44-118-921-5820 02/18/11 DS70592C-page 314 © 2011 Microchip Technology Inc.
70592C 价格&库存

很抱歉,暂时无法提供与“70592C”相匹配的价格&库存,您可以联系我们找货

免费人工找货