Browse Source

Extrudrboard support for Printrboard Rev.F

Scott Lahteine 7 years ago
parent
commit
90c7d28055
3 changed files with 80 additions and 7 deletions
  1. 1
    1
      Marlin/Marlin_main.cpp
  2. 1
    1
      Marlin/pins_PRINTRBOARD.h
  3. 78
    5
      Marlin/pins_PRINTRBOARD_REVF.h

+ 1
- 1
Marlin/Marlin_main.cpp View File

@@ -13790,7 +13790,7 @@ void setup() {
13790 13790
     Max7219_init();
13791 13791
   #endif
13792 13792
 
13793
-  #ifdef DISABLE_JTAG
13793
+  #if ENABLED(DISABLE_JTAG)
13794 13794
     // Disable JTAG on AT90USB chips to free up pins for IO
13795 13795
     MCUCR = 0x80;
13796 13796
     MCUCR = 0x80;

+ 1
- 1
Marlin/pins_PRINTRBOARD.h View File

@@ -70,7 +70,7 @@
70 70
 #define LARGE_FLASH        true
71 71
 
72 72
 // Disable JTAG pins so they can be used for the Extrudrboard
73
-#define DISABLE_JTAG       true
73
+#define DISABLE_JTAG
74 74
 
75 75
 //
76 76
 // Limit Switches

+ 78
- 5
Marlin/pins_PRINTRBOARD_REVF.h View File

@@ -30,8 +30,8 @@
30 30
  *  There are two Arduino IDE extensions that are compatible with this board
31 31
  *  and with the mainstream Marlin software.
32 32
  *
33
- *  Teensyduino - http://www.pjrc.com/teensy/teensyduino.html
34
- *    Installation instructions are at the above URL.
33
+ *  Teensyduino -  https://www.pjrc.com/teensy/teensyduino.html
34
+ *  Installation - https://www.pjrc.com/teensy/td_download.html
35 35
  *
36 36
  *    Select Teensy++ 2.0 in Arduino IDE from the 'Tools -> Boards' menu
37 37
  *
@@ -66,9 +66,36 @@
66 66
   #error "Oops!  Make sure you have 'Teensy++ 2.0' or 'Printrboard' selected from the 'Tools -> Boards' menu."
67 67
 #endif
68 68
 
69
+#ifndef USBCON
70
+  #error "USBCON should be defined by the platform for this board."
71
+#endif
72
+
69 73
 #define BOARD_NAME         "Printrboard Rev F"
70 74
 #define LARGE_FLASH        true
71 75
 
76
+// Disable JTAG pins so EXP1 pins work correctly
77
+// (Its pins are used for the Extrudrboard and filament sensor, for example).
78
+#define DISABLE_JTAG
79
+
80
+/**
81
+ * Note that REV F6 of the Printrboard stole the A HOTEND pin and
82
+ * reassigned it to a second fan for the extruder heater.  It's
83
+ * recommended that you swap the A and B outputs on the Extrudrboard
84
+ * so EXTRUDERS=2 will still work on F6, using B for E1/HEATER_1/TEMP_1.
85
+ * See https://printrbot.zendesk.com/hc/en-us/articles/115003072346
86
+ *
87
+ * If you have REV F6 you probably also want to set E0_AUTO_FAN_PIN
88
+ * to PRINTRBOARD_F6_HEATER_FAN_PIN
89
+ *
90
+ * Define NO_EXTRUDRBOARD if you don't have an EXTRUDRBOARD and wish to
91
+ * reassign different functions to EXP1.
92
+ *
93
+ * Define NO_EXTRUDRBOARD_OUTPUT_SWAP if you have a REV F5 or lower and
94
+ * want to use EXTRUDRBOARD A for E1 and EXTRUDRBOARD B for E2.
95
+ */
96
+//#define NO_EXTRUDRBOARD
97
+//#define NO_EXTRUDRBOARD_OUTPUT_SWAP
98
+
72 99
 //
73 100
 // Limit Switches
74 101
 //
@@ -95,6 +122,26 @@
95 122
 #define E0_DIR_PIN         35   // A7
96 123
 #define E0_ENABLE_PIN      13   // C3
97 124
 
125
+#if DISABLED(NO_EXTRUDRBOARD)
126
+#if DISABLED(NO_EXTRUDRBOARD_OUTPUT_SWAP)
127
+  #define E1_STEP_PIN      25   // B5
128
+  #define E1_DIR_PIN       37   // E5
129
+  #define E1_ENABLE_PIN    42   // F4
130
+
131
+  #define E2_STEP_PIN       2   // D2
132
+  #define E2_DIR_PIN        3   // D3
133
+  #define E2_ENABLE_PIN    43   // F5
134
+#else
135
+  #define E1_STEP_PIN       2   // D2
136
+  #define E1_DIR_PIN        3   // D3
137
+  #define E1_ENABLE_PIN    43   // F5
138
+
139
+  #define E2_STEP_PIN      25   // B5
140
+  #define E2_DIR_PIN       37   // E5
141
+  #define E2_ENABLE_PIN    42   // F4
142
+#endif
143
+#endif // NO_EXTRUDRBOARD
144
+
98 145
 // Enable control of stepper motor currents with the I2C based MCP4728 DAC used on Printrboard REVF
99 146
 #define DAC_STEPPER_CURRENT
100 147
 
@@ -119,14 +166,32 @@
119 166
 #define TEMP_0_PIN          1   // Analog Input (Extruder)
120 167
 #define TEMP_BED_PIN        0   // Analog Input (Bed)
121 168
 
169
+#if DISABLED(NO_EXTRUDRBOARD)
170
+#if DISABLED(NO_EXTRUDRBOARD_OUTPUT_SWAP)
171
+  #define TEMP_1_PIN        2   // Analog Input (Extrudrboard A THERM)
172
+  #define TEMP_2_PIN        3   // Analog Input (Extrudrboard B THERM)
173
+#else
174
+  #define TEMP_1_PIN        3   // Analog Input (Extrudrboard B THERM)
175
+  #define TEMP_2_PIN        2   // Analog Input (Extrudrboard A THERM)
176
+#endif
177
+#endif
178
+
122 179
 //
123 180
 // Heaters / Fans
124 181
 //
125 182
 #define HEATER_0_PIN       15   // C5 PWM3B - Extruder
126
-#define HEATER_1_PIN       44   // F6
127
-#define HEATER_2_PIN       45   // F7
128 183
 #define HEATER_BED_PIN     14   // C4 PWM3C
129 184
 
185
+#if DISABLED(NO_EXTRUDRBOARD)
186
+#if DISABLED(NO_EXTRUDRBOARD_OUTPUT_SWAP)
187
+  #define HEATER_1_PIN     44   // F6 - Extrudrboard A HOTEND
188
+  #define HEATER_2_PIN     45   // F7 - Extrudrboard B HOTEND
189
+#else
190
+  #define HEATER_1_PIN     45   // F7 - Extrudrboard B HOTEND
191
+  #define HEATER_2_PIN     44   // F6 - Extrudrboard A HOTEND
192
+#endif
193
+#endif
194
+
130 195
 #define FAN_PIN            16   // C6 PWM3A
131 196
 
132 197
 //
@@ -201,6 +266,14 @@
201 266
 #ifndef SDSS
202 267
   #define SDSS             20  //        10               B0
203 268
 #endif
269
+
270
+/**
271
+ * This is EXP1-2, which is also the TEMP_A_PIN for the Extrudrboard.
272
+ * If using w/ Extrudrboard, cut off pin 2 on the Extrudrboard male
273
+ * connector to ensure this is disconnected from the A THERM pullups.
274
+ * You probably want to set EXTRUDERS=2 and swap the Extrudrboard outputs,
275
+ * which will let you use Channel B on the Extrudrboard as E1.
276
+ */
204 277
 #ifndef FILWIDTH_PIN
205
-  #define FILWIDTH_PIN      2  // Analog Input 
278
+  #define FILWIDTH_PIN      2   // Analog Input
206 279
 #endif

Loading…
Cancel
Save