MA330027

Americas
Atlanta - 678-957-9614
Boston - 774-760-0087
Chicago - 630-285-0071
Cleveland - 216-447-0464
Dallas - 972-818-7423
Detroit - 248-538-2250
Indianapolis - 317-773-8323
Los Angeles - 949-462-9523
Phoenix - 480-792-7200
Santa Clara - 408-961-6444
Toronto - 905-673-0699
Europe
Austria - Wels - 43-7242-2244-39
Denmark - Copenhagen - 45-4450-2828
France - Paris - 33-1-69-53-63-20
Germany - Munich - 49-89-627-144-0
Italy - Milan - 39-0331-742611
Netherlands - Drunen - 31-416-690399
Spain - Madrid - 34-91-708-08-90
UK - Wokingham - 44-118-921-5869
Asia/Pacific
Australia - Sydney - 61-2-9868-6733
China - Beijing - 86-10-8569-2100
China - Chengdu - 86-28-8665-5511
Asia/Pacific (Continued)
China - Chongqing - 86-23-8980-9588
China - Hangzhou - 86-571-2819-3180
China - Hong Kong SAR - 852-2401-1200
China - Nanjing- 86-25-8473-2460
China - Qingdao - 86-532-8502-7355
China - Shanghai - 86-21-5407-5533
China - Shenyang - 86-24-2334-2829
China - Shenzhen - 86-755-8203-2660
China - Wuhan - 86-27-5980-5300
China - Xiamen - 86-592-2388138
China - Xian - 86-29-8833-7252
China - Zhuhai - 86-756-3210040
India - Bangalore - 91-80-3090-4444
India - New Delhi - 91-11-4160-8631
India - Pune - 91-20-2566-1512
Japan - Yokohama - 81-45-471-6166
Korea - Daegu - 82-53-744-4301
Korea - Seoul - 82-2-554-7200
Malaysia - Kuala Lumpur - 60-3-6201-9857
Malaysia - Penang - 60-4-227-8870
Philippines - Manila - 63-2-634-9065
Singapore - 65-6334-8870
Taiwan - Hsin Chu - 886-3-6578-300
Taiwan - Kaohsiung - 886-7-213-7830
Taiwan - Taipei - 886-2-2500-6610
Thailand - Bangkok - 66-2-694-1351
05/02/11
Microchip Technology Inc. • 2355 West Chandler Blvd. • Chandler, AZ 85224-6199
www.microchip.com
The Microchip name and logo, the Microchip logo, and MPLAB are registered trademarks of Microchip Technology
Incorporated in the U.S.A. and other countries. All other trademarks mentioned herein are property of their respective
companies. © 2011, Microchip Technology Incorporated, Printed in the U.S.A. All Rights Reserved. 08/10
DS51979B
*DS51979B*
Dual Motor Control Plug-In Module (PIM) Information Sheet
The Dual Motor Control Plug-In Module (PIM) is designed to facilitate the development of Motor
Control applications using two motors and one Digital Signal Controller (DSC) or Microcontroller
(MCU). Two Microchip dsPICDEM™ motor control development boards can be used with this
PIM to control 3-phase or stepper motors. A flexible cable connects the two boards together and
routes all signals to the appropriate pins on the DSC or MCU. The configuration of the cable and
signal was carefully chosen to support a wide range of dual motor configuration application notes
written for the dsPICDEM MCLV, MCHV, and MCSM Development Boards.
Installing MPLAB
®
IDE and C Compilers
The MPLAB Integrated Development Environment (IDE) should be installed prior to running the
Dual Motor Control demonstration. While MPLAB provides the assembler tools for development,
most of the code examples are written in C language and require a C compiler to be installed.
Microchip’s MPLAB C compiler seamlessly integrates into MPLAB IDE. Both the MPLAB IDE and
MPLAB C compiler are free (see the note below) and are available for download at
www.microchip.com/MPLAB and www.microchip.com/compilers, respectively.
Code Examples and More Information
For code examples and more information, please visit the Dual Motor Control page at http://
www.microchip.com/motor. From the Development Tools menu, click Development and Evaluation
Boards and from the list select dsPICDEM Dual Motor Control PIM MA330027. Then, from the
Downloads section, select the code for the desired Application Note and Development Board.
Refer to Table 1 for the hardware settings required for each Development Board.
Running and Debugging Applications (MCLV) Development Board
After downloading the code example and installing the development tools, please use the following
procedure to build and run your software:
1. Connect one motor to each MCLV board as described in the “dsPICDEM™ MCLV
Development Board User’s Guide” (DS70331).
2. Place the two MCLV boards side by side, on a sturdy platform.
3. Carefully insert the Dual Motor Control PIM into U9 on each MCLV board. The board on which
the PIM labeled as Master is plugged into is referred to as the Master board. The other MCLV
board is referred to as the Slave board.
4. Connect a 24V power supply to J2 on both the Master and Slave boards.
5. Connect a programmer/debugger (i.e., MPLAB ICD 3 or REAL ICE™) using the J11 connector
on the Master board.
6. Extract the Dual Motor Control software previously downloaded and load the project file.
7. In MPLAB 8.XX IDE:
- Select Programmer > Tool
and then choose the appropriate tool.
- Build the project by selecting Project > Build All.
- Download your code to the DSC or MCU by selecting Programmer > Program.
8. In MPLAB X IDE:
- Select Run > Set Project Configuration > Customize.
- Select required tool under Hardware Tools. Click Apply > Ok to confirm the selection.
- Select Run > Run Project. This will download the code to the target chip and release
reset.
9. To start a motor, press the S2 button on the corresponding board. Press the S2 button again
to stop the motor.
10. Use the potentiometers on each board to change the speed of a motor.
11. For an enhanced demonstration, the application requires the Real-Time Data Monitor (RTDM).
Connect the development computer to J8 on the Master board with a mini-USB cable and
follow the instructions provided on the Dual Motor Control web page for additional instructions
on this demonstration.
Note: Standard Evaluation (Free) – All optimization levels are enabled for 60 days, but then
revert to optimization level 1 only.
Note: When using the Dual Motor Control PIM with the dsPICDEM MCHV Development
Board, connecting the GND test point to an oscilloscope must be done only through
a High-Voltage Differential Probe.
TABLE 1: CABLE SETTINGS BASED ON APPLICATION NOTE
MCLV R1 R2 R3 R4 R5 R6 R11 R12 R13 R14 R15
Dual Shunt ON ON x ON ON OFF OFF OFF x OFF OFF
AN1299 ON ON ON x x OFF OFF OFF OFF x x
MCHV R1 R2 R3 R4 R5 R6 R11 R12 R13 R14 R15
Dual Shunt ON ON ON OFF OFF OFF OFF OFF OFF ON ON
AN1299 ON ON x x x OFF OFF OFF x x x
MCLV & MCHV R1 R2 R3 R4 R5 R6 R11 R12 R13 R14 R15
AN1160 ON ON OFF OFF OFF OFF OFF OFF ON ON ON
AN1017 ON ON x x x OFF OFF OFF x x x
MCSM R1 R2 R3 R4 R5 R6 R11 R12 R13 R14 R15
AN1307 OFF OFF ON ON ON ON ON ON OFF OFF OFF
Legend: Dual Shunt = AN1078, AN1162, AN1292, and AN1206; x = don't care
DS51979B
Dual Motor Control Plug-In Module (PIM) Information Sheet
Schematics
1
Dual Motor Control Interface PIM
03-02252 2.0
5/16/2011 2:29:39 PM
Title
Size: Number:
Date:
Revision:
Sheet of
Time:
B
M
Drawn By:
Sorin Manea
Serban Morea
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/VBUSON//VB USST/RP37/RB5
20
AN4/C1INB/USBOEN/RP3 6/RB4
21
AN3/C2INA/VPIO/RP3 5/RB3
22
AN2/C2INB/VMIO/RP34/RB2
23
PGEC3/AN1/RP33/RB1
24
PGED3/AN0/RP32/RB0
25
PGEC1/AN6/RP38/RB6
26
PGED1/AN7/RCV/RP39/RB7
27
VREF-/RA9
28
VREF+/RA10
29
AVDD
30
AVSS
31
AN8/PMA6/RP40/RB8
32
AN9/PMA7//RP41/RB9
33
AN10/CVREF/PMA13/RP42/RB10
34
AN11/PMA12/RP43/RB11
35
VSS
36
VDD_4
37
TCK/RP17/RA1
38
RP109/RF13
39
RP108/RF12
40
AN12/PMA11/RP44/RB12
41
AN13/PMA10/RP45/RB13
42
AN14/PMA1/RP46/RB14
43
AN15/PMA0/RP47/RB15
44
VSS
45
VDD_5
46
RP78/RD14
47
RP79/RD15
48
SDA2/PMA9 /RP100/RF4
49
SCL2/PMA8/RP101/RF5
50
AN28/PWM3L/PMD4/RP84/RE4
100
AN27/PWM2H/PMD3/RP83/RE3
99
AN26/PWM2L/PMD2/RP82/RE2
98
RP125/RG13
97
RP124/RG12
96
RP126/RG14
95
AN25/PWM1H/PMD1/RP81/RE1
94
AN24/PWM1L/PMD0/RP80/RE0
93
AN23/RP23/RA7
92
AN22/RP22/RA6
91
RP112/RG0
90
RP113/RG1
89
VCMPST2/RP97/RF1
88
VCMPST1/RP96/RF0
87
VDD
86
VCAP
85
C3INA /VC MPST3/RP71/RD7
84
C3INB/RP70/RD6
83
PMRD/RP69/RD5
82
PMWR/RP68/RD4
81
RP77/RD13
80
RP76/RD12
79
PMBE/RP67/RD3
78
DPH/RP66/RD2
77
VCPCO N/RP65/RD1
76
VSS
75
PGEC2/SOSCO/C3INC/T1CK/RP62/RC14
74
PGED2/SOSCI/C3IND/RP61/RC13
73
INT0/DMH/RP64/RD0
72
PMCS1/RP75/RD11
71
ASCL1/PMCS2/RP74/RD10
70
ASDA 1/DPLN/RP73/RD9
69
RT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.3V
GND
GND
GNDGND
AVDD
AVDD
AVDD_S
AGND
0.1uF
C1
0.1uF
C2
0.1uF
C3
0.1uF
C4
0.1uF
C5
0.1uF
C9
10uF
C8
+3.3V +3.3V +3.3V +3.3V +3.3V
AVDD
AGNDGND GND GND GND GND GND
M_AN8 / S_AN9
0.1uF
C6
+3.3V
GND
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
P1
MASTER PIM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
60
59
58
57
56
55
54
53
52
51
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
P2
SLAVE PIM
VUSB
M_RP72
M_RP73
M_RP74
M_RP75
M_RP64
M_RP65
M_RP66
M_RP67
M_RP76
M_HALLA
M_RP70
M_RP71
VCORE
VCORE
CAN_RX
CAN_TX
M_PWM2L
M_PWM2H
M_PWM3L
VUSB
AGND
1
TP1
GND
GND GND
TP2
GND
0 Oh m
R1
0 Oh m
R11
0 Oh m
R2
0 Oh m
R12
0 Oh m
R6
0 Oh m
R3
0 Oh m
R13
0 Oh m
R4
0 Oh m
R14
0 Oh m
R5
0 Oh m
R15

MA330027

Mfr. #:
Manufacturer:
Description:
MODULE PLUG-IN DSPIC33F 100TQFP
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet