dsPIC33CH128MP508 Plug-In Module (PIM) Information Sheet Americas Asia/Pacific Overview Australia - Sydney - 61-2-9868-6733 Atlanta - 678-957-9614 The dsPIC33CH128MP508 General Purpose Explorer 16/32 PIM (MA330040) is designed to demon- Austin - 512-257-3370 China - Beijing - 86-10-8569-7000 strate the capabilities of the dsPIC33CH128MP508 family using the Explorer 16 or Explorer 16/32 Boston - 774-760-0087 China - Chengdu - 86-28-8665-5511 Development Board. Refer to Table 1 and Table 2 for the mapping of the physical pins on the Chicago - 630-285-0071 China - Chongqing - 86-23-8980-9588 dsPIC33CH128MP508 to the 100 pins on the PIM connector. Dallas - 972-818-7423 China - Dongguan - 86-769-8702-9880 Detroit - 248-848-4000 Not all predefined PIM signals found on the Explorer 16/32 are connected due to the limited amount of China - Guangzhou - 86-20-8755-8029 Houston - 281-894-5983 I/O pins available. China - Hangzhou - 86-571-8792-8115 Indianapolis - 317-773-8323 The dsPIC33CH128MP508 is a dual core device. The Master core, as well the Slave, can be debugged China - Hong Kong SAR - 852-2943-5100 Los Angeles - 949-462-9523 China - Nanjing- 86-25-8473-2460 and programed using this PIM. Since there are two cores available in the dsPIC33CH128MP508 device, New York - 631-435-6000 China - Qingdao - 86-532-8502-7355 there are multiple ways to program and debug the Master and the Slave. The four scenarios are: Phoenix - 480-792-7200 China - Shanghai - 86-21-3326-8000 1. Master = Release, Slave = Release Raleigh - 919-844-7510 China - Shenyang - 86-24-2334-2829 2. Master = Debug, Slave = Release San Jose - 408-735-9110 China - Shenzhen - 86-755-8864-2200 3. Master = Release, Slave = Debug Toronto - 905-695-1980 China - Suzhou - 86-186-6233-1526 4. Master = Debug, Slave = Debug (e.g., Dual Debug mode) China - Wuhan - 86-27-5980-5300 Europe In scenarios 1, 2 and 3, only a single programmer/debugger tool is needed, and it should be connected China - Xiamen - 86-592-2388138 Austria - Wels - 43-7242-2244-39 to the PIM via the Explorer 16 (or Explorer 16/32) In-Circuit Serial Programming (ICSP) interface. China - Xian - 86-29-8833-7252 Denmark - Copenhagen - 45-4450-2828 In scenario 4 only (Dual Debug of both cores simultaneously), two debugger tools are required. In this China - Zhuhai - 86-756-3210040 Finland - Espoo - 358-9-4520-820 scenario, the debugger connected via the Explorer 16 (or Explorer 16/32) ICSP interface is used to India - Bangalore - 91-80-3090-4444 France - Paris - 33-1-69-53-63-20 debug the Master core, while the second debugger is intended to be connected directly to the PIM via Germany - Garching - 49-8931-9700 India - New Delhi - 91-11-4160-8631 the 6-pin in-line ICSP interface J2 on the PIM. When using the Explorer 16/32, the PICkit-On-Board Germany - Haan - 49-2129-3766400 India - Pune - 91-20-4121-0141 (PKOB) circuit would typically be used to debug the Master core (thus requiring only one additional Germany - Heilbronn - 49-7131-67-3636 Japan - Osaka - 81-6-6152-7160 debugger tool in this scenario). The pins of J2 are slightly staggered to provide some retention friction, Germany - Karlsruhe - 49-721-625370 Japan - Tokyo - 81-3-6880-3770 for temporary use, without requiring solder. Germany - Munich - 49-89-627-144-0 Korea - Daegu - 82-53-744-4301 Germany - Rosenheim - 49-8031-354-560 Korea - Seoul - 82-2-554-7200 Israel - Raanana - 972-9-744-7705 Demo Overview Malaysia - Kuala Lumpur - 60-3-7651-7906 Italy - Milan - 39-0331-742611 Malaysia - Penang - 60-4-227-8870 This demo project provides a basic demonstration of how to use both the Master and Slave cores within Italy - Padova - 39-049-7625286 Philippines - Manila - 63-2-634-9065 the dsPIC33CH128MP508, and how to use the Master/Slave core interface for sending data between Netherlands - Drunen - 31-416-690399 Singapore - 65-6334-8870 the cores. Norway - Trondheim - 47-7289-7561 Taiwan - Hsin Chu - 886-3-577-8366 Poland - Warsaw - 48-22-3325737 The master.X includes/uses the slave.X project. Therefore, attempting to build and program the Taiwan - Kaohsiung - 886-7-213-7830 Romania - Bucharest - 40-21-407-87-50 master.X project should have the effect of simultaneously building and programming both the Master Taiwan - Taipei - 886-2-2508-8600 Spain - Madrid - 34-91-708-08-90 and Slave core program code into the device. Thailand - Bangkok - 66-2-694-1351 Sweden - Gothenberg - 46-31-704-60-40 During execution, the demo performs the following operations: Vietnam - Ho Chi Minh - 84-28-5448-2100 Sweden - Stockholm - 46-8-5090-4654 1. Periodically takes ADC measurements on the potentiometer on the Explorer 16/32 and prints the UK - Wokingham - 44-118-921-5800 results to the LCD screen. 2. Periodically computes the value of pi and prints the results to the LCD screen. 10/25/17 3. Blinks an LED (D10 on the Explorer 16/32). 4. Samples the S3 and S6 push buttons (used for mode switching). The demo has two primary operating modes: Mode 1: Uses only the Master core to perform all application tasks, or Mode 2: Uses the Master core to perform user interface related tasks (ex: LCD printing, LED blinking, ADC measurements), while the Slave core is used to perform mathematical computations (computes pi). While operating in Mode 1, both the pi computations and other tasks are all performed on the Master core only, and since the pi computation is written as blocking code, it temporarily blocks the operation of the other application tasks (ex: ADC POT measurements, LED blinking and LCD screen updates are temporary halted while the pi computation is in progress). While operating in Mode 2, the pi computations do not interrupt/interfere with the other application operations (such as ADC POT measurements and LCD printing), since the tasks are being performed Microchip Technology Inc. 2355 West Chandler Blvd. Chandler, AZ 85224-6199 on separate cores. In Mode 2, when a pi computation is complete, the value is sent to the Master core www.microchip.com through the Master/Slave interface mailboxes, and the master core is responsible for printing the pi result to the LCD screen (along with the POT value data). The Microchip name and logo, and the Microchip logo are registered trademarks of Microchip Technology Inc. in the U.S.A. and other countries. PICkit is a trademark of Microchip Technology Inc. in the U.S.A. and To operate the application in Mode 1 (Master only), press the S3 push button on the Explorer 16/32 other countries. All other trademarks mentioned herein are property of their respective companies. Development Board when prompted to do so on the LCD screen. Alternatively, to operate in Mode 2 2018, Microchip Technology Incorporated, Printed in the U.S.A. All Rights Reserved. 3/18 (Master + Slave), press the S6 push button. DS50002707B To appreciate the difference between the two operating modes, it is suggested to continuously adjust the POT while the demo is running (and to compare the difference in LCD updating behavior between the modes). Table 1: dsPIC33CH128MP508 PIM Mapping Table 1: dsPIC33CH128MP508 PIM Mapping (Continued) PIM Device Pin dsPIC33CH128MP508 Explorer 16/32 PIM Device Pin dsPIC33CH128MP508 Explorer 16/32 Function Function Pin (80-Pin TQFP) I/Os Net Name Pin (80-Pin TQFP) I/Os Net Name 1 P1 VBUS 51 73 RP65/RD1/S1RP65/S1PWM4H/S1RD1 mikroBUS A TX P51 TXA 52 74 RP64/RD0/S1RP64/S1PWM4L/S1RD0 mikroBUS A RX P52 RXA 2 12, 25, 31, 51, 71 VDD + AVDD VDD VDD PIM 3 64 ASDA2/RE13/S1RE13 LCD D5 P3 LCDD5 53 49 SDO2/PCI19/RD8/S1SDO1/S1PCI19/S1RD8 mikroBUS B MOSI P53 MOSIB 4 77 RE14/S1RE14 LCD D6 P4 LCDD6 54 47 RP57/ASCL1/SDI2/RC9/S1RP57/S1ASCL1/S1SDI1/ mikroBUS B MISO P54 MISOB S1RC9 5 79 RE15/S1RE15 LCD D7 P5 LCDD7 55 46 RP56/ASDA1/SCK2/RC8/S1RP56/S1ASDA1/ mikroBUS B SPI SCK P55 SCKB 6 16 AN0/CMP1A/RA0/S1RA0 General Purpose I/O P6 S1SCK1/S1RC8 (1) 7 P7 2 56 61 PGC1/AN11/RP41/SDA1/RB9/S1PGC1/S1RP41/ Shared I C SDA P56 SDA (1) 8 P8 S1SDA1/S1RB9 (1) 2 57 60 PGD1/AN10/RP40/SCL1/RB8/S1PGD1/S1AN7/ Shared I C SCL P57 SCL 9 P9 S1RP40/S1SCL1/S1RB8 10 29 AN14/ISRC1/RP50/RC2/S1ANA0/S1RP50/S1RC2 mikroBUS A SPI SCK P10 SCKA 58 17 RE2/S1RE2 LED D5 P58 LED5 11 53 RP70/RD6/S1RP70/S1PWM6H/S1RD6 mikroBUS A SPI MISO P11 MISOA 59 19 RE3/S1RE3 LED D6 P59 LED6 12 33 CMP1B/RP51/RC3/S1AN8/S1CMP3B/S1RP51/S1RC3 mikroBUS A SPI MOSI P12 MOSIA 60 22 RE4/S1RE4 LED D7 P60 LED7 13 9 MCLR MCLR Reset P13 MCLR 61 24 RE5/S1RE5 LED D8 P61 LED8 14 69 RP67/RD3/S1RP67/S1PWM3L/S1RD3 mikroBUS A Chip Select P14 CSA 62 12, 25, 31, 51, 71 VDD + AVDD VDD VDD PIM 15 11, 26, 32, 50, 70 VSS + AVSS VSS VSS 63 34 OSCI/CLKI/AN5/RP32/RB0/S1AN5/S1RP32/S1RB0 Primary Oscillator In P63 OSCI 16 12, 25, 31, 51, 71 VDD + AVDD VDD VDD PIM 64 35 OSCO/CLKO/AN6/IBIAS2/RP33/RB1/ S1AN4/ Primary Oscillator Out P64 OSCO 17 2 RE0/S1RE0 LED D3 P17 LED3 S1RP33/S1RB1 18 80 RP45/PWM2L/RB13/S1RP45/S1RB13 mikroBUS B Interrupt P18 INTB 65 11, 26, 32, 50, 70 VSS + AVSS VSS VSS 19 30 RP54/RC6/S1AN11/S1CMP1B/S1RP54/S1RC6 mikroBUS B Reset P19 RSTB 66 78 TDI/RP44/PWM2H/RB12/S1RP44/S1RB12 General Purpose I/O P66 20 21 AN3/IBIAS0/RA3/S1AN0/S1CMP1A/S1PGA1P1/S1RA3 10k Potentiometer P20 POT 67 72 RP66/RD2/S1RP66/S1PWM8L/S1RD2 mikroBUS A Interrupt P67 INTA 21 18 AN1/RA1/S1AN15/S1RA1 TC1047A Temp. Sensor P21 TEMP 68 14 RD13/S1ANN0/S1PGA1N2/S1RD13 General Purpose I/O P68 22 28 AN13/ISRC0/RP49/RC1/S1ANA1/S1RP49/S1RC1 General Purpose I/O P22 69 65 RP53/RC5/S1RP53/S1PWM2L/S1RC5 General Purpose I/O P69 23 58 TDO/AN9/RP39/RB7/S1MCLR1/S1AN6/S1RP39/ mikroBUS B Chip Select P23 CSB 70 13 PCI21/RD14/S1ANN1/S1PGA2N2/S1PCI21/S1RD14 General Purpose I/O P70 S1PWM5H/S1RB7 71 P71 24 41 DACOUT/AN7/CMP1D/RP34/INT0/RB2/S1MCLR2/ mikroBUS B Analog P24 ANB 72 3 RP47/PWM1L/RB15/S1RP47/S1RB15 mikroBUS A PWM P72 PWMA S1AN3/S1ANC0/S1ANC1/S1CMP1D/S1CMP2D/ S1CMP3D/S1RP34/S1INT0/S1RB2 73 P73 SOSCI 25 40 AN15/ISRC2/RP55/RC7/S1AN12/S1RP55/S1RC7 mikroBUS A Analog P25 ANA USBOC 74 P74 SOSCO 26 45 PGC2/RP36/RB4/S1PGC2/S1AN9/S1RP36/S1PWM5L/ ICSP Prog/Debug PGC2 P26 PGC 75 11, 26, 32, 50, 70 VSS + AVSS VSS VSS S1RB4 76 38 ISRC3/RD10/S1AN13/S1CMP2B/S1RD10 General Purpose I/O P76 27 43 PGD2/AN8/RP35/RB3/S1PGD2/S1AN18/S1CMP3A/ ICSP Prog/Debug PGD2 P27 PGD 77 P77 S1PGA3P1/S1RP35/S1RB3 78 63 RP52/RC4/S1RP52/S1PWM2H/S1RC4 mikroBUS B PWM P78 PWMB 28 36 RD11/S1AN17/S1PGA1P2/S1RD11 General Purpose I/O P28 79 10 PCI22/RD15/S1PCI22/S1RD15 EEPROM Chip Select P79 EECS 29 27 RD12/S1AN14/S1PGA2P2/S1RD12 General Purpose I/O P29 80 44 RE9/S1RE9 Button S4 P80 S4 30 12, 25, 31, 51, 71 VDD + AVDD VDD VDD PIM 81 57 RE10/S1RE10 LCD E P81 LCDE 31 11, 26, 32, 50, 70 VSS + AVSS VSS VSS 82 LCD R/nW (pulled low by R4) P82 LCDRW 32 20 AN2/RA2/S1AN16/S1RA2 General Purpose I/O P32 CC2 83 1 RP46/PWM1H/RB14/S1RP46/S1RB14 Button S3 P83 S3 33 15 AN12/IBIAS3/RP48/RC0/S1AN10/S1RP48/S1RC0 General Purpose I/O P33 CC1 84 42 RE8/S1RE8 Button S6 P84 S6 34 P34 85 P85 VDDCORE 35 P35 86 P86 ENVREG 36 11, 26, 32, 50, 70 VSS + AVSS VSS VSS 87 5 RP60/PWM4H/RC12/S1RP60/S1RC12 General Purpose I/O P87 37 12, 25, 31, 51, 71 VDD + AVDD VDD VDD PIM 88 6 RP61/PWM4L/RC13/S1RP61/S1RC13 General Purpose I/O P88 38 4 RE1/S1RE1 LED D4 P38 LED4 89 52 RP71/RD7/S1RP71/S1PWM8H/S1RD7 General Purpose I/O P89 USBDN 39 75 TMS/RP42/PWM3H/RB10/S1RP42/S1RB10 General Purpose I/O P39 90 54 RP69/RD5/S1RP69/S1PWM6L/S1RD5 General Purpose I/O P90 USBDP 40 76 TCK/RP43/PWM3L/RB11/S1RP43/S1RB11 General Purpose I/O P40 91 37 RE6/S1PGA3N2/S1RE6 LED D9 P91 LED9 41 P41 92 39 RE7/S1RE7 Button S5, LED D10 P92 S5 LED10 42 P42 93 P93 LCDD0 43 P43 94 P94 LCDD1 44 59 RE11/S1RE11 LCD Register Select P44 LCDRS 95 68 RP68/RD4/S1RP68/S1PWM3H/S1RD4 mikroBUS A Reset Pin P95 RSTA 45 11, 26, 32, 50, 70 VSS + AVSS VSS VSS 96 48 PCI20/RD9/S1PCI20/S1RD9 General Purpose I/O P96 VBUSON 46 12, 25, 31, 51, 71 VDD + AVDD VDD VDD PIM 97 P97 47 7 RP62/RC14/S1RP62/S1PWM7H/S1RC14 General Purpose I/O P47 98 P98 LCDD2 48 8 RP63/RC15/S1RP63/S1PWM7L/S1RC15 General Purpose I/O P48 99 P99 LCDD3 49 66 RP58/RC10/S1RP58/S1PWM1H/S1RC10 MCP2221A/mikroBUS B RX P48 100 62 ASCL2/RE12/S1RE12 LCD D4 P100 LCDD4 50 67 RP59/RC11/S1RP59/S1PWM1L/S1RC11 MCP2221A/mikroBUS B TX P49 RXB Note 1: These pins can optionally be connected to the microcontroller if jumper resistors R1, R2 and R3 are populated. Note 1: These pins can optionally be connected to the microcontroller if jumper resistors R1, R2 and R3 are populated.