Bläddra i källkod

SPINDLE/LASER pins changes

Scott Lahteine 7 år sedan
förälder
incheckning
ffe0e2d19a

+ 2
- 2
Marlin/pinsDebug_list.h Visa fil

@@ -515,8 +515,8 @@
515 515
 #if PIN_EXISTS(SPINDLE_LASER_ENABLE)
516 516
   REPORT_NAME_DIGITAL(SPINDLE_LASER_ENABLE_PIN, __LINE__ )
517 517
 #endif
518
-#if PIN_EXISTS(SPINDLE_SPEED_LASER_POWER)
519
-  REPORT_NAME_DIGITAL(SPINDLE_SPEED_LASER_POWER_PIN, __LINE__ )
518
+#if PIN_EXISTS(SPINDLE_LASER_PWM)
519
+  REPORT_NAME_DIGITAL(SPINDLE_LASER_PWM_PIN, __LINE__ )
520 520
 #endif
521 521
 #if PIN_EXISTS(SR_CLK)
522 522
   REPORT_NAME_DIGITAL(SR_CLK_PIN, __LINE__ )

+ 57
- 0
Marlin/pins_3DRAG.h Visa fil

@@ -43,6 +43,8 @@
43 43
 #define RAMPS_D9_PIN 8
44 44
 #define MOSFET_D_PIN 12
45 45
 
46
+#define CASE_LIGHT_PIN -1     // MUST BE HARDWARE PWM but one is not available on expansion header
47
+
46 48
 #include "pins_RAMPS.h"
47 49
 
48 50
 //
@@ -104,3 +106,58 @@
104 106
   #define BEEPER_PIN       33
105 107
 
106 108
 #endif // ULTRA_LCD && NEWPANEL
109
+
110
+/**
111
+ *  M3/M4/M5 - Spindle/Laser Control
112
+ *
113
+ *  If you want to control the speed of your spindle then you'll have
114
+ *  have to sacrifce the Extruder and pull some signals off the Z stepper
115
+ *  driver socket.
116
+ *
117
+ *  The following assumes:
118
+ *   - the Z stepper driver socket is empty
119
+ *   - the extruder driver socket has a driver board plugged into it
120
+ *   - the Z stepper wires are attached the the extruder connector
121
+ *
122
+ *  If you want to keep the extruder AND don't have a LCD display then
123
+ *  you can still control the power on/off and spindle direction.
124
+ *
125
+ *  Where to get spindle signals
126
+ *
127
+ *      stepper signal           socket name       socket name
128
+ *                                          -------
129
+ *       SPINDLE_LASER_ENABLE_PIN /ENABLE  O|     |O  VMOT
130
+ *                                    MS1  O|     |O  GND
131
+ *                                    MS2  O|     |O  2B
132
+ *                                    MS3  O|     |O  2A
133
+ *                                 /RESET  O|     |O  1A
134
+ *                                 /SLEEP  O|     |O  1B
135
+ *          SPINDLE_LASER_PWM_PIN    STEP  O|     |O  VDD
136
+ *                SPINDLE_DIR_PIN     DIR  O|     |O  GND
137
+ *                                          -------
138
+ *
139
+ *  Note: Socket names vary from vendor to vendor
140
+ */
141
+#undef SPINDLE_LASER_PWM_PIN    // Definitions in pins_RAMPS.h are not good with 3DRAG
142
+#undef SPINDLE_LASER_ENABLE_PIN
143
+#undef SPINDLE_DIR_PIN
144
+
145
+#if ENABLED(SPINDLE_LASER_ENABLE)
146
+  #if !EXTRUDERS
147
+    #undef E0_DIR_PIN
148
+    #undef E0_ENABLE_PIN
149
+    #undef E0_STEP_PIN
150
+    #undef Z_DIR_PIN
151
+    #undef Z_ENABLE_PIN
152
+    #undef Z_STEP_PIN
153
+    #define Z_DIR_PIN                28
154
+    #define Z_ENABLE_PIN             24
155
+    #define Z_STEP_PIN               26
156
+    #define SPINDLE_LASER_PWM_PIN    46  // MUST BE HARDWARE PWM
157
+    #define SPINDLE_LASER_ENABLE_PIN 62  // Pin should have a pullup!
158
+    #define SPINDLE_DIR_PIN          48
159
+  #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)) // use expansion header if no LCD in use
160
+    #define SPINDLE_LASER_ENABLE_PIN 16  // Pin should have a pullup/pulldown!
161
+    #define SPINDLE_DIR_PIN          17
162
+  #endif
163
+#endif

+ 35
- 0
Marlin/pins_AZTEEG_X3.h Visa fil

@@ -24,12 +24,20 @@
24 24
  * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments
25 25
  */
26 26
 
27
+#ifndef __AVR_ATmega2560__
28
+  #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
29
+#endif
30
+
27 31
 #if HOTENDS > 2 || E_STEPPERS > 2
28 32
   #error "Azteeg X3 supports up to 2 hotends / E-steppers. Comment out this line to continue."
29 33
 #endif
30 34
 
31 35
 #define BOARD_NAME "Azteeg X3"
32 36
 
37
+#if !PIN_EXISTS(CASE_LIGHT)         // doesn't already exist so OK to change the definition coming
38
+  #define OK_TO_CHANGE_CASE_LIGHT   // in from from the include file
39
+#endif
40
+
33 41
 #include "pins_RAMPS_13.h"
34 42
 
35 43
 //
@@ -63,3 +71,30 @@
63 71
   #define STAT_LED_BLUE_PIN 11
64 72
 
65 73
 #endif
74
+
75
+//
76
+// Misc
77
+//
78
+#if ENABLED(OK_TO_CHANGE_CASE_LIGHT) && STAT_LED_RED_PIN == 6
79
+  #undef STAT_LED_RED_PIN
80
+  #undef CASE_LIGHT_PIN
81
+  #define CASE_LIGHT_PIN 6  // open collector FET driver
82
+#endif
83
+
84
+//
85
+// M3/M4/M5 - Spindle/Laser Control
86
+//
87
+#undef SPINDLE_LASER_PWM_PIN    // Definitions in pins_RAMPS.h are no good with the AzteegX3 board
88
+#undef SPINDLE_LASER_ENABLE_PIN
89
+#undef SPINDLE_DIR_PIN
90
+
91
+#if ENABLED(SPINDLE_LASER_ENABLE)
92
+  #undef SDA                       // use EXP3 header
93
+  #undef SCL
94
+  #if SERVO0_PIN == 7
95
+    #undef SERVO0_PIN
96
+    #def SERVO0_PIN 11
97
+  #define SPINDLE_LASER_PWM_PIN     7  // MUST BE HARDWARE PWM
98
+  #define SPINDLE_LASER_ENABLE_PIN 20  // Pin should have a pullup!
99
+  #define SPINDLE_DIR_PIN          21
100
+#endif

+ 38
- 0
Marlin/pins_AZTEEG_X3_PRO.h Visa fil

@@ -30,8 +30,16 @@
30 30
 
31 31
 #define BOARD_NAME "Azteeg X3 Pro"
32 32
 
33
+#if !PIN_EXISTS(CASE_LIGHT)         // doesn't already exist so OK to change the definition coming
34
+  #define OK_TO_CHANGE_CASE_LIGHT   // in from from the include file
35
+#endif
36
+
33 37
 #include "pins_RAMPS.h"
34 38
 
39
+#ifndef __AVR_ATmega2560__
40
+  #error "Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
41
+#endif
42
+
35 43
 //
36 44
 // Servos
37 45
 //
@@ -126,7 +134,37 @@
126 134
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
127 135
   #undef SD_DETECT_PIN
128 136
   #define SD_DETECT_PIN    49 // For easy adapter board
137
+  #undef BEEPER_PIN
138
+  #define  BEEPER_PIN  12     // 33 isn't physically available to the LCD display
129 139
 #else
130 140
   #define STAT_LED_RED_PIN 32
131 141
   #define STAT_LED_BLUE_PIN 35
132 142
 #endif
143
+
144
+//
145
+// Misc. Functions
146
+//
147
+#undef DOGLCD_A0            // steal pin 44 for the case light
148
+#define DOGLCD_A0      57
149
+#if ENABLED(OK_TO_CHANGE_CASE_LIGHT)
150
+  #undef CASE_LIGHT_PIN
151
+  #define CASE_LIGHT_PIN 44    // must have a hardware PWM
152
+#endif
153
+
154
+//
155
+// M3/M4/M5 - Spindle/Laser Control
156
+//
157
+#undef SPINDLE_LASER_PWM_PIN    // Definitions in pins_RAMPS.h are no good with the AzteegX3 board
158
+#undef SPINDLE_LASER_ENABLE_PIN
159
+#undef SPINDLE_DIR_PIN
160
+
161
+#if ENABLED(SPINDLE_LASER_ENABLE)   // use EXP2 header
162
+  #if ENABLED(VIKI2) || ENABLED(miniVIKI)
163
+    #undef BTN_EN2
164
+    #define BTN_EN2             31  // need 7 for the spindle speed PWM
165
+  #endif
166
+  #define SPINDLE_LASER_PWM_PIN     7  // must have a hardware PWM
167
+  #define SPINDLE_LASER_ENABLE_PIN 20  // Pin should have a pullup!
168
+  #define SPINDLE_DIR_PIN          21
169
+#endif
170
+

+ 7
- 0
Marlin/pins_BAM_DICE_DUE.h Visa fil

@@ -30,6 +30,13 @@
30 30
 
31 31
 #define BOARD_NAME "2PrintBeta Due"
32 32
 
33
+//
34
+// M3/M4/M5 - Spindle/Laser Control
35
+//
36
+#define SPINDLE_LASER_ENABLE_PIN 66  // Pin should have a pullup/pulldown!
37
+#define SPINDLE_DIR_PIN          67
38
+#define SPINDLE_LASER_PWM_PIN    44  // MUST BE HARDWARE PWM
39
+
33 40
 #include "pins_RAMPS.h"
34 41
 
35 42
 //

+ 12
- 0
Marlin/pins_BQ_ZUM_MEGA_3D.h Visa fil

@@ -46,6 +46,18 @@
46 46
 #define ORIG_E2_AUTO_FAN_PIN  6
47 47
 #define ORIG_E3_AUTO_FAN_PIN  6
48 48
 
49
+//
50
+// Misc. Functions
51
+//
52
+#define CASE_LIGHT_PIN   44     // MUST BE HARDWARE PWM
53
+
54
+//
55
+// M3/M4/M5 - Spindle/Laser Control
56
+//
57
+#define SPINDLE_LASER_ENABLE_PIN 40  // Pin should have a pullup/pulldown!
58
+#define SPINDLE_LASER_PWM_PIN    44  // MUST BE HARDWARE PWM
59
+#define SPINDLE_DIR_PIN          42
60
+
49 61
 #include "pins_RAMPS_13.h"
50 62
 
51 63
 //

+ 34
- 0
Marlin/pins_BRAINWAVE.h Visa fil

