822
2017-2019 Microchip Technology Inc. DS70005319D-page 1 dsPIC33CH128MP508 FAMILY Operating Conditions 3V to 3.6V, -40°C to +125°C: - Master Core: DC to 90 MIPS - Slave Core: DC to 100 MIPS 3V to 3.6V, -40°C to +150°C: - Master Core: DC to 60 MIPS - Slave Core: DC to 60 MIPS Core: Dual 16-Bit dsPIC33CH CPU Master/Slave Core Operation Independent Peripherals for Master Core and Slave Core Dual Partition for Slave PRAM LiveUpdate Configurable Shared Resources for Master Core and Slave Core Master Core with 64-128 Kbytes of Program Flash with ECC and 16K RAM Slave Core with 24 Kbytes of Program RAM (PRAM) with ECC and 4K Data Memory RAM Fast Six-Cycle Divide Message Boxes and FIFO to Communicate Between Master and Slave (MSI) Code Efficient (C and Assembly) Architecture 40-Bit Wide Accumulators Single-Cycle (MAC/MPY) with Dual Data Fetch Single-Cycle, Mixed-Sign MUL Plus Hardware Divide 32-Bit Multiply Support Five Sets of Interrupt Context Selected Registers and Accumulators per Core for Fast Interrupt Response Zero Overhead Looping Clock Management Internal Oscillator Programmable PLLs and Oscillator Clock Sources Master Reference Clock Output Slave Reference Clock Output Fail-Safe Clock Monitor (FSCM) Fast Wake-up and Start-up Backup Internal Oscillator LPRC Oscillator Power Management Low-Power Management Modes (Sleep, Idle, Doze) Integrated Power-on Reset and Brown-out Reset High-Resolution PWM with Fine Edge Placement Up to 12 PWM Channels: - Four channels for Master - Eight channels for Slave 250 ps PWM Resolution Applications Include: - DC/DC Converters - AC/DC power supplies - Uninterruptable Power Supply (UPS) - Motor Control: BLDC, PMSM, SR, ACIM Timers/Output Compare/Input Capture Two General Purpose 16-Bit Timers: - One each for Master and Slave Peripheral Trigger Generator (PTG) Module: - One module for Master - Slave can interrupt on select PTG sources - Useful for automating complex sequences 12 SCCP Modules: - Eight modules for Master - Four modules for Slave - Timer, Capture/Compare and PWM Modes - 16 or 32-bit time base - 16 or 32-bit capture - Four-deep capture buffer - Fully Asynchronous Operation, Available in Sleep Modes 28/36/48/64/80-Pin Dual Core, 16-Bit Digital Signal Controllers with High-Resolution PWM and CAN Flexible Data (CAN FD)

28/36/48/64/80-Pin Dual Core, 16-Bit Digital Signal ...ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33CH... · Product Core Pins Flash (1) Data RAM 12-ADC Modules (2) ADC Channels

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

  • dsPIC33CH128MP508 FAMILY28/36/48/64/80-Pin Dual Core, 16-Bit Digital Signal Controllers with High-Resolution PWM and CAN Flexible Data (CAN FD)

    Operating Conditions• 3V to 3.6V, -40°C to +125°C:

    - Master Core: DC to 90 MIPS- Slave Core: DC to 100 MIPS

    • 3V to 3.6V, -40°C to +150°C:- Master Core: DC to 60 MIPS- Slave Core: DC to 60 MIPS

    Core: Dual 16-Bit dsPIC33CH CPU• Master/Slave Core Operation• Independent Peripherals for Master Core and

    Slave Core• Dual Partition for Slave PRAM LiveUpdate• Configurable Shared Resources for Master Core

    and Slave Core• Master Core with 64-128 Kbytes of Program

    Flash with ECC and 16K RAM• Slave Core with 24 Kbytes of Program RAM

    (PRAM) with ECC and 4K Data Memory RAM• Fast Six-Cycle Divide• Message Boxes and FIFO to Communicate

    Between Master and Slave (MSI)• Code Efficient (C and Assembly) Architecture• 40-Bit Wide Accumulators• Single-Cycle (MAC/MPY) with Dual Data Fetch• Single-Cycle, Mixed-Sign MUL Plus Hardware

    Divide• 32-Bit Multiply Support• Five Sets of Interrupt Context Selected Registers

    and Accumulators per Core for Fast Interrupt Response

    • Zero Overhead Looping

    Clock Management• Internal Oscillator• Programmable PLLs and Oscillator Clock Sources• Master Reference Clock Output• Slave Reference Clock Output• Fail-Safe Clock Monitor (FSCM)• Fast Wake-up and Start-up• Backup Internal Oscillator• LPRC Oscillator

    Power Management• Low-Power Management Modes

    (Sleep, Idle, Doze)• Integrated Power-on Reset and Brown-out Reset

    High-Resolution PWM with Fine Edge Placement• Up to 12 PWM Channels:

    - Four channels for Master- Eight channels for Slave

    • 250 ps PWM Resolution• Applications Include:

    - DC/DC Converters- AC/DC power supplies- Uninterruptable Power Supply (UPS)- Motor Control: BLDC, PMSM, SR, ACIM

    Timers/Output Compare/Input Capture• Two General Purpose 16-Bit Timers:

    - One each for Master and Slave• Peripheral Trigger Generator (PTG) Module:

    - One module for Master- Slave can interrupt on select PTG sources- Useful for automating complex sequences

    • 12 SCCP Modules:- Eight modules for Master- Four modules for Slave- Timer, Capture/Compare and PWM Modes- 16 or 32-bit time base- 16 or 32-bit capture- Four-deep capture buffer- Fully Asynchronous Operation, Available in

    Sleep Modes

    2017-2019 Microchip Technology Inc. DS70005319D-page 1

  • dsPIC33CH128MP508 FAMILY

    Advanced Analog Features• Four ADC Modules:

    - One module for Master core- Three modules for Slave core- 12-bit, 3.5 Msps ADC - Up to 18 conversion channels

    • Four DAC/Analog Comparator Modules:- One module for Master core- Three modules for Slave core- 12-bit DACs with hardware slope

    compensation- 15 ns analog comparators

    • Three PGA Modules:- Three modules for Slave core- Can be read by Master ADC- Option to interface with Master ADC

    • Shared DAC/Analog Output:- DAC/analog comparator outputs- PGA outputs

    Communication Interfaces• Three UART Modules:

    - Two modules for Master core- One module for Slave core- Support for DMX and LIN/J2602 protocols

    • Three 4-Wire SPI/I2S Modules:- Two modules for Master core- One module for Slave core

    • CAN Flexible Data-Rate (FD) Module for the Master Core

    • Three I2C Modules:- Two modules for Master- One module for Slave- Support for SMBus

    Other Features• PPS to Allow Function Remap• Programmable Cyclic Redundancy Check (CRC)

    for the Master• Two SENT Modules for the Master

    Direct Memory Access (DMA)• Eight DMA Channels:

    - Six DMA channels available for the Master core- Two DMA channels available for the Slave core

    Debugger Development Support• In-Circuit and In-Application Programming• Simultaneous Debugging Support for Master and

    Slave Cores• Master Only Debug and Slave Only Debug

    Support• Master with Three Complex, Five Simple

    Breakpoints and Slave with One Complex, Two Simple Breakpoints

    • IEEE 1149.2 Compatible (JTAG) Boundary Scan• Trace Buffer and Run-Time Watch

    Safety Features• DMT (Deadman Timer) • ECC (Error Correcting Code)• WDT (Watchdog Timer)• CodeGuard™ Security• CRC (Cyclic Redundancy Check)• Two-Speed Start-up• Fail-Safe Clock Monitoring• Backup FRC (BFRC)• Capless Internal Voltage Regulator• Virtual Pins for Redundancy and Monitoring

    Qualification and Class B Support• AEC-Q100 REVG (Grade 1: -40°C to +125°C)

    Compliant• Class B Safety Library, IEC 60730

    DS70005319D-page 2 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    TABLE 1: MASTER AND SLAVE CORE FEATURESFeature Master Core Slave Core Shared

    Core Frequency 90 MIPS @ 180 MHz 100 MIPS @ 200 MHz —Program Memory 64K-128 Kbytes 24 Kbytes (PRAM)(2) —Internal Data RAM 16 Kbytes 4 Kbytes —16-Bit Timer 1 1 —DMA 6 2 —SCCP (Capture/Compare/Timer) 8 4 —UART 2 1 —SPI/I2S 2 1 —I2C 2 1 —CAN FD 1 — —SENT 2 — —CRC 1 — —QEI 1 1 —PTG 1 — —CLC 4 4 —16-Bit High-Speed PWM 4 8 —ADC 12-Bit 1 3 —Digital Comparator 4 4 —12-Bit DAC/Analog CMP Module 1 3 —Watchdog Timer 1 1 —Deadman Timer 1 — —Input/Output 69 69 69Simple Breakpoints 5 2 —PGAs(1) — 3 3DAC Output Buffer — — 1Oscillator 1 1 1Note 1: Slave owns the peripheral/feature, but it is shared with the Master.

    2: Dual Partition feature is available on Slave PRAM.

    2017-2019 Microchip Technology Inc. DS70005319D-page 3

  • dsPIC33C

    H128M

    P508 FAM

    ILY

    DS

    70005319D-page 4

    2017-2019 M

    icrochip Technology Inc.

    pages show their pinout diagrams.

    CLC

    PTG

    CR

    C

    PWM

    (Hig

    h R

    esol

    utio

    n)

    Ana

    log

    Com

    para

    tors

    PGA

    Cur

    rent

    Bia

    s So

    urce

    REF

    O

    1 1 4 1 — 1 1— — 8 3 3 — 11 1 4 1 — 1 1— — 8 3 3 — 11 1 4 1 — 1 1— — 8 3 3 — 11 1 4 1 — 1 1— — 8 3 3 — 11 1 4 1 — 1 1— — 8 3 3 — 11 1 4 1 — 1 1— — 8 3 3 — 11 1 4 1 — 1 1— — 8 3 3 — 11 1 4 1 — 1 1— — 8 3 3 — 11 1 4 1 — 1 1— — 8 3 3 — 11 1 4 1 — 1 1— — 8 3 3 — 1

    dsPIC33CH128MP508 PRODUCT FAMILIESThe device names, pin counts, memory sizes and peripheral availability of each device are listed in Table 2. The following

    TABLE 2: dsPIC33CHXXXMP50X FAMILY

    Product Core

    Pins

    Flas

    h(1)

    Dat

    a R

    AM

    12-A

    DC

    Mod

    ules

    (2)

    AD

    C C

    hann

    els

    Tim

    ers

    SCC

    P

    CA

    N F

    D

    SEN

    T

    UA

    RT

    SPI/I

    2 S

    I2C

    QEI

    dsPIC33CH64MP502Master

    2864K 16K 1 12 1 8 1 2 2 2 2 1 4

    Slave 24K 4K 3 11 1 4 — — 1 1 1 1 4

    dsPIC33CH128MP502Master

    28128K 16K 1 12 1 8 1 2 2 2 2 1 4

    Slave 24K 4K 3 11 1 4 — — 1 1 1 1 4

    dsPIC33CH64MP503Master

    3664K 16K 1 15 1 8 1 2 2 2 2 1 4

    Slave 24K 4K 3 15 1 4 — — 1 1 1 1 4

    dsPIC33CH128MP503Master

    36128K 16K 1 15 1 8 1 2 2 2 2 1 4

    Slave 24K 4K 3 16 1 4 — — 1 1 1 1 4

    dsPIC33CH64MP505Master

    4864K 16K 1 16 1 8 1 2 2 2 2 1 4

    Slave 24K 4K 3 16 1 4 — — 1 1 1 1 4

    dsPIC33CH128MP505Master

    48128K 16K 1 16 1 8 1 2 2 2 2 1 4

    Slave 24K 4K 3 16 1 4 — — 1 1 1 1 4

    dsPIC33CH64MP506Master

    6464K 16K 1 16 1 8 1 2 2 2 2 1 4

    Slave 24K 4K 3 18 1 4 — — 1 1 1 1 4

    dsPIC33CH128MP506Master

    64128K 16K 1 16 1 8 1 2 2 2 2 1 4

    Slave 24K 4K 3 18 1 4 — — 1 1 1 1 4

    dsPIC33CH64MP508Master

    8064K 16K 1 16 1 8 1 2 2 2 2 1 4

    Slave 24K 4K 3 18 1 4 — — 1 1 1 1 4

    dsPIC33CH128MP508Master

    80128K 16K 1 16 1 8 1 2 2 2 2 1 4

    Slave 24K 4K 3 18 1 4 — — 1 1 1 1 4Note 1: For the Slave core, the implemented program memory of 24K is PRAM.

    2: Number of ADC modules implemented in the Master and Slave cores.

  • 2017-2019 M

    icrochip Technology Inc.D

    S70005319D

    -page 5

    dsPIC33C

    H128M

    P508 FAM

    ILY

    TA

    PTG

    CR

    C

    PWM

    (Hig

    h R

    esol

    utio

    n)

    Ana

    log

    Com

    para

    tors

    PGA

    Cur

    rent

    Bia

    s So

    urce

    REF

    O

    ds1 1 4 1 — 1 1— — 8 3 3 — 1

    ds1 1 4 1 — 1 1— — 8 3 3 — 1

    ds1 1 4 1 — 1 1— — 8 3 3 — 1

    ds1 1 4 1 — 1 1— — 8 3 3 — 1

    ds1 1 4 1 — 1 1— — 8 3 3 — 1

    ds1 1 4 1 — 1 1— — 8 3 3 — 1

    ds1 1 4 1 — 1 1— — 8 3 3 — 1

    ds1 1 4 1 — 1 1— — 8 3 3 — 1

    ds1 1 4 1 — 1 1— — 8 3 3 — 1

    ds1 1 4 1 — 1 1— — 8 3 3 — 1

    No

    BLE 3: dsPIC33CHXXXMP20X FAMILY WITH NO CAN FD

    Product Core

    Pins

    Flas

    h(1)

    Dat

    a R

    AM

    AD

    C M

    odul

    es(2

    )

    AD

    C C

    hann

    els

    Tim

    ers

    SCC

    P

    CA

    N F

    D

    SEN

    T

    UA

    RT

    SPI/I

    2 S

    I2C

    QEI

    CLC

    PIC33CH64MP202Master

    2864K 16K 1 12 1 8 — 2 2 2 2 1 4

    Slave 24K 4K 3 11 1 4 — — 1 1 1 1 4

    PIC33CH128MP202Master

    28128K 16K 1 12 1 8 — 2 2 2 2 1 4

    Slave 24K 4K 3 11 1 4 — — 1 1 1 1 4

    PIC33CH64MP203Master

    3664K 16K 1 15 1 8 — 2 2 2 2 1 4

    Slave 24K 4K 3 15 1 4 — — 1 1 1 1 4

    PIC33CH128MP203Master

    36128K 16K 1 15 1 8 — 2 2 2 2 1 4

    Slave 24K 4K 3 16 1 4 — — 1 1 1 1 4

    PIC33CH64MP205Master

    4864K 16K 1 16 1 8 — 2 2 2 2 1 4

    Slave 24K 4K 3 16 1 4 — — 1 1 1 1 4

    PIC33CH128MP205Master

    48128K 16K 1 16 1 8 — 2 2 2 2 1 4

    Slave 24K 4K 3 16 1 4 — — 1 1 1 1 4

    PIC33CH64MP206Master

    6464K 16K 1 16 1 8 — 2 2 2 2 1 4

    Slave 24K 4K 3 18 1 4 — — 1 1 1 1 4

    PIC33CH128MP206Master

    64128K 16K 1 16 1 8 — 2 2 2 2 1 4

    Slave 24K 4K 3 18 1 4 — — 1 1 1 1 4

    PIC33CH64MP208Master

    8064K 16K 1 16 1 8 — 2 2 2 2 1 4

    Slave 24K 4K 3 18 1 4 — — 1 1 1 1 4

    PIC33CH128MP208Master

    80128K 16K 1 16 1 8 — 2 2 2 2 1 4

    Slave 24K 4K 3 18 1 4 — — 1 1 1 1 4te 1: For the Slave core, the implemented program memory of 24K is PRAM.

    2: Number of ADC modules implemented in the Master and Slave cores.

  • dsPIC33CH128MP508 FAMILY

    Pin Diagrams

    28-Pin SSOP(1)RA1

    VSS

    RB4

    RA2RA3

    RA0MCLR

    RA4

    RB6

    RB3RB2

    VSSRB1RB0 VDD

    RB7

    RB9RB8

    VDDAVSSAVDD

    1234567891011121314

    2827262524232221201918171615

    RB15RB14RB13RB12

    RB10RB11

    RB5

    dsPI

    C33

    CH

    XXXM

    P202

    dsPI

    C33

    CH

    XXXM

    P502

    Note 1: Shaded pins are up to 5.5 VDC tolerant (refer to Table 3-29). For the list of analog ports, refer to Table 3-28 and Table 4-25.

    TABLE 4: 28-PIN SSOPPin # Master Core Slave Core

    1 AN1/RA1 S1AN15/S1RA12 AN2/RA2 S1AN16/S1RA23 AN3/IBIAS0/RA3 S1AN0/S1CMP1A/S1PGA1P1/S1RA34 AN4/IBIAS1/RA4 S1MCLR3/S1AN1/S1CMP2A/S1PGA2P1/S1PGA3P2/S1RA45 AVDD AVDD6 AVSS AVSS7 VDD VDD8 VSS VSS9 OSCI/CLKI/AN5/RP32/RB0 S1AN5/S1RP32/S1RB010 OSCO/CLKO/AN6/IBIAS2/RP33/RB1(2) S1AN4/S1RP33/S1RB1(2)

    11 DACOUT1/AN7/CMP1D/RP34/INT0/RB2 S1MCLR2/S1AN3/S1ANC0/S1ANC1/S1CMP1D/S1CMP2D/S1CMP3D/S1RP34/S1INT0/S1RB2

    12 PGD2/AN8/RP35/RB3 S1PGD2/S1AN18/S1CMP3A/S1PGA3P1/S1RP35/S1RB313 PGC2/RP36/RB4 S1PGC2/S1AN9/S1RP36/S1PWM5L/S1RB414 PGD3/RP37/SDA2/RB5 S1PGD3/S1RP37/S1RB515 PGC3/RP38/SCL2/RB6 S1PGC3/S1RP38/S1RB616 TDO/AN9/RP39/RB7 S1MCLR1/S1AN6/S1RP39/S1PWM5H/S1RB717 PGD1/AN10/RP40/SCL1/RB8 S1PGD1/S1AN7/S1RP40/S1SCL1/S1RB818 PGC1/AN11/RP41/SDA1/RB9 S1PGC1/S1RP41/S1SDA1/S1RB919 VSS VSS20 VDD VDD21 TMS/RP42/PWM3H/RB10(1) S1RP42/S1PWM3H/S1RB10(1)

    22 TCK/RP43/PWM3L/RB11 S1RP43/S1PWM8H/S1PWM3L/S1RB1123 TDI/RP44/PWM2H/RB12 S1RP44/S1PWM2H/S1RB1224 RP45/PWM2L/RB13 S1RP45/S1PWM7H/S1PWM2L/S1RB1325 RP46/PWM1H/RB14 S1RP46/S1PWM1H/S1RB1426 RP47/PWM1L/RB15 S1RP47/S1PWM6H/S1PWM1L/S1RB1527 MCLR —28 AN0/CMP1A/RA0 S1RA0

    Legend: RPn represents remappable peripheral functions.Note 1: A pull-up resistor is connected to this pin during programming.

    2: This pin is toggled during programming.

    DS70005319D-page 6 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    Pin Diagrams (Continued)

    TABLE 5: 28-PIN UQFNPin # Master Core Slave Core

    1 RP46/PWM1H/RB14 S1RP46/S1PWM1H/S1RB142 RP47/PWM1L/RB15 S1RP47/S1PWM6H/S1PWM1L/S1RB153 MCLR —4 AN0/CMP1A/RA0 S1RA05 AN1/RA1 S1AN15/S1RA16 AN2/RA2 S1AN16/S1RA27 AN3/IBIAS0/RA3 S1AN0/S1CMP1A/S1PGA1P1/S1RA38 AN4/IBIAS1/RA4 S1MCLR3/S1AN1/S1CMP2A/S1PGA2P1/S1PGA3P2/S1RA49 AVDD AVDD10 AVSS AVSS11 VDD VDD12 VSS VSS13 OSCI/CLKI/AN5/RP32/RB0 S1AN5/S1RP32/S1RB014 OSCO/CLKO/AN6/IBIAS2/RP33/RB1(2) S1AN4/S1RP33/S1RB1(2)

    15 DACOUT1/AN7/CMP1D/RP34/INT0/RB2 S1MCLR2/S1AN3/S1ANC0/S1ANC1/S1CMP1D/S1CMP2D/S1CMP3D/S1RP34/S1INT0/S1RB216 PGD2/AN8/RP35/RB3 S1PGD2/S1AN18/S1CMP3A/S1PGA3P1/S1RP35/S1RB317 PGC2/RP36/RB4 S1PGC2/S1AN9/S1RP36/S1PWM5L/S1RB418 PGD3/RP37/SDA2/RB5 S1PGD3/S1RP37/S1RB519 PGC3/RP38/SCL2/RB6 S1PGC3/S1RP38/S1RB620 TDO/AN9/RP39/RB7 S1MCLR1/S1AN6/S1RP39/S1PWM5H/S1RB721 PGD1/AN10/RP40/SCL1/RB8 S1PGD1/S1AN7/S1RP40/S1SCL1/S1RB822 PGC1/AN11/RP41/SDA1/RB9 S1PGC1/S1RP41/S1SDA1/S1RB923 VSS VSS24 VDD VDD25 TMS/RP42/PWM3H/RB10(1) S1RP42/S1PWM3H/S1RB10(1)

    26 TCK/RP43/PWM3L/RB11 S1RP43/S1PWM8H/S1PWM3L/S1RB1127 TDI/RP44/PWM2H/RB12 S1RP44/S1PWM2H/S1RB1228 RP45/PWM2L/RB13 S1RP45/S1PWM7H/S1PWM2L/S1RB13

    Legend: RPn represents remappable peripheral functions.Note 1: A pull-up resistor is connected to this pin during programming.

    2: This pin is toggled during programming.

    28 27 26 25 24 23 22

    8 9 10 11 12 13 14

    3

    18171615

    45

    7

    12 20

    19

    6

    21

    AVD

    D

    MCLRRA0RA1RA2

    RA3

    RB8RB7RB6RB5RB4RB3RB2

    RB14

    RB15

    dsPIC33CHXXXMP502dsPIC33CHXXXMP202

    RA

    4

    AVSS

    VDD

    VSS

    RB

    0R

    B1

    RB

    9VS

    S

    VDD

    RB

    10R

    B11

    RB1

    2R

    B1328-Pin UQFN(1,2)

    Note 1: Shaded pins are up to 5.5 VDC tolerant (refer to Table 3-29). For the list of analog ports, refer to Table 3-28 and Table 4-25.

    2: The large center pad on the bottom of the package may be left floating or connected to VSS. The four-corner anchor pads are internally connected to the large bottom pad, and therefore, must be connected to the same net as the large center pad.

    2017-2019 Microchip Technology Inc. DS70005319D-page 7

  • dsPIC33CH128MP508 FAMILY

    Pin Diagrams (Continued)

    36 35 34 33 32 31 30

    10 11 12 13 14 15 16

    3

    22

    21

    20

    19

    4

    5

    7

    1

    2

    24

    23

    6

    25

    8

    917 18

    26

    272829

    dsPIC33CHXXXMP503dsPIC33CHXXXMP203

    RB14RB15

    MCLRRC0RA0RA1RA2

    RA3RA4

    AVD

    D

    AVS

    S

    RC

    1R

    C2

    VD

    D

    VS

    S

    RC

    3R

    B0

    RB2RB3RB4

    VSSVDDRB5RB6RB7RB8

    RB

    9R

    C4

    RC

    5V

    SS

    VD

    D

    RB

    10R

    B11

    RB

    12R

    B13

    RB

    1

    36-Pin UQFN(1,2)

    Note 1: Shaded pins are up to 5.5 VDC tolerant (refer to Table 3-29). For the list of analog ports, refer to Table 3-28 and Table 4-25.

    2: The large center pad on the bottom of the package may be left floating or connected to VSS. The four-corner anchor pads are internally connected to the large bottom pad, and therefore, must be connected to the same net as the large center pad.

    DS70005319D-page 8 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    TABLE 6: 36-PIN UQFNPin # Master Core Slave Core

    1 RP46/PWM1H/RB14 S1RP46/S1PWM1H/S1RB142 RP47/PWM1L/RB15 S1RP47/S1PWM6H/S1PWM1L/S1RB15

    3 MCLR —

    4 AN12/IBIAS3/RP48/RC0 S1AN10/S1RP48/S1RC05 AN0/CMP1A/RA0 S1RA0

    6 AN1/RA1 S1AN15/S1RA1

    7 AN2/RA2 S1AN16/S1RA2

    8 AN3/IBIAS0/RA3 S1AN0/S1CMP1A/S1PGA1P1/S1RA3

    9 AN4/IBIAS1/RA4 S1MCLR3/S1AN1/S1CMP2A/S1PGA2P1/S1PGA3P2/S1RA4

    10 AVDD AVDD

    11 AVSS AVSS

    12 AN13/ISRC0/RP49/RC1 S1ANA1/S1RP49/S1RC113 AN14/ISRC1/RP50/RC2 S1ANA0/S1RP50/S1RC214 VDD VDD

    15 VSS VSS

    16 CMP1B/RP51/RC3 S1AN8/S1CMP3B/S1RP51/S1RC317 OSCI/CLKI/AN5/RP32/RB0 S1AN5/S1RP32/S1RB018 OSCO/CLKO/AN6/IBIAS2/RP33/RB1(2) S1AN4/S1RP33/S1RB1(2)

    19 DACOUT1/AN7/CMP1D/RP34/INT0/RB2 S1MCLR2/S1AN3/S1ANC0/S1ANC1/S1CMP1D/S1CMP2D/S1CMP3D/S1RP34/S1INT0/S1RB2

    20 PGD2/AN8/RP35/RB3 S1PGD2/S1AN18/S1CMP3A/S1PGA3P1/S1RP35/S1RB321 PGC2/RP36/RB4 S1PGC2/S1AN9/S1RP36/S1PWM5L/S1RB422 VSS VSS

    23 VDD VDD

    24 PGD3/RP37/SDA2/RB5 S1PGD3/S1RP37/S1RB525 PGC3/RP38/SCL2/RB6 S1PGC3/S1RP38/S1RB6

    26 TDO/AN9/RP39/RB7 S1MCLR1/S1AN6/S1RP39/S1PWM5H/S1RB727 PGD1/AN10/RP40/SCL1/RB8 S1PGD1/S1AN7/S1RP40/S1SCL1/S1RB828 PGC1/AN11/RP41/SDA1/RB9 S1PGC1/S1RP41/S1SDA1/S1RB929 RP52/RC4 S1RP52/S1PWM2H/S1RC430 RP53/RC5 S1RP53/S1PWM2L/S1RC531 VSS VSS

    32 VDD VDD

    33 TMS/RP42/PWM3H/RB10(1) S1RP42/S1PWM3H/S1RB10(1)

    34 TCK/RP43/PWM3L/RB11 S1RP43/S1PWM8H/S1PWM3L/S1RB1135 TDI/RP44/PWM2H/RB12 S1RP44/S1PWM7L/S1RB1236 RP45/PWM2L/RB13 S1RP45/S1PWM7H/S1RB13

    Legend: RPn represents remappable peripheral functions.Note 1: A pull-up resistor is connected to this pin during programming.

    2: This pin is toggled during programming.

    2017-2019 Microchip Technology Inc. DS70005319D-page 9

  • dsPIC33CH128MP508 FAMILY

    Pin Diagrams (Continued)

    46 45 44 43 42 41 40 39 38

    13 14 15 16 17 18 19 20 21 22

    3

    32

    31

    30

    29

    28

    27

    26

    25

    4

    5

    7

    8

    9

    10

    11

    1

    2

    34

    33

    6

    23

    35

    3747

    1224

    36

    48

    MCLR

    dsPIC33CHXXXMP505dsPIC33CHXXXMP205

    RB14

    RB15RC12RC13

    RD13RC0

    RA0RA1RA2RA3

    RA4

    AVD

    D

    AVS

    S

    RC

    1R

    C2

    RC

    6V

    DD

    VS

    S

    RC

    3R

    B0

    RB

    1R

    D10

    RC

    7

    RB2RB3RB4RC8RC9RD8VSSVDDRB5RB6RB7

    RB8

    RB9

    RC

    4R

    C5

    RC

    10R

    C11

    V SS

    VDD

    RD

    1R

    B10

    RB1

    1R

    B12

    RB1

    3

    48-Pin TQFP/UQFN(1,2)

    Note 1: Shaded pins are up to 5.5 VDC tolerant (refer to Table 3-29). For the list of analog ports, refer to Table 3-28 and Table 4-25.

    2: The large center pad on the bottom of the package may be left floating or connected to VSS. The four-corner anchor pads are internally connected to the large bottom pad, and therefore, must be connected to the same net as the large center pad.

    DS70005319D-page 10 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    TABLE 7: 48-PIN TQFP/UQFNPin # Master Core Slave Core

    1 RP46/PWM1H/RB14 S1RP46/S1PWM6L/S1RB142 RP47/PWM1L/RB15 S1RP47/S1PWM6H/S1RB153 RP60/RC12 S1RP60/S1PWM3H/S1RC124 RP61/RC13 S1RP61/S1PWM3L/S1RC13

    5 MCLR —

    6 RD13 S1ANN0/S1PGA1N2/S1RD13

    7 AN12/IBIAS3/RP48/RC0 S1AN10/S1RP48/S1RC08 AN0/CMP1A/RA0 S1RA0

    9 AN1/RA1 S1AN15/S1RA1

    10 AN2/RA2 S1AN16/S1RA2

    11 AN3/IBIAS0/RA3 S1AN0/S1CMP1A/S1PGA1P1/S1RA3

    12 AN4/IBIAS1/RA4 S1MCLR3/S1AN1/S1CMP2A/S1PGA2P1/S1PGA3P2/S1RA4

    13 AVDD AVDD

    14 AVSS AVSS

    15 AN13/ISRC0/RP49/RC1 S1ANA1/S1RP49/S1RC116 AN14/ISRC1/RP50/RC2 S1ANA0/S1RP50/S1RC217 RP54/RC6 S1AN11/S1CMP1B/S1RP54/S1RC618 VDD VDD

    19 VSS VSS

    20 CMP1B/RP51/RC3 S1AN8/S1CMP3B/S1RP51/S1RC321 OSCI/CLKI/AN5/RP32/RB0 S1AN5/S1RP32/S1RB022 OSCO/CLKO/AN6/IBIAS2/RP33/RB1(2) S1AN4/S1RP33/S1RB1(2)

    23 ISRC3/RD10 S1AN13/S1CMP2B/S1RD10

    24 AN15/ISRC2/RP55/RC7 S1AN12/S1RP55/S1RC7

    25 DACOUT1/AN7/CMP1D/RP34/INT0/RB2 S1MCLR2/S1AN3/S1ANC0/S1ANC1/S1CMP1D/S1CMP2D/S1CMP3D/S1RP34/S1INT0/S1RB2

    26 PGD2/AN8/RP35/RB3 S1PGD2/S1AN18/S1CMP3A/S1PGA3P1/S1RP35/S1RB327 PGC2/RP36/RB4 S1PGC2/S1AN9/S1RP36/S1PWM5L/S1RB428 RP56/ASDA1/SCK2/RC8 S1RP56/S1ASDA1/S1SCK1/S1RC829 RP57/ASCL1/SDI2/RC9 S1RP57/S1ASCL1/S1SDI1/S1RC930 SDO2/PCI19/RD8 S1SDO1/S1PCI19/S1RD8

    31 VSS VSS

    32 VDD VDD

    33 PGD3/RP37/SDA2/RB5 S1PGD3/S1RP37/S1RB534 PGC3/RP38/SCL2/RB6 S1PGC3/S1RP38/S1RB6

    35 TDO/AN9/RP39/RB7 S1MCLR1/S1AN6/S1RP39/S1PWM5H/S1RB736 PGD1/AN10/RP40/SCL1/RB8 S1PGD1/S1AN7/S1RP40/S1SCL1/S1RB837 PGC1/AN11/RP41/SDA1/RB9 S1PGC1/S1RP41/S1SDA1/S1RB938 RP52/RC4 S1RP52/S1PWM2H/S1RC439 RP53/RC5 S1RP53/S1PWM2L/S1RC540 RP58/RC10 S1RP58/S1PWM1H/S1RC1041 RP59/RC11 S1RP59/S1PWM1L/S1RC1142 VSS VSS

    43 VDD VDD

    44 RP65/RD1 S1RP65/S1PWM4H/S1RD145 TMS/RP42/PWM3H/RB10(1) S1RP42/S1PWM8L/S1RB10(1)

    46 TCK/RP43/PWM3L/RB11 S1RP43/S1PWM8H/S1RB1147 TDI/RP44/PWM2H/RB12 S1RP44/S1PWM7L/S1RB1248 RP45/PWM2L/RB13 S1RP45/S1PWM7H/S1RB13

    Legend: RPn represents remappable peripheral functions.Note 1: A pull-up resistor is connected to this pin during programming.

    2: This pin is toggled during programming.

    2017-2019 Microchip Technology Inc. DS70005319D-page 11

  • dsPIC33CH128MP508 FAMILY

    Pin Diagrams (Continued)

    RB14RB15RC12RC13

    MCLR

    RC0RA0RA1RA2

    RC14RC15

    RD15VSSVDD

    RD14RD13

    64-Pin TQFP/QFN(1,2)

    2345678910111213141516

    4847

    22

    44

    24 25 26 27 28 29 30 31 32

    1

    4645

    23

    4342414039

    63 62 61 5960 58 57 56 5455 53 52 51 4950

    3837

    34

    3635

    33

    17 19 20 211864

    RA

    4A

    VD

    DA

    VS

    S

    RC

    1R

    D12

    RA

    3

    RC

    2R

    C6

    VD

    DV

    SS

    RC

    3R

    B0

    RB

    1R

    D11

    RD

    10R

    C7

    RB2RB3RB4RC8RC9RD9RD8VssVDDRD7RD6RD5RB5RB6RB7RB8

    RB

    9R

    C4

    RC

    5R

    C10

    RC

    11R

    D4

    RD

    3V

    SS

    VD

    DR

    D2

    RD

    1R

    D0

    RB

    10R

    B11

    RB

    12R

    B13

    dsPIC33CHXXXMP506dsPIC33CHXXXMP206

    Note 1: Shaded pins are up to 5.5 VDC tolerant (refer to Table 3-29). For the list of analog ports, refer to Table 3-28 and Table 4-25.

    2: The large center pad on the bottom of the package may be left floating or connected to VSS. The four-corner anchor pads are internally connected to the large bottom pad, and therefore, must be connected to the same net as the large center pad.

    DS70005319D-page 12 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    TABLE 8: 64-PIN TQFP/QFNPin # Master Core Slave Core

    1 RP46/PWM1H/RB14 S1RP46/S1RB142 RP47/PWM1L/RB15 S1RP47/S1RB153 RP60/PWM4H/RC12 S1RP60/S1RC124 RP61/PWM4L/RC13 S1RP61/S1RC135 RP62/RC14 S1RP62/S1PWM7H/S1RC146 RP63/RC15 S1RP63/S1PWM7L/S1RC157 MCLR —8 PCI22/RD15 S1PCI22/S1RD159 VSS VSS10 VDD VDD11 PCI21/RD14 S1ANN1/S1PGA2N2/S1PCI21/S1RD1412 RD13 S1ANN0/S1PGA1N2/S1RD1313 AN12/IBIAS3/RP48/RC0 S1AN10/S1RP48/S1RC014 AN0/CMP1A/RA0 S1RA015 AN1/RA1 S1AN15/S1RA116 AN2/RA2 S1AN16/S1RA217 AN3/IBIAS0/RA3 S1AN0/S1CMP1A/S1PGA1P1/S1RA3

    18 AN4/IBIAS1/RA4 S1MCLR3/S1AN1/S1CMP2A/S1PGA2P1/S1PGA3P2/S1RA419 AVDD AVDD20 AVSS AVSS21 RD12 S1AN14/S1PGA2P2/S1RD1222 AN13/ISRC0/RP49/RC1 S1ANA1/S1RP49/S1RC123 AN14/ISRC1/RP50/RC2 S1ANA0/S1RP50/S1RC224 RP54/RC6 S1AN11/S1CMP1B/S1RP54/S1RC625 VDD VDD26 VSS VSS27 CMP1B/RP51/RC3 S1AN8/S1CMP3B/S1RP51/S1RC328 OSCI/CLKI/AN5/RP32/RB0 S1AN5/S1RP32/S1RB029 OSCO/CLKO/AN6/IBIAS2/RP33/RB1(2) S1AN4/S1RP33/S1RB1(2)

    30 RD11 S1AN17/S1PGA1P2/S1RD1131 ISRC3/RD10 S1AN13/S1CMP2B/S1RD1032 AN15/ISRC2/RP55/RC7 S1AN12/S1RP55/S1RC733 DACOUT1/AN7/CMP1D/RP34/INT0/RB2 S1MCLR2/S1AN3/S1ANC0/S1ANC1/S1CMP1D/S1CMP2D/S1CMP3D/S1RP34/

    S1INT0/S1RB234 PGD2/AN8/RP35/RB3 S1PGD2/S1AN18/S1CMP3A/S1PGA3P1/S1RP35/S1RB335 PGC2/RP36/RB4 S1PGC2/S1AN9/S1RP36/S1PWM5L/S1RB436 RP56/ASDA1/SCK2/RC8 S1RP56/S1ASDA1/S1SCK1/S1RC837 RP57/ASCL1/SDI2/RC9 S1RP57/S1ASCL1/S1SDI1/S1RC938 PCI20/RD9 S1PCI20/S1RD939 SDO2/PCI19/RD8 S1SDO1/S1PCI19/S1RD840 VSS VSS41 VDD VDD42 RP71/RD7 S1RP71/S1PWM8H/S1RD743 RP70/RD6 S1RP70/S1PWM6H/S1RD644 RP69/RD5 S1RP69/S1PWM6L/S1RD545 PGD3/RP37/SDA2/RB5 S1PGD3/S1RP37/S1RB546 PGC3/RP38/SCL2/RB6 S1PGC3/S1RP38/S1RB647 TDO/AN9/RP39/RB7 S1MCLR1/S1AN6/S1RP39/S1PWM5H/S1RB748 PGD1/AN10/RP40/SCL1/RB8 S1PGD1/S1AN7/S1RP40/S1SCL1/S1RB849 PGC1/AN11/RP41/SDA1/RB9 S1PGC1/S1RP41/S1SDA1/S1RB950 RP52/RC4 S1RP52/S1PWM2H/S1RC4

    Legend: RPn represent remappable peripheral functions.Note 1: A pull-up resistor is connected to this pin during programming.

    2: This pin is toggled during programming.

    2017-2019 Microchip Technology Inc. DS70005319D-page 13

  • dsPIC33CH128MP508 FAMILY

    51 RP53/RC5 S1RP53/S1PWM2L/S1RC552 RP58/RC10 S1RP58/S1PWM1H/S1RC1053 RP59/RC11 S1RP59/S1PWM1L/S1RC1154 RP68/RD4 S1RP68/S1PWM3H/S1RD455 RP67/RD3 S1RP67/S1PWM3L/S1RD356 VSS VSS57 VDD VDD58 RP66/RD2 S1RP66/S1PWM8L/S1RD259 RP65/RD1 S1RP65/S1PWM4H/S1RD160 RP64/RD0 S1RP64/S1PWM4L/S1RD061 TMS/RP42/PWM3H/RB10(1) S1RP42/S1RB10(1)

    62 TCK/RP43/PWM3L/RB11 S1RP43/S1RB1163 TDI/RP44/PWM2H/RB12 S1RP44/S1RB1264 RP45/PWM2L/RB13 S1RP45/S1RB13

    TABLE 8: 64-PIN TQFP/QFN (CONTINUED)Pin # Master Core Slave Core

    Legend: RPn represent remappable peripheral functions.Note 1: A pull-up resistor is connected to this pin during programming.

    2: This pin is toggled during programming.

    DS70005319D-page 14 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    Pin Diagrams (Continued)

    80-Pin TQFP(1)

    80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65

    1 602 593 584 575 566 557 548 539 5210 5111 5012 4913 4814 4715 4616 45

    21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

    17181920

    37 38 39 40

    44434241

    64 63 62 61

    dsPIC33CHXXXMP508dsPIC33CHXXXMP208

    RB14RE0

    RB15RE1

    RC12RC13RC14RC15MCLR

    RA2RE3RA1RE2

    RD15VSS

    RA0RC0

    RD13RD14

    VDD

    RA3

    RE4

    RA4

    RE5

    AVD

    DAV

    SS

    RD

    12R

    C1

    RC

    2R

    C6

    VD

    DVS

    SR

    C3

    RB0

    RB1

    RD

    11R

    E6R

    D10

    RE7

    RC

    7

    RB2RE8RB3RE9RB4RC8RC9RD9RD8VSSVDDRD7RD6RD5RB5RB6RE10RB7RE11RB8

    RB

    9R

    E12

    RC

    4R

    E13

    RC

    5R

    C10

    RC

    11R

    D4

    RD

    3V

    SSV

    DD

    RD

    2R

    D1

    RD

    0R

    B10

    RB

    11R

    E14

    RB

    12R

    E15

    RB

    13

    Note 1: Shaded pins are up to 5.5 VDC tolerant (refer to Table 3-29). For the list of analog ports, refer to Table 3-28 and Table 4-25.

    2017-2019 Microchip Technology Inc. DS70005319D-page 15

  • dsPIC33CH128MP508 FAMILY

    TABLE 9: 80-PIN TQFPPin # Master Core Slave Core

    1 RP46/PWM1H/RB14 S1RP46/S1RB142 RE0 S1RE0

    3 RP47/PWM1L/RB15 S1RP47/S1RB154 RE1 S1RE1

    5 RP60/PWM4H/RC12 S1RP60/S1RC126 RP61/PWM4L/RC13 S1RP61/S1RC137 RP62/RC14 S1RP62/S1PWM7H/S1RC148 RP63/RC15 S1RP63/S1PWM7L/S1RC15

    9 MCLR —

    10 PCI22/RD15 S1PCI22/S1RD15

    11 VSS VSS

    12 VDD VDD

    13 PCI21/RD14 S1ANN1/S1PGA2N2/S1PCI21/S1RD14

    14 RD13 S1ANN0/S1PGA1N2/S1RD13

    15 AN12/IBIAS3/RP48/RC0 S1AN10/S1RP48/S1RC016 AN0/CMP1A/RA0 S1RA0

    17 RE2 S1RE2

    18 AN1/RA1 S1AN15/S1RA1

    19 RE3 S1RE3

    20 AN2/RA2 S1AN16/S1RA2

    21 AN3/IBIAS0/RA3 S1AN0/S1CMP1A/S1PGA1P1/S1RA3

    22 RE4 S1RE4

    23 AN4/IBIAS1/RA4 S1MCLR3/S1AN1/S1CMP2A/S1PGA2P1/S1PGA3P2/S1RA4

    24 RE5 S1RE5

    25 AVDD AVDD

    26 AVSS AVSS

    27 RD12 S1AN14/S1PGA2P2/S1RD12

    28 AN13/ISRC0/RP49/RC1 S1ANA1/S1RP49/S1RC129 AN14/ISRC1/RP50/RC2 S1ANA0/S1RP50/S1RC230 RP54/RC6 S1AN11/S1CMP1B/S1RP54/S1RC631 VDD VDD

    32 VSS VSS

    33 CMP1B/RP51/RC3 S1AN8/S1CMP3B/S1RP51/S1RC334 OSCI/CLKI/AN5/RP32/RB0 S1AN5/S1RP32/S1RB035 OSCO/CLKO/AN6/IBIAS2/RP33/RB1(2) S1AN4/S1RP33/S1RB1(2)

    36 RD11 S1AN17/S1PGA1P2/S1RD11

    37 RE6 S1PGA3N2/S1RE6

    38 ISRC3/RD10 S1AN13/S1CMP2B/S1RD10

    39 RE7 S1RE7

    40 AN15/ISRC2/RP55/RC7 S1AN12/S1RP55/S1RC7

    41 DACOUT1/AN7/CMP1D/RP34/INT0/RB2 S1MCLR2/S1AN3/S1ANC0/S1ANC1/S1CMP1D/S1CMP2D/S1CMP3D/S1RP34/S1INT0/S1RB2

    42 RE8 S1RE8

    43 PGD2/AN8/RP35/RB3 S1PGD2/S1AN18/S1CMP3A/S1PGA3P1/S1RP35/S1RB344 RE9 S1RE9

    45 PGC2/RP36/RB4 S1PGC2/S1AN9/S1RP36/S1PWM5L/S1RB446 RP56/ASDA1/SCK2/RC8 S1RP56/S1ASDA1/S1SCK1/S1RC847 RP57/ASCL1/SDI2/RC9 S1RP57/S1ASCL1/S1SDI1/S1RC948 PCI20/RD9 S1PCI20/S1RD9

    Legend: RPn represent remappable peripheral functions.Note 1: A pull-up resistor is connected to this pin during programming.

    2: This pin is toggled during programming.

    DS70005319D-page 16 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    49 SDO2/PCI19/RD8 S1SDO1/S1PCI19/S1RD8

    50 VSS VSS

    51 VDD VDD

    52 RP71/RD7 S1RP71/S1PWM8H/S1RD753 RP70/RD6 S1RP70/S1PWM6H/S1RD654 RP69/RD5 S1RP69/S1PWM6L/S1RD555 PGD3/RP37/SDA2/RB5 S1PGD3/S1RP37/S1RB556 PGC3/RP38/SCL2/RB6 S1PGC3/S1RP38/S1RB657 RE10 S1RE10

    58 TDO/AN9/RP39/RB7 S1MCLR1/S1AN6/S1RP39/S1PWM5H/S1RB759 RE11 S1RE11

    60 PGD1/AN10/RP40/SCL1/RB8 S1PGD1/S1AN7/S1RP40/S1SCL1/S1RB861 PGC1/AN11/RP41/SDA1/RB9 S1PGC1/S1RP41/S1SDA1/S1RB962 ASCL2/RE12 S1RE12

    63 RP52/RC4 S1RP52/S1PWM2H/S1RC464 ASDA2/RE13 S1RE13

    65 RP53/RC5 S1RP53/S1PWM2L/S1RC566 RP58/RC10 S1RP58/S1PWM1H/S1RC1067 RP59/RC11 S1RP59/S1PWM1L/S1RC1168 RP68/RD4 S1RP68/S1PWM3H/S1RD469 RP67/RD3 S1RP67/S1PWM3L/S1RD370 VSS VSS

    71 VDD VDD

    72 RP66/RD2 S1RP66/S1PWM8L/S1RD273 RP65/RD1 S1RP65/S1PWM4H/S1RD174 RP64/RD0 S1RP64/S1PWM4L/S1RD075 TMS/RP42/PWM3H/RB10(1) S1RP42/S1RB10(1)

    76 TCK/RP43/PWM3L/RB11 S1RP43/S1RB1177 RE14 S1RE14

    78 TDI/RP44/PWM2H/RB12 S1RP44/S1RB1279 RE15 S1RE15

    80 RP45/PWM2L/RB13 S1RP45/S1RB13

    TABLE 9: 80-PIN TQFP (CONTINUED)Pin # Master Core Slave Core

    Legend: RPn represent remappable peripheral functions.Note 1: A pull-up resistor is connected to this pin during programming.

    2: This pin is toggled during programming.

    2017-2019 Microchip Technology Inc. DS70005319D-page 17

  • dsPIC33CH128MP508 FAMILY

    Table of Contents1.0 Device Overview ........................................................................................................................................................................ 212.0 Guidelines for Getting Started with 16-Bit Digital Signal Controllers.......................................................................................... 293.0 Master Modules.......................................................................................................................................................................... 354.0 Slave Modules.......................................................................................................................................................................... 2595.0 Master Slave Interface (MSI).................................................................................................................................................... 4156.0 Oscillator with High-Frequency PLL ......................................................................................................................................... 4297.0 Power-Saving Features (Master and Slave) ............................................................................................................................ 4718.0 Direct Memory Access (DMA) Controller ................................................................................................................................. 4899.0 High-Resolution PWM (HSPWM) with Fine Edge Placement .................................................................................................. 49910.0 Capture/Compare/PWM/Timer Modules (SCCP)..................................................................................................................... 53311.0 High-Speed Analog Comparator with Slope Compensation DAC............................................................................................ 55112.0 Quadrature Encoder Interface (QEI) (Master/Slave) ................................................................................................................ 56313.0 Universal Asynchronous Receiver Transmitter (UART) ........................................................................................................... 58114.0 Serial Peripheral Interface (SPI)............................................................................................................................................... 60315.0 Inter-Integrated Circuit (I2C) ..................................................................................................................................................... 62116.0 Single-Edge Nibble Transmission (SENT) ............................................................................................................................... 63117.0 Timer1 ...................................................................................................................................................................................... 64118.0 Configurable Logic Cell (CLC).................................................................................................................................................. 64519.0 32-Bit Programmable Cyclic Redundancy Check (CRC) Generator ....................................................................................... 65720.0 Current Bias Generator (CBG) ................................................................................................................................................. 66121.0 Special Features ...................................................................................................................................................................... 66722.0 Instruction Set Summary .......................................................................................................................................................... 71323.0 Development Support............................................................................................................................................................... 72324.0 Electrical Characteristics .......................................................................................................................................................... 72525.0 High-Temperature Electrical Characteristics............................................................................................................................ 76526.0 Packaging Information.............................................................................................................................................................. 779Appendix A: Revision History............................................................................................................................................................. 805Index ................................................................................................................................................................................................. 807The Microchip Website....................................................................................................................................................................... 817Customer Change Notification Service .............................................................................................................................................. 817Customer Support .............................................................................................................................................................................. 817Product Identification System............................................................................................................................................................. 819

    DS70005319D-page 18 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    TO OUR VALUED CUSTOMERSIt is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchipproducts. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined andenhanced as new volumes and updates are introduced. If you have any questions or comments regarding this publication, please contact the Marketing Communications Department viaE-mail at [email protected]. We welcome your feedback.

    Most Current Data SheetTo obtain the most up-to-date version of this data sheet, please register at our Worldwide Website at:

    http://www.microchip.comYou 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., DS30000000A is version A of document DS30000000).

    ErrataAn errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for currentdevices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revisionof 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 Website; 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 areusing.

    Customer Notification SystemRegister on our website at www.microchip.com to receive the most current information on all of our products.

    2017-2019 Microchip Technology Inc. DS70005319D-page 19

    mailto:[email protected]://www.microchip.comhttp://www.microchip.com

  • dsPIC33CH128MP508 FAMILY

    Referenced SourcesThis device data sheet is based on the followingindividual chapters of the “dsPIC33/PIC24 FamilyReference Manual”. These documents should beconsidered as the general reference for the operationof a particular module or device feature.

    • “Introduction” (www.microchip.com/DS70573)• “Enhanced CPU” (www.microchip.com/DS70005158)• “dsPIC33/PIC24 Program Memory” (www.microchip.com/DS70000613)• “Data Memory” (www.microchip.com/DS70595)• “Dual Partition Flash Program Memory” (www.microchip.com/DS70005156)• “Flash Programming” (www.microchip.com/DS70000609)• “Reset” (www.microchip.com/DS70602)• “Interrupts” (www.microchip.com/DS70000600)• “I/O Ports with Edge Detect” (www.microchip.com/DS70005322)• “Deadman Timer” (www.microchip.com/DS70005155)• “CAN Flexible Data-Rate (FD) Protocol Module” (www.microchip.com/DS70005340)• “12-Bit High-Speed, Multiple SARs A/D Converter (ADC)” (www.microchip.com/DS70005213)• “Peripheral Trigger Generator (PTG)” (www.microchip.com/DS70000669)• “Programmable Gain Amplifier (PGA)” (www.microchip.com/DS70005146)• “Master Slave Interface (MSI) Module” (www.microchip.com/DS70005278)• “Watchdog Timer and Power-Saving Modes” (www.microchip.com/DS70615)• “Oscillator Module with High-Speed PLL” (www.microchip.com/DS70005255)• “Timer1 Module” (www.microchip.com/DS70005279)• “Direct Memory Access Controller (DMA)” (www.microchip.com/DS30009742)• “Capture/Compare/PWM/Timer (MCCP and SCCP)” (www.microchip.com/DS30003035)• “High-Resolution PWM with Fine Edge Placement” (www.microchip.com/DS70005320)• “Serial Peripheral Interface (SPI) with Audio Codec Support” (www.microchip.com/DS70005136)• “Inter-Integrated Circuit (I2C)” (www.microchip.com/DS70000195)• “Multiprotocol Universal Asynchronous Receiver Transmitter (UART) Module”

    (www.microchip.com/DS70005288)• “Single-Edge Nibble Transmission (SENT) Module” (www.microchip.com/DS70005145)• “32-Bit Programmable Cyclic Redundancy Check (CRC)” (www.microchip.com/DS30009729)• “Configurable Logic Cell (CLC)” (www.microchip.com/DS70005298)• “Quadrature Encoder Interface (QEI)” (www.microchip.com/DS70000601)• “High-Speed Analog Comparator Module” (www.microchip.com/DS70005280)• “Current Bias Generator (CBG)” (www.microchip.com/DS70005253)• “Dual Watchdog Timer” (www.microchip.com/DS70005250)• “Programming and Diagnostics” (www.microchip.com/DS70608)• “CodeGuard™ Security” (www.microchip.com/DS70005182)

    Note 1: To access the documents listed below,browse to the documentation section of thedsPIC33CH128MP508 product page of theMicrochip website (www.microchip.com) orselect a family reference manual sectionfrom the following list.

    In addition to parameters, features andother documentation, the resulting pageprovides links to the related familyreference manual sections.

    DS70005319D-page 20 2017-2019 Microchip Technology Inc.

    http://ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33-PIC24-FRM-Master-Slave-Interface-MSI-Module-70005278b.pdfhttp://ww1.microchip.com/downloads/en/devicedoc/ds-70595c.pdfhttps://www.microchip.com/DS70005182http://www.microchip.comhttp://www.microchip.comhttp://www.microchip.com/DS70005158http://ww1.microchip.com/downloads/en/DeviceDoc/70005156b.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/70000613e.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/S8.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/70005213f.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/70005146b.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/70000600d.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/70005155a.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33-PIC24-FRM-IO-Ports-with-Edge-Detect-70005322b.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/DS-70669A.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33-PIC24-FRM-CAN-Flexible-Data-Rate-FD-Protocol-Module-70005340a.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/39742B.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/70005298a.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/70000601c.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/70005136a.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/70000195g.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/70005145b.pdfhttp://ww1.microchip.com/downloads/en/devicedoc/s24.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/30009729b.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/33035a.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/S9.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33-PIC24-FRM-Oscillator-Module-with-High-Speed-PLL-70005255b.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33-PIC24-FRM-Timer1-Module-70005279B.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33-PIC24-FRM-High-Resolution-PWM-with-Fine-Edge-Placement-70005320b.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33-PIC24-FRM-Multiprotocol-Universal-Asynchronous-Receiver-Transmitter-UART-Module-70005288b.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33-PIC24-FRM-High-Speed-Analog-Comparator-Module-70005280B.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33-PIC24-FRM-Current-Bias-Generator-CBG-70005253a.pdfhttp://ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33-PIC24-FRM-Dual-Watchdog-Timer-70005250B.pdf

  • dsPIC33CH128MP508 FAMILY

    1.0 DEVICE OVERVIEW

    This document contains device-specific informationfor the dsPIC33CH128MP508 Digital Signal Controller(DSC) and Microcontroller (MCU) devices.

    dsPIC33CH128MP508 devices contain extensiveDigital Signal Processor (DSP) functionality with ahigh-performance, 16-bit MCU architecture.

    Figure 1-2 shows a general block diagram of the coresand peripheral modules of the Master and Slave.Table 1-1 lists the functions of the various pins shownin the pinout diagrams.

    The Master core and Slave core can operateindependently, and can be programmed and debuggedseparately during the application development. Bothprocessor (Master and Slave) subsystems have theirown interrupt controllers, clock generators, ICD, portlogic, I/O MUXes and PPS. The device is equivalent tohaving two complete dsPIC® DSCs on a single die.

    The Master core will execute the code from ProgramFlash Memory (PFM) and the Slave core will operatefrom Program RAM Memory (PRAM).

    Once the code development is complete, the MasterFlash will be programmed with the Master code, as wellas the Slave code. After a Power-on Reset (POR), theSlave code from Master Flash will be loaded to thePRAM (program memory of the Slave) and the Slavecan execute the code independently of the Master. TheMaster and Slave can communicate with each otherusing the Master Slave Interface (MSI) peripheral, andcan exchange data between them.

    Figure 1-1 shows the block diagram of the deviceoperation during a POR and the process of transferringthe Slave code from the Master to Slave PRAM.

    The I/O ports are shared between the Master and Slave.Table 1 shows the number of peripherals and the sharedperipherals that the Master and Slave own. There areConfiguration bits in the Flash memory that specify theownership (Master or Slave) of each device pin.

    The default (erased) state of the Flash assigns all of thedevice pins to the Master.

    The two cores (Master and Slave) can both beconnected to debug tools, which support independentand simultaneous debugging. When the Slave core orMaster core is debugged (non-Dual Debug mode), theS1MCLRx is not used. MCLR is used for programmingand debugging both the Master core and the Slavecore. S1MCLRx is only used when debugging both thecores at the same time.

    In normal operation, the “owner” of a device pin isresponsible for full control of that pin; this includes boththe digital and analog functionality.

    The pin owner’s GPIO registers control all aspects ofthe I/O pad, including the ANSELx, CNPUx, CNPDx,ODCx registers and slew rate control.

    Note 1: This data sheet summarizes the featuresof the dsPIC33CH128MP508 family ofdevices. It is not intended to be a com-prehensive resource. To complement theinformation in this data sheet, refer tothe related section of the “dsPIC33/PIC24 Family Reference Manual”,which is available from the Microchipwebsite (www.microchip.com).

    2: Some registers and associated bitsdescribed in this section may not be avail-able on all devices. Refer to Section 3.2“Master Memory Organization” andSection 4.2 “Slave Memory Organiza-tion” in this data sheet for device-specificregister and bit information.

    Note: Both the Master and Slave cores canmonitor a pin as an input, regardless of pinownership. Pin ownership is valid only forthe output functionality of the port.

    2017-2019 Microchip Technology Inc. DS70005319D-page 21

    http://www.microchip.com

  • dsPIC33CH128MP508 FAMILY

    FIGURE 1-1: SLAVE CORE CODE TRANSFER BLOCK DIAGRAM

    Before a POR:

    Master Flash

    Code to Transfer the SlaveCode to the Slave PRAM

    Master Code

    Slave Code

    MasterCPU

    MasterRAM

    Slave PRAM

    No Code

    SlaveCPU

    SlaveRAM

    Master Flash

    Code to Transfer the SlaveCode to the Slave PRAM

    Master Code

    Slave Code

    MasterCPU

    MasterRAM

    Slave PRAM

    Slave Code

    SlaveCPU

    SlaveRAM

    After a POR, it is Master code’s responsibility to load the Slave PRAM with the Slave code. Once the Slave code is loaded to PRAM, the Master can enable the Slave to startSlave code execution:

    DS70005319D-page 22 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    FIGURE 1-2: dsPIC33CH128MP508 FAMILY BLOCK DIAGRAM(1)

    PORTA(2)Power-up

    Timer

    OscillatorStart-up

    OSCI/CLKI

    MCLR

    VDD, VSS

    DAC/

    TimingGeneration

    DMA (2)

    HS PWM

    ADC (3)

    AVDD, AVSSWatchdog

    Timer/

    POR/BOR

    CLC (4)

    RemappablePins(3)

    WDT

    PGA (3)

    16

    PORTB(2)

    PORTC(2)

    PORTD(2)

    PORTE(2)

    PORTS

    Timer

    Deadman

    Timer1

    Timer

    DAC/

    QEI (1) DMA (6)SENT (2) CAN FD (1) ADC (1)

    Timer1 (1)CRC (1)WDT/

    CLC (4)

    HS PWM(4)DMT

    SCCP (8) I2C (2)

    Comparator SPI/I2S

    (2)UART (2)

    Master CPU

    S1MCLRx MSI (Master Slave Interface)

    Slave CPU

    (8) UART (1)

    I2C (1)

    SPI/I2S

    SCCP

    (1)

    (4)

    Note 1: The numbers in the parentheses are the number of instantiations of the module indicated.2: Not all I/O pins or features are implemented on all device pinout configurations. See Table 1-1 for specific

    implementations by pin count.3: Some peripheral I/Os are only accessible through remappable pins.

    Comparator

    QEI (1)

    PTG (1)(1)

    (3)(1)

    2017-2019 Microchip Technology Inc. DS70005319D-page 23

  • dsPIC33CH128MP508 FAMILY

    TABLE 1-1: PINOUT I/O DESCRIPTIONS

    Pin Name(1) PinTypeBufferType PPS Description

    AN0-AN18S1AN0-S1AN18S1ANA0, S1ANA1

    III

    AnalogAnalogAnalog

    NoNoNo

    Master analog input channelsSlave analog input channelsSlave alternate analog inputs

    ADCTRG I ST Yes ADC Trigger Input 31CAN1RXCAN1

    IO

    ST—

    YesYes

    CAN1 receive inputCAN1 transmit output

    CLKI

    CLKO

    I

    O

    ST/CMOS

    No

    No

    External Clock (EC) source input. Always associated with OSCI 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 OSCO pin function.

    OSCI

    OSCO

    I

    I/O

    ST/CMOS

    No

    No

    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.

    REFOI/S1REFOI I ST Yes Reference clock inputREFCLKO/S1REFCLKO(3) O — Yes Reference clock outputINT0/S1INT0(3)INT1/S1INT1(3)INT2/S1INT2(3)INT3/S1INT3(3)

    IIII

    STSTSTST

    NoYesYesYes

    External Interrupt 0External Interrupt 1External Interrupt 2External Interrupt 3

    IOCA[4:0]/S1IOCA[4:0](3)IOCB[15:0]/S1IOCB[15:0](3)IOCC[15:0]/S1IOCC[15:0](3)IOCD[15:0]/S1IOCD[15:0](3)IOCE[15:0]/S1IOCE[15:0](3)

    IIIII

    STSTSTSTST

    NoNoNoNoNo

    Interrupt-on-Change input for PORTAInterrupt-on-Change input for PORTBInterrupt-on-Change input for PORTCInterrupt-on-Change input for PORTDInterrupt-on-Change input for PORTE

    QEIA1QEIB1QEINDX1QEIHOM1QEICMP

    IIIIO

    STSTSTST—

    YesYesYesYesYes

    QEI Input AQEI Input BQEI Index 1 inputQEI Home 1 inputQEI comparator output

    RA0-RA4/S1RA0-S1RA4(3) I/O ST No PORTA is a bidirectional I/O portRB0-RB15/S1RB0-S1RB15(3) I/O ST No PORTB is a bidirectional I/O portRC0-RC15/S1RC0-S1RC15(3) I/O ST No PORTC is a bidirectional I/O portRD0-RD15/S1RD0-S1RD15(3) I/O ST No PORTD is a bidirectional I/O portRE0-RE15/S1RE0-S1RE15(3) I/O ST No PORTE is a bidirectional I/O portT1CK/S1T1CK(3) I ST Yes Timer1 external clock inputLegend: CMOS = CMOS compatible input or output Analog = Analog input P = Power

    ST = Schmitt Trigger input with CMOS levels O = Output I = Input PPS = Peripheral Pin Select TTL = TTL input buffer

    Note 1: Not all pins are available in all package variants. See the “Pin Diagrams” section for pin availability.2: These pins are remappable as well as dedicated. Some of the pins are associated with the Slave function

    and have S1 attached to the beginning of the name. For example, AN0 for the Slave is S1AN0.3: S1 attached to the beginning of the name indicates the Slave feature for that function. For example, AN0 for

    the Slave is S1AN0.4: Only 48, 64 and 80-pin devices have all eight PWM output pairs on dedicated pins. Refer to pinout diagrams

    for PWM pin availability on other packages.

    DS70005319D-page 24 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    U1CTS/S1U1CTS(3)U1RTS/S1U1RTS(3)U1RX/S1U1RX(3)U1TX/S1U1TX(3)U1DSR/S1U1DSRU1DTR/S1U1DTR

    IOIOIO

    ST—ST—ST—

    YesYesYesYesYesYes

    UART1 Clear-to-SendUART1 Request-to-SendUART1 receiveUART1 transmitUART1 Data-Set-ReadyUART1 Data-Terminal-Ready

    U2CTSU2RTSU2RXU2TXU2DSRU2DTR

    IOIOIO

    ST—ST—ST—

    YesYesYesYesYesYes

    UART2 Clear-to-SendUART2 Request-to-SendUART2 receiveUART2 transmitUART2 Data-Set-ReadyUART2 Data-Terminal-Ready

    SENT1SENT2SENT1OUTSENT2OUT

    IIOO

    STST——

    YesYesYesYes

    SENT1 inputSENT2 inputSENT1 outputSENT2 output

    PTGTRG24PTGTRG25

    OO

    ——

    YesYes

    PTG Trigger Output 24PTG Trigger Output 25

    TCKI1-TCKI8/S1TCKI1-S1TCKI4(3)ICM1-ICM8/S1ICM1-S1ICM4(3)OCFA-OCFB/S1OCFA-S1OCFB(3)OCM1-OCM8/S1OCM1-S1OCM4(3)

    I

    I

    I

    O

    ST

    ST

    ST

    Yes

    Yes

    Yes

    Yes

    SCCP Timer Inputs 1 through 8/1 through 4

    SCCP Capture Inputs 1 through 8/1 through 4

    SCCP Fault Inputs A through B

    SCCP Compare Outputs 1 through 8/1 through 4

    SCK1/S1SCK1(3)SDI1/S1SDI1(3)SDO1/S1SDO1(3)SS1/S1SS1(3)

    I/OIO

    I/O

    STST—ST

    YesYesYesYes

    Synchronous serial clock input/output for SPI1SPI1 data inSPI1 data outSPI1 Slave synchronization or frame pulse I/O

    SCK2SDI2SDO2SS2

    I/OIO

    I/O

    STST—ST

    YesYesYesYes

    Synchronous serial clock input/output for SPI2SPI2 data inSPI2 data outSPI2 Slave synchronization or frame pulse I/O

    SCL1/S1SCL1(3)SDA1/S1SDA1(3)ASCL1ASDA1

    I/OI/OI/OI/O

    STSTSTST

    NoNoNoNo

    Synchronous serial clock input/output for I2C1Synchronous serial data input/output for I2C1Alternate synchronous serial clock input/output for I2C1Alternate synchronous serial data input/output for I2C1

    SCL2SDA2ASCL2ASDA2

    I/OI/OI/OI/O

    STSTSTST

    NoNoNoNo

    Synchronous serial clock input/output for I2C2Synchronous serial data input/output for I2C2Alternate synchronous serial clock input/output for I2C2Alternate synchronous serial data input/output for I2C2

    TABLE 1-1: PINOUT I/O DESCRIPTIONS (CONTINUED)

    Pin Name(1) PinTypeBufferType PPS Description

    Legend: CMOS = CMOS compatible input or output Analog = Analog input P = PowerST = Schmitt Trigger input with CMOS levels O = Output I = Input PPS = Peripheral Pin Select TTL = TTL input buffer

    Note 1: Not all pins are available in all package variants. See the “Pin Diagrams” section for pin availability.2: These pins are remappable as well as dedicated. Some of the pins are associated with the Slave function

    and have S1 attached to the beginning of the name. For example, AN0 for the Slave is S1AN0.3: S1 attached to the beginning of the name indicates the Slave feature for that function. For example, AN0 for

    the Slave is S1AN0.4: Only 48, 64 and 80-pin devices have all eight PWM output pairs on dedicated pins. Refer to pinout diagrams

    for PWM pin availability on other packages.

    2017-2019 Microchip Technology Inc. DS70005319D-page 25

  • dsPIC33CH128MP508 FAMILY

    TMSTCKTDITDO

    IIIO

    STSTST—

    NoNoNoNo

    JTAG Test mode select pinJTAG test clock input pinJTAG test data input pinJTAG test data output pin

    PCI8-PCI18/S1PCI8-S1PCI18PWMEA-PWMED/S1PWMEA-S1PWMEDPCI19-PCI22/S1PCI19-S1PCI22(3)PWM1L-PWM4L/S1PWM1L/S1PWM8L(3,4)PWM1H-PWM4H/S1PWM1H-S1PWM8H(2,3,4)

    I

    O

    I

    O

    O

    ST

    ST

    Yes

    Yes

    No

    No

    PWM Inputs 8 through 18

    PWM Event Outputs A through D

    PWM Inputs 19 through 22

    PWM Low Outputs 1 through 8

    PWM High Outputs 1 through 8

    CLCINA-CLCIND/S1CLCINA-S1CLCIND(3)CLC1OUT-CLC4OUT

    I

    O

    ST

    Yes

    Yes

    CLC Inputs A through D

    CLC Outputs 1 through 4CMP1CMP1A/S1CMP1A-S1CMP3A(3)CMP1B/S1CMP1B-S1CMP3B(3)CMP1D/S1CMP1D-S1CMP3D(3)

    OI

    I

    I

    —Analog

    Analog

    Analog

    YesNo

    No

    No

    Comparator 1 outputComparator Channels 1A through 3A inputs

    Comparator Channels 1B through 3B inputs

    Comparator Channels 1D through 3D inputs

    DACOUT1 O — No DAC output voltageIBIAS3, IBIAS2, IBIAS1, IBIAS0/ISRC3, ISRC2, ISRC1, ISRC0

    O Analog No Constant-Current Outputs 0 through 3

    S1PGA1P2 I Analog No PGA1 Positive Input 2S1PGA1N2 I Analog No PGA1 Negative Input 2S1PGA2P2 I Analog No PGA2 Positive Input 2S1PGA2N2 I Analog No PGA2 Negative Input 2S1PGA3P1-S1PGA3P2 I Analog No PGA3 Positive Inputs 1 through 2S1PGA3N2 I Analog No PGA3 Negative Input 2

    TABLE 1-1: PINOUT I/O DESCRIPTIONS (CONTINUED)

    Pin Name(1) PinTypeBufferType PPS Description

    Legend: CMOS = CMOS compatible input or output Analog = Analog input P = PowerST = Schmitt Trigger input with CMOS levels O = Output I = Input PPS = Peripheral Pin Select TTL = TTL input buffer

    Note 1: Not all pins are available in all package variants. See the “Pin Diagrams” section for pin availability.2: These pins are remappable as well as dedicated. Some of the pins are associated with the Slave function

    and have S1 attached to the beginning of the name. For example, AN0 for the Slave is S1AN0.3: S1 attached to the beginning of the name indicates the Slave feature for that function. For example, AN0 for

    the Slave is S1AN0.4: Only 48, 64 and 80-pin devices have all eight PWM output pairs on dedicated pins. Refer to pinout diagrams

    for PWM pin availability on other packages.

    DS70005319D-page 26 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    PGD1/S1PGD1(3)PGC1/S1PGC1(3)

    PGD2/S1PGD2(3)PGC2/S1PGC2(3)

    PGD3/S1PGD3(3)PGC3/S1PGC3(3)

    I/OI

    I/OI

    I/OI

    STST

    STST

    STST

    NoNo

    NoNo

    NoNo

    Data I/O pin for Programming/Debugging Communication Channel 1Clock input pin for Programming/Debugging Communication Channel 1Data I/O pin for Programming/Debugging Communication Channel 2Clock input pin for Programming/Debugging Communication Channel 2Data I/O pin for Programming/Debugging Communication Channel 3Clock input pin for Programming/Debugging Communication Channel 3

    MCLR/S1MCLR1/S1MCLR2/S1MCLR3

    I/P ST No Master Clear (Reset) input. This pin is an active-low Reset to the device. S1MCLRx is valid only for Slave debug in Dual Debug mode.

    AVDD P P No Positive supply for analog modules. This pin must be connected at all times.

    AVSS P P No Ground reference for analog modules. This pin must be connected at all times.

    VDD P — No Positive supply for peripheral logic and I/O pinsVSS P — No Ground reference for logic and I/O pins

    TABLE 1-1: PINOUT I/O DESCRIPTIONS (CONTINUED)

    Pin Name(1) PinTypeBufferType PPS Description

    Legend: CMOS = CMOS compatible input or output Analog = Analog input P = PowerST = Schmitt Trigger input with CMOS levels O = Output I = Input PPS = Peripheral Pin Select TTL = TTL input buffer

    Note 1: Not all pins are available in all package variants. See the “Pin Diagrams” section for pin availability.2: These pins are remappable as well as dedicated. Some of the pins are associated with the Slave function

    and have S1 attached to the beginning of the name. For example, AN0 for the Slave is S1AN0.3: S1 attached to the beginning of the name indicates the Slave feature for that function. For example, AN0 for

    the Slave is S1AN0.4: Only 48, 64 and 80-pin devices have all eight PWM output pairs on dedicated pins. Refer to pinout diagrams

    for PWM pin availability on other packages.

    2017-2019 Microchip Technology Inc. DS70005319D-page 27

  • dsPIC33CH128MP508 FAMILY

    NOTES:

    DS70005319D-page 28 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    2.0 GUIDELINES FOR GETTING STARTED WITH 16-BIT DIGITAL SIGNAL CONTROLLERS

    2.1 Basic Connection RequirementsGetting started with the family devices of thedsPIC33CH128MP508 requires attention to a minimalset of device pin connections before proceeding withdevelopment. The following is a list of pin names whichmust 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”)

    • MCLR pin (see Section 2.3 “Master Clear (MCLR) Pin”)

    • PGCx/PGDx pinsused for In-Circuit Serial Programming™ (ICSP™) and debugging purposes (see Section 2.4 “ICSP Pins”)

    • OSCI and OSCO pins when an external oscillator source is used (see Section 2.5 “External Oscillator Pins”)

    2.2 Decoupling CapacitorsThe use of decoupling capacitors on every pair ofpower supply pins, such as VDD, VSS, AVDD andAVSS is required.

    Consider the following criteria when using decouplingcapacitors:

    • 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 to use ceramic capacitors.

    • 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, above 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.

    2017-2019 Microchip Technology Inc. DS70005319D-page 29

  • dsPIC33CH128MP508 FAMILY

    FIGURE 2-1: RECOMMENDED MINIMUM CONNECTION

    2.2.1 BULK CAPACITORSOn boards with power traces running longer than sixinches in length, it is suggested to use a bulk capacitorfor integrated circuits, including DSCs, to supply a localpower source. The value of the bulk capacitor shouldbe determined based on the trace resistance thatconnects the power supply source to the device andthe maximum current drawn by the device in theapplication. In other words, select the bulk capacitor sothat it meets the acceptable voltage sag at the device.Typical values range from 4.7 µF to 47 µF.

    2.3 Master Clear (MCLR) PinThe MCLR pin provides two specific devicefunctions:

    • Device Reset• Device Programming and Debugging.

    During device programming and debugging, theresistance and capacitance that can be added to thepin must be considered. Device programmers anddebuggers drive the MCLR pin. Consequently,specific voltage levels (VIH and VIL) and fast signaltransitions must not be adversely affected. Therefore,specific values of R and C will need to be adjustedbased on the application and PCB requirements.

    For example, as shown in Figure 2-2, it isrecommended that the capacitor, C, be isolated fromthe MCLR pin during programming and debuggingoperations.

    Place the components, as shown in Figure 2-2,within one-quarter inch (6 mm) from the MCLR pin.

    FIGURE 2-2: EXAMPLE OF MCLR PIN CONNECTIONS

    Note 1: As an option, instead of a hard-wired connection, an inductor (L1) can be substituted between VDD and AVDD to improve ADC noise rejection. The inductor impedance should be less than 1 and the inductor capacity greater than 10 mA.

    Where:

    f FCNV2

    --------------=

    f 12 LC

    -----------------------=

    L 12f C

    ---------------------- 2=

    (i.e., ADC Conversion Rate/2)

    dsPIC33V

    DD

    VS

    S

    VDD

    VSS

    VSS

    VDD

    AVD

    D

    AVS

    S

    VD

    D

    VS

    S

    0.1 µFCeramic

    0.1 µFCeramic

    0.1 µFCeramic

    0.1 µFCeramic

    C

    R

    VDD

    MCLR

    0.1 µFCeramic

    L1(1)

    R1

    Note 1: There are the S1MCLR1, S1MCLR2 andS1MCLR3 pins and they are used forSlave debug during the dual debugprocess. Those pins do not reset theSlave core during normal operation.

    C

    R1(2)R(1)

    VDD

    MCLR

    dsPIC33JP

    Note 1: R 10 k is recommended. A suggested starting value is 10 k. Ensure that the MCLR pin VIH and VIL specifications are met.

    2: 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.

    DS70005319D-page 30 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    2.4 ICSP PinsThe PGCx and PGDx pins are used for ICSP anddebugging purposes. It is recommended to keep thetrace length between the ICSP connector and the ICSPpins on the device as short as possible. If the ICSP con-nector is expected to experience an ESD event, aseries resistor is recommended, with the value in therange of a few tens of Ohms, not to exceed 100 Ohms.

    Pull-up resistors, series diodes and capacitors on thePGCx and PGDx pins are not recommended as theywill interfere with the programmer/debugger communi-cations to the device. If such discrete components arean application requirement, they should be removedfrom the circuit during programming and debugging.Alternatively, refer to the AC/DC characteristics andtiming requirements information in the respectivedevice Flash programming specification for informationon capacitive loading limits and pin Voltage Input High(VIH) and Voltage Input Low (VIL) requirements.

    Ensure that the “Communication Channel Select” (i.e.,PGCx/PGDx pins) programmed into the devicematches the physical connections for the ICSP toPICkit™ 3, MPLAB® ICD 3 or MPLAB REAL ICE™emulator.

    For more information on MPLAB ICD 2, MPLAB ICD 3and REAL ICE emulator connection requirements,refer to the following documents that are available onthe Microchip website.

    • “Using MPLAB® ICD 3 In-Circuit Debugger” (poster) (DS51765)

    • “Development Tools Design Advisory” (DS51764)• “MPLAB® REAL ICE™ In-Circuit Emulator User’s

    Guide” (DS51616)• “Using MPLAB® REAL ICE™ In-Circuit Emulator”

    (poster) (DS51749)

    2.5 External Oscillator PinsMany DSCs have options for at least two oscillators: ahigh-frequency Primary Oscillator (POSC) and alow-frequency Secondary Oscillator (SOSC). Fordetails, see Section 6.12.1 “Master Oscillator ControlRegisters”. The oscillator circuit should be placed on the sameside of the board as the device. Also, place the oscil-lator circuit close to the respective oscillator pins, notexceeding one-half inch (12 mm) distance betweenthem. The load capacitors should be placed next tothe oscillator itself, on the same side of the board.Use a grounded copper pour around the oscillatorcircuit to isolate them from surrounding circuits. Thegrounded copper pour should be routed directly to theMCU ground. Do not run any signal traces or powertraces inside the ground pour. Also, if using atwo-sided board, avoid any traces on the other side ofthe board where the crystal is placed. A suggestedlayout is shown in Figure 2-3.

    FIGURE 2-3: SUGGESTED PLACEMENT OF THE OSCILLATOR CIRCUIT

    Main Oscillator

    Guard Ring

    Guard Trace

    Oscillator Pins

    2017-2019 Microchip Technology Inc. DS70005319D-page 31

  • dsPIC33CH128MP508 FAMILY

    2.6 Oscillator Value Conditions on Device Start-up

    If the PLL of the target device is enabled andconfigured for the device start-up oscillator, themaximum oscillator source frequency must be limitedto a certain frequency (see Section 6.0 “Oscillatorwith High-Frequency PLL”) to comply with devicePLL start-up conditions. This means that if the externaloscillator frequency is outside this range, the applica-tion must start up in the FRC mode first. The defaultPLL settings after a POR with an oscillator frequencyoutside this range will violate the device operatingspeed.

    Once the device powers up, the application firmwarecan initialize the PLL SFRs, CLKDIV and PLLFBD, to asuitable value, and then perform a clock switch to theOscillator + PLL clock source. Note that clock switchingmust be enabled in the device Configuration Word.

    2.7 Unused I/OsUnused I/O pins should be configured as outputs anddriven to a logic low state.

    Alternatively, connect a 1k to 10k resistor between VSSand unused pins, and drive the output to logic low.

    2.8 Targeted Applications• Power Factor Correction (PFC):

    - Interleaved PFC- Critical Conduction PFC- Bridgeless PFC

    • DC/DC Converters:- Buck, Boost, Forward, Flyback, Push-Pull- Half/Full-Bridge- Phase-Shift Full-Bridge- Resonant Converters

    • DC/AC:- Half/Full-Bridge Inverter- Resonant Inverter

    • Motor Control- BLDC- PMSM- SR- ACIM

    Examples of typical application connections are shownin Figure 2-4 through Figure 2-6.

    FIGURE 2-4: INTERLEAVED PFC

    VAC

    VOUT+

    PGA/ADC Channel PWM ADCPWM

    |VAC|

    k4 k3

    FET

    dsPIC33CH128MP508

    Driver

    VOUT-

    ADC Channel

    PGA/ADCChannel Channel

    PGA/ADCChannel

    k2

    FETDriver

    k1

    DS70005319D-page 32 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    FIGURE 2-5: PHASE-SHIFTED FULL-BRIDGE CONVERTER

    VIN+

    VIN-

    S1

    Gate 4

    Gate 2

    Gate 3Gate 1

    AnalogGround

    VOUT+

    VOUT-

    k2FETDriver

    k1

    FETDriver

    FETDriver

    Gate 1

    Gate 2

    S1 Gate 3

    Gate 4

    S3

    S3

    Gate 6

    Gate 5

    Gat

    e 6Gate 5

    dsPIC33CH128MP508

    PWM

    PWM PGA/ADCChannel

    PWM ADCChannel

    2017-2019 Microchip Technology Inc. DS70005319D-page 33

  • dsPIC33CH128MP508 FAMILY

    FIGURE 2-6: OFF-LINE UPS

    PGA/ADC

    ADC

    ADC

    ADC

    ADC

    PWM PWMPWM

    dsPIC33CH128MP508

    PWM PWM PWM

    FETDriver k2 k1

    FETDriver

    FETDriver

    FETDriver

    FETDriver k4 k5

    VBAT

    GND

    +VOUT+

    VOUT-

    Full-Bridge InverterPush-Pull ConverterVDC

    GND

    FETDriver

    ADC PWM

    k3

    k6

    orAnalog Comp.

    Battery Charger

    +

    FETDriver

    DS70005319D-page 34 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    3.0 MASTER MODULES

    3.1 Master CPU

    There are two independent CPU cores in thedsPIC33CH128MP508 family. The Master and Slavecores are similar, except for the fact that the Slave corecan run at a higher speed than the Master core.

    The Slave core fetches instructions from the PRAMand the Master core fetches the code from the Flash.The Master and Slave cores can run independentlyasynchronously, at the same speed or at a differentspeed. This section discusses the Master core.

    The dsPIC33CH128MP508 family CPU has a 16-bit(data) modified Harvard architecture with an enhancedinstruction set, including significant support for DigitalSignal Processing (DSP). The CPU has a 24-bit instruc-tion word with a variable length opcode field. TheProgram Counter (PC) is 23 bits wide and addresses upto 4M x 24 bits of user program memory space.

    An instruction prefetch mechanism helps maintainthroughput and provides predictable execution. Mostinstructions execute in a single-cycle effective execu-tion rate, with the exception of instructions that changethe program flow, the double-word move (MOV.D)instruction, PSV accesses and the table instructions.Overhead-free program loop constructs are supportedusing the DO and REPEAT instructions, both of whichare interruptible at any point.

    3.1.1 REGISTERSThe dsPIC33CH128MP508 devices have sixteen, 16-bitWorking registers in the programmer’s model. Each ofthe Working registers can act as a Data, Address orAddress Offset register. The 16th Working register(W15) operates as a Software Stack Pointer forinterrupts and calls.

    In addition, the dsPIC33CH128MP508 devices includefour Alternate Working register sets, which consist ofW0 through W14. The Alternate Working registers canbe made persistent to help reduce the saving andrestoring of register content during Interrupt ServiceRoutines (ISRs). The Alternate Working registers canbe assigned to a specific Interrupt Priority Level (IPL1through IPL7) by configuring the CTXTx[2:0] bits in theFALTREG Configuration register. The Alternate Work-ing registers can also be accessed manually by usingthe CTXTSWP instruction. The CCTXI[2:0] andMCTXI[2:0] bits in the CTXTSTAT register can be usedto identify the current, and most recent, manuallyselected Working register sets.

    3.1.2 INSTRUCTION SETThe instruction set for dsPIC33CH128MP508 deviceshas two classes of instructions: the MCU class ofinstructions and the DSP class of instructions. Thesetwo instruction classes are seamlessly integrated into thearchitecture and execute from a single execution unit.The instruction set includes many addressing modes andwas designed for optimum C compiler efficiency.

    Note 1: This data sheet summarizes the featuresof the dsPIC33CH128MP508 family ofdevices. It is not intended to be acomprehensive reference source. Tocomplement the information in this datasheet, refer to “Enhanced CPU”(www.microchip.com/DS70005158) in the“dsPIC33/PIC24 Family ReferenceManual”, which is available from theMicrochip website (www.microchip.com).

    Note: All of the associated register names are thesame on the Master, as well as on the Slave.The Slave code will be developed in a sepa-rate project in MPLAB® X IDE with the deviceselection, dsPIC33CH128MP508S1, wherethe S1 indicates the Slave device.

    2017-2019 Microchip Technology Inc. DS70005319D-page 35

    http://www.microchip.comhttp://www.microchip.com

  • dsPIC33CH128MP508 FAMILY

    3.1.3 DATA SPACE ADDRESSINGThe base Data Space (DS) can be addressed as up to4K words or 8 Kbytes, and is split into two blocks,referred to as X and Y data memory. Each memory blockhas its own independent Address Generation Unit(AGU). The MCU class of instructions operates solelythrough the X memory AGU, which accesses the entirememory map as one linear Data Space. Certain DSPinstructions operate through the X and Y AGUs to sup-port dual operand reads, which splits the data addressspace into two parts. The X and Y Data Space boundaryis device-specific.

    The upper 32 Kbytes of the Data Space memory mapcan optionally be mapped into Program Space (PS) atany 16K program word boundary. The program-to-DataSpace mapping feature, known as Program SpaceVisibility (PSV), lets any instruction access ProgramSpace as if it were Data Space. Refer to “DataMemory” (www.microchip.com/DS70595) in the“dsPIC33/PIC24 Family Reference Manual” for moredetails on PSV and table accesses.

    On dsPIC33CH128MP508 family devices, overhead-free circular buffers (Modulo Addressing) aresupported in both X and Y address spaces. TheModulo Addressing removes the software boundarychecking overhead for DSP algorithms. The X AGUCircular Addressing can be used with any of the MCUclass of instructions. The X AGU also supports Bit-Reversed Addressing to greatly simplify input or outputdata re-ordering for radix-2 FFT algorithms.

    3.1.4 ADDRESSING MODESThe CPU supports these addressing modes:

    • Inherent (no operand)• Relative• Literal• Memory Direct• Register Direct• Register Indirect

    Each instruction is associated with a predefinedaddressing mode group, depending upon its functionalrequirements. As many as six addressing modes aresupported for each instruction.

    DS70005319D-page 36 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    FIGURE 3-1: dsPIC33CH128MP508 FAMILY (MASTER) CPU BLOCK DIAGRAM

    InstructionDecode and

    Control

    16PCL

    16

    Program Counter

    16-Bit ALU

    24

    24

    24

    24

    X Data Bus

    PCU16

    16 16

    DivideSupport

    EngineDSP

    RO

    M L

    atch

    16

    Y Data Bus

    EA MUX

    X RAGUX WAGU

    Y AGU

    16

    24

    16

    16

    16

    16

    16

    16

    16

    8

    InterruptController

    PSV and TableData AccessControl Block

    StackControlLogic

    LoopControlLogic

    Data LatchData Latch

    Y DataRAM

    X DataRAM

    AddressLatch

    AddressLatch

    16

    Data Latch

    16

    16

    16

    X Address Bus

    Y A

    ddre

    ss B

    us

    24

    Lite

    ral D

    ata

    Program Memory

    Address Latch

    Power, Resetand Oscillator

    Control Signalsto Various Blocks

    Ports

    PeripheralModules

    Modules

    PCH

    IR

    16-BitWorking Register Arrays

    MSISlaveCPU

    2017-2019 Microchip Technology Inc. DS70005319D-page 37

  • dsPIC33CH128MP508 FAMILY

    3.1.5 PROGRAMMER’S MODELThe programmer’s model for the dsPIC33CH128MP508family is shown in Figure 3-2. All registers in theprogrammer’s model are memory-mapped and can bemanipulated directly by instructions. Table 3-1 lists adescription of each register.

    In addition to the registers contained in the programmer’smodel, the dsPIC33CH128MP508 devices containcontrol registers for Modulo Addressing, Bit-ReversedAddressing and interrupts. These registers aredescribed in subsequent sections of this document.

    All registers associated with the programmer’s modelare memory-mapped, as shown in Figure 3-3 andFigure 3-4.

    TABLE 3-1: PROGRAMMER’S MODEL REGISTER DESCRIPTIONSRegister(s) Name Description

    W0 through W15(1) Working Register ArrayW0 through W14(1) Alternate Working Register Array 1W0 through W14(1) Alternate Working Register Array 2W0 through W14(1) Alternate Working Register Array 3W0 through W14(1) Alternate Working Register Array 4ACCA, ACCB 40-Bit DSP Accumulators (Additional 4 Alternate Accumulators)PC 23-Bit Program CounterSR ALU and DSP Engine STATUS RegisterSPLIM Stack Pointer Limit Value RegisterTBLPAG Table Memory Page Address RegisterDSRPAG Extended Data Space (EDS) Read Page RegisterRCOUNT REPEAT Loop Counter RegisterDCOUNT DO Loop Counter RegisterDOSTARTH, DOSTARTL(2) DO Loop Start Address Register (High and Low)DOENDH, DOENDL DO Loop End Address Register (High and Low)CORCON Contains DSP Engine, DO Loop Control and Trap Status bitsNote 1: Memory-mapped W0 through W14 represent the value of the register in the currently active CPU context.

    2: The DOSTARTH and DOSTARTL registers are read-only.

    DS70005319D-page 38 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    FIGURE 3-2: PROGRAMMER’S MODEL (MASTER)

    N OV Z C

    TBLPAG

    PC23 PC0

    7 0

    D0D15

    Program Counter

    Data Table Page Address

    STATUS Register

    Working/AddressRegisters

    DSP OperandRegisters

    W0 (WREG)W1W2W3

    W4W5W6W7W8W9

    W10W11W12W13

    Frame Pointer/W14Stack Pointer/W15

    DSP AddressRegisters

    AD39 AD0AD31

    DSPAccumulators(1)

    ACCA

    ACCB

    DSRPAG9 0

    RA

    0

    OA OB SA SB

    RCOUNT15 0

    REPEAT Loop Counter

    DCOUNT15 0

    DO Loop Counter and Stack

    DOSTART23 0

    DO Loop Start Address and Stack

    0

    DOEND DO Loop End Address and Stack

    IPL2 IPL1

    SPLIM Stack Pointer Limit

    AD15

    23 0

    SRLIPL0

    PUSH.S and POP.S Shadows

    Nested DO Stack

    0

    0

    OAB SAB

    X Data Space Read Page Address

    DA DC

    0

    0

    0

    0

    CORCON15 0

    CPU Core Control Register

    W0-W3

    D15 D0

    W0W1W2W3W4

    W13W14

    W12W11W10W9

    W5

    W6W7W8

    W0W1W2W3W4

    W13W14

    W12

    W9

    W5

    W6W7W8

    W10W11

    D0

    AlternateWorking/AddressRegisters

    D15

    D15D15

    D0

    D0

    W0 W0W1 W1W2 W2W3 W3W4 W4

    W5 W5

    W6 W6W7 W7W8 W8W9 W9W10 W10W11 W11W12 W12W13 W13

    W14 W14

    AD39 AD31 AD15 AD0AD39 AD31 AD15 AD0

    AD39 AD31 AD15 AD0AD39 AD31 AD15 AD0

    2017-2019 Microchip Technology Inc. DS70005319D-page 39

  • dsPIC33CH128MP508 FAMILY

    3.1.6 CPU RESOURCESMany useful resources are provided on the main prod-uct page of the Microchip website for the devices listedin this data sheet. This product page contains the latestupdates and additional information.

    3.1.6.1 Key Resources• “Enhanced CPU” (www.microchip.com/

    DS70005158) in the “dsPIC33/PIC24 Family Reference Manual”

    • Code Samples• Application Notes• Software Libraries• Webinars• All related “dsPIC33/PIC24 Family Reference

    Manual” Sections• Development Tools

    DS70005319D-page 40 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    3.1.7 CPU CONTROL/STATUS REGISTERS

    REGISTER 3-1: SR: CPU STATUS REGISTER

    R/W-0 R/W-0 R/W-0 R/W-0 R/C-0 R/C-0 R-0 R/W-0OA OB SA(3) SB(3) OAB SAB DA DC

    bit 15 bit 8

    R/W-0(2) R/W-0(2) R/W-0(2) R-0 R/W-0 R/W-0 R/W-0 R/W-0IPL2(1) IPL1(1) IPL0(1) RA N OV Z C

    bit 7 bit 0

    Legend: C = Clearable bitR = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’-n = Value at POR ‘1’= Bit is set ‘0’ = Bit is cleared x = Bit is unknown

    bit 15 OA: Accumulator A Overflow Status bit1 = Accumulator A has overflowed0 = Accumulator A has not overflowed

    bit 14 OB: Accumulator B Overflow Status bit1 = Accumulator B has overflowed0 = Accumulator B has not overflowed

    bit 13 SA: Accumulator A Saturation ‘Sticky’ Status bit(3)

    1 = Accumulator A is saturated or has been saturated at some time0 = Accumulator A is not saturated

    bit 12 SB: Accumulator B Saturation ‘Sticky’ Status bit(3)

    1 = Accumulator B is saturated or has been saturated at some time0 = Accumulator B is not saturated

    bit 11 OAB: OA || OB Combined Accumulator Overflow Status bit1 = Accumulator A or B has overflowed0 = Neither Accumulator A or B has overflowed

    bit 10 SAB: SA || SB Combined Accumulator ‘Sticky’ Status bit1 = Accumulator A or B is saturated or has been saturated at some time0 = Neither Accumulator A or B is saturated

    bit 9 DA: DO Loop Active bit1 = DO loop is in progress0 = DO loop is not in progress

    bit 8 DC: MCU ALU Half Carry/Borrow bit1 = 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 occurred0 = 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

    Note 1: The IPL[2:0] bits are concatenated with the IPL[3] bit (CORCON[3]) to form the CPU Interrupt Priority Level. The value in parentheses indicates the IPL, if IPL[3] = 1. User interrupts are disabled when IPL[3] = 1.

    2: The IPL[2:0] Status bits are read-only when the NSTDIS bit (INTCON1[15]) = 1.3: A data write to the SR register can modify the SA and SB bits by either a data write to SA and SB or by

    clearing the SAB bit. To avoid a possible SA or SB bit write race condition, the SA and SB bits should not be modified using bit operations.

    2017-2019 Microchip Technology Inc. DS70005319D-page 41

  • dsPIC33CH128MP508 FAMILY

    bit 7-5 IPL[2:0]: CPU Interrupt Priority Level Status bits(1,2)

    111 = CPU Interrupt Priority Level is 7 (15); user interrupts are disabled110 = 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)

    bit 4 RA: REPEAT Loop Active bit1 = REPEAT loop is in progress0 = REPEAT loop is not in progress

    bit 3 N: MCU ALU Negative bit1 = Result was negative0 = Result was non-negative (zero or positive)

    bit 2 OV: MCU ALU Overflow bitThis bit is used for signed arithmetic (two’s complement). It indicates an overflow of the magnitude thatcauses the sign bit to change state. 1 = Overflow occurred for signed arithmetic (in this arithmetic operation)0 = No overflow occurred

    bit 1 Z: MCU ALU Zero bit1 = An operation that affects the Z bit has set it at some time in the past0 = The most recent operation that affects the Z bit has cleared it (i.e., a non-zero result)

    bit 0 C: MCU ALU Carry/Borrow bit1 = A carry-out from the Most Significant bit of the result occurred0 = No carry-out from the Most Significant bit of the result occurred

    REGISTER 3-1: SR: CPU STATUS REGISTER (CONTINUED)

    Note 1: The IPL[2:0] bits are concatenated with the IPL[3] bit (CORCON[3]) to form the CPU Interrupt Priority Level. The value in parentheses indicates the IPL, if IPL[3] = 1. User interrupts are disabled when IPL[3] = 1.

    2: The IPL[2:0] Status bits are read-only when the NSTDIS bit (INTCON1[15]) = 1.3: A data write to the SR register can modify the SA and SB bits by either a data write to SA and SB or by

    clearing the SAB bit. To avoid a possible SA or SB bit write race condition, the SA and SB bits should not be modified using bit operations.

    DS70005319D-page 42 2017-2019 Microchip Technology Inc.

  • dsPIC33CH128MP508 FAMILY

    REGISTER 3-2: CORCON: CORE CONTROL REGISTER

    R/W-0 U-0 R/W-0 R/W-0 R/W-0 R-0 R-0 R-0VAR — US1 US0 EDT(1) DL2 DL1 DL0

    bit 15 bit 8

    R/W-0 R/W-0 R/W-1 R/W-0 R/C-0 R-0 R/W-0 R/W-0SATA SATB SATDW ACCSAT IPL3(2) SFA RND IF

    bit 7 bit 0

    Legend: C = Clearable bitR = Readable bit W = Writable bit U = Unimplemented bit, read as ‘0’-n = Value at POR ‘1’ = Bit is set ‘0’ = Bit is cleared x = Bit is unknown

    bit 15 VAR: Variable Exception Processing Latency Control bit1 = Variable exception processing is enabled0 = Fixed exception processing is enabled

    bit 14 Unimplemented: Read as ‘0’bit 13-12 US[1:0]: DSP Multiply Unsigned/Signed Control bits

    11 = Reserved10 = DSP engine multiplies are mixed sign01 = DSP engine multiplies are unsigned 00 = DSP engine multiplies are signed

    bit 11 EDT: Early DO Loop Termination Control bit(1)1 = Terminates executing DO loop at the end of the current loop iteration0 = No effect

    bit 10-8 DL[2:0]: DO Loop Nesting Level Status bits111 = Seven DO loops are active...001 = One DO loop is active000 = Zero DO loops are active

    bit 7 SATA: ACCA Saturation Enable bit1 = Accumulator A saturation is enabled0 = Accumulator A saturation is disabled

    bit 6 SATB: ACCB Saturation Enable bit1 = Accumulator B saturation is enabled0 = Accumulator B saturation is disabled

    bit 5 SATDW: Data Space Write from DSP Engine Saturation Enable bit1 = Data Space write saturation is enabled0 = Data Space write saturation is disabled

    bit 4 ACCSAT: Accumulator Saturation Mode Select bit1 = 9.31 saturation (super saturation)0 = 1.31 saturation (normal saturation)

    bit 3 IPL3: CPU Interrupt Priority Level Status bit 3(2)

    1 = CPU Interrupt Priority Level is greater than 70 = CPU Interrupt Pr