@@ -27,6 +27,40 @@
27 27
  * https://github.com/unrepentantgeek/brainwave-arduino
28 28
  */
29 29
 
30
+/**
31
+ *  Rev B  16 JAN 2017
32
+ *
33
+ *  Added pointer to a currently available Arduino IDE extension that will
34
+ *  allow this board to use the latest Marlin software
35
+ */
36
+
37
+/**
38
+ *  Marlin_AT90USB - https://github.com/Bob-the-Kuhn/Marlin_AT90USB
39
+ *    This is the only known IDE extension that is compatible with the pin definitions
40
+ *    in this file, Adrduino 1.6.12 and the latest mainstream Marlin software.
41
+ *
42
+ *    "Marlin_AT90USB" makes PWM0A available rather than the usual PWM1C. These PWMs share
43
+ *    the same physical pin. Marlin uses TIMER1 to generate interrupts and sets it up such
44
+ *    that PWM1A, PWM1B & PWM1C can not be used.
45
+ *
46
+ *  Installation:
47
+ *
48
+ *    1. In the Arduino IDE, under Files -> Preferences paste the following URL
49
+ *       https://rawgit.com/Bob-the-Kuhn/Marlin_AT90USB/master/package_MARLIN_AT90USB_index.json
50
+ *    2. Under Tools -> Board -> Boards manager, scroll to the bottom, click on MARLIN_AT90USB
51
+ *       and then click on "Install"
52
+ *    3. Select "AT90USB646_STANDARD" from the 'Tools -> Boards' menu.
53
+ */
54
+
55
+/**
56
+ *  To burn the bootloader that comes with Marlin_AT90USB:
57
+ *
58
+ *    1. Connect your programmer to the board.
59
+ *    2. In Arduino IDE select "AT90USB646_STANDARD" and then select the programmer.
60
+ *    3. In Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message.
61
+ *    4. The programmer is no longer needed. Remove it.
62
+ */
63
+
30 64
 #ifndef __AVR_AT90USB646__
31 65
   #error "Oops!  Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu."
32 66
 #endif

+ 58
- 2
Marlin/pins_BRAINWAVE_PRO.h Visa fil

@@ -27,14 +27,70 @@
27 27
  * https://github.com/unrepentantgeek/brainwave-arduino
28 28
  */
29 29
 
30
+/**
31
+ *  Rev B  16 JAN 2017
32
+ *
33
+ *  Added pointers to currently available Arduino IDE extensions that will
34
+ *  allow this board to use the latest Marlin software
35
+ */
36
+
37
+/**
38
+ *  There are three Arduino IDE extensions that are compatible with this board
39
+ *  and with the mainstream Marlin software.  All have been used with Arduino 1.6.12
40
+ *
41
+ *  Teensyduino - http://www.pjrc.com/teensy/teensyduino.html
42
+ *    Select Teensy++ 2.0 in Arduino IDE from the 'Tools -> Boards' menu
43
+ *
44
+ *    Installation instructions are at the above URL.  Don't bother loading the
45
+ *    libraries - they are not used with the Marlin software.
46
+ *
47
+ *  Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support
48
+ *    This is basically Teensyduino but with a bootloader that can handle image sizes
49
+ *    larger than 64K.
50
+ *
51
+ *    Installation:
52
+ *
53
+ *       1. Go to the above URL, click on the "Clone or Download" button and then
54
+ *          click on "Download ZIP" button.
55
+ *       2. Unzip the file, find the "printrboard" directory and then copy it to the
56
+ *          hardware directory in Arduino.  The Arduino hardware directory will probably
57
+ *			be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware.
58
+ *       3. Restart Arduino.
59
+ *       4. Select "Printrboard" from the 'Tools -> Boards' menu.
60
+ *
61
+ *  Marlin_AT90USB - https://github.com/Bob-the-Kuhn/Marlin_AT90USB
62
+ *    Uses the bootloader from Printerboard above.
63
+ *
64
+ *    "Marlin_AT90USB" makes PWM0A available rather than the usual PWM1C. These PWMs share
65
+ *    the same physical pin. Marlin uses TIMER1 to generate interrupts and sets it up such
66
+ *    that PWM1A, PWM1B & PWM1C can not be used.
67
+ *
68
+ *    Installation:
69
+ *
70
+ *       1. In the Arduino IDE, under Files -> Preferences paste the following URL
71
+ *          https://rawgit.com/Bob-the-Kuhn/Marlin_AT90USB/master/package_MARLIN_AT90USB_index.json
72
+ *       2. Under Tools -> Board -> Boards manager, scroll to the bottom, click on MARLIN_AT90USB
73
+ *          and then click on "Install"
74
+ *       3. Select "AT90USB1286_TEENSYPP" from the 'Tools -> Boards' menu.
75
+ */
76
+
77
+/**
78
+ *  To burn the bootloader that comes with Printrboard and Marlin_AT90USB:
79
+ *
80
+ *   1. Connect your programmer to the board.
81
+ *   2. In the Arduino IDE select "Printrboard" or "AT90USB1286_TEENSYPP" and then select the programmer.
82
+ *   3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message.
83
+ *   4. The programmer is no longer needed. Remove it.
84
+ */
85
+
30 86
 #ifndef __AVR_AT90USB1286__
31
-  #error "Oops!  Make sure you have 'Brainwave Pro' selected from the 'Tools -> Boards' menu."
87
+  #error "Oops!  Make sure you have 'Teensy++ 2.0', 'AT90USB1286_TEENSYPP', or 'Printrboard' selected from the 'Tools -> Boards' menu."
32 88
 #endif
33 89
 
34 90
 #include "fastio.h"
35 91
 
36 92
 #if DISABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical.
37
-  #error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config"
93
+  #error "Uncomment '#define AT90USBxx_TEENSYPP_ASSIGNMENTS' in fastio.h for this config"
38 94
 #endif
39 95
 
40 96
 #define BOARD_NAME         "Brainwave Pro"

+ 7
- 0
Marlin/pins_FELIX2.h Visa fil

@@ -54,3 +54,10 @@
54 54
   #define SD_DETECT_PIN 6
55 55
 
56 56
 #endif // NEWPANEL && ULTRA_LCD
57
+
58
+//
59
+// M3/M4/M5 - Spindle/Laser Control
60
+//
61
+#undef SPINDLE_LASER_PWM_PIN     // Definitions in pins_RAMPS.h are not valid with this board
62
+#undef SPINDLE_LASER_ENABLE_PIN
63
+#undef SPINDLE_DIR_PIN

+ 26
- 0
Marlin/pins_GEN3_MONOLITHIC.h Visa fil

@@ -24,6 +24,31 @@
24 24
  * Gen3 Monolithic Electronics pin assignments
25 25
  */
26 26
 
27
+/**
28
+ * Rev B    26 DEC 2016
29
+ *
30
+ * added pointer to a current Arduino IDE extension
31
+ *
32
+ */
33
+
34
+/**
35
+ * A useable Arduino IDE extension (board manager) can be found at
36
+ * https://github.com/Lauszus/Sanguino
37
+ *
38
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
39
+ *
40
+ * Here's the JSON path:
41
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
42
+ *
43
+ * When installing select 1.0.2
44
+ *
45
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
46
+ * Just use the above JSON URL instead of Sparkfun's JSON.
47
+ *
48
+ * Once installed select the Sanguino board and then select the CPU.
49
+ *
50
+ */
51
+
27 52
 #ifndef __AVR_ATmega644P__
28 53
   #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
29 54
 #endif
@@ -73,3 +98,4 @@
73 98
 #define PS_ON_PIN          14 // Alex, does this work on the card?
74 99
 
75 100
 // Alex extras from Gen3+
101
+

+ 26
- 1
Marlin/pins_GEN3_PLUS.h Visa fil

@@ -24,6 +24,32 @@
24 24
  * Gen3+ pin assignments
25 25
  */
26 26
 
27
+/**
28
+ * Rev B    26 DEC 2016
29
+ *
30
+ * added pointer to a current Arduino IDE extension
31
+ *
32
+ */
33
+
34
+/**
35
+ * A useable Arduino IDE extension (board manager) can be found at
36
+ * https://github.com/Lauszus/Sanguino
37
+ *
38
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
39
+ *
40
+ * Here's the JSON path:
41
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
42
+ *
43
+ * When installing select 1.0.2
44
+ *
45
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
46
+ * Just use the above JSON URL instead of Sparkfun's JSON.
47
+ *
48
+ * Once installed select the SANGUINO board and then select the CPU.
49
+ *
50
+ */
51
+
52
+
27 53
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
28 54
   #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
29 55
 #endif
@@ -73,4 +99,3 @@
73 99
 //
74 100
 #define SDSS                4
75 101
 #define PS_ON_PIN          14
76
-

+ 35
- 0
Marlin/pins_GEN6.h Visa fil

@@ -24,6 +24,33 @@
24 24
  * Gen6 pin assignments
25 25
  */
26 26
 
27
+ /**
28
+ * Rev B    26 DEC 2016
29
+ *
30
+ * 1) added pointer to a current Arduino IDE extension
31
+ * 2) added support for M3, M4 & M5 spindle control commands
32
+ * 3) added case light pin definition
33
+ *
34
+ */
35
+
36
+/**
37
+ * A useable Arduino IDE extension (board manager) can be found at
38
+ * https://github.com/Lauszus/Sanguino
39
+ *
40
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
41
+ *
42
+ * Here's the JSON path:
43
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
44
+ *
45
+ * When installing select 1.0.2
46
+ *
47
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
48
+ * Just use the above JSON URL instead of Sparkfun's JSON.
49
+ *
50
+ * Once installed select the Sanguino board and then select the CPU.
51
+ *
52
+ */
53
+
27 54
 #ifndef __AVR_ATmega644P__
28 55
   #ifndef __AVR_ATmega1284P__
29 56
     #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
@@ -80,7 +107,15 @@
80 107
 //
81 108
 #define SDSS               17
82 109
 #define DEBUG_PIN           0
110
+#define CASE_LIGHT_PIN   16     // MUST BE HARDWARE PWM
83 111
 
84 112
 // RS485 pins
85 113
 #define TX_ENABLE_PIN      12
86 114
 #define RX_ENABLE_PIN      13
115
+
116
+//
117
+// M3/M4/M5 - Spindle/Laser Control
118
+//
119
+#define SPINDLE_LASER_ENABLE_PIN  5     // Pin should have a pullup/pulldown!
120
+#define SPINDLE_LASER_PWM_PIN    16     // MUST BE HARDWARE PWM
121
+#define SPINDLE_DIR_PIN           6

+ 26
- 0
Marlin/pins_GEN6_DELUXE.h Visa fil

@@ -24,6 +24,32 @@
24 24
  * Gen6 Deluxe pin assignments
25 25
  */
26 26
 
27
+/**
28
+ * Rev B    26 DEC 2016
29
+ *
30
+ * added pointer to a current Arduino IDE extension
31
+ *
32
+ */
33
+
34
+/**
35
+ * A useable Arduino IDE extension (board manager) can be found at
36
+ * https://github.com/Lauszus/Sanguino
37
+ *
38
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
39
+ *
40
+ * Here's the JSON path:
41
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
42
+ *
43
+ * When installing select 1.0.2
44
+ *
45
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
46
+ * Just use the above JSON URL instead of Sparkfun's JSON.
47
+ *
48
+ * Once installed select the SANGUINO board and then select the CPU.
49
+ *
50
+ */
51
+
52
+
27 53
 #define BOARD_NAME "Gen6 Deluxe"
28 54
 
29 55
 #include "pins_GEN6.h"

+ 49
- 3
Marlin/pins_GEN7_12.h Visa fil

@@ -24,8 +24,35 @@
24 24
  * Gen7 v1.1, v1.2, v1.3 pin assignments
25 25
  */
26 26
 
27
+ /**
28
+ * Rev B    26 DEC 2016
29
+ *
30
+ * 1) added pointer to a current Arduino IDE extension
31
+ * 2) added support for M3, M4 & M5 spindle control commands
32
+ * 3) added case light pin definition
33
+ *
34
+ */
35
+
36
+/**
37
+ * A useable Arduino IDE extension (board manager) can be found at
38
+ * https://github.com/Lauszus/Sanguino
39
+ *
40
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
41
+ *
42
+ * Here's the JSON path:
43
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
44
+ *
45
+ * When installing select 1.0.2
46
+ *
47
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
48
+ * Just use the above JSON URL instead of Sparkfun's JSON.
49
+ *
50
+ * Once installed select the Sanguino board and then select the CPU.
51
+ *
52
+ */
53
+
27 54
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
28
-  #error "Oops!  Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu."
55
+  #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
29 56
 #endif
30 57
 
31 58
 #ifndef BOARD_NAME
@@ -39,10 +66,13 @@
39 66
 //
40 67
 // Limit Switches
41 68
 //
42
-#define X_STOP_PIN          7
43
-#define Y_STOP_PIN          5
69
+#define X_MIN_PIN           7
70
+#define Y_MIN_PIN           5
44 71
 #define Z_MIN_PIN           1
45 72
 #define Z_MAX_PIN           0
73
+#define Y_MAX_PIN           2
74
+#define X_MAX_PIN           6
75
+
46 76
 
47 77
 //
48 78
 // Z Probe (when not Z_MIN_PIN)
@@ -91,6 +121,12 @@
91 121
 //
92 122
 #define PS_ON_PIN          15
93 123
 
124
+#if GEN7_VERSION < 13
125
+  #define CASE_LIGHT_PIN   16     // MUST BE HARDWARE PWM
126
+#else     // Gen7 v1.3 removed the I2C connector & signals so need to get PWM off the PC power supply header
127
+  #define CASE_LIGHT_PIN   15     // MUST BE HARDWARE PWM
128
+#endif
129
+
94 130
 // All these generations of Gen7 supply thermistor power
95 131
 // via PS_ON, so ignore bad thermistor readings
96 132
 #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
@@ -101,3 +137,13 @@
101 137
 #define TX_ENABLE_PIN      12
102 138
 #define RX_ENABLE_PIN      13
103 139
 
140
+//
141
+// M3/M4/M5 - Spindle/Laser Control
142
+//
143
+#define SPINDLE_LASER_ENABLE_PIN 10  // Pin should have a pullup/pulldown!
144
+#define SPINDLE_DIR_PIN          11
145
+#if GEN7_VERSION < 13
146
+  #define SPINDLE_LASER_PWM_PIN  16  // MUST BE HARDWARE PWM
147
+#else  // Gen7 v1.3 removed the I2C connector & signals so need to get PWM off the PC power supply header
148
+  #define SPINDLE_LASER_PWM_PIN  15  // MUST BE HARDWARE PWM
149
+#endif

+ 25
- 0
Marlin/pins_GEN7_13.h Visa fil

@@ -24,6 +24,31 @@
24 24
  * Gen7 v1.3 pin assignments
25 25
  */
26 26
 
27
+ /**
28
+ * Rev B    26 DEC 2016
29
+ *
30
+ * added pointer to a current Arduino IDE extension
31
+ *
32
+ */
33
+
34
+/**
35
+ * A useable Arduino IDE extension (board manager) can be found at
36
+ * https://github.com/Lauszus/Sanguino
37
+ *
38
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
39
+ *
40
+ * Here's the JSON path:
41
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
42
+ *
43
+ * When installing select 1.0.2
44
+ *
45
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
46
+ * Just use the above JSON URL instead of Sparkfun's JSON.
47
+ *
48
+ * Once installed select the Sanguino board and then select the CPU.
49
+ *
50
+ */
51
+
27 52
 #define BOARD_NAME "Gen7 v1.3"
28 53
 
29 54
 #define GEN7_VERSION 13 // v1.3

+ 42
- 7
Marlin/pins_GEN7_14.h Visa fil

@@ -24,8 +24,35 @@
24 24
  * Gen7 v1.4 pin assignments
25 25
  */
26 26
 
27
+/**
28
+ * Rev B    26 DEC 2016
29
+ *
30
+ * 1) added pointer to a current Arduino IDE extension
31
+ * 2) added support for M3, M4 & M5 spindle control commands
32
+ * 3) added case light pin definition
33
+ *
34
+ */
35
+
36
+/**
37
+ * A useable Arduino IDE extension (board manager) can be found at
38
+ * https://github.com/Lauszus/Sanguino
39
+ *
40
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
41
+ *
42
+ * Here's the JSON path:
43
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
44
+ *
45
+ * When installing select 1.0.2
46
+ *
47
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
48
+ * Just use the above JSON URL instead of Sparkfun's JSON.
49
+ *
50
+ * Once installed select the Sanguino board and then select the CPU.
51
+ *
52
+ */
53
+
27 54
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
28
-  #error "Oops!  Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu."
55
+  #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
29 56
 #endif
30 57
 
31 58
 #define BOARD_NAME "Gen7 v1.4"
@@ -67,17 +94,25 @@
67 94
 //
68 95
 // Heaters
69 96
 //
70
-#define HEATER_0_PIN 4
71
-#define HEATER_BED_PIN 3
97
+#define HEATER_0_PIN        4
98
+#define HEATER_BED_PIN      3
72 99
 
73 100
 //
74 101
 // Misc. Functions
75 102
 //
76
-#define PS_ON_PIN 15
103
+#define PS_ON_PIN          15
104
+#define CASE_LIGHT_PIN     15    // MUST BE HARDWARE PWM
77 105
 
78 106
 // A pin for debugging
79
-#define DEBUG_PIN 0
107
+#define DEBUG_PIN           0
80 108
 
81 109
 // RS485 pins
82
-#define TX_ENABLE_PIN 12
83
-#define RX_ENABLE_PIN 13
110
+#define TX_ENABLE_PIN      12
111
+#define RX_ENABLE_PIN      13
112
+
113
+//
114
+// M3/M4/M5 - Spindle/Laser Control
115
+//
116
+#define SPINDLE_LASER_ENABLE_PIN 20  // Pin should have a pullup/pulldown!
117
+#define SPINDLE_LASER_PWM_PIN    16  // MUST BE HARDWARE PWM
118
+#define SPINDLE_DIR_PIN          21

+ 36
- 1
Marlin/pins_GEN7_CUSTOM.h Visa fil

@@ -27,8 +27,35 @@
27 27
  * Please review the pins and adjust them for your needs.
28 28
  */
29 29
 
30
+/**
31
+ * Rev B    26 DEC 2016
32
+ *
33
+ * 1) added pointer to a current Arduino IDE extension
34
+ * 2) added support for M3, M4 & M5 spindle control commands
35
+ * 3) added case light pin definition
36
+ *
37
+ */
38
+
39
+/**
40
+ * A useable Arduino IDE extension (board manager) can be found at
41
+ * https://github.com/Lauszus/Sanguino
42
+ *
43
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
44
+ *
45
+ * Here's the JSON path:
46
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
47
+ *
48
+ * When installing select 1.0.2
49
+ *
50
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
51
+ * Just use the above JSON URL instead of Sparkfun's JSON.
52
+ *
53
+ * Once installed select the Sanguino board and then select the CPU.
54
+ *
55
+ */
56
+
30 57
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
31
-  #error "Oops!  Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu."
58
+  #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
32 59
 #endif
33 60
 
34 61
 #define BOARD_NAME      "Gen7 Custom"
@@ -76,6 +103,7 @@
76 103
 //
77 104
 #define SDSS            31  // SCL pin of I2C header || CS Pin for SD Card support
78 105
 #define PS_ON_PIN       19
106
+#define CASE_LIGHT_PIN  15    // MUST BE HARDWARE PWM
79 107
 
80 108
 // A pin for debugging
81 109
 #define DEBUG_PIN       -1
@@ -101,3 +129,10 @@
101 129
 // RS485 pins
102 130
 //#define TX_ENABLE_PIN   12
103 131
 //#define RX_ENABLE_PIN   13
132
+
133
+//
134
+// M3/M4/M5 - Spindle/Laser Control
135
+//
136
+#define SPINDLE_LASER_ENABLE_PIN  5  // Pin should have a pullup/pulldown!
137
+#define SPINDLE_LASER_PWM_PIN    16  // MUST BE HARDWARE PWM
138
+#define SPINDLE_DIR_PIN           6

+ 5
- 0
Marlin/pins_K8400.h Visa fil

@@ -66,3 +66,8 @@
66 66
 #undef PS_ON_PIN
67 67
 #undef KILL_PIN
68 68
 #undef SD_DETECT_PIN
69
+
70
+#if Z_STEP_PIN == 26
71
+  #undef Z_STEP_PIN
72
+  #define Z_STEP_PIN 32
73
+#endif

+ 8
- 0
Marlin/pins_MEGACONTROLLER.h Visa fil

@@ -127,6 +127,7 @@
127 127
 //
128 128
 #define SDSS               53
129 129
 #define LED_PIN            13
130
+#define CASE_LIGHT_PIN      2
130 131
 
131 132
 //
132 133
 // LCD / Controller
@@ -152,3 +153,10 @@
152 153
 
153 154
   #define SD_DETECT_PIN    49
154 155
 #endif // MINIPANEL
156
+
157
+//
158
+// M3/M4/M5 - Spindle/Laser Control
159
+//
160
+#define SPINDLE_LASER_PWM_PIN     6  // MUST BE HARDWARE PWM
161
+#define SPINDLE_LASER_ENABLE_PIN  7  // Pin should have a pullup!
162
+#define SPINDLE_DIR_PIN           8

+ 8
- 0
Marlin/pins_MEGATRONICS.h Visa fil

@@ -97,6 +97,7 @@
97 97
 #define SDSS               53
98 98
 #define LED_PIN            13
99 99
 #define PS_ON_PIN          12
100
+#define CASE_LIGHT_PIN      2
100 101
 
101 102
 //
102 103
 // LCD / Controller
@@ -120,3 +121,10 @@
120 121
   #define SD_DETECT_PIN   -1   // RAMPS doesn't use this
121 122
 
122 123
 #endif // ULTRA_LCD && NEWPANEL
124
+
125
+//
126
+// M3/M4/M5 - Spindle/Laser Control
127
+//
128
+#define SPINDLE_LASER_PWM_PIN     3  // MUST BE HARDWARE PWM
129
+#define SPINDLE_LASER_ENABLE_PIN  4  // Pin should have a pullup!
130
+#define SPINDLE_DIR_PIN          11

+ 10
- 2
Marlin/pins_MEGATRONICS_2.h Visa fil

@@ -71,8 +71,8 @@
71 71
 #define E1_DIR_PIN         39
72 72
 #define E1_ENABLE_PIN      28
73 73
 
74
-#define E2_STEP_PIN        23
75
-#define E2_DIR_PIN         24
74
+#define E2_STEP_PIN        23 // ? schematic says 24
75
+#define E2_DIR_PIN         24 // ? schematic says 23
76 76
 #define E2_ENABLE_PIN      22
77 77
 
78 78
 //
@@ -112,6 +112,7 @@
112 112
 #define SDSS               53
113 113
 #define LED_PIN            13
114 114
 #define PS_ON_PIN          12
115
+#define CASE_LIGHT_PIN      2
115 116
 
116 117
 //
117 118
 // LCD / Controller
@@ -129,3 +130,10 @@
129 130
 #define BTN_EN1            61
130 131
 #define BTN_EN2            59
131 132
 #define BTN_ENC            43
133
+
134
+//
135
+// M3/M4/M5 - Spindle/Laser Control
136
+//
137
+#define SPINDLE_LASER_PWM_PIN          3  // MUST BE HARDWARE PWM
138
+#define SPINDLE_LASER_ENABLE_PIN      16  // Pin should have a pullup!
139
+#define SPINDLE_DIR_PIN               11

+ 27
- 0
Marlin/pins_MEGATRONICS_3.h Visa fil

@@ -28,6 +28,8 @@
28 28
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 29
 #endif
30 30
 
31
+#define MEGATRONICS_31
32
+
31 33
 #if ENABLED(MEGATRONICS_31)
32 34
   #define BOARD_NAME       "Megatronics v3.1"
33 35
 #else
@@ -129,6 +131,7 @@
129 131
 #define SDSS               53
130 132
 #define LED_PIN            13
131 133
 #define PS_ON_PIN          12
134
+#define CASE_LIGHT_PIN     45 // try the keypad connector
132 135
 
133 136
 //
134 137
 // LCD / Controller
@@ -164,3 +167,27 @@
164 167
   #endif
165 168
 
166 169
 #endif
170
+
171
+//
172
+// M3/M4/M5 - Spindle/Laser Control
173
+//
174
+#if DISABLED(REPRAPWORLD_KEYPAD)     // try to use the keypad connector first
175
+  #define SPINDLE_LASER_PWM_PIN         44  // MUST BE HARDWARE PWM
176
+  #define SPINDLE_LASER_ENABLE_PIN      43  // Pin should have a pullup!
177
+  #define SPINDLE_DIR_PIN               42
178
+#elif EXTRUDERS <= 2
179
+  // try to hijack the last extruder so that we can get the PWM signal off the Y breakout
180
+  // move all the Y signals to the E2 extruder socket - makes dual Y steppers harder
181
+  #undef Y_ENABLE_PIN
182
+  #undef Y_STEP_PIN
183
+  #undef Y_DIR_PIN
184
+  #undef E2_STEP_PIN
185
+  #undef E2_ENABLE_PIN
186
+  #undef E2_DIR_PIN
187
+  #define Y_ENABLE_PIN          23
188
+  #define Y_STEP_PIN            22
189
+  #define Y_DIR_PIN             60
190
+  #define SPINDLE_LASER_PWM_PIN          4  // MUST BE HARDWARE PWM
191
+  #define SPINDLE_LASER_ENABLE_PIN      17  // Pin should have a pullup!
192
+  #define SPINDLE_DIR_PIN                5
193
+#endif

+ 27
- 4
Marlin/pins_MIGHTYBOARD_REVE.h Visa fil

@@ -41,6 +41,17 @@
41 41
  *
42 42
  */
43 43
 
44
+/**
45
+ * Rev B  2 JAN 2017
46
+ *
47
+ *  Added pin definitions for:
48
+ *    M3, M4 & M5 spindle control commands
49
+ *    case light
50
+ *
51
+ *  Corrected pin assignment for MOSFET_B_PIN pin. Changed it from 9 to 11.  The port
52
+ *  number (B5) agrees with the schematic but B5 is assigned to logical pin 11.
53
+ */
54
+
44 55
 #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
45 56
   #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
46 57
 #endif
@@ -140,7 +151,7 @@
140 151
 // With no heated bed, an additional 24V fan is possible.
141 152
 //
142 153
 #define MOSFET_A_PIN     6 // H3
143
-#define MOSFET_B_PIN    11 // B5
154
+#define MOSFET_B_PIN    11 // B5 - Rev A of this file had this pin assigned to 9
144 155
 #define MOSFET_C_PIN    45 // L4
145 156
 #define MOSFET_D_PIN    44 // L5
146 157
 
@@ -193,11 +204,11 @@
193 204
 #define LED_PIN             13 // B7
194 205
 #define CUTOFF_RESET_PIN    16 // H1
195 206
 #define CUTOFF_TEST_PIN     17 // H0
207
+#define CASE_LIGHT_PIN      44 // L5   MUST BE HARDWARE PWM
196 208
 
197 209
 //
198 210
 // LCD / Controller
199 211
 //
200
-
201 212
 #ifdef REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
202 213
 
203 214
   #define LCD_PINS_RS           33 // C4, LCD-STROBE
@@ -246,7 +257,6 @@
246 257
 
247 258
 #endif
248 259
 
249
-
250 260
 //
251 261
 // SD Card
252 262
 //
@@ -255,7 +265,20 @@
255 265
 
256 266
 #define MAX_PIN             THERMO_SCK_PIN
257 267
 
258
-//check if all pins are defined in mega/pins_arduino.h
268
+//
269
+// M3/M4/M5 - Spindle/Laser Control
270
+//
271
+#define SPINDLE_LASER_ENABLE_PIN 66  // K4   Pin should have a pullup!
272
+#define SPINDLE_LASER_PWM_PIN     8  // H5   MUST BE HARDWARE PWM
273
+#define SPINDLE_DIR_PIN          67  // K5
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+// Check if all pins are defined in mega/pins_arduino.h
259 282
 #include <Arduino.h>
260 283
 static_assert(NUM_DIGITAL_PINS > MAX_PIN, "add missing pins to [arduino dir]/hardware/arduino/avr/variants/mega/pins_arduino.h based on fastio.h"
261 284
                                           "to digital_pin_to_port_PGM, digital_pin_to_bit_mask_PGM, digital_pin_to_timer_PGM, NUM_DIGITAL_PINS, see below");

+ 10
- 0
Marlin/pins_MINIRAMBO.h Visa fil

@@ -111,6 +111,7 @@
111 111
 //
112 112
 #define SDSS               53
113 113
 #define LED_PIN            13
114
+#define CASE_LIGHT_PIN      9
114 115
 
115 116
 //
116 117
 // LCD / Controller
@@ -140,3 +141,12 @@
140 141
 
141 142
   #endif // NEWPANEL
142 143
 #endif // ULTRA_LCD
144
+
145
+//
146
+// M3/M4/M5 - Spindle/Laser Control
147
+//
148
+
149
+// use P1 connector for spindle pins
150
+#define SPINDLE_LASER_PWM_PIN     9  // MUST BE HARDWARE PWM
151
+#define SPINDLE_LASER_ENABLE_PIN 18  // Pin should have a pullup!
152
+#define SPINDLE_DIR_PIN          19

+ 23
- 0
Marlin/pins_MINITRONICS.h Visa fil

@@ -24,6 +24,13 @@
24 24
  * Minitronics v1.0/1.1 pin assignments
25 25
  */
26 26
 
27
+/**
28
+ * Rev B   2 JAN 2017
29
+ *
30
+ *  Added pin definitions for M3, M4 & M5 spindle control commands
31
+ *
32
+ */
33
+
27 34
 #ifndef __AVR_ATmega1281__
28 35
   #error "Oops!  Make sure you have 'Minitronics' selected from the 'Tools -> Boards' menu."
29 36
 #endif
@@ -123,3 +130,19 @@
123 130
 
124 131
   #define SD_DETECT_PIN    -1 // Minitronics doesn't use this
125 132
 #endif
133
+
134
+//
135
+// M3/M4/M5 - Spindle/Laser Control
136
+//
137
+#if ENABLED(SPINDLE_LASER_ENABLE)  // assumes we're only doing CNC work (no 3D printing)
138
+  #undef HEATER_BED_PIN
139
+  #undef TEMP_BED_PIN           // need to free up some pins but also need to
140
+  #undef TEMP_0_PIN             // re-assign them (to unused pins) because Marlin
141
+  #undef TEMP_1_PIN             // requires the presence of certain pins or else it
142
+  #define HEATER_BED_PIN      4  // won't compile
143
+  #define TEMP_BED_PIN       50
144
+  #define TEMP_0_PIN         51
145
+  #define SPINDLE_LASER_ENABLE_PIN      52 // using A6 because it already has a pull up on it
146
+  #define SPINDLE_LASER_PWM_PIN          3 // WARNING - LED & resistor pull up to +12/+24V stepper voltage
147
+  #define SPINDLE_DIR_PIN               53
148
+#endif

+ 12
- 1
Marlin/pins_MKS_BASE.h Visa fil

@@ -22,6 +22,8 @@
22 22
 
23 23
 /**
24 24
  * MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments
25
+ *
26
+ * Rev B - Override pin definitions for CASE_LIGHT and M3/M4/M5 spindle control
25 27
  */
26 28
 
27 29
 #if HOTENDS > 2 || E_STEPPERS > 2
@@ -36,4 +38,13 @@
36 38
 // Power outputs EFBF or EFBE
37 39
 #define MOSFET_D_PIN 7
38 40
 
39
-#include "pins_RAMPS.h"
41
+#define CASE_LIGHT_PIN            2
42
+
43
+//
44
+// M3/M4/M5 - Spindle/Laser Control
45
+//
46
+#define SPINDLE_LASER_PWM_PIN     2  // MUST BE HARDWARE PWM
47
+#define SPINDLE_LASER_ENABLE_PIN 15  // Pin should have a pullup!
48
+#define SPINDLE_DIR_PIN          19
49
+
50
+#include "pins_RAMPS.h"

+ 25
- 0
Marlin/pins_OMCA.h Visa fil

@@ -51,6 +51,31 @@
51 51
  * REF http://sanguino.cc/hardware
52 52
  */
53 53
 
54
+/**
55
+ * Rev B    26 DEC 2016
56
+ *
57
+ * added pointer to a current Arduino IDE extension
58
+ *
59
+ */
60
+
61
+/**
62
+ * A useable Arduino IDE extension (board manager) can be found at
63
+ * https://github.com/Lauszus/Sanguino
64
+ *
65
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
66
+ *
67
+ * Here's the JSON path:
68
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
69
+ *
70
+ * When installing select 1.0.2
71
+ *
72
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
73
+ * Just use the above JSON URL instead of Sparkfun's JSON.
74
+ *
75
+ * Once installed select the Sanguino board and then select the CPU.
76
+ *
77
+ */
78
+
54 79
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
55 80
   #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)"
56 81
 #endif

+ 26
- 1
Marlin/pins_OMCA_A.h Visa fil

@@ -50,8 +50,33 @@
50 50
  *
51 51
  */
52 52
 
53
+/**
54
+ * Rev B    26 DEC 2016
55
+ *
56
+ * added pointer to a current Arduino IDE extension
57
+ *
58
+ */
59
+
60
+/**
61
+ * A useable Arduino IDE extension (board manager) can be found at
62
+ * https://github.com/Lauszus/Sanguino
63
+ *
64
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
65
+ *
66
+ * Here's the JSON path:
67
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
68
+ *
69
+ * When installing select 1.0.2
70
+ *
71
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
72
+ * Just use the above JSON URL instead of Sparkfun's JSON.
73
+ *
74
+ * Once installed select the Sanguino board and then select the CPU.
75
+ *
76
+ */
77
+
53 78
 #ifndef __AVR_ATmega644__
54
-  #error "Oops!  Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu."
79
+  #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
55 80
 #endif
56 81
 
57 82
 #define BOARD_NAME         "Alpha OMCA"

+ 8
- 0
Marlin/pins_RAMBO.h Visa fil

@@ -137,6 +137,7 @@
137 137
 #define LED_PIN            13
138 138
 #define FILWIDTH_PIN        3   // Analog Input
139 139
 #define PS_ON_PIN           4
140
+#define CASE_LIGHT_PIN     46
140 141
 
141 142
 //
142 143
 // LCD / Controller
@@ -208,3 +209,10 @@
208 209
   #endif // !NEWPANEL
209 210
 
210 211
 #endif // ULTRA_LCD
212
+
213
+//
214
+// M3/M4/M5 - Spindle/Laser Control
215
+//
216
+#define SPINDLE_LASER_PWM_PIN    45  // MUST BE HARDWARE PWM
217
+#define SPINDLE_LASER_ENABLE_PIN 31  // Pin should have a pullup!
218
+#define SPINDLE_DIR_PIN          32

+ 26
- 0
Marlin/pins_RAMPS.h Visa fil

@@ -204,6 +204,16 @@
204 204
 
205 205
 #define PS_ON_PIN          12
206 206
 
207
+#if !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN)
208
+  #undef CASE_LIGHT_PIN
209
+  #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
210
+    #define CASE_LIGHT_PIN   6      // MUST BE HARDWARE PWM
211
+  #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
212
+      && (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD)))  // try to use AUX 2
213
+    #define CASE_LIGHT_PIN   44     // MUST BE HARDWARE PWM
214
+  #endif
215
+#endif
216
+
207 217
 //
208 218
 // LCD / Controller
209 219
 //
@@ -361,3 +371,19 @@
361 371
   #endif // NEWPANEL
362 372
 
363 373
 #endif // ULTRA_LCD
374
+
375
+//
376
+// M3/M4/M5 - Spindle/Laser Control
377
+//
378
+#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE_PIN)
379
+  #if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // try to use servo connector first
380
+    #define SPINDLE_LASER_ENABLE_PIN  4  // Pin should have a pullup/pulldown!
381
+    #define SPINDLE_LASER_PWM_PIN     6  // MUST BE HARDWARE PWM
382
+    #define SPINDLE_DIR_PIN           5
383
+  #elif !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) \
384
+      && (ENABLED(PANEL_ONE) || ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(MINIPANEL) || ENABLED(REPRAPWORLD_KEYPAD)))  // try to use AUX 2
385
+    #define SPINDLE_LASER_ENABLE_PIN 40  // Pin should have a pullup/pulldown!
386
+    #define SPINDLE_LASER_PWM_PIN    44  // MUST BE HARDWARE PWM
387
+    #define SPINDLE_DIR_PIN          65
388
+  #endif
389
+#endif

+ 8
- 0
Marlin/pins_RAMPS_OLD.h Visa fil

@@ -101,3 +101,11 @@
101 101
 #define SDPOWER            48
102 102
 #define SDSS               53
103 103
 #define LED_PIN            13
104
+#define CASE_LIGHT_PIN     45     // MUST BE HARDWARE PWM
105
+
106
+//
107
+// M3/M4/M5 - Spindle/Laser Control
108
+//
109
+#define SPINDLE_LASER_ENABLE_PIN 41  // Pin should have a pullup/pulldown!
110
+#define SPINDLE_LASER_PWM_PIN    45  // MUST BE HARDWARE PWM
111
+#define SPINDLE_DIR_PIN          43

+ 9
- 9
Marlin/pins_RIGIDBOARD.h Visa fil

@@ -82,16 +82,16 @@
82 82
 //
83 83
 // Heaters / Fans
84 84
 //
85
-#undef  HEATER_BED_PIN
85
+#undef HEATER_BED_PIN
86 86
 #define HEATER_BED_PIN     10
87 87
 
88
-#undef  FAN_PIN
88
+#undef FAN_PIN
89 89
 #define FAN_PIN             8 // Same as RAMPS_13_EEF
90 90
 
91 91
 //
92 92
 // Misc. Functions
93 93
 //
94
-#undef  PS_ON_PIN
94
+#undef PS_ON_PIN
95 95
 #define PS_ON_PIN          -1
96 96
 
97 97
 //
@@ -110,24 +110,24 @@
110 110
   #define BTN_RT           32
111 111
 
112 112
   // 'R' button
113
-  #undef  BTN_ENC
113
+  #undef BTN_ENC
114 114
   #define BTN_ENC 31
115 115
 
116 116
   // Disable encoder
117
-  #undef  BTN_EN1
117
+  #undef BTN_EN1
118 118
   #define BTN_EN1 -1
119
-  #undef  BTN_EN2
119
+  #undef BTN_EN2
120 120
   #define BTN_EN2 -1
121 121
 
122
-  #undef  SD_DETECT_PIN
122
+  #undef SD_DETECT_PIN
123 123
   #define SD_DETECT_PIN 22
124 124
 
125 125
 #elif ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
126 126
 
127
-  #undef  SD_DETECT_PIN
127
+  #undef SD_DETECT_PIN
128 128
   #define SD_DETECT_PIN 22
129 129
 
130
-  #undef  KILL_PIN
130
+  #undef KILL_PIN
131 131
   #define KILL_PIN 32
132 132
 
133 133
 #endif

+ 10
- 2
Marlin/pins_RUMBA.h Visa fil

@@ -100,7 +100,7 @@
100 100
 #endif
101 101
 
102 102
 #if TEMP_SENSOR_2 == -1
103
-  #define TEMP_2_PIN        7   // Analog Input (connector *K3* on RUMBA thermocouple ADD ON is used <-- this can't be used when TEMP_SENSOR_BED is defined as thermocouple)
103
+  #define TEMP_2_PIN        7   // Analog Input (connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_BED is defined as thermocouple)
104 104
 #else
105 105
   #define TEMP_2_PIN       13   // Analog Input (default connector for thermistor *T2* on rumba board is used)
106 106
 #endif
@@ -109,7 +109,7 @@
109 109
 //#define TEMP_X_PIN         12   // Analog Input (default connector for thermistor *T3* on rumba board is used)
110 110
 
111 111
 #if TEMP_SENSOR_BED == -1
112
-  #define TEMP_BED_PIN      7   // Analog Input (connector *K3* on RUMBA thermocouple ADD ON is used <-- this can't be used when TEMP_SENSOR_2 is defined as thermocouple)
112
+  #define TEMP_BED_PIN      7   // Analog Input (connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_2 is defined as thermocouple)
113 113
 #else
114 114
   #define TEMP_BED_PIN     11   // Analog Input (default connector for thermistor *THB* on rumba board is used)
115 115
 #endif
@@ -133,6 +133,7 @@
133 133
 #define LED_PIN            13
134 134
 #define PS_ON_PIN          45
135 135
 #define KILL_PIN           46
136
+#define CASE_LIGHT_PIN     45
136 137
 
137 138
 //
138 139
 // LCD / Controller
@@ -148,3 +149,10 @@
148 149
 #define BTN_EN1            11
149 150
 #define BTN_EN2            12
150 151
 #define BTN_ENC            43
152
+
153
+//
154
+// M3/M4/M5 - Spindle/Laser Control
155
+//
156
+#define SPINDLE_LASER_PWM_PIN     4  // MUST BE HARDWARE PWM
157
+#define SPINDLE_LASER_ENABLE_PIN 14  // Pin should have a pullup!
158
+#define SPINDLE_DIR_PIN          15

+ 90
- 8
Marlin/pins_SANGUINOLOLU_11.h Visa fil

@@ -24,6 +24,33 @@
24 24
  * Sanguinololu board pin assignments
25 25
  */
26 26
 
27
+/**
28
+ * Rev B    26 DEC 2016
29
+ *
30
+ * 1) added pointer to a current Arduino IDE extension
31
+ * 2) added support for M3, M4 & M5 spindle control commands
32
+ * 3) added case light pin definition
33
+ *
34
+ */
35
+
36
+/**
37
+ * A useable Arduino IDE extension (board manager) can be found at
38
+ * https://github.com/Lauszus/Sanguino
39
+ *
40
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
41
+ *
42
+ * Here's the JSON path:
43
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
44
+ *
45
+ * When installing select 1.0.2
46
+ *
47
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
48
+ * Just use the above JSON URL instead of Sparkfun's JSON.
49
+ *
50
+ * Once installed select the Sanguino board and then select the CPU.
51
+ *
52
+ */
53
+
27 54
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
28 55
   #error "Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu."
29 56
 #endif
@@ -96,19 +123,26 @@
96 123
 //
97 124
 // Misc. Functions
98 125
 //
126
+
99 127
 /**
100
- * On some broken versions of the Sanguino libraries the pin definitions are wrong,
101
- * which then needs SDSS as pin 24. But you should upgrade your Sanguino libraries! See #368.
128
+ * In some versions of the Sanguino libraries the pin
129
+ * definitions are wrong, with SDSS = 24 and LED_PIN = 28 (Melzi).
130
+ * If you encounter issues with these pins, upgrade your
131
+ * Sanguino libraries! See #368.
102 132
  */
103 133
 //#define SDSS               24
104 134
 #define SDSS               31
105 135
 
106 136
 #if IS_MELZI
107
-  #define LED_PIN          27 // On some broken versions of the Sanguino libraries the pin definitions are wrong, so LED_PIN needs to be 28. But you should upgrade your Sanguino libraries! See #368.
137
+  #define LED_PIN           27
108 138
 #elif MB(STB_11)
109 139
   #define LCD_BACKLIGHT_PIN 17 // LCD backlight LED
110 140
 #endif
111 141
 
142
+#if DISABLED(SPINDLE_LASER_ENABLE) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL))  // try to use IO Header
143
+  #define CASE_LIGHT_PIN         4   // MUST BE HARDWARE PWM  - see if IO Header is available
144
+#endif
145
+
112 146
 //
113 147
 // LCD / Controller
114 148
 //
@@ -181,14 +215,62 @@
181 215
     #else
182 216
       #define BTN_ENC           30
183 217
     #endif
184
-  #elif ENABLED(OLED_PANEL_TINYBOY2)
185
-    #define BTN_ENC             28
186
-    #define LCD_SDSS            -1
187
-  #else  // !Panelolu2, !TinyBoy2
218
+  #else  // !Panelolu2
188 219
     #define BTN_ENC             16
189 220
     #define LCD_SDSS            28 // Smart Controller SD card reader rather than the Melzi
190
-  #endif // !Panelolu2, !TinyBoy2
221
+  #endif // !Panelolu2
191 222
 
192 223
   #define SD_DETECT_PIN         -1
193 224
 
194 225
 #endif // ULTRA_LCD && NEWPANEL
226
+
227
+//
228
+// M3/M4/M5 - Spindle/Laser Control
229
+//
230
+#if ENABLED(SPINDLE_LASER_ENABLE)
231
+  #if !MB(AZTEEG_X1) && ENABLED(SANGUINOLOLU_V_1_2) && !(ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL))  // try to use IO Header
232
+
233
+    #define SPINDLE_LASER_ENABLE_PIN 10  // Pin should have a pullup/pulldown!
234
+    #define SPINDLE_LASER_PWM_PIN     4  // MUST BE HARDWARE PWM
235
+    #define SPINDLE_DIR_PIN          11
236
+
237
+  #elif !MB(MELZI)  // use X stepper motor socket
238
+
239
+    /**
240
+     *  To control the spindle speed and have an LCD you must sacrifice
241
+     *  the Extruder and pull some signals off the X stepper driver socket.
242
+     *
243
+     *  The following assumes:
244
+     *   - The X stepper driver socket is empty
245
+     *   - The extruder driver socket has a driver board plugged into it
246
+     *   - The X stepper wires are attached the the extruder connector
247
+     */
248
+
249
+    /**
250
+     *  Where to get the spindle signals
251
+     *
252
+     *      spindle signal          socket name       socket name
253
+     *                                         -------
254
+     *                               /ENABLE  O|     |O  VMOT
255
+     *                                   MS1  O|     |O  GND
256
+     *                                   MS2  O|     |O  2B
257
+     *                                   MS3  O|     |O  2A
258
+     *                                /RESET  O|     |O  1A
259
+     *                                /SLEEP  O|     |O  1B
260
+     *  SPINDLE_LASER_PWM_PIN  STEP  O|     |O  VDD
261
+     *  SPINDLE_LASER_ENABLE_PIN         DIR  O|     |O  GND
262
+     *                                         -------
263
+     *
264
+     *  Note: Socket names vary from vendor to vendor.
265
+     */
266
+    #undef X_DIR_PIN
267
+    #undef X_ENABLE_PIN
268
+    #undef X_STEP_PIN
269
+    #define X_DIR_PIN                 0
270
+    #define X_ENABLE_PIN             14
271
+    #define X_STEP_PIN                1
272
+    #define SPINDLE_LASER_PWM_PIN    15  // MUST BE HARDWARE PWM
273
+    #define SPINDLE_LASER_ENABLE_PIN 21  // Pin should have a pullup!
274
+    #define SPINDLE_DIR_PIN          -1  // No pin available on the socket for the direction pin
275
+  #endif
276
+#endif // SPINDLE_LASER_ENABLE

+ 14
- 2
Marlin/pins_SAV_MKI.h Visa fil

@@ -115,7 +115,6 @@
115 115
 #define EXT_AUX_A4                 4 // Analog
116 116
 #define EXT_AUX_A4_IO             44 // Digital IO, 42 (teensy), 44 (marlin)
117 117
 
118
-
119 118
 //
120 119
 // LCD / Controller
121 120
 //
@@ -134,10 +133,23 @@
134 133
 #endif // SAV_3DLCD
135 134
 
136 135
 #if ENABLED(SAV_3DLCD) || ENABLED(SAV_3DGLCD)
136
+
137 137
   #define BTN_EN1            EXT_AUX_A1_IO
138 138
   #define BTN_EN2            EXT_AUX_A0_IO
139 139
   #define BTN_ENC            EXT_AUX_PWM_D24
140 140
 
141 141
   #define KILL_PIN           EXT_AUX_A2_IO
142 142
   #define HOME_PIN           EXT_AUX_A4_IO
143
-#endif // SAV_3DLCD || SAV_3DGLCD
143
+
144
+#else // Try to use the expansion header for spindle control
145
+
146
+  //
147
+  // M3/M4/M5 - Spindle/Laser Control
148
+  //
149
+  #define SPINDLE_LASER_PWM_PIN    24  // 12 AT90USB… pin #
150
+  #define SPINDLE_LASER_ENABLE_PIN 39  // Pin should have a pullup!   41 AT90USB… pin #
151
+  #define SPINDLE_DIR_PIN          40  // 42 AT90USB… pin #
152
+
153
+  #define CASE_LIGHT_PIN            0  // 24 AT90USB… pin #
154
+
155
+#endif

+ 25
- 0
Marlin/pins_SETHI.h Visa fil

@@ -24,6 +24,31 @@
24 24
  * Sethi 3D_1 pin assignments - www.sethi3d.com.br
25 25
  */
26 26
 
27
+/**
28
+ * Rev B    26 DEC 2016
29
+ *
30
+ * added pointer to a current Arduino IDE extension
31
+ *    this assumes that this board uses the Sanguino pin map
32
+ */
33
+
34
+/**
35
+ * A useable Arduino IDE extension (board manager) can be found at
36
+ * https://github.com/Lauszus/Sanguino
37
+ *
38
+ * This extension has been tested on Arduino 1.6.12 & 1.8.0
39
+ *
40
+ * Here's the JSON path:
41
+ * https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
42
+ *
43
+ * When installing select 1.0.2
44
+ *
45
+ * Installation instructions can be found at https://learn.sparkfun.com/pages/CustomBoardsArduino
46
+ * Just use the above JSON URL instead of Sparkfun's JSON.
47
+ *
48
+ * Once installed select the Sanguino board and then select the CPU.
49
+ *
50
+ */
51
+
27 52
 #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
28 53
   #error "Oops!  Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu."
29 54
 #endif

+ 8
- 0
Marlin/pins_TEENSY2.h Visa fil

@@ -124,6 +124,7 @@
124 124
 #define SDSS               20 // 8
125 125
 #define LED_PIN             6
126 126
 #define PS_ON_PIN          27
127
+#define CASE_LIGHT_PIN      1 // MUST BE HARDWARE PWM
127 128
 
128 129
 //
129 130
 // LCD / Controller
@@ -139,3 +140,10 @@
139 140
   #define BTN_EN2            39
140 141
   #define BTN_ENC            40
141 142
 #endif
143
+
144
+//
145
+// M3/M4/M5 - Spindle/Laser Control
146
+//
147
+#define SPINDLE_LASER_ENABLE_PIN  5 // Pin should have a pullup!
148
+#define SPINDLE_LASER_PWM_PIN     0 // MUST BE HARDWARE PWM
149
+#define SPINDLE_DIR_PIN           7

+ 114
- 49
Marlin/pins_TEENSYLU.h Visa fil

@@ -12,27 +12,82 @@
12 12
  *
13 13
  * This program is distributed in the hope that it will be useful,
14 14
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the
16 16
  * GNU General Public License for more details.
17 17
  *
18 18
  * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
+ * along with this program.   If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22 22
 
23 23
 /**
24
- * Teensylu 0.7 pin assignments (AT90USB1286)
25
- * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
26
- * http://www.pjrc.com/teensy/teensyduino.html
27
- * See http://reprap.org/wiki/Printrboard for more info
24
+ *  rev B    30 DEC 2016
25
+ *
26
+ *  The original version of this file did NOT result in a useful program because:
27
+ *   1. The pin numbers assumed that the "#define AT90USBxx_TEENSYPP_ASSIGNMENTS" line
28
+ *      in FASTIO.h was commented out. There wasn't an Arduino IDE 1.6.x extension/package
29
+ *      that supported this pin map so the latest Marlin wouldn't compile.
30
+ *   2. The silkscreen for the four end stops don't agree with the schematic. Activating
31
+ *      the X endstop would tell the software that the Y endstop just went active.
32
+ *   3. The thermistor inputs also had heater names assigned to them. The result was
33
+ *      thermistor inputs that were set to digital outputs.
34
+ *
35
+ *  Rev B corrects the above problems by:
36
+ *   1. The "Marlin_AT90USB" extension/package was developed.  This extension enables the
37
+ *      latest Marlin software to compile using Arduino IDE 1.6.x and 1.80.
38
+ *   2. The endstop pin numbers in this file were changed to match the silkscreen.  This
39
+ *      makes it a little confusing when trying to correlate the schematic with the pin
40
+ *      numbers used in this file.
41
+ *   3. The offending heater names were deleted.
42
+ *
43
+ *  To create a useable image for Teensylu do the following:
44
+ *   a) Install the Marlin_AT90USB extension with either of the following methods:
45
+ *        Automatic - paste this URL into preferences and then use Boards manager
46
+ *            https://rawgit.com/Bob-the-Kuhn/Marlin_AT90USB/master/package_MARLIN_AT90USB_index.json
47
+ *        Manual:
48
+ *           1. Copy the following URL into Go to "https://github.com/Bob-the-Kuhn/Marlin_AT90USB",
49
+ *              click on the "Clone or Download" button and then click on "Download ZIP" button.
50
+ *           2. Unzip the file, find the "Marlin_AT90USB" directory and then copy it to the
51
+ *              hardware directory in Arduino.  The Arduino hardware directory will probably be
52
+ *              located in a path similar to this: C:\Program Files (x86)\Arduino\hardware
53
+ *   b) Connect the USBtinyISP to the board.
54
+ *   c) In the Arduino IDE select the "AT90USB1286_STANDARD" board in the of the "Marlin_AT90USB"
55
+ *      section and select the "USBtinyISP" programmer.
56
+ *   d) In the Arduino IDE click on "burn bootloader".  Don't worry about the "verify
57
+ *      failed at 1F000" error message.
58
+ *   e) The USBtinyISP programmer is no longer needed.  Remove it.
59
+ *   f) In FASTIO.h comment out the "#define AT90USBxx_TEENSYPP_ASSIGNMENTS" line.
60
+ *   g) To upload a sketch do the following:
61
+ *       1. remove the jumper
62
+ *       2. press reset
63
+ *       3. click on the "upload" button in the Arduino IDE
64
+ *       4. wait until the upload finishes (less than a minute)
65
+ *       5. put the jumper back on
66
+ *       6. press the reset button
67
+ *
68
+ *
69
+ *  NOTE - the "Marlin_AT90USB" pin maps make PWM0A available rather than the usual PWM1C.
70
+ *         These PWMs share the same physical pin. Marlin uses TIMER1 to generate
71
+ *         interrupts and sets it up such that PWM1A, PWM1B & PWM1C can not be used.
28 72
  */
29 73
 
30
-#ifndef __AVR_AT90USB1286__
31
-  #error "Oops!  Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu."
74
+ /**
75
+  *  SILKSCREEN ERROR
76
+  *
77
+  *  The silkscreen for the endstops do NOT match the schematic.  The silkscreen SHOULD
78
+  *  read (from left to right) X-STOP, Y-STOP, Z-STOP & E-STOP.  The silkscreen actually
79
+  *  reads                     E-STOP, X-STOP, Y-STOP & Z-STOP.
80
+  *
81
+  *  The pin assignments in this file match the silkscreen.
82
+  */
83
+
84
+
85
+#if !defined(__AVR_AT90USB1286__) && !defined(__AVR_AT90USB1286P__)
86
+  #error "Oops!  Make sure you have 'AT90USB1286_STANDARD' selected from the 'Tools -> Boards' menu."
32 87
 #endif
33 88
 
34
-#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS)  // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional.
35
-  #error "These Teensylu assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h"
89
+#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS)
90
+  #error "please disable (comment out) the AT90USBxx_TEENSYPP_ASSIGNMENTS flag in FASTIO.h "
36 91
 #endif
37 92
 
38 93
 #define BOARD_NAME         "Teensylu"
@@ -40,74 +95,84 @@
40 95
 #define USBCON 1286  // Disable MarlinSerial etc.
41 96
 #define LARGE_FLASH        true
42 97
 
98
+
99
+//
100
+// Limit Switche definitions that match the SCHEMATIC
101
+//
102
+//#define X_STOP_PIN              13
103
+//#define Y_STOP_PIN              14
104
+//#define Z_STOP_PIN              15
105
+//#define E_STOP_PIN              36
106
+
107
+
43 108
 //
44
-// Limit Switches
109
+// Limit Switch definitions that match the SILKSCREEN
45 110
 //
46
-#define X_STOP_PIN         13
47
-#define Y_STOP_PIN         14
48
-#define Z_STOP_PIN         15
111
+#define X_STOP_PIN              14
112
+#define Y_STOP_PIN              15
113
+#define Z_STOP_PIN              36
114
+//#define E_STOP_PIN              13
49 115
 
50 116
 //
51 117
 // Steppers
52 118
 //
53
-#define X_STEP_PIN          0
54
-#define X_DIR_PIN           1
55
-#define X_ENABLE_PIN       39
119
+#define X_STEP_PIN               0
120
+#define X_DIR_PIN                1
121
+#define X_ENABLE_PIN            39
56 122
 
57
-#define Y_STEP_PIN          2
58
-#define Y_DIR_PIN           3
59
-#define Y_ENABLE_PIN       38
123
+#define Y_STEP_PIN               2
124
+#define Y_DIR_PIN                3
125
+#define Y_ENABLE_PIN            38
60 126
 
61
-#define Z_STEP_PIN          4
62
-#define Z_DIR_PIN           5
63
-#define Z_ENABLE_PIN       23
127
+#define Z_STEP_PIN               4
128
+#define Z_DIR_PIN                5
129
+#define Z_ENABLE_PIN            23
130
+
131
+#define E0_STEP_PIN              6
132
+#define E0_DIR_PIN               7
133
+#define E0_ENABLE_PIN           19
64 134
 
65
-#define E0_STEP_PIN         6
66
-#define E0_DIR_PIN          7
67
-#define E0_ENABLE_PIN      19
68 135
 
69
-//
70 136
 // Temperature Sensors
71
-//
72
-#define TEMP_0_PIN          7   // Analog Input (Extruder)
73
-#define TEMP_BED_PIN        6   // Analog Input (Bed)
137
+
138
+#define TEMP_0_PIN               7  // Analog Input (Extruder)
139
+#define TEMP_BED_PIN             6  // Analog Input (Bed)
74 140
 
75 141
 //
76 142
 // Heaters / Fans
77 143
 //
78
-#define HEATER_0_PIN       21  // Extruder
79
-#define HEATER_1_PIN       46
80
-#define HEATER_2_PIN       47
81
-#define HEATER_BED_PIN     20
82
-
83
-// If soft or fast PWM is off then use Teensyduino pin numbering, Marlin
84
-// fastio pin numbering otherwise
85
-#if ENABLED(FAN_SOFT_PWM) || ENABLED(FAST_PWM_FAN)
86
-  #define FAN_PIN          22
87
-#else
88
-  #define FAN_PIN          16
89
-#endif
144
+#define HEATER_0_PIN            21  // Extruder
145
+#define HEATER_BED_PIN          20
146
+
147
+#define FAN_PIN                 22
90 148
 
91 149
 //
92 150
 // Misc. Functions
93 151
 //
94
-#define SDSS                8
152
+#define SDSS                     8
153
+#define CASE_LIGHT_PIN          24
95 154
 
96 155
 //
97 156
 // LCD / Controller
98 157
 //
99 158
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
100 159
 
101
-  #define BEEPER_PIN       -1
160
+  #define BEEPER_PIN            -1
102 161
 
103 162
   #if ENABLED(LCD_I2C_PANELOLU2)
104
-    #define BTN_EN1        27  // RX1 - fastio.h pin mapping 27
105
-    #define BTN_EN2        26  // TX1 - fastio.h pin mapping 26
106
-    #define BTN_ENC        43  // A3  - fastio.h pin mapping 43
107
-    #define SDSS           40  // use SD card on Panelolu2 (Teensyduino pin mapping)
163
+    #define BTN_EN1             27
164
+    #define BTN_EN2             26
165
+    #define BTN_ENC             43
166
+    #define SDSS                40  // use SD card on Panelolu2
108 167
   #endif // LCD_I2C_PANELOLU2
109 168
 
110
-  #define SD_DETECT_PIN    -1
169
+  #define SD_DETECT_PIN         -1
111 170
 
112 171
 #endif // ULTRA_LCD && NEWPANEL
113 172
 
173
+//
174
+// M3/M4/M5 - Spindle/Laser Control
175
+//
176
+#define SPINDLE_LASER_PWM_PIN    12  // MUST BE HARDWARE PWM
177
+#define SPINDLE_LASER_ENABLE_PIN 41  // Pin should have a pullup!
178
+#define SPINDLE_DIR_PIN          42

+ 21
- 0
Marlin/pins_ULTIMAIN_2.h Visa fil

@@ -24,6 +24,14 @@
24 24
  * Ultiboard v2.0 pin assignments
25 25
  */
26 26
 
27
+/**
28
+ * Rev B   2 JAN 2017
29
+ *
30
+ *  Added pin definitions for:
31
+ *    M3, M4 & M5 spindle control commands
32
+ *    case light
33
+ */
34
+
27 35
 #ifndef __AVR_ATmega2560__
28 36
   #error "Oops!  Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu."
29 37
 #endif
@@ -110,3 +118,16 @@
110 118
 #define BTN_EN1            40
111 119
 #define BTN_EN2            41
112 120
 #define BTN_ENC            19
121
+
122
+//
123
+// M3/M4/M5 - Spindle/Laser Control
124
+//
125
+#if ENABLED(SPINDLE_LASER_ENABLE)   // use the LED_PIN for spindle speed control or case light
126
+  #undef LED_PIN
127
+  #define SPINDLE_DIR_PIN          16
128
+  #define SPINDLE_LASER_ENABLE_PIN 17  // Pin should have a pullup!
129
+  #define SPINDLE_LASER_PWM_PIN     8  // MUST BE HARDWARE PWM
130
+#else
131
+  #undef LED_PIN
132
+  #define CASE_LIGHT_PIN            8
133
+#endif

+ 16
- 0
Marlin/pins_ULTIMAKER.h Visa fil

@@ -24,6 +24,14 @@
24 24
  * Ultimaker pin assignments
25 25
  */
26 26
 
27
+/**
28
+ * Rev B   2 JAN 2017
29
+ *
30
+ *  Added pin definitions for:
31
+ *    M3, M4 & M5 spindle control commands
32
+ *    case light
33
+ */
34
+
27 35
 #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
28 36
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 37
 #endif
@@ -102,6 +110,7 @@
102 110
 #define LED_PIN            13
103 111
 #define PS_ON_PIN          12
104 112
 #define SUICIDE_PIN        54  // PIN that has to be turned on right after start, to keep power flowing.
113
+#define CASE_LIGHT_PIN      8
105 114
 
106 115
 //
107 116
 // LCD / Controller
@@ -146,3 +155,10 @@
146 155
   #endif // !NEWPANEL
147 156
 
148 157
 #endif // ULTRA_LCD
158
+
159
+//
160
+// M3/M4/M5 - Spindle/Laser Control
161
+//
162
+#define SPINDLE_LASER_PWM_PIN     9  // MUST BE HARDWARE PWM
163
+#define SPINDLE_LASER_ENABLE_PIN 10  // Pin should have a pullup!
164
+#define SPINDLE_DIR_PIN          11  // use the EXP3 PWM header

+ 203
- 17
Marlin/pins_ULTIMAKER_OLD.h Visa fil

@@ -24,6 +24,42 @@
24 24
  * Ultimaker pin assignments (Old electronics)
25 25
  */
26 26
 
27
+ /**
28
+ * Rev B   3 JAN 2017
29
+ *
30
+ * Details on pin definitions for M3, M4 & M5 spindle control commands and for
31
+ * the CASE_LIGHT_PIN are at the end of this file.
32
+ *
33
+ * This started out as an attempt to add pin definitions for M3, M4 & M5 spindle
34
+ * control commands but quickly turned into a head scratcher as the sources for
35
+ * the revisions provided inconsistent information.
36
+ *
37
+ * As best I can determine:
38
+ *   1.5.3 boards should use the pins_ULTIMAKER.h file which means the BOARD_NAME
39
+ *      define in this file should say 1.5.3 rather than 1.5.4
40
+ *   This file is meant for 1.1 - 1.3 boards.
41
+ *   The endstops for the 1.0 boards use different definitions than on the 1.1 - 1.3
42
+ *      boards.
43
+ *
44
+ * I've added sections that have the 1.0 and 1.5.3 + endstop definitions so you can
45
+ * easily switch if needed.  I've also copied over the 1.5.3 + LCD definitions.
46
+ *
47
+ * To be 100% sure of the board you have:
48
+ *   1. In Configuration_adv.h enable "PINS_DEBUGGING"
49
+ *   2. Compile & uploade
50
+ *   3. Enter the command "M43 W1 I1".  This command will report that pin nmumber and
51
+ *      name of any pin that changes state.
52
+ *   4. Using a 1k (approximately) resistor pull the endstops and some of the LCD pins
53
+ *      to ground and see what is reported.
54
+ *   5. If the reported pin doesn't match the file then try a different board revision
55
+ *      and repeat steps 2 - 5
56
+ */
57
+
58
+#define board_rev_1_1_TO_1_3
59
+//#define board_rev_1_0
60
+//#define board_rev_1_5
61
+
62
+
27 63
 #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
28 64
   #error "Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu."
29 65
 #endif
@@ -37,18 +73,38 @@
37 73
 //
38 74
 // Limit Switches
39 75
 //
40
-#define X_MIN_PIN          15
41
-#define X_MAX_PIN          14
42
-#define Y_MIN_PIN          17
43
-#define Y_MAX_PIN          16
44
-#define Z_MIN_PIN          19
45
-#define Z_MAX_PIN          18
76
+#if ENABLED(board_rev_1_1_TO_1_3)
77
+  #define X_MIN_PIN          15  // SW1
78
+  #define X_MAX_PIN          14  // SW2
79
+  #define Y_MIN_PIN          17  // SW3
80
+  #define Y_MAX_PIN          16  // SW4
81
+  #define Z_MIN_PIN          19  // SW5
82
+  #define Z_MAX_PIN          18  // SW6
83
+#endif
84
+
85
+#if ENABLED(board_rev_1_0)
86
+  #define X_MIN_PIN          13  // SW1
87
+  #define X_MAX_PIN          12  // SW2
88
+  #define Y_MIN_PIN          11  // SW3
89
+  #define Y_MAX_PIN          10  // SW4
90
+  #define Z_MIN_PIN           9  // SW5
91
+  #define Z_MAX_PIN           8  // SW6
92
+#endif
93
+
94
+#if ENABLED(board_rev_1_5)
95
+  #define X_MIN_PIN          22
96
+  #define X_MAX_PIN          24
97
+  #define Y_MIN_PIN          26
98
+  #define Y_MAX_PIN          28
99
+  #define Z_MIN_PIN          30
100
+  #define Z_MAX_PIN          32
101
+#endif
46 102
 
47 103
 //
48 104
 // Z Probe (when not Z_MIN_PIN)
49 105
 //
50 106
 #ifndef Z_MIN_PROBE_PIN
51
-  #define Z_MIN_PROBE_PIN  18
107
+  #define Z_MIN_PROBE_PIN  Z_MAX_PIN
52 108
 #endif
53 109
 
54 110
 //
@@ -70,9 +126,9 @@
70 126
 #define E0_DIR_PIN         45
71 127
 #define E0_ENABLE_PIN      41
72 128
 
73
-#define E1_STEP_PIN        -1
74
-#define E1_DIR_PIN         -1
75
-#define E1_ENABLE_PIN      -1
129
+#define E1_STEP_PIN        -1  // 49
130
+#define E1_DIR_PIN         -1  // 47
131
+#define E1_ENABLE_PIN      -1  // 48
76 132
 
77 133
 //
78 134
 // Temperature Sensors
@@ -84,14 +140,144 @@
84 140
 // Heaters / Fans
85 141
 //
86 142
 #define HEATER_0_PIN        2
87
-#define HEATER_1_PIN        1
143
+//#define HEATER_1_PIN        3 // used for case light   Rev A said "1"
144
+#define HEATER_BED_PIN      4
88 145
 
89 146
 //
90 147
 // LCD / Controller
91 148
 //
92
-#define LCD_PINS_RS        24
93
-#define LCD_PINS_ENABLE    22
94
-#define LCD_PINS_D4        36
95
-#define LCD_PINS_D5        34
96
-#define LCD_PINS_D6        32
97
-#define LCD_PINS_D7        30
149
+#if ENABLED(board_rev_1_0) || ENABLED(board_rev_1_1_TO_1_3)
150
+  #define LCD_PINS_RS        24
151
+  #define LCD_PINS_ENABLE    22
152
+  #define LCD_PINS_D4        36
153
+  #define LCD_PINS_D5        34
154
+  #define LCD_PINS_D6        32
155
+  #define LCD_PINS_D7        30
156
+#elif ENABLED(board_rev_1_5) && ENABLED(ULTRA_LCD)
157
+
158
+  #define BEEPER_PIN 18
159
+
160
+  #if ENABLED(NEWPANEL)
161
+
162
+    #define LCD_PINS_RS 20
163
+    #define LCD_PINS_ENABLE 17
164
+    #define LCD_PINS_D4 16
165
+    #define LCD_PINS_D5 21
166
+    #define LCD_PINS_D6 5
167
+    #define LCD_PINS_D7 6
168
+
169
+    // buttons are directly attached
170
+    #define BTN_EN1 40
171
+    #define BTN_EN2 42
172
+    #define BTN_ENC 19
173
+
174
+    #define SD_DETECT_PIN 38
175
+
176
+  #else // !NEWPANEL - Old style panel with shift register
177
+
178
+    // buttons are attached to a shift register
179
+    #define SHIFT_CLK 38
180
+    #define SHIFT_LD 42
181
+    #define SHIFT_OUT 40
182
+    #define SHIFT_EN 17
183
+
184
+    #define LCD_PINS_RS 16
185
+    #define LCD_PINS_ENABLE 5
186
+    #define LCD_PINS_D4 6
187
+    #define LCD_PINS_D5 21
188
+    #define LCD_PINS_D6 20
189
+    #define LCD_PINS_D7 19
190
+
191
+    #define SD_DETECT_PIN -1
192
+
193
+  #endif // !NEWPANEL
194
+
195
+#endif // ULTRA_LCD
196
+
197
+//
198
+// case light  - see spindle section for more info on available hardware PWMs
199
+//
200
+#if !PIN_EXISTS(CASE_LIGHT) && ENABLED(board_rev_1_5)
201
+  #define CASE_LIGHT_PIN        7  // use PWM -  MUST BE HARDWARE PWM
202
+#endif
203
+
204
+//
205
+// M3/M4/M5 - Spindle/Laser Control
206
+//
207
+#if ENABLED(SPINDLE_LASER_ENABLE)
208
+
209
+  #if ENABLED(board_rev_1_0)       // use the last three SW positions
210
+
211
+    #undef Z_MIN_PROBE_PIN
212
+    #undef X_MIN_PIN              // SW1
213
+    #undef X_MAX_PIN              // SW2
214
+    #undef Y_MIN_PIN              // SW3
215
+    #undef Y_MAX_PIN              // SW4
216
+    #undef Z_MIN_PIN              // SW5
217
+    #undef Z_MAX_PIN              // SW6
218
+
219
+    #define X_STOP_PIN         13  // SW1  (didn't change) - also has a useable hardware PWM
220
+    #define Y_STOP_PIN         12  // SW2
221
+    #define Z_STOP_PIN         11  // SW3
222
+
223
+    #define SPINDLE_DIR_PIN          10  // SW4
224
+    #define SPINDLE_LASER_PWM_PIN     9  // SW5  MUST BE HARDWARE PWM
225
+    #define SPINDLE_LASER_ENABLE_PIN  8  // SW6  Pin should have a pullup!
226
+
227
+  #elif ENABLED(board_rev_1_5)      // use the same pins - but now they are on a different connector
228
+
229
+    #define SPINDLE_DIR_PIN          10  // EXP3-6 (silkscreen says 10)
230
+    #define SPINDLE_LASER_PWM_PIN     9  // EXP3-7 (silkscreen says 9) MUST BE HARDWARE PWM
231
+    #define SPINDLE_LASER_ENABLE_PIN  8  // EXP3-8 (silkscreen says 8) Pin should have a pullup!
232
+
233
+  #elif ENABLED(board_rev_1_1_TO_1_3)
234
+
235
+    /**
236
+     *  Only four hardware PWMs physically connected to anything on these boards:
237
+     *
238
+     *    HEATER_0_PIN    2  silkscreen varies - usually "PWM 1" or "HEATER1"
239
+     *    HEATER_1_PIN    3  silkscreen varies - usually "PWM 2" or "HEATER2"
240
+     *    HEATER_BED_PIN  4  silkscreen varies - usually "PWM 3" or "HEATED BED"
241
+     *    E0_DIR_PIN     45
242
+     *
243
+     *   If one of the heaters is used then special precautions will usually be needed.
244
+     *   They have an LED and resistor pullup to +24V which could damage 3.3V-5V ICs.
245
+     */
246
+    #if EXTRUDERS == 1                     // Move E0 stepper module to the spare and get signals from E0
247
+      #undef E0_STEP_PIN
248
+      #undef E0_DIR_PIN
249
+      #undef E0_ENABLE_PIN
250
+      #define E0_STEP_PIN              49
251
+      #define E0_DIR_PIN               47
252
+      #define E0_ENABLE_PIN            48
253
+      #define SPINDLE_DIR_PIN          43
254
+      #define SPINDLE_LASER_PWM_PIN    45  // MUST BE HARDWARE PWM
255
+      #define SPINDLE_LASER_ENABLE_PIN 41  // Pin should have a pullup!
256
+    #elif TEMP_SENSOR_BED == 0  // Can't use E0 so see if HEATER_BED_PIN is available
257
+      #undef HEATER_BED_PIN
258
+      #define SPINDLE_DIR_PIN          38  // Probably pin 4 on 10 pin connector closest to the E0 socket
259
+      #define SPINDLE_LASER_PWM_PIN     4  // MUST BE HARDWARE PWM - Special precautions usually needed.
260
+      #define SPINDLE_LASER_ENABLE_PIN 40  // Pin should have a pullup! (Probably pin 6 on the 10-pin
261
+                                           // connector closest to the E0 socket)
262
+    #endif
263
+  #endif
264
+#endif
265
+
266
+/**
267
+ *  Where to get the spindle signals on the E0 socket
268
+ *
269
+ *         spindle signal     socket name       socket name
270
+ *                                       -------
271
+ * SPINDLE_LASER_ENABLE_PIN    /ENABLE  *|     |O  VMOT
272
+ *                                 MS1  O|     |O  GND
273
+ *                                 MS2  O|     |O  2B
274
+ *                                 MS3  O|     |O  2A
275
+ *                              /RESET  O|     |O  1A
276
+ *                              /SLEEP  O|     |O  1B
277
+ *          SPINDLE_DIR_PIN       STEP  O|     |O  VDD
278
+ *    SPINDLE_LASER_PWM_PIN        DIR  O|     |O  GND
279
+ *                                       -------
280
+ *  * - pin closest to MS1, MS2 & MS3 jumpers on the board
281
+ *
282
+ *  Note: Socket names vary from vendor to vendor.
283
+ */

Laddar…
Avbryt
Spara