Browse Source

Merge pull request #6889 from thinkyhead/bf_at90usb_mapping

Unify all AVR90USB pin mappings
Scott Lahteine 7 years ago
parent
commit
f17a3c2474

+ 45
- 23
Marlin/Marlin_main.cpp View File

@@ -732,9 +732,7 @@ void report_current_position_detail();
732 732
     SERIAL_ECHOPAIR(", ", y);
733 733
     SERIAL_ECHOPAIR(", ", z);
734 734
     SERIAL_CHAR(')');
735
-
736
-    if (suffix) {serialprintPGM(suffix);}  //won't compile for Teensy with the previous construction
737
-    else SERIAL_EOL();
735
+    if (suffix) serialprintPGM(suffix); else SERIAL_EOL();
738 736
   }
739 737
 
740 738
   void print_xyz(const char* prefix, const char* suffix, const float xyz[]) {
@@ -6366,23 +6364,44 @@ inline void gcode_M42() {
6366 6364
               wait = parser.seen('W') ? parser.value_int() : 500;
6367 6365
 
6368 6366
     for (uint8_t pin = start; pin <= end; pin++) {
6367
+      //report_pin_state_extended(pin, I_flag, false);
6368
+
6369 6369
       if (!I_flag && pin_is_protected(pin)) {
6370
-        SERIAL_ECHOPAIR("Sensitive Pin: ", pin);
6371
-        SERIAL_ECHOLNPGM(" untouched.");
6370
+        report_pin_state_extended(pin, I_flag, true, "Untouched ");
6371
+        SERIAL_EOL();
6372 6372
       }
6373 6373
       else {
6374
-        SERIAL_ECHOPAIR("Pulsing Pin: ", pin);
6375
-        pinMode(pin, OUTPUT);
6376
-        for (int16_t j = 0; j < repeat; j++) {
6377
-          digitalWrite(pin, 0);
6378
-          safe_delay(wait);
6379
-          digitalWrite(pin, 1);
6380
-          safe_delay(wait);
6381
-          digitalWrite(pin, 0);
6382
-          safe_delay(wait);
6374
+        report_pin_state_extended(pin, I_flag, true, "Pulsing   ");
6375
+        #ifdef AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
6376
+          if (pin == 46) {
6377
+            SET_OUTPUT(46);
6378
+            for (int16_t j = 0; j < repeat; j++) {
6379
+              WRITE(46, 0); safe_delay(wait);
6380
+              WRITE(46, 1); safe_delay(wait);
6381
+              WRITE(46, 0); safe_delay(wait);
6382
+            }
6383
+          }
6384
+          else if (pin == 47) {
6385
+            SET_OUTPUT(47);
6386
+            for (int16_t j = 0; j < repeat; j++) {
6387
+              WRITE(47, 0); safe_delay(wait);
6388
+              WRITE(47, 1); safe_delay(wait);
6389
+              WRITE(47, 0); safe_delay(wait);
6390
+            }
6391
+          }
6392
+          else
6393
+        #endif
6394
+        {
6395
+          pinMode(pin, OUTPUT);
6396
+          for (int16_t j = 0; j < repeat; j++) {
6397
+            digitalWrite(pin, 0); safe_delay(wait);
6398
+            digitalWrite(pin, 1); safe_delay(wait);
6399
+            digitalWrite(pin, 0); safe_delay(wait);
6400
+          }
6383 6401
         }
6402
+
6384 6403
       }
6385
-      SERIAL_CHAR('\n');
6404
+      SERIAL_EOL();
6386 6405
     }
6387 6406
     SERIAL_ECHOLNPGM("Done.");
6388 6407
 
@@ -6527,13 +6546,13 @@ inline void gcode_M42() {
6527 6546
    *  M43 E<bool> - Enable / disable background endstop monitoring
6528 6547
    *                  - Machine continues to operate
6529 6548
    *                  - Reports changes to endstops
6530
-   *                  - Toggles LED when an endstop changes
6549
+   *                  - Toggles LED_PIN when an endstop changes
6531 6550
    *                  - Can not reliably catch the 5mS pulse from BLTouch type probes
6532 6551
    *
6533 6552
    *  M43 T       - Toggle pin(s) and report which pin is being toggled
6534 6553
    *                  S<pin>  - Start Pin number.   If not given, will default to 0
6535 6554
    *                  L<pin>  - End Pin number.   If not given, will default to last pin defined for this board
6536
-   *                  I       - Flag to ignore Marlin's pin protection.   Use with caution!!!!
6555
+   *                  I<bool> - Flag to ignore Marlin's pin protection.   Use with caution!!!!
6537 6556
    *                  R       - Repeat pulses on each pin this number of times before continueing to next pin
6538 6557
    *                  W       - Wait time (in miliseconds) between pulses.  If not given will default to 500
6539 6558
    *
@@ -6542,7 +6561,7 @@ inline void gcode_M42() {
6542 6561
    */
6543 6562
   inline void gcode_M43() {
6544 6563
 
6545
-    if (parser.seen('T')) {   // must be first ot else it's "S" and "E" parameters will execute endstop or servo test
6564
+    if (parser.seen('T')) {   // must be first or else it's "S" and "E" parameters will execute endstop or servo test
6546 6565
       toggle_pins();
6547 6566
       return;
6548 6567
     }
@@ -6576,6 +6595,7 @@ inline void gcode_M42() {
6576 6595
       for (int8_t pin = first_pin; pin <= last_pin; pin++) {
6577 6596
         if (pin_is_protected(pin) && !ignore_protection) continue;
6578 6597
         pinMode(pin, INPUT_PULLUP);
6598
+        delay(1);
6579 6599
         /*
6580 6600
           if (IS_ANALOG(pin))
6581 6601
             pin_state[pin - first_pin] = analogRead(pin - analogInputToDigitalPin(0)); // int16_t pin_state[...]
@@ -6591,7 +6611,7 @@ inline void gcode_M42() {
6591 6611
 
6592 6612
       for (;;) {
6593 6613
         for (int8_t pin = first_pin; pin <= last_pin; pin++) {
6594
-          if (pin_is_protected(pin)) continue;
6614
+          if (pin_is_protected(pin) && !ignore_protection) continue;
6595 6615
           const byte val =
6596 6616
             /*
6597 6617
               IS_ANALOG(pin)
@@ -6600,7 +6620,7 @@ inline void gcode_M42() {
6600 6620
             //*/
6601 6621
               digitalRead(pin);
6602 6622
           if (val != pin_state[pin - first_pin]) {
6603
-            report_pin_state(pin);
6623
+            report_pin_state_extended(pin, ignore_protection, false);
6604 6624
             pin_state[pin - first_pin] = val;
6605 6625
           }
6606 6626
         }
@@ -6612,14 +6632,14 @@ inline void gcode_M42() {
6612 6632
           }
6613 6633
         #endif
6614 6634
 
6615
-        safe_delay(500);
6635
+        safe_delay(200);
6616 6636
       }
6617 6637
       return;
6618 6638
     }
6619 6639
 
6620 6640
     // Report current state of selected pin(s)
6621 6641
     for (uint8_t pin = first_pin; pin <= last_pin; pin++)
6622
-      report_pin_state_extended(pin, ignore_protection);
6642
+      report_pin_state_extended(pin, ignore_protection, true);
6623 6643
   }
6624 6644
 
6625 6645
 #endif // PINS_DEBUGGING
@@ -12164,7 +12184,9 @@ void prepare_move_to_destination() {
12164 12184
     val &= 0x07;
12165 12185
     switch (digitalPinToTimer(pin)) {
12166 12186
       #ifdef TCCR0A
12167
-        case TIMER0A:
12187
+        #if !AVR_AT90USB1286_FAMILY
12188
+          case TIMER0A:
12189
+        #endif
12168 12190
         case TIMER0B:
12169 12191
           //_SET_CS(0, val);
12170 12192
           break;

+ 1
- 1
Marlin/boards.h View File

@@ -71,7 +71,7 @@
71 71
 #define BOARD_PRINTRBOARD_REVF  811  // Printrboard Revision F (AT90USB1286)
72 72
 #define BOARD_BRAINWAVE         82   // Brainwave (AT90USB646)
73 73
 #define BOARD_SAV_MKI           83   // SAV Mk-I (AT90USB1286)
74
-#define BOARD_TEENSY2           84   // Teensy++2.0 (AT90USB1286) - CLI compile: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84  make
74
+#define BOARD_TEENSY2           84   // Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84  make
75 75
 #define BOARD_BRAINWAVE_PRO     85   // Brainwave Pro (AT90USB1286)
76 76
 #define BOARD_GEN3_PLUS         9    // Gen3+
77 77
 #define BOARD_GEN3_MONOLITHIC   22   // Gen3 Monolithic Electronics

+ 12
- 19
Marlin/fastio.h View File

@@ -32,27 +32,25 @@
32 32
 #include <avr/io.h>
33 33
 #include "macros.h"
34 34
 
35
-/**
36
- * Enable this option to use Teensy++ 2.0 assignments for AT90USB processors.
37
- */
38
-//#define AT90USBxx_TEENSYPP_ASSIGNMENTS
35
+#define AVR_AT90USB1286_FAMILY (defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1286P__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB646P__)  || defined(__AVR_AT90USB647__))
36
+#define AVR_ATmega1284_FAMILY (defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__))
37
+#define AVR_ATmega2560_FAMILY (defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__))
38
+#define AVR_ATmega2561_FAMILY (defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__))
39
+#define AVR_ATmega328_FAMILY (defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328p__))
40
+
39 41
 
40 42
 /**
41 43
  * Include Ports and Functions
42 44
  */
43
-#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
45
+#if AVR_ATmega328_FAMILY
44 46
   #include "fastio_168.h"
45
-#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
47
+#elif AVR_ATmega1284_FAMILY
46 48
   #include "fastio_644.h"
47
-#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
49
+#elif AVR_ATmega2560_FAMILY
48 50
   #include "fastio_1280.h"
49
-#elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
50
-  #ifdef AT90USBxx_TEENSYPP_ASSIGNMENTS
51
-    #include "fastio_AT90USB-Teensy.h"
52
-  #else
53
-    #include "fastio_AT90USB-Marlin.h"
54
-  #endif
55
-#elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
51
+#elif AVR_AT90USB1286_FAMILY
52
+  #include "fastio_AT90USB.h"
53
+#elif AVR_ATmega2561_FAMILY
56 54
   #include "fastio_1281.h"
57 55
 #else
58 56
   #error "Pins for this chip not defined in Arduino.h! If you have a working pins definition, please contribute!"
@@ -243,11 +241,6 @@ typedef enum {
243 241
 /**
244 242
  * PWM availability macros
245 243
  */
246
-#define AVR_AT90USB1286_FAMILY (defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1286P__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB646P__)  || defined(__AVR_AT90USB647__))
247
-#define AVR_ATmega1284_FAMILY (defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__))
248
-#define AVR_ATmega2560_FAMILY (defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__))
249
-#define AVR_ATmega2561_FAMILY (defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__))
250
-#define AVR_ATmega328_FAMILY (defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328p__))
251 244
 
252 245
 //find out which harware PWMs are already in use
253 246
 #if PIN_EXISTS(CONTROLLER_FAN)

+ 0
- 681
Marlin/fastio_AT90USB-Marlin.h View File

@@ -1,681 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
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/>.
20
- *
21
- */
22
-
23
-/**
24
- * Pin mapping (Marlin) for AT90USB646, 647, 1286, and 1287
25
- *
26
- *   AT90USB  51 50 49 48 47 46 45 44 10 11 12 13 14 15 16 17 35 36 37 38 39 40 41 42 25 26 27 28 29 30 31 32 33 34 43 09 18 19 01 02 61 60 59 58 57 56 55 54
27
- *   Teensy   28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
28
- *   Port     A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
29
- * > Marlin   00 01 02 03 04 05 06 07 08 09 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
30
- *            The pins 46 and 47 are not supported by Teensyduino, but are supported below.
31
- */
32
-
33
-#ifndef _FASTIO_AT90USB
34
-#define _FASTIO_AT90USB
35
-
36
-#include "fastio.h"
37
-
38
-// change for your board
39
-#define DEBUG_LED   DIO31 /* led D5 red */
40
-
41
-// SPI
42
-#define SCK         DIO9   // 21
43
-#define MISO        DIO11  // 23
44
-#define MOSI        DIO10  // 22
45
-#define SS          DIO8   // 20
46
-
47
-// Digital I/O
48
-
49
-#define DIO0_PIN    PINA0
50
-#define DIO0_RPORT  PINA
51
-#define DIO0_WPORT  PORTA
52
-#define DIO0_PWM    NULL
53
-#define DIO0_DDR    DDRA
54
-
55
-#define DIO1_PIN    PINA1
56
-#define DIO1_RPORT  PINA
57
-#define DIO1_WPORT  PORTA
58
-#define DIO1_PWM    NULL
59
-#define DIO1_DDR    DDRA
60
-
61
-#define DIO2_PIN    PINA2
62
-#define DIO2_RPORT  PINA
63
-#define DIO2_WPORT  PORTA
64
-#define DIO2_PWM    NULL
65
-#define DIO2_DDR    DDRA
66
-
67
-#define DIO3_PIN    PINA3
68
-#define DIO3_RPORT  PINA
69
-#define DIO3_WPORT  PORTA
70
-#define DIO3_PWM    NULL
71
-#define DIO3_DDR    DDRA
72
-
73
-#define DIO4_PIN    PINA4
74
-#define DIO4_RPORT  PINA
75
-#define DIO4_WPORT  PORTA
76
-#define DIO4_PWM    NULL
77
-#define DIO4_DDR    DDRA
78
-
79
-#define DIO5_PIN    PINA5
80
-#define DIO5_RPORT  PINA
81
-#define DIO5_WPORT  PORTA
82
-#define DIO5_PWM    NULL
83
-#define DIO5_DDR    DDRA
84
-
85
-#define DIO6_PIN    PINA6
86
-#define DIO6_RPORT  PINA
87
-#define DIO6_WPORT  PORTA
88
-#define DIO6_PWM    NULL
89
-#define DIO6_DDR    DDRA
90
-
91
-#define DIO7_PIN    PINA7
92
-#define DIO7_RPORT  PINA
93
-#define DIO7_WPORT  PORTA
94
-#define DIO7_PWM    NULL
95
-#define DIO7_DDR    DDRA
96
-
97
-#define DIO8_PIN    PINB0
98
-#define DIO8_RPORT  PINB
99
-#define DIO8_WPORT  PORTB
100
-#define DIO8_PWM    NULL
101
-#define DIO8_DDR    DDRB
102
-
103
-#define DIO9_PIN    PINB1
104
-#define DIO9_RPORT  PINB
105
-#define DIO9_WPORT  PORTB
106
-#define DIO9_PWM    NULL
107
-#define DIO9_DDR    DDRB
108
-
109
-#define DIO10_PIN   PINB2
110
-#define DIO10_RPORT PINB
111
-#define DIO10_WPORT PORTB
112
-#define DIO10_PWM   NULL
113
-#define DIO10_DDR   DDRB
114
-
115
-#define DIO11_PIN   PINB3
116
-#define DIO11_RPORT PINB
117
-#define DIO11_WPORT PORTB
118
-#define DIO11_PWM   NULL
119
-#define DIO11_DDR   DDRB
120
-
121
-#define DIO12_PIN   PINB4
122
-#define DIO12_RPORT PINB
123
-#define DIO12_WPORT PORTB
124
-#define DIO12_PWM   NULL
125
-#define DIO12_DDR   DDRB
126
-
127
-#define DIO13_PIN   PINB5
128
-#define DIO13_RPORT PINB
129
-#define DIO13_WPORT PORTB
130
-#define DIO13_PWM   NULL
131
-#define DIO13_DDR   DDRB
132
-
133
-#define DIO14_PIN   PINB6
134
-#define DIO14_RPORT PINB
135
-#define DIO14_WPORT PORTB
136
-#define DIO14_PWM   NULL
137
-#define DIO14_DDR   DDRB
138
-
139
-#define DIO15_PIN   PINB7
140
-#define DIO15_RPORT PINB
141
-#define DIO15_WPORT PORTB
142
-#define DIO15_PWM   NULL
143
-#define DIO15_DDR   DDRB
144
-
145
-#define DIO16_PIN   PINC0
146
-#define DIO16_RPORT PINC
147
-#define DIO16_WPORT PORTC
148
-#define DIO16_PWM   NULL
149
-#define DIO16_DDR   DDRC
150
-
151
-#define DIO17_PIN   PINC1
152
-#define DIO17_RPORT PINC
153
-#define DIO17_WPORT PORTC
154
-#define DIO17_PWM   NULL
155
-#define DIO17_DDR   DDRC
156
-
157
-#define DIO18_PIN   PINC2
158
-#define DIO18_RPORT PINC
159
-#define DIO18_WPORT PORTC
160
-#define DIO18_PWM   NULL
161
-#define DIO18_DDR   DDRC
162
-
163
-#define DIO19_PIN   PINC3
164
-#define DIO19_RPORT PINC
165
-#define DIO19_WPORT PORTC
166
-#define DIO19_PWM   NULL
167
-#define DIO19_DDR   DDRC
168
-
169
-#define DIO20_PIN   PINC4
170
-#define DIO20_RPORT PINC
171
-#define DIO20_WPORT PORTC
172
-#define DIO20_PWM   NULL
173
-#define DIO20_DDR   DDRC
174
-
175
-#define DIO21_PIN   PINC5
176
-#define DIO21_RPORT PINC
177
-#define DIO21_WPORT PORTC
178
-#define DIO21_PWM   NULL
179
-#define DIO21_DDR   DDRC
180
-
181
-#define DIO22_PIN   PINC6
182
-#define DIO22_RPORT PINC
183
-#define DIO22_WPORT PORTC
184
-#define DIO22_PWM   NULL
185
-#define DIO22_DDR   DDRC
186
-
187
-#define DIO23_PIN   PINC7
188
-#define DIO23_RPORT PINC
189
-#define DIO23_WPORT PORTC
190
-#define DIO23_PWM   NULL
191
-#define DIO23_DDR   DDRC
192
-
193
-#define DIO24_PIN   PIND0
194
-#define DIO24_RPORT PIND
195
-#define DIO24_WPORT PORTD
196
-#define DIO24_PWM   NULL
197
-#define DIO24_DDR   DDRD
198
-
199
-#define DIO25_PIN   PIND1
200
-#define DIO25_RPORT PIND
201
-#define DIO25_WPORT PORTD
202
-#define DIO25_PWM   NULL
203
-#define DIO25_DDR   DDRD
204
-
205
-#define DIO26_PIN   PIND2
206
-#define DIO26_RPORT PIND
207
-#define DIO26_WPORT PORTD
208
-#define DIO26_PWM   NULL
209
-#define DIO26_DDR   DDRD
210
-
211
-#define DIO27_PIN   PIND3
212
-#define DIO27_RPORT PIND
213
-#define DIO27_WPORT PORTD
214
-#define DIO27_PWM   NULL
215
-#define DIO27_DDR   DDRD
216
-
217
-#define DIO28_PIN   PIND4
218
-#define DIO28_RPORT PIND
219
-#define DIO28_WPORT PORTD
220
-#define DIO28_PWM   NULL
221
-#define DIO28_DDR   DDRD
222
-
223
-#define DIO29_PIN   PIND5
224
-#define DIO29_RPORT PIND
225
-#define DIO29_WPORT PORTD
226
-#define DIO29_PWM   NULL
227
-#define DIO29_DDR   DDRD
228
-
229
-#define DIO30_PIN   PIND6
230
-#define DIO30_RPORT PIND
231
-#define DIO30_WPORT PORTD
232
-#define DIO30_PWM   NULL
233
-#define DIO30_DDR   DDRD
234
-
235
-#define DIO31_PIN   PIND7
236
-#define DIO31_RPORT PIND
237
-#define DIO31_WPORT PORTD
238
-#define DIO31_PWM   NULL
239
-#define DIO31_DDR   DDRD
240
-
241
-#define DIO32_PIN   PINE0
242
-#define DIO32_RPORT PINE
243
-#define DIO32_WPORT PORTE
244
-#define DIO32_PWM   NULL
245
-#define DIO32_DDR   DDRE
246
-
247
-#define DIO33_PIN   PINE1
248
-#define DIO33_RPORT PINE
249
-#define DIO33_WPORT PORTE
250
-#define DIO33_PWM   NULL
251
-#define DIO33_DDR   DDRE
252
-
253
-#define DIO34_PIN   PINE2
254
-#define DIO34_RPORT PINE
255
-#define DIO34_WPORT PORTE
256
-#define DIO34_PWM   NULL
257
-#define DIO34_DDR   DDRE
258
-
259
-#define DIO35_PIN   PINE3
260
-#define DIO35_RPORT PINE
261
-#define DIO35_WPORT PORTE
262
-#define DIO35_PWM   NULL
263
-#define DIO35_DDR   DDRE
264
-
265
-#define DIO36_PIN   PINE4
266
-#define DIO36_RPORT PINE
267
-#define DIO36_WPORT PORTE
268
-#define DIO36_PWM   NULL
269
-#define DIO36_DDR   DDRE
270
-
271
-#define DIO37_PIN   PINE5
272
-#define DIO37_RPORT PINE
273
-#define DIO37_WPORT PORTE
274
-#define DIO37_PWM   NULL
275
-#define DIO37_DDR   DDRE
276
-
277
-#define DIO38_PIN   PINE6
278
-#define DIO38_RPORT PINE
279
-#define DIO38_WPORT PORTE
280
-#define DIO38_PWM   NULL
281
-#define DIO38_DDR   DDRE
282
-
283
-#define DIO39_PIN   PINE7
284
-#define DIO39_RPORT PINE
285
-#define DIO39_WPORT PORTE
286
-#define DIO39_PWM   NULL
287
-#define DIO39_DDR   DDRE
288
-
289
-#define AIO0_PIN    PINF0
290
-#define AIO0_RPORT  PINF
291
-#define AIO0_WPORT  PORTF
292
-#define AIO0_PWM    NULL
293
-#define AIO0_DDR    DDRF
294
-
295
-#define AIO1_PIN    PINF1
296
-#define AIO1_RPORT  PINF
297
-#define AIO1_WPORT  PORTF
298
-#define AIO1_PWM    NULL
299
-#define AIO1_DDR    DDRF
300
-
301
-#define AIO2_PIN    PINF2
302
-#define AIO2_RPORT  PINF
303
-#define AIO2_WPORT  PORTF
304
-#define AIO2_PWM    NULL
305
-#define AIO2_DDR    DDRF
306
-
307
-#define AIO3_PIN    PINF3
308
-#define AIO3_RPORT  PINF
309
-#define AIO3_WPORT  PORTF
310
-#define AIO3_PWM    NULL
311
-#define AIO3_DDR    DDRF
312
-
313
-#define AIO4_PIN    PINF4
314
-#define AIO4_RPORT  PINF
315
-#define AIO4_WPORT  PORTF
316
-#define AIO4_PWM    NULL
317
-#define AIO4_DDR    DDRF
318
-
319
-#define AIO5_PIN    PINF5
320
-#define AIO5_RPORT  PINF
321
-#define AIO5_WPORT  PORTF
322
-#define AIO5_PWM    NULL
323
-#define AIO5_DDR    DDRF
324
-
325
-#define AIO6_PIN    PINF6
326
-#define AIO6_RPORT  PINF
327
-#define AIO6_WPORT  PORTF
328
-#define AIO6_PWM    NULL
329
-#define AIO6_DDR    DDRF
330
-
331
-#define AIO7_PIN    PINF7
332
-#define AIO7_RPORT  PINF
333
-#define AIO7_WPORT  PORTF
334
-#define AIO7_PWM    NULL
335
-#define AIO7_DDR    DDRF
336
-
337
-#define DIO40_PIN   PINF0
338
-#define DIO40_RPORT PINF
339
-#define DIO40_WPORT PORTF
340
-#define DIO40_PWM   NULL
341
-#define DIO40_DDR   DDRF
342
-
343
-#define DIO41_PIN   PINF1
344
-#define DIO41_RPORT PINF
345
-#define DIO41_WPORT PORTF
346
-#define DIO41_PWM   NULL
347
-#define DIO41_DDR   DDRF
348
-
349
-#define DIO42_PIN   PINF2
350
-#define DIO42_RPORT PINF
351
-#define DIO42_WPORT PORTF
352
-#define DIO42_PWM   NULL
353
-#define DIO42_DDR   DDRF
354
-
355
-#define DIO43_PIN   PINF3
356
-#define DIO43_RPORT PINF
357
-#define DIO43_WPORT PORTF
358
-#define DIO43_PWM   NULL
359
-#define DIO43_DDR   DDRF
360
-
361
-#define DIO44_PIN   PINF4
362
-#define DIO44_RPORT PINF
363
-#define DIO44_WPORT PORTF
364
-#define DIO44_PWM   NULL
365
-#define DIO44_DDR   DDRF
366
-
367
-#define DIO45_PIN   PINF5
368
-#define DIO45_RPORT PINF
369
-#define DIO45_WPORT PORTF
370
-#define DIO45_PWM   NULL
371
-#define DIO45_DDR   DDRF
372
-
373
-#define DIO46_PIN   PINF6
374
-#define DIO46_RPORT PINF
375
-#define DIO46_WPORT PORTF
376
-#define DIO46_PWM   NULL
377
-#define DIO46_DDR   DDRF
378
-
379
-#define DIO47_PIN   PINF7
380
-#define DIO47_RPORT PINF
381
-#define DIO47_WPORT PORTF
382
-#define DIO47_PWM   NULL
383
-#define DIO47_DDR   DDRF
384
-
385
-// Analog Outputs
386
-
387
-#undef PA0
388
-#define PA0_PIN     PINA0
389
-#define PA0_RPORT   PINA
390
-#define PA0_WPORT   PORTA
391
-#define PA0_PWM     NULL
392
-#define PA0_DDR     DDRA
393
-#undef PA1
394
-#define PA1_PIN     PINA1
395
-#define PA1_RPORT   PINA
396
-#define PA1_WPORT   PORTA
397
-#define PA1_PWM     NULL
398
-#define PA1_DDR     DDRA
399
-#undef PA2
400
-#define PA2_PIN     PINA2
401
-#define PA2_RPORT   PINA
402
-#define PA2_WPORT   PORTA
403
-#define PA2_PWM     NULL
404
-#define PA2_DDR     DDRA
405
-#undef PA3
406
-#define PA3_PIN     PINA3
407
-#define PA3_RPORT   PINA
408
-#define PA3_WPORT   PORTA
409
-#define PA3_PWM     NULL
410
-#define PA3_DDR     DDRA
411
-#undef PA4
412
-#define PA4_PIN     PINA4
413
-#define PA4_RPORT   PINA
414
-#define PA4_WPORT   PORTA
415
-#define PA4_PWM     NULL
416
-#define PA4_DDR     DDRA
417
-#undef PA5
418
-#define PA5_PIN     PINA5
419
-#define PA5_RPORT   PINA
420
-#define PA5_WPORT   PORTA
421
-#define PA5_PWM     NULL
422
-#define PA5_DDR     DDRA
423
-#undef PA6
424
-#define PA6_PIN     PINA6
425
-#define PA6_RPORT   PINA
426
-#define PA6_WPORT   PORTA
427
-#define PA6_PWM     NULL
428
-#define PA6_DDR     DDRA
429
-#undef PA7
430
-#define PA7_PIN     PINA7
431
-#define PA7_RPORT   PINA
432
-#define PA7_WPORT   PORTA
433
-#define PA7_PWM     NULL
434
-#define PA7_DDR     DDRA
435
-
436
-#undef PB0
437
-#define PB0_PIN     PINB0
438
-#define PB0_RPORT   PINB
439
-#define PB0_WPORT   PORTB
440
-#define PB0_PWM     NULL
441
-#define PB0_DDR     DDRB
442
-#undef PB1
443
-#define PB1_PIN     PINB1
444
-#define PB1_RPORT   PINB
445
-#define PB1_WPORT   PORTB
446
-#define PB1_PWM     NULL
447
-#define PB1_DDR     DDRB
448
-#undef PB2
449
-#define PB2_PIN     PINB2
450
-#define PB2_RPORT   PINB
451
-#define PB2_WPORT   PORTB
452
-#define PB2_PWM     NULL
453
-#define PB2_DDR     DDRB
454
-#undef PB3
455
-#define PB3_PIN     PINB3
456
-#define PB3_RPORT   PINB
457
-#define PB3_WPORT   PORTB
458
-#define PB3_PWM     NULL
459
-#define PB3_DDR     DDRB
460
-#undef PB4
461
-#define PB4_PIN     PINB4
462
-#define PB4_RPORT   PINB
463
-#define PB4_WPORT   PORTB
464
-#define PB4_PWM     NULL
465
-#define PB4_DDR     DDRB
466
-#undef PB5
467
-#define PB5_PIN     PINB5
468
-#define PB5_RPORT   PINB
469
-#define PB5_WPORT   PORTB
470
-#define PB5_PWM     NULL
471
-#define PB5_DDR     DDRB
472
-#undef PB6
473
-#define PB6_PIN     PINB6
474
-#define PB6_RPORT   PINB
475
-#define PB6_WPORT   PORTB
476
-#define PB6_PWM     NULL
477
-#define PB6_DDR     DDRB
478
-#undef PB7
479
-#define PB7_PIN     PINB7
480
-#define PB7_RPORT   PINB
481
-#define PB7_WPORT   PORTB
482
-#define PB7_PWM     NULL
483
-#define PB7_DDR     DDRB
484
-
485
-#undef PC0
486
-#define PC0_PIN     PINC0
487
-#define PC0_RPORT   PINC
488
-#define PC0_WPORT   PORTC
489
-#define PC0_PWM     NULL
490
-#define PC0_DDR     DDRC
491
-#undef PC1
492
-#define PC1_PIN     PINC1
493
-#define PC1_RPORT   PINC
494
-#define PC1_WPORT   PORTC
495
-#define PC1_PWM     NULL
496
-#define PC1_DDR     DDRC
497
-#undef PC2
498
-#define PC2_PIN     PINC2
499
-#define PC2_RPORT   PINC
500
-#define PC2_WPORT   PORTC
501
-#define PC2_PWM     NULL
502
-#define PC2_DDR     DDRC
503
-#undef PC3
504
-#define PC3_PIN     PINC3
505
-#define PC3_RPORT   PINC
506
-#define PC3_WPORT   PORTC
507
-#define PC3_PWM     NULL
508
-#define PC3_DDR     DDRC
509
-#undef PC4
510
-#define PC4_PIN     PINC4
511
-#define PC4_RPORT   PINC
512
-#define PC4_WPORT   PORTC
513
-#define PC4_PWM     NULL
514
-#define PC4_DDR     DDRC
515
-#undef PC5
516
-#define PC5_PIN     PINC5
517
-#define PC5_RPORT   PINC
518
-#define PC5_WPORT   PORTC
519
-#define PC5_PWM     NULL
520
-#define PC5_DDR     DDRC
521
-#undef PC6
522
-#define PC6_PIN     PINC6
523
-#define PC6_RPORT   PINC
524
-#define PC6_WPORT   PORTC
525
-#define PC6_PWM     NULL
526
-#define PC6_DDR     DDRC
527
-#undef PC7
528
-#define PC7_PIN     PINC7
529
-#define PC7_RPORT   PINC
530
-#define PC7_WPORT   PORTC
531
-#define PC7_PWM     NULL
532
-#define PC7_DDR     DDRC
533
-
534
-#undef PD0
535
-#define PD0_PIN     PIND0
536
-#define PD0_RPORT   PIND
537
-#define PD0_WPORT   PORTD
538
-#define PD0_PWM     NULL
539
-#define PD0_DDR     DDRD
540
-#undef PD1
541
-#define PD1_PIN     PIND1
542
-#define PD1_RPORT   PIND
543
-#define PD1_WPORT   PORTD
544
-#define PD1_PWM     NULL
545
-#define PD1_DDR     DDRD
546
-#undef PD2
547
-#define PD2_PIN     PIND2
548
-#define PD2_RPORT   PIND
549
-#define PD2_WPORT   PORTD
550
-#define PD2_PWM     NULL
551
-#define PD2_DDR     DDRD
552
-#undef PD3
553
-#define PD3_PIN     PIND3
554
-#define PD3_RPORT   PIND
555
-#define PD3_WPORT   PORTD
556
-#define PD3_PWM     NULL
557
-#define PD3_DDR     DDRD
558
-#undef PD4
559
-#define PD4_PIN     PIND4
560
-#define PD4_RPORT   PIND
561
-#define PD4_WPORT   PORTD
562
-#define PD4_PWM     NULL
563
-#define PD4_DDR     DDRD
564
-#undef PD5
565
-#define PD5_PIN     PIND5
566
-#define PD5_RPORT   PIND
567
-#define PD5_WPORT   PORTD
568
-#define PD5_PWM     NULL
569
-#define PD5_DDR     DDRD
570
-#undef PD6
571
-#define PD6_PIN     PIND6
572
-#define PD6_RPORT   PIND
573
-#define PD6_WPORT   PORTD
574
-#define PD6_PWM     NULL
575
-#define PD6_DDR     DDRD
576
-#undef PD7
577
-#define PD7_PIN     PIND7
578
-#define PD7_RPORT   PIND
579
-#define PD7_WPORT   PORTD
580
-#define PD7_PWM     NULL
581
-#define PD7_DDR     DDRD
582
-
583
-#undef PE0
584
-#define PE0_PIN     PINE0
585
-#define PE0_RPORT   PINE
586
-#define PE0_WPORT   PORTE
587
-#define PE0_PWM     NULL
588
-#define PE0_DDR     DDRE
589
-#undef PE1
590
-#define PE1_PIN     PINE1
591
-#define PE1_RPORT   PINE
592
-#define PE1_WPORT   PORTE
593
-#define PE1_PWM     NULL
594
-#define PE1_DDR     DDRE
595
-#undef PE2
596
-#define PE2_PIN     PINE2
597
-#define PE2_RPORT   PINE
598
-#define PE2_WPORT   PORTE
599
-#define PE2_PWM     NULL
600
-#define PE2_DDR     DDRE
601
-#undef PE3
602
-#define PE3_PIN     PINE3
603
-#define PE3_RPORT   PINE
604
-#define PE3_WPORT   PORTE
605
-#define PE3_PWM     NULL
606
-#define PE3_DDR     DDRE
607
-#undef PE4
608
-#define PE4_PIN     PINE4
609
-#define PE4_RPORT   PINE
610
-#define PE4_WPORT   PORTE
611
-#define PE4_PWM     NULL
612
-#define PE4_DDR     DDRE
613
-#undef PE5
614
-#define PE5_PIN     PINE5
615
-#define PE5_RPORT   PINE
616
-#define PE5_WPORT   PORTE
617
-#define PE5_PWM     NULL
618
-#define PE5_DDR     DDRE
619
-#undef PE6
620
-#define PE6_PIN     PINE6
621
-#define PE6_RPORT   PINE
622
-#define PE6_WPORT   PORTE
623
-#define PE6_PWM     NULL
624
-#define PE6_DDR     DDRE
625
-#undef PE7
626
-#define PE7_PIN     PINE7
627
-#define PE7_RPORT   PINE
628
-#define PE7_WPORT   PORTE
629
-#define PE7_PWM     NULL
630
-#define PE7_DDR     DDRE
631
-
632
-#undef PF0
633
-#define PF0_PIN     PINF0
634
-#define PF0_RPORT   PINF
635
-#define PF0_WPORT   PORTF
636
-#define PF0_PWM     NULL
637
-#define PF0_DDR     DDRF
638
-#undef PF1
639
-#define PF1_PIN     PINF1
640
-#define PF1_RPORT   PINF
641
-#define PF1_WPORT   PORTF
642
-#define PF1_PWM     NULL
643
-#define PF1_DDR     DDRF
644
-#undef PF2
645
-#define PF2_PIN     PINF2
646
-#define PF2_RPORT   PINF
647
-#define PF2_WPORT   PORTF
648
-#define PF2_PWM     NULL
649
-#define PF2_DDR     DDRF
650
-#undef PF3
651
-#define PF3_PIN     PINF3
652
-#define PF3_RPORT   PINF
653
-#define PF3_WPORT   PORTF
654
-#define PF3_PWM     NULL
655
-#define PF3_DDR     DDRF
656
-#undef PF4
657
-#define PF4_PIN     PINF4
658
-#define PF4_RPORT   PINF
659
-#define PF4_WPORT   PORTF
660
-#define PF4_PWM     NULL
661
-#define PF4_DDR     DDRF
662
-#undef PF5
663
-#define PF5_PIN     PINF5
664
-#define PF5_RPORT   PINF
665
-#define PF5_WPORT   PORTF
666
-#define PF5_PWM     NULL
667
-#define PF5_DDR     DDRF
668
-#undef PF6
669
-#define PF6_PIN     PINF6
670
-#define PF6_RPORT   PINF
671
-#define PF6_WPORT   PORTF
672
-#define PF6_PWM     NULL
673
-#define PF6_DDR     DDRF
674
-#undef PF7
675
-#define PF7_PIN     PINF7
676
-#define PF7_RPORT   PINF
677
-#define PF7_WPORT   PORTF
678
-#define PF7_PWM     NULL
679
-#define PF7_DDR     DDRF
680
-
681
-#endif // _FASTIO_AT90USB

Marlin/fastio_AT90USB-Teensy.h → Marlin/fastio_AT90USB.h View File

@@ -26,8 +26,7 @@
26 26
  *   AT90USB  51 50 49 48 47 46 45 44 10 11 12 13 14 15 16 17 35 36 37 38 39 40 41 42 25 26 27 28 29 30 31 32 33 34 43 09 18 19 01 02 61 60 59 58 57 56 55 54
27 27
  * > Teensy   28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
28 28
  *   Port     A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
29
- *   Marlin   00 01 02 03 04 05 06 07 08 09 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
30
- *            The pins 46 and 47 are not supported by Teensyduino, but are supported below.
29
+ *            The pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
31 30
  */
32 31
 
33 32
 #ifndef _FASTIO_AT90USB
@@ -679,4 +678,21 @@
679 678
 #define PF7_PWM     NULL
680 679
 #define PF7_DDR     DDRF
681 680
 
681
+
682
+/**
683
+ *  some of the pin mapping functions of the Teensduino extension to the Arduino IDE
684
+ *  do not function the same as the other Arduino extensions
685
+ */
686
+
687
+//digitalPinToTimer(pin) function works like Arduino but Timers are not defined
688
+#define TIMER0B 1
689
+#define TIMER1A 7
690
+#define TIMER1B 8
691
+#define TIMER1C 9
692
+#define TIMER2A 6
693
+#define TIMER2B 2
694
+#define TIMER3A 5
695
+#define TIMER3B 4
696
+#define TIMER3C 3
697
+
682 698
 #endif // _FASTIO_AT90USB

+ 16
- 13
Marlin/pins.h View File

@@ -20,6 +20,18 @@
20 20
  *
21 21
  */
22 22
 
23
+/**
24
+ * Include pins definitions
25
+ *
26
+ * Pins numbering schemes:
27
+ *
28
+ *  - Digital I/O pin number if used by READ/WRITE macros. (e.g., X_STEP_DIR)
29
+ *    The FastIO headers map digital pins to their ports and functions.
30
+ *
31
+ *  - Analog Input number if used by analogRead or DAC. (e.g., TEMP_n_PIN)
32
+ *    These numbers are the same in any pin mapping.
33
+ */
34
+
23 35
 #ifndef __PINS_H__
24 36
 #define __PINS_H__
25 37
 
@@ -537,19 +549,10 @@
537 549
   #define AVR_MOSI_PIN 51
538 550
   #define AVR_SS_PIN   53
539 551
 #elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
540
-  #if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS)
541
-    // Teensy pin assignments
542
-    #define AVR_SCK_PIN  21
543
-    #define AVR_MISO_PIN 23
544
-    #define AVR_MOSI_PIN 22
545
-    #define AVR_SS_PIN   20
546
-  #else
547
-    // Traditional pin assignments
548
-    #define AVR_SCK_PIN  9
549
-    #define AVR_MISO_PIN 11
550
-    #define AVR_MOSI_PIN 10
551
-    #define AVR_SS_PIN   8
552
-  #endif
552
+  #define AVR_SCK_PIN  21
553
+  #define AVR_MISO_PIN 23
554
+  #define AVR_MOSI_PIN 22
555
+  #define AVR_SS_PIN   20
553 556
 #elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
554 557
   #define AVR_SCK_PIN  10
555 558
   #define AVR_MISO_PIN 12

+ 151
- 88
Marlin/pinsDebug.h View File

@@ -20,18 +20,13 @@
20 20
  *
21 21
  */
22 22
 
23
-
24 23
 bool endstop_monitor_flag = false;
25 24
 
26
-#define NAME_FORMAT "%-28s"   // one place to specify the format of all the sources of names
25
+#define NAME_FORMAT "%-35s"   // one place to specify the format of all the sources of names
27 26
                                // "-" left justify, "28" minimum width of name, pad with blanks
28 27
 
29 28
 #define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(0) && ((P) <= analogInputToDigitalPin(15) || (P) <= analogInputToDigitalPin(7)))
30 29
 
31
-#define AVR_ATmega2560_FAMILY (defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__))
32
-#define AVR_AT90USB1286_FAMILY (defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1286P__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB646P__)  || defined(__AVR_AT90USB647__))
33
-#define AVR_ATmega1284_FAMILY (defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__))
34
-
35 30
 /**
36 31
  *  This routine minimizes RAM usage by creating a FLASH resident array to
37 32
  *  store the pin names, pin numbers and analog/digital flag.
@@ -52,7 +47,7 @@ bool endstop_monitor_flag = false;
52 47
 #define REPORT_NAME_ANALOG(NAME, COUNTER) _ADD_PIN(#NAME, COUNTER)
53 48
 
54 49
 #include "pinsDebug_list.h"
55
-#line 56
50
+#line 51
56 51
 
57 52
 // manually add pins that have names that are macros which don't play well with these macros
58 53
 #if SERIAL_PORT == 0 && (AVR_ATmega2560_FAMILY || AVR_ATmega1284_FAMILY)
@@ -88,27 +83,34 @@ const char* const pin_array[][3] PROGMEM = {
88 83
   // manually add pins ...
89 84
   #if SERIAL_PORT == 0
90 85
     #if AVR_ATmega2560_FAMILY
91
-      { RXD_NAME, "0", "1" },
92
-      { TXD_NAME, "1", "1" },
86
+      { RXD_NAME, 0, 1 },
87
+      { TXD_NAME, 1, 1 },
93 88
     #elif AVR_ATmega1284_FAMILY
94
-      { RXD_NAME, "8", "1" },
95
-      { TXD_NAME, "9", "1" },
89
+      { RXD_NAME, 8, 1 },
90
+      { TXD_NAME, 9, 1 },
96 91
     #endif
97 92
   #endif
98 93
 
99 94
   #include "pinsDebug_list.h"
100
-  #line 101
95
+  #line 96
101 96
 
102 97
 };
103 98
 
104 99
 #define n_array (sizeof(pin_array) / sizeof(char*)) / 3
105 100
 
106
-#ifndef TIMER1B
107
-  // working with Teensyduino extension so need to re-define some things
101
+#if AVR_AT90USB1286_FAMILY
102
+  // Working with Teensyduino extension so need to re-define some things
108 103
   #include "pinsDebug_Teensyduino.h"
104
+  // Can't use the "digitalPinToPort" function from the Teensyduino type IDEs
105
+  // portModeRegister takes a different argument
106
+ #define digitalPinToPort_DEBUG(p) digitalPinToPort_Teensy(p)
107
+ #define get_pinMode(pin) (*portModeRegister(pin) & digitalPinToBitMask(pin))
108
+#else
109
+ #define digitalPinToPort_DEBUG(p) digitalPinToPort(p)
110
+ bool get_pinMode(int8_t pin) {return *portModeRegister(digitalPinToPort_DEBUG(pin)) & digitalPinToBitMask(pin); }
109 111
 #endif
110 112
 
111
-#define PWM_PRINT(V) do{ sprintf(buffer, "PWM:  %4d", V); SERIAL_ECHO(buffer); }while(0)
113
+#define PWM_PRINT(V) do{ sprintf_P(buffer, PSTR("PWM:  %4d"), V); SERIAL_ECHO(buffer); }while(0)
112 114
 #define PWM_CASE(N,Z)                                           \
113 115
   case TIMER##N##Z:                                             \
114 116
     if (TCCR##N##A & (_BV(COM##N##Z##1) | _BV(COM##N##Z##0))) { \
@@ -127,7 +129,9 @@ static bool pwm_status(uint8_t pin) {
127 129
 
128 130
     #if defined(TCCR0A) && defined(COM0A1)
129 131
       #ifdef TIMER0A
130
-        PWM_CASE(0, A);
132
+        #if !AVR_AT90USB1286_FAMILY  // not available in Teensyduino type IDEs
133
+          PWM_CASE(0, A);
134
+        #endif
131 135
       #endif
132 136
       PWM_CASE(0, B);
133 137
     #endif
@@ -244,9 +248,10 @@ const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
244 248
 static void err_is_counter()     { SERIAL_PROTOCOLPGM("   non-standard PWM mode"); }
245 249
 static void err_is_interrupt()   { SERIAL_PROTOCOLPGM("   compare interrupt enabled"); }
246 250
 static void err_prob_interrupt() { SERIAL_PROTOCOLPGM("   overflow interrupt enabled"); }
251
+static void print_is_also_tied() { SERIAL_PROTOCOLPGM(" is also tied to this pin"); SERIAL_PROTOCOL_SP(14); }
247 252
 
248 253
 void com_print(uint8_t N, uint8_t Z) {
249
-  uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
254
+  const uint8_t *TCCRA = (uint8_t*)TCCR_A(N);
250 255
   SERIAL_PROTOCOLPGM("    COM");
251 256
   SERIAL_PROTOCOLCHAR(N + '0');
252 257
   switch (Z) {
@@ -264,8 +269,8 @@ void com_print(uint8_t N, uint8_t Z) {
264 269
 
265 270
 void timer_prefix(uint8_t T, char L, uint8_t N) {  // T - timer    L - pwm  N - WGM bit layout
266 271
   char buffer[20];   // for the sprintf statements
267
-  uint8_t *TCCRB = (uint8_t*)TCCR_B(T);
268
-  uint8_t *TCCRA = (uint8_t*)TCCR_A(T);
272
+  const uint8_t *TCCRB = (uint8_t*)TCCR_B(T),
273
+                *TCCRA = (uint8_t*)TCCR_A(T);
269 274
   uint8_t WGM = (((*TCCRB & _BV(WGM_2)) >> 1) | (*TCCRA & (_BV(WGM_0) | _BV(WGM_1))));
270 275
   if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1);
271 276
 
@@ -275,11 +280,11 @@ void timer_prefix(uint8_t T, char L, uint8_t N) {  // T - timer    L - pwm  N -
275 280
   SERIAL_PROTOCOL_SP(3);
276 281
 
277 282
   if (N == 3) {
278
-    uint8_t *OCRVAL8 = (uint8_t*)OCR_VAL(T, L - 'A');
283
+    const uint8_t *OCRVAL8 = (uint8_t*)OCR_VAL(T, L - 'A');
279 284
     PWM_PRINT(*OCRVAL8);
280 285
   }
281 286
   else {
282
-    uint16_t *OCRVAL16 = (uint16_t*)OCR_VAL(T, L - 'A');
287
+    const uint16_t *OCRVAL16 = (uint16_t*)OCR_VAL(T, L - 'A');
283 288
     PWM_PRINT(*OCRVAL16);
284 289
   }
285 290
   SERIAL_PROTOCOLPAIR("    WGM: ", WGM);
@@ -294,12 +299,12 @@ void timer_prefix(uint8_t T, char L, uint8_t N) {  // T - timer    L - pwm  N -
294 299
   SERIAL_PROTOCOLCHAR(T + '0');
295 300
   SERIAL_PROTOCOLPAIR("B: ", *TCCRB);
296 301
 
297
-  uint8_t *TMSK = (uint8_t*)TIMSK(T);
302
+  const uint8_t *TMSK = (uint8_t*)TIMSK(T);
298 303
   SERIAL_PROTOCOLPGM("    TIMSK");
299 304
   SERIAL_PROTOCOLCHAR(T + '0');
300 305
   SERIAL_PROTOCOLPAIR(": ", *TMSK);
301 306
 
302
-  uint8_t OCIE = L - 'A' + 1;
307
+  const uint8_t OCIE = L - 'A' + 1;
303 308
   if (N == 3) { if (WGM == 0 || WGM == 2 || WGM ==  4 || WGM ==  6) err_is_counter(); }
304 309
   else        { if (WGM == 0 || WGM == 4 || WGM == 12 || WGM == 13) err_is_counter(); }
305 310
   if (TEST(*TMSK, OCIE)) err_is_interrupt();
@@ -311,7 +316,9 @@ static void pwm_details(uint8_t pin) {
311 316
 
312 317
     #if defined(TCCR0A) && defined(COM0A1)
313 318
       #ifdef TIMER0A
314
-        case TIMER0A: timer_prefix(0, 'A', 3); break;
319
+        #if !AVR_AT90USB1286_FAMILY  // not available in Teensyduino type IDEs
320
+          case TIMER0A: timer_prefix(0, 'A', 3); break;
321
+        #endif
315 322
       #endif
316 323
       case TIMER0B: timer_prefix(0, 'B', 3); break;
317 324
     #endif
@@ -357,136 +364,192 @@ static void pwm_details(uint8_t pin) {
357 364
   // on pins that have two PWMs, print info on second PWM
358 365
   #if AVR_ATmega2560_FAMILY || AVR_AT90USB1286_FAMILY
359 366
     // looking for port B7 - PWMs 0A and 1C
360
-    if (digitalPinToPort(pin) == 2 && digitalPinToBitMask(pin) == 0x80) {
361
-      #ifndef TEENSYDUINO_IDE
367
+    if (digitalPinToPort_DEBUG(pin) == 'B' - 64 && 0x80 == digitalPinToBitMask(pin)) {
368
+      #if !AVR_AT90USB1286_FAMILY
362 369
         SERIAL_PROTOCOLPGM("\n .");
363 370
         SERIAL_PROTOCOL_SP(18);
364
-        SERIAL_PROTOCOLPGM("TIMER1C is also tied to this pin");
365
-        SERIAL_PROTOCOL_SP(13);
371
+        SERIAL_PROTOCOLPGM("TIMER1C");
372
+        print_is_also_tied();
366 373
         timer_prefix(1, 'C', 4);
367 374
       #else
368 375
         SERIAL_PROTOCOLPGM("\n .");
369 376
         SERIAL_PROTOCOL_SP(18);
370
-        SERIAL_PROTOCOLPGM("TIMER0A is also tied to this pin");
371
-        SERIAL_PROTOCOL_SP(13);
377
+        SERIAL_PROTOCOLPGM("TIMER0A");
378
+        print_is_also_tied();
372 379
         timer_prefix(0, 'A', 3);
373 380
       #endif
374 381
     }
375 382
   #endif
376 383
 } // pwm_details
377 384
 
378
-bool get_pinMode(int8_t pin) { return *portModeRegister(digitalPinToPort(pin)) & digitalPinToBitMask(pin); }
379
-
380
-#ifndef digitalRead_mod             // use Teensyduino's version of digitalRead - it doesn't disable the PWMs
381
-  int digitalRead_mod(int8_t pin) { // same as digitalRead except the PWM stop section has been removed
382
-    uint8_t port = digitalPinToPort(pin);
385
+#ifndef digitalRead_mod                   // Use Teensyduino's version of digitalRead - it doesn't disable the PWMs
386
+  int digitalRead_mod(const int8_t pin) { // same as digitalRead except the PWM stop section has been removed
387
+    const uint8_t port = digitalPinToPort_DEBUG(pin);
383 388
     return (port != NOT_A_PIN) && (*portInputRegister(port) & digitalPinToBitMask(pin)) ? HIGH : LOW;
384 389
   }
385 390
 #endif
386 391
 
387 392
 void print_port(int8_t pin) {   // print port number
388
-  #ifdef digitalPinToPort
393
+  #ifdef digitalPinToPort_DEBUG
394
+    uint8_t x;
389 395
     SERIAL_PROTOCOLPGM("  Port: ");
390
-    uint8_t x = digitalPinToPort(pin) + 64;
396
+    #if AVR_AT90USB1286_FAMILY
397
+      x = (pin == 46 || pin == 47) ? 'E' : digitalPinToPort_DEBUG(pin) + 64;
398
+    #else
399
+      x = digitalPinToPort_DEBUG(pin) + 64;
400
+    #endif
391 401
     SERIAL_CHAR(x);
392
-    uint8_t temp = digitalPinToBitMask(pin);
393
-    for (x = '0'; x < '9' && temp != 1; x++) temp >>= 1;
402
+
403
+    #if AVR_AT90USB1286_FAMILY
404
+      if (pin == 46)
405
+        x = '2';
406
+      else if (pin == 47)
407
+        x = '3';
408
+      else {
409
+        uint8_t temp = digitalPinToBitMask(pin);
410
+        for (x = '0'; x < '9' && temp != 1; x++) temp >>= 1;
411
+      }
412
+    #else
413
+      uint8_t temp = digitalPinToBitMask(pin);
414
+      for (x = '0'; x < '9' && temp != 1; x++) temp >>= 1;
415
+    #endif
394 416
     SERIAL_CHAR(x);
395 417
   #else
396 418
     SERIAL_PROTOCOL_SP(10);
397 419
   #endif
398 420
 }
399 421
 
422
+static void print_input_or_output(const bool isout) {
423
+  serialprintPGM(isout ? PSTR("Output = ") : PSTR("Input  = "));
424
+}
425
+
400 426
 // pretty report with PWM info
401
-inline void report_pin_state_extended(int8_t pin, bool ignore, bool extended = true) {
427
+inline void report_pin_state_extended(int8_t pin, bool ignore, bool extended = false,const char *start_string = "") {
402 428
   uint8_t temp_char;
403
-  char *name_mem_pointer;
404
-  char buffer[30];   // for the sprintf statements
405
-  bool found = false,
406
-       multi_name_pin = false;
429
+  char *name_mem_pointer, buffer[30];   // for the sprintf statements
430
+  bool found = false, multi_name_pin = false;
407 431
   for (uint8_t x = 0; x < n_array; x++)  {    // scan entire array and report all instances of this pin
408 432
     if (pgm_read_byte(&pin_array[x][1]) == pin) {
409 433
       if (found) multi_name_pin = true;
410 434
       found = true;
411 435
       if (!multi_name_pin) {    // report digitial and analog pin number only on the first time through
412
-        sprintf(buffer, "PIN: %3d ", pin);     // digital pin number
436
+        sprintf_P(buffer, PSTR("%sPIN: %3d "), start_string, pin);     // digital pin number
413 437
         SERIAL_ECHO(buffer);
414 438
         print_port(pin);
415 439
         if (IS_ANALOG(pin)) {
416
-          sprintf(buffer, " (A%2d)  ", int(pin - analogInputToDigitalPin(0)));    // analog pin number
440
+          sprintf_P(buffer, PSTR(" (A%2d)  "), int(pin - analogInputToDigitalPin(0)));    // analog pin number
417 441
           SERIAL_ECHO(buffer);
418 442
         }
419 443
         else SERIAL_ECHO_SP(8);   // add padding if not an analog pin
420 444
       }
421 445
       else {
422 446
         SERIAL_CHAR('.');
423
-        SERIAL_ECHO_SP(25);  // add padding if not the first instance found
447
+        SERIAL_ECHO_SP(26 + strlen(start_string));  // add padding if not the first instance found
424 448
       }
425 449
       name_mem_pointer = (char*)pgm_read_word(&pin_array[x][0]);
426 450
       for (uint8_t y = 0; y < 28; y++) {                   // always print pin name
427 451
         temp_char = pgm_read_byte(name_mem_pointer + y);
428
-        if (temp_char != 0) MYSERIAL.write(temp_char);
452
+        if (temp_char != 0)
453
+          MYSERIAL.write(temp_char);
429 454
         else {
430 455
           for (uint8_t i = 0; i < 28 - y; i++) MYSERIAL.write(' ');
431 456
           break;
432 457
         }
433 458
       }
434
-      if (pin_is_protected(pin) && !ignore)
435
-        SERIAL_ECHOPGM("protected ");
436
-      else {
437
-        if (!(pgm_read_byte(&pin_array[x][2]))) {
438
-          sprintf(buffer, "Analog in = %5d", analogRead(pin - analogInputToDigitalPin(0)));
439
-          SERIAL_ECHO(buffer);
440
-        }
459
+      if (extended) {
460
+        if (pin_is_protected(pin) && !ignore)
461
+          SERIAL_ECHOPGM("protected ");
441 462
         else {
442
-          if (!get_pinMode(pin)) {
443
-            //pinMode(pin, INPUT_PULLUP);  // make sure input isn't floating - stopped doing this
444
-                                           // because this could interfere with inductive/capacitive
445
-                                           // sensors (high impedance voltage divider) and with PT100 amplifier
446
-            SERIAL_PROTOCOLPAIR("Input  = ", digitalRead_mod(pin));
447
-          }
448
-          else if (pwm_status(pin)) {
449
-            // do nothing
463
+          #ifdef AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
464
+            if (pin == 46) {
465
+              print_input_or_output(GET_OUTPUT(46));
466
+              SERIAL_PROTOCOL(READ(46));
467
+            }
468
+            else if (pin == 47)
469
+              print_input_or_output(GET_OUTPUT(47));
470
+              SERIAL_PROTOCOL(READ(47));
471
+            }
472
+            else
473
+          #endif
474
+          {
475
+            if (!(pgm_read_byte(&pin_array[x][2]))) {
476
+              sprintf_P(buffer, PSTR("Analog in = %5d"), analogRead(pin - analogInputToDigitalPin(0)));
477
+              SERIAL_ECHO(buffer);
478
+            }
479
+            else {
480
+
481
+              if (!get_pinMode(pin)) {
482
+                //pinMode(pin, INPUT_PULLUP);  // make sure input isn't floating - stopped doing this
483
+                                               // because this could interfere with inductive/capacitive
484
+                                               // sensors (high impedance voltage divider) and with PT100 amplifier
485
+                print_input_or_output(false);
486
+                SERIAL_PROTOCOL(digitalRead_mod(pin));
487
+              }
488
+              else if (pwm_status(pin)) {
489
+                // do nothing
490
+              }
491
+              else {
492
+                print_input_or_output(true);
493
+                SERIAL_PROTOCOL(digitalRead_mod(pin));
494
+              }
495
+            }
496
+            if (!multi_name_pin && extended) pwm_details(pin);  // report PWM capabilities only on the first pass & only if doing an extended report
450 497
           }
451
-          else SERIAL_PROTOCOLPAIR("Output = ", digitalRead_mod(pin));
452 498
         }
453
-        if (!multi_name_pin && extended) pwm_details(pin);  // report PWM capabilities only on the first pass & only if doing an extended report
454 499
       }
455 500
       SERIAL_EOL();
456 501
     }  // end of IF
457 502
   } // end of for loop
458 503
 
459 504
   if (!found) {
460
-    sprintf(buffer, "PIN: %3d ", pin);
505
+    sprintf_P(buffer, PSTR("%sPIN: %3d "), start_string, pin);
461 506
     SERIAL_ECHO(buffer);
462 507
     print_port(pin);
463 508
     if (IS_ANALOG(pin)) {
464
-      sprintf(buffer, " (A%2d)  ", int(pin - analogInputToDigitalPin(0)));    // analog pin number
509
+      sprintf_P(buffer, PSTR(" (A%2d)  "), int(pin - analogInputToDigitalPin(0)));    // analog pin number
465 510
       SERIAL_ECHO(buffer);
466 511
     }
467
-    else
468
-      SERIAL_ECHO_SP(8);   // add padding if not an analog pin
469
-    SERIAL_ECHOPGM("<unused/unknown>");
470
-    if (get_pinMode(pin)) {
471
-      SERIAL_PROTOCOL_SP(12);
472
-      SERIAL_PROTOCOLPAIR("Output = ", digitalRead_mod(pin));
473
-    }
474 512
     else {
475
-      if (IS_ANALOG(pin)) {
476
-        sprintf(buffer, "   Analog in = %5d", analogRead(pin - analogInputToDigitalPin(0)));
477
-        SERIAL_ECHO(buffer);
513
+      SERIAL_ECHO_SP(8);   // add padding if not an analog pin
514
+      SERIAL_ECHOPGM("<unused/unknown>");
515
+      if (extended) {
516
+        #ifdef AVR_AT90USB1286_FAMILY  // Teensy IDEs don't know about these pins so must use FASTIO
517
+          if (pin == 46 || pin == 47) {
518
+            SERIAL_PROTOCOL_SP(12);
519
+            if (pin == 46) {
520
+              print_input_or_output(GET_OUTPUT(46));
521
+              SERIAL_PROTOCOL(READ(46));
522
+            }
523
+            else {
524
+              print_input_or_output(GET_OUTPUT(47));
525
+              SERIAL_PROTOCOL(READ(47));
526
+            }
527
+          }
528
+          else
529
+        #endif
530
+        {
531
+          if (get_pinMode(pin)) {
532
+            SERIAL_PROTOCOL_SP(12);
533
+            print_input_or_output(true);
534
+            SERIAL_PROTOCOL(digitalRead_mod(pin));
535
+          }
536
+          else {
537
+            if (IS_ANALOG(pin)) {
538
+              sprintf_P(buffer, PSTR("   Analog in = %5d"), analogRead(pin - analogInputToDigitalPin(0)));
539
+              SERIAL_ECHO(buffer);
540
+              SERIAL_ECHOPGM("   ");
541
+            }
542
+            else
543
+              SERIAL_ECHO_SP(12);   // add padding if not an analog pin
544
+
545
+            print_input_or_output(false);
546
+            SERIAL_PROTOCOL(digitalRead_mod(pin));
547
+          }
548
+          //if (!pwm_status(pin)) SERIAL_CHAR(' ');    // add padding if it's not a PWM pin
549
+          if (extended) pwm_details(pin);  // report PWM capabilities only if doing an extended report
550
+        }
478 551
       }
479
-      else
480
-        SERIAL_ECHO_SP(9);   // add padding if not an analog pin
481
-
482
-      SERIAL_PROTOCOLPAIR("   Input  = ", digitalRead_mod(pin));
552
+      SERIAL_EOL();
483 553
     }
484
-    //if (!pwm_status(pin)) SERIAL_CHAR(' ');    // add padding if it's not a PWM pin
485
-    if (extended) pwm_details(pin);  // report PWM capabilities only if doing an extended report
486
-    SERIAL_EOL();
487 554
   }
488 555
 }
489
-
490
-inline void report_pin_state(int8_t pin) {
491
-  report_pin_state_extended(pin, false, false);
492
-}

+ 11
- 15
Marlin/pinsDebug_Teensyduino.h View File

@@ -25,21 +25,16 @@
25 25
 //  do not function the same as the other Arduino extensions
26 26
 //
27 27
 
28
+#ifndef __PINSDEBUG_TEENSYDUINO_H__
29
+#define __PINSDEBUG_TEENSYDUINO_H__
28 30
 
29
-#define TEENSYDUINO_IDE
31
+#undef NUM_DIGITAL_PINS
32
+#define NUM_DIGITAL_PINS 48  // Teensy says 46 but FASTIO is 48
30 33
 
31
-//digitalPinToTimer(pin) function works like Arduino but Timers are not defined
32
-#define TIMER0B 1
33
-#define TIMER1A 7
34
-#define TIMER1B 8
35
-#define TIMER1C 9
36
-#define TIMER2A 6
37
-#define TIMER2B 2
38
-#define TIMER3A 5
39
-#define TIMER3B 4
40
-#define TIMER3C 3
34
+// "digitalPinToPort" function just returns the pin number so need to create our own.
35
+// Can't use the name "digitalPinToPort" for our own because it interferes with the
36
+// FAST_PWM_FAN function if we do
41 37
 
42
-// digitalPinToPort function just returns the pin number so need to create our own
43 38
 #define PA 1
44 39
 #define PB 2
45 40
 #define PC 3
@@ -47,9 +42,8 @@
47 42
 #define PE 5
48 43
 #define PF 6
49 44
 
50
-#undef digitalPinToPort
51 45
 
52
-const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
46
+const uint8_t PROGMEM digital_pin_to_port_PGM_Teensy[] = {
53 47
   PD, // 0  - PD0 - INT0 - PWM
54 48
   PD, // 1  - PD1 - INT1 - PWM
55 49
   PD, // 2  - PD2 - INT2 - RX
@@ -100,7 +94,7 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
100 94
   PE, // 47 - PE3 (not defined in teensyduino)
101 95
 };
102 96
 
103
-#define digitalPinToPort(P) ( pgm_read_byte( digital_pin_to_port_PGM + (P) ) )
97
+#define digitalPinToPort_Teensy(P) ( pgm_read_byte( digital_pin_to_port_PGM_Teensy + (P) ) )
104 98
 
105 99
 // digitalPinToBitMask(pin) is OK
106 100
 
@@ -108,3 +102,5 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
108 102
                                              // disable the PWMs so we can use it as is
109 103
 
110 104
 // portModeRegister(pin) is OK
105
+
106
+#endif // __PINSDEBUG_TEENSYDUINO_H__

+ 28
- 6
Marlin/pinsDebug_list.h View File

@@ -353,22 +353,22 @@
353 353
 #if defined(LCD_CONTRAST) && LCD_CONTRAST >= 0
354 354
   REPORT_NAME_DIGITAL(LCD_CONTRAST, __LINE__ )
355 355
 #endif
356
-#if PIN_EXISTS(LCD)
356
+#if defined(LCD_PINS_D4) && LCD_PINS_D4 >= 0
357 357
   REPORT_NAME_DIGITAL(LCD_PINS_D4, __LINE__ )
358 358
 #endif
359
-#if PIN_EXISTS(LCD)
359
+#if defined(LCD_PINS_D5) && LCD_PINS_D5 >= 0
360 360
   REPORT_NAME_DIGITAL(LCD_PINS_D5, __LINE__ )
361 361
 #endif
362
-#if PIN_EXISTS(LCD)
362
+#if defined(LCD_PINS_D6) && LCD_PINS_D6 >= 0
363 363
   REPORT_NAME_DIGITAL(LCD_PINS_D6, __LINE__ )
364 364
 #endif
365
-#if PIN_EXISTS(LCD)
365
+#if defined(LCD_PINS_D7) && LCD_PINS_D7 >= 0
366 366
   REPORT_NAME_DIGITAL(LCD_PINS_D7, __LINE__ )
367 367
 #endif
368
-#if PIN_EXISTS(LCD)
368
+#if defined(LCD_PINS_ENABLE) && LCD_PINS_ENABLE >= 0
369 369
   REPORT_NAME_DIGITAL(LCD_PINS_ENABLE, __LINE__ )
370 370
 #endif
371
-#if PIN_EXISTS(LCD)
371
+#if defined(LCD_PINS_RS) && LCD_PINS_RS >= 0
372 372
   REPORT_NAME_DIGITAL(LCD_PINS_RS, __LINE__ )
373 373
 #endif
374 374
 #if defined(LCD_SDSS) && LCD_SDSS >= 0
@@ -446,6 +446,18 @@
446 446
 #if PIN_EXISTS(RAMPS_D9)
447 447
   REPORT_NAME_DIGITAL(RAMPS_D9_PIN, __LINE__ )
448 448
 #endif
449
+#if PIN_EXISTS(RGB_LED_R)
450
+  REPORT_NAME_DIGITAL(RGB_LED_R_PIN, __LINE__ )
451
+#endif
452
+#if PIN_EXISTS(RGB_LED_G)
453
+  REPORT_NAME_DIGITAL(RGB_LED_G_PIN, __LINE__ )
454
+#endif
455
+#if PIN_EXISTS(RGB_LED_B)
456
+  REPORT_NAME_DIGITAL(RGB_LED_B_PIN, __LINE__ )
457
+#endif
458
+#if PIN_EXISTS(RGB_LED_W)
459
+  REPORT_NAME_DIGITAL(RGB_LED_W_PIN, __LINE__ )
460
+#endif
449 461
 #if PIN_EXISTS(RX_ENABLE)
450 462
   REPORT_NAME_DIGITAL(RX_ENABLE_PIN, __LINE__ )
451 463
 #endif
@@ -500,12 +512,21 @@
500 512
 #if PIN_EXISTS(SLEEP_WAKE)
501 513
   REPORT_NAME_DIGITAL(SLEEP_WAKE_PIN, __LINE__ )
502 514
 #endif
515
+#if PIN_EXISTS(SOL0)
516
+  REPORT_NAME_DIGITAL(SOL0_PIN, __LINE__ )
517
+#endif
503 518
 #if PIN_EXISTS(SOL1)
504 519
   REPORT_NAME_DIGITAL(SOL1_PIN, __LINE__ )
505 520
 #endif
506 521
 #if PIN_EXISTS(SOL2)
507 522
   REPORT_NAME_DIGITAL(SOL2_PIN, __LINE__ )
508 523
 #endif
524
+#if PIN_EXISTS(SOL3)
525
+  REPORT_NAME_DIGITAL(SOL3_PIN, __LINE__ )
526
+#endif
527
+#if PIN_EXISTS(SOL4)
528
+  REPORT_NAME_DIGITAL(SOL4_PIN, __LINE__ )
529
+#endif
509 530
 #if defined(SPARE_IO) && SPARE_IO >= 0
510 531
   REPORT_NAME_DIGITAL(SPARE_IO, __LINE__ )
511 532
 #endif
@@ -749,3 +770,4 @@
749 770
 #if PIN_EXISTS(Z2_STEP)
750 771
   REPORT_NAME_DIGITAL(Z2_STEP_PIN, __LINE__ )
751 772
 #endif
773
+

+ 77
- 38
Marlin/pins_5DPRINT.h View File

@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6 6
  * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -21,13 +21,54 @@
21 21
  */
22 22
 
23 23
 /**
24
+ *  Rev B  2 JUN 2017
25
+ *
26
+ *  Converted to Arduino pin numbering
27
+ */
28
+
29
+/**
30
+ *  There are two Arduino IDE extensions that are compatible with this board
31
+ *  and with the mainstream Marlin software.
32
+ *
33
+ *  Teensyduino - http://www.pjrc.com/teensy/teensyduino.html
34
+ *    Select Teensy++ 2.0 in Arduino IDE from the 'Tools -> Boards' menu
35
+ *
36
+ *    Installation instructions are at the above URL.  Don't bother loading the
37
+ *    libraries - they are not used with the Marlin software.
38
+ *
39
+ *  Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support
40
+ *
41
+ *    Installation:
42
+ *
43
+ *       1. Go to the above URL, click on the "Clone or Download" button and then
44
+ *          click on "Download ZIP" button.
45
+ *       2. Unzip the file, find the "printrboard" directory and then copy it to the
46
+ *          hardware directory in Arduino.  The Arduino hardware directory will probably
47
+ *          be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware.
48
+ *       3. Restart Arduino.
49
+ *       4. Select "Printrboard" from the 'Tools -> Boards' menu.
50
+ *
51
+ *  Teensyduino is the most popular option. Printrboard is used if your board doesn't have
52
+ *  the Teensyduino bootloader on it.
53
+ */
54
+
55
+/**
56
+ *  To burn the bootloader that comes with Printrboard:
57
+ *
58
+ *   1. Connect your programmer to the board.
59
+ *   2. In the Arduino IDE select "Printrboard" and then select the programmer.
60
+ *   3. In the 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
+
64
+/**
24 65
  * 5DPrint D8 Driver board pin assignments
25 66
  *
26 67
  * https://bitbucket.org/makible/5dprint-d8-controller-board
27 68
  */
28 69
 
29 70
 #ifndef __AVR_AT90USB1286__
30
-  #error "Oops!  Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu."
71
+  #error "Oops!  Make sure you have 'Teensy++ 2.0' or 'Printrboard' selected from the 'Tools -> Boards' menu."
31 72
 #endif
32 73
 
33 74
 #define DEFAULT_MACHINE_NAME "Makibox"
@@ -39,56 +80,54 @@
39 80
 //
40 81
 // Limit Switches
41 82
 //
42
-#define X_STOP_PIN         37
43
-#define Y_STOP_PIN         36
44
-#define Z_STOP_PIN         39
83
+#define X_STOP_PIN         37   // E5
84
+#define Y_STOP_PIN         36   // E4
85
+#define Z_STOP_PIN         19   // E7
45 86
 
46 87
 //
47 88
 // Steppers
48 89
 //
49
-#define X_STEP_PIN          0
50
-#define X_DIR_PIN           1
51
-#define X_ENABLE_PIN       23
52
-
53
-#define Y_STEP_PIN          2
54
-#define Y_DIR_PIN           3
55
-#define Y_ENABLE_PIN       19
56
-
57
-#define Z_STEP_PIN          4
58
-#define Z_DIR_PIN           5
59
-#define Z_ENABLE_PIN       18
60
-
61
-#define E0_STEP_PIN         6
62
-#define E0_DIR_PIN          7
63
-#define E0_ENABLE_PIN      17
64
-
65
-// Microstepping pins - Mapping not from fastio.h (?)
66
-#define X_MS1_PIN          25
67
-#define X_MS2_PIN          26
68
-#define Y_MS1_PIN           9
69
-#define Y_MS2_PIN           8
70
-#define Z_MS1_PIN           7
71
-#define Z_MS2_PIN           6
72
-#define E0_MS1_PIN          5
73
-#define E0_MS2_PIN          4
90
+#define X_STEP_PIN         28   // A0
91
+#define X_DIR_PIN          29   // A1
92
+#define X_ENABLE_PIN       17   // C7
93
+
94
+#define Y_STEP_PIN         30   // A2
95
+#define Y_DIR_PIN          31   // A3
96
+#define Y_ENABLE_PIN       13   // C3
97
+
98
+#define Z_STEP_PIN         32   // A4
99
+#define Z_DIR_PIN          33   // A5
100
+#define Z_ENABLE_PIN       12   // C2
101
+
102
+#define E0_STEP_PIN        34   // A6
103
+#define E0_DIR_PIN         35   // A7
104
+#define E0_ENABLE_PIN      11   // C1
105
+
106
+
107
+#define X_MS1_PIN          25   // B5
108
+#define X_MS2_PIN          26   // B6
109
+#define Y_MS1_PIN           9   // E1
110
+#define Y_MS2_PIN           8   // E0
111
+#define Z_MS1_PIN           7   // D7
112
+#define Z_MS2_PIN           6   // D6
113
+#define E0_MS1_PIN          5   // D5
114
+#define E0_MS2_PIN          4   // D4
74 115
 
75 116
 //
76 117
 // Temperature Sensors
77 118
 //
78
-#define TEMP_0_PIN          1   // Analog Input
79
-#define TEMP_BED_PIN        0   // Analog Input
119
+#define TEMP_0_PIN          1   // F1  Analog Input
120
+#define TEMP_BED_PIN        0   // F0  Analog Input
80 121
 
81 122
 //
82 123
 // Heaters / Fans
83 124
 //
84
-#define HEATER_0_PIN       21
85
-#define HEATER_BED_PIN     20
125
+#define HEATER_0_PIN       15   // C5
126
+#define HEATER_BED_PIN     14   // C4
86 127
 
87
-// You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
88
-// for the fan and Teensyduino uses a different pin mapping.
89
-#define FAN_PIN            16
128
+#define FAN_PIN            16   // C6  PWM3A
90 129
 
91 130
 //
92 131
 // Misc. Functions
93 132
 //
94
-#define SDSS               20
133
+#define SDSS               20   // B0

+ 5
- 5
Marlin/pins_AZTEEG_X3_PRO.h View File

@@ -134,9 +134,9 @@
134 134
 
135 135
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
136 136
   #undef SD_DETECT_PIN
137
-  #define SD_DETECT_PIN    49 // For easy adapter board
137
+  #define SD_DETECT_PIN    49   // For easy adapter board
138 138
   #undef BEEPER_PIN
139
-  #define  BEEPER_PIN  12     // 33 isn't physically available to the LCD display
139
+  #define  BEEPER_PIN      12   // 33 isn't physically available to the LCD display
140 140
 #else
141 141
   #define STAT_LED_RED_PIN 32
142 142
   #define STAT_LED_BLUE_PIN 35
@@ -146,9 +146,9 @@
146 146
 // Misc. Functions
147 147
 //
148 148
 #if ENABLED(CASE_LIGHT_ENABLE)  && PIN_EXISTS(CASE_LIGHT) && defined(DOGLCD_A0) && DOGLCD_A0 == CASE_LIGHT_PIN
149
-  #undef DOGLCD_A0            // steal pin 44 for the case light; if you have a Viki2 and have connected it
150
-  #define DOGLCD_A0      57   // following the Panucatt wiring diagram, you may need to tweak these pin assignments
151
-                                // as the wiring diagram uses pin 44 for DOGLCD_A0
149
+  #undef DOGLCD_A0            // Steal pin 44 for the case light; if you have a Viki2 and have connected it
150
+  #define DOGLCD_A0        57 // following the Panucatt wiring diagram, you may need to tweak these pin assignments
151
+                              // as the wiring diagram uses pin 44 for DOGLCD_A0
152 152
 #endif
153 153
 
154 154
 //

+ 38
- 32
Marlin/pins_BRAINWAVE.h View File

@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6 6
  * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -35,6 +35,12 @@
35 35
  */
36 36
 
37 37
 /**
38
+ *  Rev C  2 JUN 2017
39
+ *
40
+ *  Converted to Arduino pin numbering
41
+ */
42
+
43
+/**
38 44
  *  Marlin_AT90USB - https://github.com/Bob-the-Kuhn/Marlin_AT90USB
39 45
  *    This is the only known IDE extension that is compatible with the pin definitions
40 46
  *    in this file, Adrduino 1.6.12 and the latest mainstream Marlin software.
@@ -49,20 +55,20 @@
49 55
  *       https://rawgit.com/Bob-the-Kuhn/Marlin_AT90USB/master/package_MARLIN_AT90USB_index.json
50 56
  *    2. Under Tools -> Board -> Boards manager, scroll to the bottom, click on MARLIN_AT90USB
51 57
  *       and then click on "Install"
52
- *    3. Select "AT90USB646_STANDARD" from the 'Tools -> Boards' menu.
58
+ *    3. Select "AT90USB646_TEENSYPP" from the 'Tools -> Boards' menu.
53 59
  */
54 60
 
55 61
 /**
56 62
  *  To burn the bootloader that comes with Marlin_AT90USB:
57 63
  *
58 64
  *    1. Connect your programmer to the board.
59
- *    2. In Arduino IDE select "AT90USB646_STANDARD" and then select the programmer.
65
+ *    2. In Arduino IDE select "AT90USB646_TEENSYPP" and then select the programmer.
60 66
  *    3. In Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message.
61 67
  *    4. The programmer is no longer needed. Remove it.
62 68
  */
63 69
 
64 70
 #ifndef __AVR_AT90USB646__
65
-  #error "Oops!  Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu."
71
+  #error "Oops!  Make sure you have 'AT90USB646_TEENSYPP' selected from the 'Tools -> Boards' menu."
66 72
 #endif
67 73
 
68 74
 #define BOARD_NAME         "Brainwave"
@@ -72,48 +78,48 @@
72 78
 //
73 79
 // Limit Switches
74 80
 //
75
-#define X_STOP_PIN          7
76
-#define Y_STOP_PIN          6
77
-#define Z_STOP_PIN          5
81
+#define X_STOP_PIN         35   // A7
82
+#define Y_STOP_PIN         34   // A6
83
+#define Z_STOP_PIN         33   // A5
78 84
 
79 85
 //
80 86
 // Steppers
81 87
 //
82
-#define X_STEP_PIN         27
83
-#define X_DIR_PIN          29
84
-#define X_ENABLE_PIN       28
85
-#define X_ATT_PIN          26
86
-
87
-#define Y_STEP_PIN         31
88
-#define Y_DIR_PIN          33
89
-#define Y_ENABLE_PIN       32
90
-#define Y_ATT_PIN          30
91
-
92
-#define Z_STEP_PIN         17
93
-#define Z_DIR_PIN          19
94
-#define Z_ENABLE_PIN       18
95
-#define Z_ATT_PIN          16
96
-
97
-#define E0_STEP_PIN        21
98
-#define E0_DIR_PIN         23
99
-#define E0_ENABLE_PIN      22
100
-#define E0_ATT_PIN         20
88
+#define X_STEP_PIN          3   // D3
89
+#define X_DIR_PIN           5   // D5
90
+#define X_ENABLE_PIN        4   // D4
91
+#define X_ATT_PIN           2   // D2
92
+
93
+#define Y_STEP_PIN          7   // D7
94
+#define Y_DIR_PIN           9   // E1
95
+#define Y_ENABLE_PIN        8   // E0
96
+#define Y_ATT_PIN           6   // D6
97
+
98
+#define Z_STEP_PIN         11   // C1
99
+#define Z_DIR_PIN          13   // C3
100
+#define Z_ENABLE_PIN       12   // C2
101
+#define Z_ATT_PIN          10   // C0
102
+
103
+#define E0_STEP_PIN        15   // C5
104
+#define E0_DIR_PIN         17   // C7
105
+#define E0_ENABLE_PIN      16   // C6
106
+#define E0_ATT_PIN         14   // C4
101 107
 
102 108
 //
103 109
 // Temperature Sensors
104 110
 //
105
-#define TEMP_0_PIN          7   // Analog Input
106
-#define TEMP_BED_PIN        6   // Analog Input
111
+#define TEMP_0_PIN          7   // F7  Analog Input
112
+#define TEMP_BED_PIN        6   // F6  Analog Input
107 113
 
108 114
 //
109 115
 // Heaters / Fans
110 116
 //
111
-#define HEATER_0_PIN        4  // Extruder
112
-#define HEATER_BED_PIN     38  // Bed
117
+#define HEATER_0_PIN       32   // A4 Extruder
118
+#define HEATER_BED_PIN     18   // E6 Bed
113 119
 
114
-#define FAN_PIN             3  // Fan
120
+#define FAN_PIN            31   // A3 Fan
115 121
 
116 122
 //
117 123
 // Misc. Functions
118 124
 //
119
-#define LED_PIN            39
125
+#define LED_PIN            19   // E7

+ 39
- 54
Marlin/pins_BRAINWAVE_PRO.h View File

@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6 6
  * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -32,11 +32,16 @@
32 32
  *
33 33
  *  Added pointers to currently available Arduino IDE extensions that will
34 34
  *  allow this board to use the latest Marlin software
35
+ *
36
+ *
37
+ *  Rev C  2 JUN 2017
38
+ *
39
+ *  Converted to Arduino pin numbering
35 40
  */
36 41
 
37 42
 /**
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
43
+ *  There are two Arduino IDE extensions that are compatible with this board
44
+ *  and with the mainstream Marlin software.
40 45
  *
41 46
  *  Teensyduino - http://www.pjrc.com/teensy/teensyduino.html
42 47
  *    Select Teensy++ 2.0 in Arduino IDE from the 'Tools -> Boards' menu
@@ -45,8 +50,6 @@
45 50
  *    libraries - they are not used with the Marlin software.
46 51
  *
47 52
  *  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 53
  *
51 54
  *    Installation:
52 55
  *
@@ -54,43 +57,25 @@
54 57
  *          click on "Download ZIP" button.
55 58
  *       2. Unzip the file, find the "printrboard" directory and then copy it to the
56 59
  *          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.
60
+ *          be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware.
58 61
  *       3. Restart Arduino.
59 62
  *       4. Select "Printrboard" from the 'Tools -> Boards' menu.
60 63
  *
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't 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.
64
+ *  Teensyduino is the most popular option. Printrboard is used if your board doesn't have
65
+ *  the Teensyduino bootloader on it.
75 66
  */
76 67
 
77 68
 /**
78
- *  To burn the bootloader that comes with Printrboard and Marlin_AT90USB:
69
+ *  To burn the bootloader that comes with Printrboard:
79 70
  *
80 71
  *   1. Connect your programmer to the board.
81
- *   2. In the Arduino IDE select "Printrboard" or "AT90USB1286_TEENSYPP" and then select the programmer.
72
+ *   2. In the Arduino IDE select "Printrboard" and then select the programmer.
82 73
  *   3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message.
83 74
  *   4. The programmer is no longer needed. Remove it.
84 75
  */
85 76
 
86 77
 #ifndef __AVR_AT90USB1286__
87
-  #error "Oops!  Make sure you have 'Teensy++ 2.0', 'AT90USB1286_TEENSYPP', or 'Printrboard' selected from the 'Tools -> Boards' menu."
88
-#endif
89
-
90
-#include "fastio.h"
91
-
92
-#if DISABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical.
93
-  #error "Uncomment '#define AT90USBxx_TEENSYPP_ASSIGNMENTS' in fastio.h for this config"
78
+  #error "Oops!  Make sure you have 'Teensy++ 2.0' or 'Printrboard' selected from the 'Tools -> Boards' menu."
94 79
 #endif
95 80
 
96 81
 #define BOARD_NAME         "Brainwave Pro"
@@ -101,53 +86,53 @@
101 86
 //
102 87
 // Limit Switches
103 88
 //
104
-#define X_STOP_PIN         47
105
-#define Y_STOP_PIN         18
106
-#define Z_MAX_PIN          36
89
+#define X_STOP_PIN         45   // F7
90
+#define Y_STOP_PIN         12   // C2
91
+#define Z_STOP_PIN         36   // E4
107 92
 
108 93
 //
109 94
 // Z Probe (when not Z_MIN_PIN)
110 95
 //
111 96
 #ifndef Z_MIN_PROBE_PIN
112
-  #define Z_MIN_PROBE_PIN  17
97
+  #define Z_MIN_PROBE_PIN  11   // C1
113 98
 #endif
114 99
 
115 100
 //
116 101
 // Steppers
117 102
 //
118
-#define X_STEP_PIN         33
119
-#define X_DIR_PIN          32
120
-#define X_ENABLE_PIN       11
103
+#define X_STEP_PIN          9   // E1
104
+#define X_DIR_PIN           8   // E0
105
+#define X_ENABLE_PIN       23   // B3
121 106
 
122
-#define Y_STEP_PIN         31
123
-#define Y_DIR_PIN          30
124
-#define Y_ENABLE_PIN        8
107
+#define Y_STEP_PIN          7   // D7
108
+#define Y_DIR_PIN           6   // D6
109
+#define Y_ENABLE_PIN       20   // B0
125 110
 
126
-#define Z_STEP_PIN         29
127
-#define Z_DIR_PIN          28
128
-#define Z_ENABLE_PIN       37
111
+#define Z_STEP_PIN          5   // D5
112
+#define Z_DIR_PIN           4   // D4
113
+#define Z_ENABLE_PIN       37   // E5
129 114
 
130
-#define E0_STEP_PIN        35
131
-#define E0_DIR_PIN         34
132
-#define E0_ENABLE_PIN      13
115
+#define E0_STEP_PIN        47   // E3
116
+#define E0_DIR_PIN         46   // E2
117
+#define E0_ENABLE_PIN      25   // B5
133 118
 
134 119
 //
135 120
 // Temperature Sensors
136 121
 //
137
-#define TEMP_0_PIN          2   // Analog Input
138
-#define TEMP_1_PIN          1   // Analog Input
139
-#define TEMP_BED_PIN        0   // Analog Input
122
+#define TEMP_0_PIN          2   // F2  Analog Input
123
+#define TEMP_1_PIN          1   // F1  Analog Input
124
+#define TEMP_BED_PIN        0   // F0  Analog Input
140 125
 
141 126
 //
142 127
 // Heaters / Fans
143 128
 //
144
-#define HEATER_0_PIN       15
145
-#define HEATER_BED_PIN     14  // Bed
146
-#define FAN_PIN            16  // Fan, PWM
129
+#define HEATER_0_PIN       27   // B7
130
+#define HEATER_BED_PIN     26   // B6  Bed
131
+#define FAN_PIN            16   // C6  Fan, PWM3A
147 132
 
148 133
 //
149 134
 // Misc. Functions
150 135
 //
151
-#define SDSS               20
152
-#define SD_DETECT_PIN      12
153
-#define LED_PIN            19
136
+#define SDSS               20   // B0
137
+#define SD_DETECT_PIN      24   // B4
138
+#define LED_PIN            13   // C3

+ 3
- 3
Marlin/pins_GEN6.h View File

@@ -107,7 +107,7 @@
107 107
 //
108 108
 #define SDSS               17
109 109
 #define DEBUG_PIN           0
110
-#define CASE_LIGHT_PIN   16     // MUST BE HARDWARE PWM
110
+#define CASE_LIGHT_PIN     16   // MUST BE HARDWARE PWM
111 111
 
112 112
 // RS485 pins
113 113
 #define TX_ENABLE_PIN      12
@@ -116,6 +116,6 @@
116 116
 //
117 117
 // M3/M4/M5 - Spindle/Laser Control
118 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
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 121
 #define SPINDLE_DIR_PIN           6

+ 3
- 3
Marlin/pins_GEN7_CUSTOM.h View File

@@ -96,14 +96,14 @@
96 96
 // Heaters
97 97
 //
98 98
 #define HEATER_0_PIN     4
99
-#define HEATER_BED_PIN   3  // (bed)
99
+#define HEATER_BED_PIN   3   // (bed)
100 100
 
101 101
 //
102 102
 // Misc. Functions
103 103
 //
104
-#define SDSS            31  // SCL pin of I2C header || CS Pin for SD Card support
104
+#define SDSS            31   // SCL pin of I2C header || CS Pin for SD Card support
105 105
 #define PS_ON_PIN       19
106
-#define CASE_LIGHT_PIN  15    // MUST BE HARDWARE PWM
106
+#define CASE_LIGHT_PIN  15   // MUST BE HARDWARE PWM
107 107
 
108 108
 // A pin for debugging
109 109
 #define DEBUG_PIN       -1

+ 4
- 4
Marlin/pins_MEGATRONICS_3.h View File

@@ -131,7 +131,7 @@
131 131
 #define SDSS               53
132 132
 #define LED_PIN            13
133 133
 #define PS_ON_PIN          12
134
-#define CASE_LIGHT_PIN     45 // try the keypad connector
134
+#define CASE_LIGHT_PIN     45   // Try the keypad connector
135 135
 
136 136
 //
137 137
 // LCD / Controller
@@ -144,9 +144,9 @@
144 144
 
145 145
 #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
146 146
 
147
-  #define LCD_PINS_RS      56 // CS chip select / SS chip slave select
148
-  #define LCD_PINS_ENABLE  51 // SID (MOSI)
149
-  #define LCD_PINS_D4      52 // SCK (CLK) clock
147
+  #define LCD_PINS_RS      56   // CS chip select / SS chip slave select
148
+  #define LCD_PINS_ENABLE  51   // SID (MOSI)
149
+  #define LCD_PINS_D4      52   // SCK (CLK) clock
150 150
   #define SD_DETECT_PIN    35
151 151
 
152 152
 #else

+ 74
- 77
Marlin/pins_MIGHTYBOARD_REVE.h View File

@@ -64,20 +64,20 @@
64 64
 //
65 65
 // Servos
66 66
 //
67
-#define SERVO0_PIN         36 // C1 (1280-EX1)
68
-#define SERVO1_PIN         37 // C0 (1280-EX2)
69
-#define SERVO2_PIN         40 // G1 (1280-EX3)
70
-#define SERVO3_PIN         41 // G0 (1280-EX4)
67
+#define SERVO0_PIN         36   // C1 (1280-EX1)
68
+#define SERVO1_PIN         37   // C0 (1280-EX2)
69
+#define SERVO2_PIN         40   // G1 (1280-EX3)
70
+#define SERVO3_PIN         41   // G0 (1280-EX4)
71 71
 
72 72
 //
73 73
 // Limit Switches
74 74
 //
75
-#define X_MIN_PIN          49 // L0
76
-#define X_MAX_PIN          48 // L1
77
-#define Y_MIN_PIN          47 // L2
78
-#define Y_MAX_PIN          46 // L3
79
-#define Z_MIN_PIN          43 // L6
80
-#define Z_MAX_PIN          42 // L7
75
+#define X_MIN_PIN          49   // L0
76
+#define X_MAX_PIN          48   // L1
77
+#define Y_MIN_PIN          47   // L2
78
+#define Y_MAX_PIN          46   // L3
79
+#define Z_MIN_PIN          43   // L6
80
+#define Z_MAX_PIN          42   // L7
81 81
 
82 82
 //
83 83
 // Z Probe (when not Z_MIN_PIN)
@@ -89,25 +89,25 @@
89 89
 //
90 90
 // Steppers
91 91
 //
92
-#define X_STEP_PIN         55 // F1
93
-#define X_DIR_PIN          54 // F0
94
-#define X_ENABLE_PIN       56 // F2
92
+#define X_STEP_PIN         55   // F1
93
+#define X_DIR_PIN          54   // F0
94
+#define X_ENABLE_PIN       56   // F2
95 95
 
96
-#define Y_STEP_PIN         59 // F5
97
-#define Y_DIR_PIN          58 // F4
98
-#define Y_ENABLE_PIN       60 // F6
96
+#define Y_STEP_PIN         59   // F5
97
+#define Y_DIR_PIN          58   // F4
98
+#define Y_ENABLE_PIN       60   // F6
99 99
 
100
-#define Z_STEP_PIN         63 // K1
101
-#define Z_DIR_PIN          62 // K0
102
-#define Z_ENABLE_PIN       64 // K2
100
+#define Z_STEP_PIN         63   // K1
101
+#define Z_DIR_PIN          62   // K0
102
+#define Z_ENABLE_PIN       64   // K2
103 103
 
104
-#define E0_STEP_PIN        25 // A3
105
-#define E0_DIR_PIN         24 // A2
106
-#define E0_ENABLE_PIN      26 // A4
104
+#define E0_STEP_PIN        25   // A3
105
+#define E0_DIR_PIN         24   // A2
106
+#define E0_ENABLE_PIN      26   // A4
107 107
 
108
-#define E1_STEP_PIN        29 // A7
109
-#define E1_DIR_PIN         28 // A6
110
-#define E1_ENABLE_PIN      39 // G2
108
+#define E1_STEP_PIN        29   // A7
109
+#define E1_DIR_PIN         28   // A6
110
+#define E1_ENABLE_PIN      39   // G2
111 111
 
112 112
 //
113 113
 // I2C Digipots - MCP4018
@@ -115,17 +115,17 @@
115 115
 // Set from 0 - 127 with stop bit.
116 116
 // (Ex. 3F << 1 | 1)
117 117
 //
118
-#define DIGIPOTS_I2C_SCL    76 // J5
119
-#define DIGIPOTS_I2C_SDA_X  57 // F3
120
-#define DIGIPOTS_I2C_SDA_Y  61 // F7
121
-#define DIGIPOTS_I2C_SDA_Z  65 // K3
122
-#define DIGIPOTS_I2C_SDA_E0 27 // A5
123
-#define DIGIPOTS_I2C_SDA_E1 77 // J6
118
+#define DIGIPOTS_I2C_SCL    76   // J5
119
+#define DIGIPOTS_I2C_SDA_X  57   // F3
120
+#define DIGIPOTS_I2C_SDA_Y  61   // F7
121
+#define DIGIPOTS_I2C_SDA_Z  65   // K3
122
+#define DIGIPOTS_I2C_SDA_E0 27   // A5
123
+#define DIGIPOTS_I2C_SDA_E1 77   // J6
124 124
 
125 125
 //
126 126
 // Temperature Sensors
127 127
 //
128
-#define TEMP_BED_PIN       69 // K7
128
+#define TEMP_BED_PIN        69   // K7
129 129
 
130 130
 // SPI for Max6675 or Max31855 Thermocouple
131 131
 // Uses a separate SPI bus
@@ -135,10 +135,10 @@
135 135
 //  2 E4 CS2
136 136
 // 78 E2 SCK
137 137
 //
138
-#define THERMO_SCK_PIN     78 // E2
139
-#define THERMO_DO_PIN       3 // E5
140
-#define THERMO_CS1          5 // E3
141
-#define THERMO_CS2          2 // E4
138
+#define THERMO_SCK_PIN      78   // E2
139
+#define THERMO_DO_PIN        3   // E5
140
+#define THERMO_CS1           5   // E3
141
+#define THERMO_CS2           2   // E4
142 142
 
143 143
 #define MAX6675_SS          THERMO_CS1
144 144
 #define MAX6675_SCK_PIN     THERMO_SCK_PIN
@@ -150,10 +150,10 @@
150 150
 // 2 extruders or 1 extruder and a heated bed.
151 151
 // With no heated bed, an additional 24V fan is possible.
152 152
 //
153
-#define MOSFET_A_PIN     6 // H3
154
-#define MOSFET_B_PIN    11 // B5 - Rev A of this file had this pin assigned to 9
155
-#define MOSFET_C_PIN    45 // L4
156
-#define MOSFET_D_PIN    44 // L5
153
+#define MOSFET_A_PIN         6   // H3
154
+#define MOSFET_B_PIN        11   // B5 - Rev A of this file had this pin assigned to 9
155
+#define MOSFET_C_PIN        45   // L4
156
+#define MOSFET_D_PIN        44   // L5
157 157
 
158 158
 #if HOTENDS > 1
159 159
   #if TEMP_SENSOR_BED
@@ -195,43 +195,43 @@
195 195
 //
196 196
 // Extruder Auto Fan Pins
197 197
 //
198
-#define ORIG_E0_AUTO_FAN_PIN   7 // H4
199
-#define ORIG_E1_AUTO_FAN_PIN  12 // B6
198
+#define ORIG_E0_AUTO_FAN_PIN  7   // H4
199
+#define ORIG_E1_AUTO_FAN_PIN 12   // B6
200 200
 
201 201
 //
202 202
 // Misc. Functions
203 203
 //
204
-#define LED_PIN             13 // B7
205
-#define CUTOFF_RESET_PIN    16 // H1
206
-#define CUTOFF_TEST_PIN     17 // H0
207
-#define CASE_LIGHT_PIN      44 // L5   MUST BE HARDWARE PWM
204
+#define LED_PIN             13   // B7
205
+#define CUTOFF_RESET_PIN    16   // H1
206
+#define CUTOFF_TEST_PIN     17   // H0
207
+#define CASE_LIGHT_PIN      44   // L5   MUST BE HARDWARE PWM
208 208
 
209 209
 //
210 210
 // LCD / Controller
211 211
 //
212 212
 #ifdef REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
213 213
 
214
-  #define LCD_PINS_RS           33 // C4, LCD-STROBE
215
-  #define LCD_PINS_ENABLE       72 // J2, LEFT
216
-  #define LCD_PINS_D4           35 // C2, LCD-CLK
217
-  #define LCD_PINS_D5           32 // C5, RLED
218
-  #define LCD_PINS_D6           34 // C3, LCD-DATA
219
-  #define LCD_PINS_D7           31 // C6, GLED
214
+  #define LCD_PINS_RS       33   // C4: LCD-STROBE
215
+  #define LCD_PINS_ENABLE   72   // J2: LEFT
216
+  #define LCD_PINS_D4       35   // C2: LCD-CLK
217
+  #define LCD_PINS_D5       32   // C5: RLED
218
+  #define LCD_PINS_D6       34   // C3: LCD-DATA
219
+  #define LCD_PINS_D7       31   // C6: GLED
220 220
 
221
-  #define BTN_EN2               75 // J4, UP
222
-  #define BTN_EN1               73 // J3, DOWN
221
+  #define BTN_EN2           75   // J4, UP
222
+  #define BTN_EN1           73   // J3, DOWN
223 223
   //STOP button connected as KILL_PIN
224
-  #define KILL_PIN              14 // J1, RIGHT
224
+  #define KILL_PIN          14   // J1, RIGHT
225 225
   //KILL - not connected
226 226
 
227
-  #define BEEPER_PIN             8 // H5, SD_WP
227
+  #define BEEPER_PIN         8   // H5, SD_WP
228 228
 
229
-  #define BTN_CENTER            15 // J0
230
-  #define BTN_ENC               BTN_CENTER
229
+  #define BTN_CENTER        15   // J0
230
+  #define BTN_ENC           BTN_CENTER
231 231
 
232 232
   //on board leds
233
-  #define STAT_LED_RED_LED      SERVO0_PIN // C1 (1280-EX1, DEBUG2)
234
-  #define STAT_LED_BLUE_PIN     SERVO1_PIN // C0 (1280-EX2, DEBUG3)
233
+  #define STAT_LED_RED_LED  SERVO0_PIN // C1 (1280-EX1, DEBUG2)
234
+  #define STAT_LED_BLUE_PIN SERVO1_PIN // C0 (1280-EX2, DEBUG3)
235 235
 
236 236
 #else
237 237
   // Replicator uses a 3-wire SR controller with HD44780
@@ -239,29 +239,29 @@
239 239
   //
240 240
 
241 241
   #define SAV_3DLCD
242
-  #define SR_DATA_PIN         34 // C3
243
-  #define SR_CLK_PIN          35 // C2
244
-  #define SR_STROBE_PIN       33 // C4
242
+  #define SR_DATA_PIN       34   // C3
243
+  #define SR_CLK_PIN        35   // C2
244
+  #define SR_STROBE_PIN     33   // C4
245 245
 
246
-  #define BTN_UP              75 // J4
247
-  #define BTN_DOWN            73 // J3
248
-  #define BTN_LEFT            72 // J2
249
-  #define BTN_RIGHT           14 // J1
250
-  #define BTN_CENTER          15 // J0
251
-  #define BTN_ENC             BTN_CENTER
246
+  #define BTN_UP            75   // J4
247
+  #define BTN_DOWN          73   // J3
248
+  #define BTN_LEFT          72   // J2
249
+  #define BTN_RIGHT         14   // J1
250
+  #define BTN_CENTER        15   // J0
251
+  #define BTN_ENC           BTN_CENTER
252 252
 
253
-  #define BEEPER_PIN           4 // G5
253
+  #define BEEPER_PIN         4   // G5
254 254
 
255
-  #define STAT_LED_RED_PIN    32 // C5
256
-  #define STAT_LED_BLUE_PIN   31 // C6 (Actually green)
255
+  #define STAT_LED_RED_PIN  32   // C5
256
+  #define STAT_LED_BLUE_PIN 31   // C6 (Actually green)
257 257
 
258 258
 #endif
259 259
 
260 260
 //
261 261
 // SD Card
262 262
 //
263
-#define SDSS                53 // B0
264
-#define SD_DETECT_PIN       9  // H6
263
+#define SDSS                53   // B0
264
+#define SD_DETECT_PIN        9   // H6
265 265
 
266 266
 #define MAX_PIN             THERMO_SCK_PIN
267 267
 
@@ -275,9 +275,6 @@
275 275
 
276 276
 
277 277
 
278
-
279
-
280
-
281 278
 // Check if all pins are defined in mega/pins_arduino.h
282 279
 #include <Arduino.h>
283 280
 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"

+ 3
- 3
Marlin/pins_MINITRONICS.h View File

@@ -104,9 +104,9 @@
104 104
 
105 105
 #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
106 106
 
107
-  #define LCD_PINS_RS      15 // CS chip select /SS chip slave select
108
-  #define LCD_PINS_ENABLE  11 // SID (MOSI)
109
-  #define LCD_PINS_D4      10 // SCK (CLK) clock
107
+  #define LCD_PINS_RS      15   // CS chip select /SS chip slave select
108
+  #define LCD_PINS_ENABLE  11   // SID (MOSI)
109
+  #define LCD_PINS_D4      10   // SCK (CLK) clock
110 110
 
111 111
   #define BTN_EN1          18
112 112
   #define BTN_EN2          17

+ 93
- 72
Marlin/pins_PRINTRBOARD.h View File

@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6 6
  * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -21,18 +21,48 @@
21 21
  */
22 22
 
23 23
 /**
24
- * Printrboard 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  2 JUN 2017
25
+ *
26
+ *  Converted to Arduino pin numbering
28 27
  */
29 28
 
30
-#ifndef __AVR_AT90USB1286__
31
-  #error "Oops!  Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu."
32
-#endif
29
+/**
30
+ *  There are two Arduino IDE extensions that are compatible with this board
31
+ *  and with the mainstream Marlin software.
32
+ *
33
+ *  Teensyduino - http://www.pjrc.com/teensy/teensyduino.html
34
+ *    Select Teensy++ 2.0 in Arduino IDE from the 'Tools -> Boards' menu
35
+ *
36
+ *    Installation instructions are at the above URL.  Don't bother loading the
37
+ *    libraries - they are not used with the Marlin software.
38
+ *
39
+ *  Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support
40
+ *
41
+ *    Installation:
42
+ *
43
+ *       1. Go to the above URL, click on the "Clone or Download" button and then
44
+ *          click on "Download ZIP" button.
45
+ *       2. Unzip the file, find the "printrboard" directory and then copy it to the
46
+ *          hardware directory in Arduino.  The Arduino hardware directory will probably
47
+ *          be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware.
48
+ *       3. Restart Arduino.
49
+ *       4. Select "Printrboard" from the 'Tools -> Boards' menu.
50
+ *
51
+ *  Teensyduino is the most popular option. Printrboard is used if your board doesn't have
52
+ *  the Teensyduino bootloader on it.
53
+ */
33 54
 
34
-#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS)  // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional.
35
-  #error "These Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h"
55
+/**
56
+ *  To burn the bootloader that comes with Printrboard:
57
+ *
58
+ *   1. Connect your programmer to the board.
59
+ *   2. In the Arduino IDE select "Printrboard" and then select the programmer.
60
+ *   3. In the 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
+
64
+#ifndef __AVR_AT90USB1286__
65
+  #error "Oops!  Make sure you have 'Teensy++ 2.0' or 'Printrboard' selected from the 'Tools -> Boards' menu."
36 66
 #endif
37 67
 
38 68
 #define BOARD_NAME         "Printrboard"
@@ -46,32 +76,32 @@
46 76
 //
47 77
 // Limit Switches
48 78
 //
49
-#define X_STOP_PIN         35
79
+#define X_STOP_PIN         47   // E3
50 80
 #if ENABLED(SDSUPPORT)
51
-  #define Y_STOP_PIN       37 // Move Ystop to Estop socket
81
+  #define Y_STOP_PIN       37   // E5 - Move Ystop to Estop socket
52 82
 #else
53
-  #define Y_STOP_PIN        8 // Ystop in Ystop socket
83
+  #define Y_STOP_PIN       20   // B0 SS - Ystop in Ystop socket
54 84
 #endif
55
-#define Z_STOP_PIN         36
85
+#define Z_STOP_PIN         36   // E4
56 86
 
57 87
 //
58 88
 // Steppers
59 89
 //
60
-#define X_STEP_PIN          0
61
-#define X_DIR_PIN           1
62
-#define X_ENABLE_PIN       39
90
+#define X_STEP_PIN         28   // A0
91
+#define X_DIR_PIN          29   // A1
92
+#define X_ENABLE_PIN       19   // E7
63 93
 
64
-#define Y_STEP_PIN          2
65
-#define Y_DIR_PIN           3
66
-#define Y_ENABLE_PIN       38
94
+#define Y_STEP_PIN         30   // A2
95
+#define Y_DIR_PIN          31   // A3
96
+#define Y_ENABLE_PIN       18   // E6
67 97
 
68
-#define Z_STEP_PIN          4
69
-#define Z_DIR_PIN           5
70
-#define Z_ENABLE_PIN       23
98
+#define Z_STEP_PIN         32   // A4
99
+#define Z_DIR_PIN          33   // A5
100
+#define Z_ENABLE_PIN       17   // C7
71 101
 
72
-#define E0_STEP_PIN         6
73
-#define E0_DIR_PIN          7
74
-#define E0_ENABLE_PIN      19
102
+#define E0_STEP_PIN        34   // A6
103
+#define E0_DIR_PIN         35   // A7
104
+#define E0_ENABLE_PIN      13   // C3
75 105
 
76 106
 //
77 107
 // Temperature Sensors
@@ -82,76 +112,67 @@
82 112
 //
83 113
 // Heaters / Fans
84 114
 //
85
-#define HEATER_0_PIN       21 // Extruder
86
-#define HEATER_1_PIN       46
87
-#define HEATER_2_PIN       47
88
-#define HEATER_BED_PIN     20
89
-
90
-// If soft or fast PWM is off then use Teensyduino pin numbering, Marlin
91
-// fastio pin numbering otherwise
92
-#if ENABLED(FAN_SOFT_PWM) || ENABLED(FAST_PWM_FAN)
93
-  #define FAN_PIN          22
94
-#else
95
-  #define FAN_PIN          16
96
-#endif
115
+#define HEATER_0_PIN       15   // C5 PWM3B - Extruder
116
+#define HEATER_1_PIN       44   // F6
117
+#define HEATER_2_PIN       45   // F7
118
+#define HEATER_BED_PIN     14   // C4 PWM3C
119
+
120
+
121
+#define FAN_PIN            16   // C6 PWM3A
97 122
 
98 123
 //
99 124
 // Misc. Functions
100 125
 //
101
-#define SDSS               26
102
-
103
-#ifndef FILWIDTH_PIN
104
-  #define FILWIDTH_PIN      2   // Analog Input
105
-#endif
126
+#define SDSS               20   // B0 SS
127
+#define FILWIDTH_PIN        2   // Analog Input
106 128
 
107 129
 //
108 130
 // LCD / Controller
109 131
 //
110 132
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
111 133
   // we have no buzzer installed
112
-  #define BEEPER_PIN -1
134
+  #define BEEPER_PIN       -1
113 135
 
114 136
   // LCD Pins
115 137
   #if ENABLED(LCD_I2C_PANELOLU2)
116
-    #define BTN_EN1 27 // RX1 - fastio.h pin mapping 27
117
-    #define BTN_EN2 26 // TX1 - fastio.h pin mapping 26
118
-    #define BTN_ENC 43 // A3 - fastio.h pin mapping 43
119
-    #define SDSS    40 // use SD card on Panelolu2 (Teensyduino pin mapping)
138
+    #define BTN_EN1         3   // D3 RX1   JP2-7
139
+    #define BTN_EN2         2   // D2 TX1   JP2-5
140
+    #define BTN_ENC        41   // F3       JP2-4
141
+    #define SDSS           38   // F0       B-THERM connector - use SD card on Panelolu2
120 142
   #else
121
-    #define BTN_EN1 16
122
-    #define BTN_EN2 17
123
-    #define BTN_ENC 18 // the click
124
-  #endif // LCD_I2C_PANELOLU2
143
+    #define BTN_EN1        10   // C0       JP11-12
144
+    #define BTN_EN2        11   // C1       JP11-13
145
+    #define BTN_ENC        12   // C2       JP11-14
146
+  #endif
125 147
 
126
-  // not connected to a pin
127
-  #define SD_DETECT_PIN -1
148
+  // not connected
149
+  #define SD_DETECT_PIN    -1
128 150
 
129
-  #define LCD_PINS_RS 9
130
-  #define LCD_PINS_ENABLE 8
131
-  #define LCD_PINS_D4 7
132
-  #define LCD_PINS_D5 6
133
-  #define LCD_PINS_D6 5
134
-  #define LCD_PINS_D7 4
151
+  #define LCD_PINS_RS       9   // E1       JP11-11
152
+  #define LCD_PINS_ENABLE   8   // E0       JP11-10
153
+  #define LCD_PINS_D4       7   // D7       JP11-8
154
+  #define LCD_PINS_D5       6   // D6       JP11-7
155
+  #define LCD_PINS_D6       5   // D5       JP11-6
156
+  #define LCD_PINS_D7       4   // D4       JP11-5
135 157
 
136 158
 #endif // ULTRA_LCD && NEWPANEL
137 159
 
138 160
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
139
-  // FastIO
140
-  #define BEEPER_PIN 32
161
+  #define BEEPER_PIN        8   // E0       JP11-10
141 162
   // Pins for DOGM SPI LCD Support
142
-  #define DOGLCD_A0  42 // Non-FastIO
143
-  #define DOGLCD_CS  43 // Non-FastIO
163
+  #define DOGLCD_A0        40   // F2       JP2-2
164
+  #define DOGLCD_CS        41   // F3       JP2-4
144 165
   #define LCD_SCREEN_ROT_180
145 166
 
146
-  // The encoder and click button (FastIO Pins)
147
-  #define BTN_EN1 26
148
-  #define BTN_EN2 27
149
-  #define BTN_ENC 47
167
+  // The encoder and click button
168
+  #define BTN_EN1           2   // D2 TX1   JP2-5
169
+  #define BTN_EN2           3   // D3 RX1   JP2-7
170
+  #define BTN_ENC          45   // F7 TDI   JP2-12
150 171
 
151
-  #define SDSS 45
152
-  #define SD_DETECT_PIN -1 // FastIO (Manual says 72 I'm not certain cause I can't test)
172
+  #define SDSS             43   // F5 TMS   JP2-8
173
+  #define SD_DETECT_PIN    -1
153 174
 
154
-  #define STAT_LED_RED_PIN  12 // Non-FastIO
155
-  #define STAT_LED_BLUE_PIN 10 // Non-FastIO
175
+  #define STAT_LED_RED_PIN  12  // C2       JP11-14
176
+  #define STAT_LED_BLUE_PIN 10  // C0       JP11-12
156 177
 
157 178
 #endif

+ 88
- 74
Marlin/pins_PRINTRBOARD_REVF.h View File

@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6 6
  * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -21,18 +21,48 @@
21 21
  */
22 22
 
23 23
 /**
24
- * Printrboard 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  2 JUN 2017
25
+ *
26
+ *  Converted to Arduino pin numbering
28 27
  */
29 28
 
30
-#ifndef __AVR_AT90USB1286__
31
-  #error "Oops!  Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu."
32
-#endif
29
+/**
30
+ *  There are two Arduino IDE extensions that are compatible with this board
31
+ *  and with the mainstream Marlin software.
32
+ *
33
+ *  Teensyduino - http://www.pjrc.com/teensy/teensyduino.html
34
+ *    Select Teensy++ 2.0 in Arduino IDE from the 'Tools -> Boards' menu
35
+ *
36
+ *    Installation instructions are at the above URL.  Don't bother loading the
37
+ *    libraries - they are not used with the Marlin software.
38
+ *
39
+ *  Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support
40
+ *
41
+ *    Installation:
42
+ *
43
+ *       1. Go to the above URL, click on the "Clone or Download" button and then
44
+ *          click on "Download ZIP" button.
45
+ *       2. Unzip the file, find the "printrboard" directory and then copy it to the
46
+ *          hardware directory in Arduino.  The Arduino hardware directory will probably
47
+ *          be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware.
48
+ *       3. Restart Arduino.
49
+ *       4. Select "Printrboard" from the 'Tools -> Boards' menu.
50
+ *
51
+ *  Teensyduino is the most popular option. Printrboard is used if your board doesn't have
52
+ *  the Teensyduino bootloader on it.
53
+ */
33 54
 
34
-#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS)  // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional.
35
-  #error "These Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h"
55
+/**
56
+ *  To burn the bootloader that comes with Printrboard:
57
+ *
58
+ *   1. Connect your programmer to the board.
59
+ *   2. In the Arduino IDE select "Printrboard" and then select the programmer.
60
+ *   3. In the 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
+
64
+#ifndef __AVR_AT90USB1286__
65
+  #error "Oops!  Make sure you have 'Teensy++ 2.0' or 'Printrboard' selected from the 'Tools -> Boards' menu."
36 66
 #endif
37 67
 
38 68
 #define BOARD_NAME         "Printrboard Rev F"
@@ -41,28 +71,28 @@
41 71
 //
42 72
 // Limit Switches
43 73
 //
44
-#define X_STOP_PIN         35
45
-#define Y_STOP_PIN         12
46
-#define Z_STOP_PIN         36
74
+#define X_STOP_PIN         47   // E3
75
+#define Y_STOP_PIN         24   // B4 PWM2A
76
+#define Z_STOP_PIN         36   // E4
47 77
 
48 78
 //
49 79
 // Steppers
50 80
 //
51
-#define X_STEP_PIN          0
52
-#define X_DIR_PIN           1
53
-#define X_ENABLE_PIN       39
81
+#define X_STEP_PIN         28   // A0
82
+#define X_DIR_PIN          29   // A1
83
+#define X_ENABLE_PIN       19   // E7
54 84
 
55
-#define Y_STEP_PIN          2
56
-#define Y_DIR_PIN           3
57
-#define Y_ENABLE_PIN       38
85
+#define Y_STEP_PIN         30   // A2
86
+#define Y_DIR_PIN          31   // A3
87
+#define Y_ENABLE_PIN       18   // E6
58 88
 
59
-#define Z_STEP_PIN          4
60
-#define Z_DIR_PIN           5
61
-#define Z_ENABLE_PIN       23
89
+#define Z_STEP_PIN         32   // A4
90
+#define Z_DIR_PIN          33   // A5
91
+#define Z_ENABLE_PIN       17   // C7
62 92
 
63
-#define E0_STEP_PIN         6
64
-#define E0_DIR_PIN          7
65
-#define E0_ENABLE_PIN      19
93
+#define E0_STEP_PIN        34   // A6
94
+#define E0_DIR_PIN         35   // A7
95
+#define E0_ENABLE_PIN      13   // C3
66 96
 
67 97
 // uncomment to enable an I2C based DAC like on the Printrboard REVF
68 98
 #define DAC_STEPPER_CURRENT
@@ -72,7 +102,7 @@
72 102
 #define DAC_STEPPER_SENSE    0.11
73 103
 #define DAC_STEPPER_ADDRESS  0
74 104
 #define DAC_STEPPER_MAX   3520
75
-#define DAC_STEPPER_VREF     1 // internal Vref, gain 1x = 2.048V
105
+#define DAC_STEPPER_VREF     1   // internal Vref, gain 1x = 2.048V
76 106
 #define DAC_STEPPER_GAIN     0
77 107
 #define DAC_OR_ADDRESS    0x00
78 108
 
@@ -85,68 +115,52 @@
85 115
 //
86 116
 // Heaters / Fans
87 117
 //
88
-#define HEATER_0_PIN       21 // Extruder
89
-#define HEATER_1_PIN       46
90
-#define HEATER_2_PIN       47
91
-#define HEATER_BED_PIN     20
92
-
93
-// If soft or fast PWM is off then use Teensyduino pin numbering, Marlin
94
-// fastio pin numbering otherwise
95
-#if ENABLED(FAN_SOFT_PWM) || ENABLED(FAST_PWM_FAN)
96
-  #define FAN_PIN          22
97
-#else
98
-  #define FAN_PIN          16
99
-#endif
118
+#define HEATER_0_PIN       15   // C5 PWM3B - Extruder
119
+#define HEATER_1_PIN       44   // F6
120
+#define HEATER_2_PIN       45   // F7
121
+#define HEATER_BED_PIN     14   // C4 PWM3C
122
+
123
+#define FAN_PIN            16   // C6 PWM3A
100 124
 
101 125
 //
102 126
 // Misc. Functions
103 127
 //
104
-#define SDSS               20 // Teensylu pin mapping
105
-
106
-#ifndef FILWIDTH_PIN
107
-  #define FILWIDTH_PIN      2   // Analog Input
108
-#endif
128
+#define SDSS               20   // B0 SS
129
+#define FILWIDTH_PIN        2   // Analog Input
109 130
 
110 131
 //
111 132
 // LCD / Controller
112 133
 //
113 134
 #if ENABLED(ULTRA_LCD)
114
-  #define BEEPER_PIN -1
115
-
116
-  #define LCD_PINS_RS 9
117
-  #define LCD_PINS_ENABLE 8
118
-  #define LCD_PINS_D4 7
119
-  #define LCD_PINS_D5 6
120
-  #define LCD_PINS_D6 5
121
-  #define LCD_PINS_D7 4
122
-
123
-  #define BTN_EN1   16
124
-  #define BTN_EN2   17
125
-  #define BTN_ENC   18 // the click
126
-
127
-  #define SD_DETECT_PIN -1
128
-
129
-  // encoder rotation values
130
-  #define encrot0 0
131
-  #define encrot1 2
132
-  #define encrot2 3
133
-  #define encrot3 1
135
+  #define BEEPER_PIN       -1
136
+
137
+  #define LCD_PINS_RS       9   // E1       JP11-11
138
+  #define LCD_PINS_ENABLE   8   // E0       JP11-10
139
+  #define LCD_PINS_D4       7   // D7       JP11-8
140
+  #define LCD_PINS_D5       6   // D6       JP11-7
141
+  #define LCD_PINS_D6       5   // D5       JP11-6
142
+  #define LCD_PINS_D7       4   // D4       JP11-5
143
+
144
+  #define BTN_EN1          10   // C0       JP11-12
145
+  #define BTN_EN2          11   // C1       JP11-13
146
+  #define BTN_ENC          12   // C2       JP11-14
147
+
148
+  #define SD_DETECT_PIN    -1
134 149
 #endif
135 150
 
136 151
 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
137
-  #define BEEPER_PIN 32 // FastIO
138
-  #define DOGLCD_A0  42 // Non-FastIO
139
-  #define DOGLCD_CS  43 // Non-FastIO
152
+  #define BEEPER_PIN        8   // E0       JP11-10
153
+  #define DOGLCD_A0        40   // F2       JP2-2
154
+  #define DOGLCD_CS        41   // F3       JP2-4
140 155
   #define LCD_SCREEN_ROT_180
141 156
 
142
-  // (FastIO Pins)
143
-  #define BTN_EN1 26
144
-  #define BTN_EN2 27
145
-  #define BTN_ENC 47
157
+  #define BTN_EN1           2   // D2 TX1   JP2-5
158
+  #define BTN_EN2           3   // D3 RX1   JP2-7
159
+  #define BTN_ENC          45   // F7 TDI   JP2-12
146 160
 
147
-  #define SDSS 45
148
-  #define SD_DETECT_PIN -1 // FastIO (Manual says 72)
161
+  #define SDSS             43   // F5 TMS   JP2-8
162
+  #define SD_DETECT_PIN    -1
149 163
 
150
-  #define STAT_LED_RED_PIN  12 // Non-FastIO
151
-  #define STAT_LED_BLUE_PIN 10 // Non-FastIO
164
+  #define STAT_LED_RED_PIN  12  // C2       JP11-14
165
+  #define STAT_LED_BLUE_PIN 10  // C0       JP11-12
152 166
 #endif

+ 10
- 10
Marlin/pins_RAMBO.h View File

@@ -151,12 +151,12 @@
151 151
 
152 152
   #if ENABLED(NEWPANEL)
153 153
 
154
-    #define LCD_PINS_RS 70
154
+    #define LCD_PINS_RS     70
155 155
     #define LCD_PINS_ENABLE 71
156
-    #define LCD_PINS_D4 72
157
-    #define LCD_PINS_D5 73
158
-    #define LCD_PINS_D6 74
159
-    #define LCD_PINS_D7 75
156
+    #define LCD_PINS_D4     72
157
+    #define LCD_PINS_D5     73
158
+    #define LCD_PINS_D6     74
159
+    #define LCD_PINS_D7     75
160 160
 
161 161
     #if ENABLED(VIKI2) || ENABLED(miniVIKI)
162 162
       #define BEEPER_PIN 44
@@ -202,12 +202,12 @@
202 202
     //#define SHIFT_OUT 40
203 203
     //#define SHIFT_EN 17
204 204
 
205
-    #define LCD_PINS_RS 75
205
+    #define LCD_PINS_RS     75
206 206
     #define LCD_PINS_ENABLE 17
207
-    #define LCD_PINS_D4 23
208
-    #define LCD_PINS_D5 25
209
-    #define LCD_PINS_D6 27
210
-    #define LCD_PINS_D7 29
207
+    #define LCD_PINS_D4     23
208
+    #define LCD_PINS_D5     25
209
+    #define LCD_PINS_D6     27
210
+    #define LCD_PINS_D7     29
211 211
 
212 212
   #endif // !NEWPANEL
213 213
 

+ 90
- 83
Marlin/pins_RAMPS.h View File

@@ -220,25 +220,25 @@
220 220
 #if ENABLED(ULTRA_LCD)
221 221
 
222 222
   #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
223
-    #define LCD_PINS_RS     49 // CS chip select /SS chip slave select
224
-    #define LCD_PINS_ENABLE 51 // SID (MOSI)
225
-    #define LCD_PINS_D4     52 // SCK (CLK) clock
223
+    #define LCD_PINS_RS         49 // CS chip select /SS chip slave select
224
+    #define LCD_PINS_ENABLE     51 // SID (MOSI)
225
+    #define LCD_PINS_D4         52 // SCK (CLK) clock
226 226
   #elif ENABLED(NEWPANEL) && ENABLED(PANEL_ONE)
227
-    #define LCD_PINS_RS 40
228
-    #define LCD_PINS_ENABLE 42
229
-    #define LCD_PINS_D4 65
230
-    #define LCD_PINS_D5 66
231
-    #define LCD_PINS_D6 44
232
-    #define LCD_PINS_D7 64
227
+    #define LCD_PINS_RS         40
228
+    #define LCD_PINS_ENABLE     42
229
+    #define LCD_PINS_D4         65
230
+    #define LCD_PINS_D5         66
231
+    #define LCD_PINS_D6         44
232
+    #define LCD_PINS_D7         64
233 233
   #else
234
-    #define LCD_PINS_RS 16
235
-    #define LCD_PINS_ENABLE 17
236
-    #define LCD_PINS_D4 23
237
-    #define LCD_PINS_D5 25
238
-    #define LCD_PINS_D6 27
239
-    #define LCD_PINS_D7 29
234
+    #define LCD_PINS_RS         16
235
+    #define LCD_PINS_ENABLE     17
236
+    #define LCD_PINS_D4         23
237
+    #define LCD_PINS_D5         25
238
+    #define LCD_PINS_D6         27
239
+    #define LCD_PINS_D7         29
240 240
     #if DISABLED(NEWPANEL)
241
-      #define BEEPER_PIN 33
241
+      #define BEEPER_PIN        33
242 242
       // Buttons are attached to a shift register
243 243
       // Not wired yet
244 244
       //#define SHIFT_CLK 38
@@ -251,118 +251,125 @@
251 251
   #if ENABLED(NEWPANEL)
252 252
 
253 253
     #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
254
-      #define BEEPER_PIN 37
255 254
 
256
-      #define BTN_EN1 31
257
-      #define BTN_EN2 33
258
-      #define BTN_ENC 35
255
+      #define BEEPER_PIN        37
259 256
 
260
-      #define SD_DETECT_PIN 49
261
-      #define KILL_PIN 41
257
+      #define BTN_EN1           31
258
+      #define BTN_EN2           33
259
+      #define BTN_ENC           35
260
+
261
+      #define SD_DETECT_PIN     49
262
+      #define KILL_PIN          41
262 263
 
263 264
       #if ENABLED(BQ_LCD_SMART_CONTROLLER)
264 265
         #define LCD_BACKLIGHT_PIN 39
265 266
       #endif
266 267
 
267 268
     #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
268
-      #define BTN_EN1 64
269
-      #define BTN_EN2 59
270
-      #define BTN_ENC 63
271
-      #define SD_DETECT_PIN 42
269
+
270
+      #define BTN_EN1           64
271
+      #define BTN_EN2           59
272
+      #define BTN_ENC           63
273
+      #define SD_DETECT_PIN     42
274
+
272 275
     #elif ENABLED(LCD_I2C_PANELOLU2)
273
-      #define BTN_EN1 47  // reverse if the encoder turns the wrong way.
274
-      #define BTN_EN2 43
275
-      #define BTN_ENC 32
276
-      #define LCD_SDSS 53
277
-      #define SD_DETECT_PIN -1
278
-      #define KILL_PIN 41
276
+
277
+      #define BTN_EN1           47
278
+      #define BTN_EN2           43
279
+      #define BTN_ENC           32
280
+      #define LCD_SDSS          53
281
+      #define SD_DETECT_PIN     -1
282
+      #define KILL_PIN          41
283
+
279 284
     #elif ENABLED(LCD_I2C_VIKI)
280
-      #define BTN_EN1 22  // reverse if the encoder turns the wrong way.
281
-      #define BTN_EN2 7   // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf
282
-                          // tells about 40/42.
283
-                          // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
284
-      #define BTN_ENC -1
285
-      #define LCD_SDSS 53
286
-      #define SD_DETECT_PIN 49
285
+
286
+      #define BTN_EN1           22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
287
+      #define BTN_EN2            7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
288
+
289
+      #define BTN_ENC           -1
290
+      #define LCD_SDSS          53
291
+      #define SD_DETECT_PIN     49
292
+
287 293
     #elif ENABLED(VIKI2) || ENABLED(miniVIKI)
288
-      #define BEEPER_PIN       33
294
+
295
+      #define BEEPER_PIN        33
289 296
 
290 297
       // Pins for DOGM SPI LCD Support
291
-      #define DOGLCD_A0        44
292
-      #define DOGLCD_CS        45
298
+      #define DOGLCD_A0         44
299
+      #define DOGLCD_CS         45
293 300
       #define LCD_SCREEN_ROT_180
294 301
 
295
-      #define BTN_EN1          22
296
-      #define BTN_EN2           7
297
-      #define BTN_ENC          39
302
+      #define BTN_EN1           22
303
+      #define BTN_EN2            7
304
+      #define BTN_ENC           39
298 305
 
299
-      #define SDSS             53
300
-      #define SD_DETECT_PIN    -1  // Pin 49 for display sd interface, 72 for easy adapter board
306
+      #define SDSS              53
307
+      #define SD_DETECT_PIN     -1 // Pin 49 for display sd interface, 72 for easy adapter board
301 308
 
302
-      #define KILL_PIN         31
309
+      #define KILL_PIN          31
303 310
 
304
-      #define STAT_LED_RED_PIN 32
311
+      #define STAT_LED_RED_PIN  32
305 312
       #define STAT_LED_BLUE_PIN 35
306 313
 
307 314
     #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
308
-      #define BTN_EN1 35  // reverse if the encoder turns the wrong way.
309
-      #define BTN_EN2 37
310
-      #define BTN_ENC 31
311
-      #define SD_DETECT_PIN 49
312
-      #define LCD_SDSS 53
313
-      #define KILL_PIN 41
314
-      #define BEEPER_PIN 23
315
-      #define DOGLCD_CS 29
316
-      #define DOGLCD_A0 27
315
+      #define BTN_EN1           35
316
+      #define BTN_EN2           37
317
+      #define BTN_ENC           31
318
+      #define SD_DETECT_PIN     49
319
+      #define LCD_SDSS          53
320
+      #define KILL_PIN          41
321
+      #define BEEPER_PIN        23
322
+      #define DOGLCD_CS         29
323
+      #define DOGLCD_A0         27
317 324
       #define LCD_BACKLIGHT_PIN 33
318 325
     #elif ENABLED(MINIPANEL)
319
-      #define BEEPER_PIN 42
326
+      #define BEEPER_PIN        42
320 327
       // Pins for DOGM SPI LCD Support
321
-      #define DOGLCD_A0  44
322
-      #define DOGLCD_CS  66
328
+      #define DOGLCD_A0         44
329
+      #define DOGLCD_CS         66
323 330
       #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
324
-      #define SDSS   53
331
+      #define SDSS              53
325 332
 
326
-      #define KILL_PIN 64
333
+      #define KILL_PIN          64
327 334
       // GLCD features
328
-      //#define LCD_CONTRAST 190
335
+      //#define LCD_CONTRAST   190
329 336
       // Uncomment screen orientation
330 337
       //#define LCD_SCREEN_ROT_90
331 338
       //#define LCD_SCREEN_ROT_180
332 339
       //#define LCD_SCREEN_ROT_270
333 340
       // The encoder and click button
334
-      #define BTN_EN1 40
335
-      #define BTN_EN2 63
336
-      #define BTN_ENC 59
341
+      #define BTN_EN1           40
342
+      #define BTN_EN2           63
343
+      #define BTN_ENC           59
337 344
       // not connected to a pin
338
-      #define SD_DETECT_PIN 49
345
+      #define SD_DETECT_PIN     49
339 346
 
340 347
     #else
341 348
 
342 349
       // Beeper on AUX-4
343
-      #define BEEPER_PIN 33
350
+      #define BEEPER_PIN        33
344 351
 
345 352
       // buttons are directly attached using AUX-2
346 353
       #if ENABLED(REPRAPWORLD_KEYPAD)
347
-        #define BTN_EN1 64 // encoder
348
-        #define BTN_EN2 59 // encoder
349
-        #define BTN_ENC 63 // enter button
350
-        #define SHIFT_OUT 40 // shift register
351
-        #define SHIFT_CLK 44 // shift register
352
-        #define SHIFT_LD 42 // shift register
354
+        #define BTN_EN1         64
355
+        #define BTN_EN2         59
356
+        #define BTN_ENC         63
357
+        #define SHIFT_OUT       40
358
+        #define SHIFT_CLK       44
359
+        #define SHIFT_LD        42
353 360
       #elif ENABLED(PANEL_ONE)
354
-        #define BTN_EN1 59 // AUX2 PIN 3
355
-        #define BTN_EN2 63 // AUX2 PIN 4
356
-        #define BTN_ENC 49 // AUX3 PIN 7
361
+        #define BTN_EN1         59 // AUX2 PIN 3
362
+        #define BTN_EN2         63 // AUX2 PIN 4
363
+        #define BTN_ENC         49 // AUX3 PIN 7
357 364
       #else
358
-        #define BTN_EN1 37
359
-        #define BTN_EN2 35
360
-        #define BTN_ENC 31 // the click
365
+        #define BTN_EN1         37
366
+        #define BTN_EN2         35
367
+        #define BTN_ENC         31
361 368
       #endif
362 369
 
363 370
       #if ENABLED(G3D_PANEL)
364
-        #define SD_DETECT_PIN 49
365
-        #define KILL_PIN 41
371
+        #define SD_DETECT_PIN   49
372
+        #define KILL_PIN        41
366 373
       #else
367 374
         //#define SD_DETECT_PIN -1 // Ramps doesn't use this
368 375
       #endif

+ 92
- 58
Marlin/pins_SAV_MKI.h View File

@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6 6
  * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -21,14 +21,48 @@
21 21
  */
22 22
 
23 23
 /**
24
- * SAV MkI 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
- * RepRap Clone Wars project board.
24
+ *  Rev B  2 JUN 2017
25
+ *
26
+ *  Converted to Arduino pin numbering
27
+ */
28
+
29
+/**
30
+ *  There are two Arduino IDE extensions that are compatible with this board
31
+ *  and with the mainstream Marlin software.
32
+ *
33
+ *  Teensyduino - http://www.pjrc.com/teensy/teensyduino.html
34
+ *    Select Teensy++ 2.0 in Arduino IDE from the 'Tools -> Boards' menu
35
+ *
36
+ *    Installation instructions are at the above URL.  Don't bother loading the
37
+ *    libraries - they are not used with the Marlin software.
38
+ *
39
+ *  Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support
40
+ *
41
+ *    Installation:
42
+ *
43
+ *       1. Go to the above URL, click on the "Clone or Download" button and then
44
+ *          click on "Download ZIP" button.
45
+ *       2. Unzip the file, find the "printrboard" directory and then copy it to the
46
+ *          hardware directory in Arduino.  The Arduino hardware directory will probably
47
+ *          be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware.
48
+ *       3. Restart Arduino.
49
+ *       4. Select "Printrboard" from the 'Tools -> Boards' menu.
50
+ *
51
+ *  Teensyduino is the most popular option. Printrboard is used if your board doesn't have
52
+ *  the Teensyduino bootloader on it.
53
+ */
54
+
55
+/**
56
+ *  To burn the bootloader that comes with Printrboard:
57
+ *
58
+ *   1. Connect your programmer to the board.
59
+ *   2. In the Arduino IDE select "Printrboard" and then select the programmer.
60
+ *   3. In the 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.
28 62
  */
29 63
 
30 64
 #ifndef __AVR_AT90USB1286__
31
-  #error "Oops!  Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu."
65
+  #error "Oops!  Make sure you have 'Teensy++ 2.0' or 'Printrboard' selected from the 'Tools -> Boards' menu."
32 66
 #endif
33 67
 
34 68
 #define DEFAULT_MACHINE_NAME    "SAV MkI"
@@ -41,54 +75,54 @@
41 75
 //
42 76
 // Servos
43 77
 //
44
-#define SERVO0_PIN         41 // In teensy's pin definition for pinMode (in servo.cpp)
78
+#define SERVO0_PIN         39   // F1  In teensy's pin definition for pinMode (in servo.cpp)
45 79
 
46 80
 //
47 81
 // Limit Switches
48 82
 //
49
-#define X_STOP_PIN         13
50
-#define Y_STOP_PIN         14
51
-//#define Z_STOP_PIN         15
52
-#define Z_STOP_PIN         36  // For inductive sensor.
83
+#define X_STOP_PIN         25   // B5
84
+#define Y_STOP_PIN         26   // B6
85
+//#define Z_STOP_PIN         27   // B7
86
+#define Z_STOP_PIN         36   // E4 For inductive sensor.
87
+//#define E_STOP_PIN         36   // E4
53 88
 
54 89
 //
55 90
 // Steppers
56 91
 //
57
-#define X_STEP_PIN         0
58
-#define X_DIR_PIN          1
59
-#define X_ENABLE_PIN       39
92
+#define X_STEP_PIN         28   // A0
93
+#define X_DIR_PIN          29   // A1
94
+#define X_ENABLE_PIN       19   // E7
60 95
 
61
-#define Y_STEP_PIN         2
62
-#define Y_DIR_PIN          3
63
-#define Y_ENABLE_PIN       38
96
+#define Y_STEP_PIN         30   // A2
97
+#define Y_DIR_PIN          31   // A3
98
+#define Y_ENABLE_PIN       18   // E6
64 99
 
65
-#define Z_STEP_PIN         4
66
-#define Z_DIR_PIN          5
67
-#define Z_ENABLE_PIN       23
100
+#define Z_STEP_PIN         32   // A4
101
+#define Z_DIR_PIN          33   // A5
102
+#define Z_ENABLE_PIN       17   // C7
68 103
 
69
-#define E0_STEP_PIN        6
70
-#define E0_DIR_PIN         7
71
-#define E0_ENABLE_PIN      19
104
+#define E0_STEP_PIN        34   // A6
105
+#define E0_DIR_PIN         35   // A7
106
+#define E0_ENABLE_PIN      13   // C3
72 107
 
73 108
 //
74 109
 // Temperature Sensors
75 110
 //
76
-#define TEMP_0_PIN          7  // Analog Input (Extruder)
77
-#define TEMP_BED_PIN        6  // Analog Input (Bed)
111
+#define TEMP_0_PIN          7   // F7  Analog Input (Extruder)
112
+#define TEMP_BED_PIN        6   // F6  Analog Input (Bed)
78 113
 
79 114
 //
80 115
 // Heaters / Fans
81 116
 //
82
-#define HEATER_0_PIN       21  // Extruder
83
-#define HEATER_BED_PIN     20  // Bed
117
+#define HEATER_0_PIN       15   // C5 PWM3B - Extruder
118
+#define HEATER_BED_PIN     14   // C4 PWM3C - Bed
84 119
 
85
-#define FAN_PIN            16  // Fan -- from Teensyduino environment.
86
-                               // For the fan and Teensyduino uses a different pin mapping.
120
+#define FAN_PIN            16   // C6 PWM3A
87 121
 
88 122
 //
89 123
 // Misc. Functions
90 124
 //
91
-#define SDSS               20  // PB0 - 8 in marlin env.
125
+#define SDSS               20   // B0
92 126
 
93 127
 // Extension header pin mapping
94 128
 // ----------------------------
@@ -99,21 +133,21 @@
99 133
 //  PWM-D24         A4 (An), IO
100 134
 //  5V              GND
101 135
 //  12V             GND
102
-#define EXT_AUX_SCL_D0            0  // 0 (teensy), 24 (marlin)
103
-#define EXT_AUX_SDA_D1            1  // 1 (teensy), 25 (marlin)
104
-#define EXT_AUX_RX1_D2            26 // 2 (teensy), 26 (marlin)
105
-#define EXT_AUX_TX1_D3            27 // 3 (teensy), 27 (marlin)
106
-#define EXT_AUX_PWM_D24           12 // 24 (teensy), 12 (marlin)
107
-#define EXT_AUX_A0                 0 // Analog
108
-#define EXT_AUX_A0_IO             40 // Digital IO, 38 (teensy), 40 (marlin)
109
-#define EXT_AUX_A1                 1 // Analog
110
-#define EXT_AUX_A1_IO             41 // Digital IO, 39 (teensy), 41 (marlin)
111
-#define EXT_AUX_A2                 2 // Analog
112
-#define EXT_AUX_A2_IO             42 // Digital IO, 40 (teensy), 42 (marlin)
113
-#define EXT_AUX_A3                 3 // Analog
114
-#define EXT_AUX_A3_IO             43 // Digital IO, 41 (teensy), 43 (marlin)
115
-#define EXT_AUX_A4                 4 // Analog
116
-#define EXT_AUX_A4_IO             44 // Digital IO, 42 (teensy), 44 (marlin)
136
+#define EXT_AUX_SCL_D0      0   // D0  PWM0B
137
+#define EXT_AUX_SDA_D1      1   // D1
138
+#define EXT_AUX_RX1_D2      2   // D2
139
+#define EXT_AUX_TX1_D3      3   // D3
140
+#define EXT_AUX_PWM_D24    24   // B4  PWM2A
141
+#define EXT_AUX_A0          0   // F0  Analog Input
142
+#define EXT_AUX_A0_IO      38   // F0  Digital IO
143
+#define EXT_AUX_A1          1   // F1  Analog Input
144
+#define EXT_AUX_A1_IO      39   // F1  Digital IO
145
+#define EXT_AUX_A2          2   // F2  Analog Input
146
+#define EXT_AUX_A2_IO      40   // F2  Digital IO
147
+#define EXT_AUX_A3          3   // F3  Analog Input
148
+#define EXT_AUX_A3_IO      41   // F3  Digital IO
149
+#define EXT_AUX_A4          4   // F4  Analog Input
150
+#define EXT_AUX_A4_IO      42   // F4  Digital IO
117 151
 
118 152
 //
119 153
 // LCD / Controller
@@ -128,28 +162,28 @@
128 162
 
129 163
 #if ENABLED(SAV_3DLCD)
130 164
   // For LCD SHIFT register LCD
131
-  #define SR_DATA_PIN         EXT_AUX_SDA_D1
132
-  #define SR_CLK_PIN          EXT_AUX_SCL_D0
133
-#endif // SAV_3DLCD
165
+  #define SR_DATA_PIN      EXT_AUX_SDA_D1
166
+  #define SR_CLK_PIN       EXT_AUX_SCL_D0
167
+#endif
134 168
 
135 169
 #if ENABLED(SAV_3DLCD) || ENABLED(SAV_3DGLCD)
136 170
 
137
-  #define BTN_EN1            EXT_AUX_A1_IO
138
-  #define BTN_EN2            EXT_AUX_A0_IO
139
-  #define BTN_ENC            EXT_AUX_PWM_D24
171
+  #define BTN_EN1          EXT_AUX_A1_IO
172
+  #define BTN_EN2          EXT_AUX_A0_IO
173
+  #define BTN_ENC          EXT_AUX_PWM_D24
140 174
 
141
-  #define KILL_PIN           EXT_AUX_A2_IO
142
-  #define HOME_PIN           EXT_AUX_A4_IO
175
+  #define KILL_PIN         EXT_AUX_A2_IO
176
+  #define HOME_PIN         EXT_AUX_A4_IO
143 177
 
144
-#else // Try to use the expansion header for spindle control
178
+#else // Use the expansion header for spindle control
145 179
 
146 180
   //
147 181
   // M3/M4/M5 - Spindle/Laser Control
148 182
   //
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 #
183
+  #define SPINDLE_LASER_PWM_PIN    24  // B4  PWM2A
184
+  #define SPINDLE_LASER_ENABLE_PIN 39  // F1  Pin should have a pullup!
185
+  #define SPINDLE_DIR_PIN          40  // F2
152 186
 
153
-  #define CASE_LIGHT_PIN            0  // 24 AT90USB… pin #
187
+  #define CASE_LIGHT_PIN            0  // D0  PWM0B
154 188
 
155 189
 #endif

+ 13
- 13
Marlin/pins_SCOOVO_X9H.h View File

@@ -126,21 +126,21 @@
126 126
 //
127 127
 // LCD / Controller
128 128
 //
129
-#define LCD_PINS_RS         70 // Ext2_5
130
-#define LCD_PINS_ENABLE     71 // Ext2_7
131
-#define LCD_PINS_D4         72 // Ext2_9 ?
132
-#define LCD_PINS_D5         73 // Ext2_11 ?
133
-#define LCD_PINS_D6         74 // Ext2_13
134
-#define LCD_PINS_D7         75 // Ext2_15 ?
129
+#define LCD_PINS_RS         70   // Ext2_5
130
+#define LCD_PINS_ENABLE     71   // Ext2_7
131
+#define LCD_PINS_D4         72   // Ext2_9 ?
132
+#define LCD_PINS_D5         73   // Ext2_11 ?
133
+#define LCD_PINS_D6         74   // Ext2_13
134
+#define LCD_PINS_D7         75   // Ext2_15 ?
135 135
 #define BEEPER_PIN          -1
136 136
 
137
-#define BTN_HOME            80 // Ext_16
138
-#define BTN_CENTER          81 // Ext_14
137
+#define BTN_HOME            80   // Ext_16
138
+#define BTN_CENTER          81   // Ext_14
139 139
 #define BTN_ENC             BTN_CENTER
140
-#define BTN_RIGHT           82 // Ext_12
141
-#define BTN_LEFT            83 // Ext_10
142
-#define BTN_UP              84 // Ext2_8
143
-#define BTN_DOWN            85 // Ext2_6
140
+#define BTN_RIGHT           82   // Ext_12
141
+#define BTN_LEFT            83   // Ext_10
142
+#define BTN_UP              84   // Ext2_8
143
+#define BTN_DOWN            85   // Ext2_6
144 144
 
145 145
 #define HOME_PIN            BTN_HOME
146 146
 
@@ -151,7 +151,7 @@
151 151
   #define DOGLCD_CS         71
152 152
   #define LCD_SCREEN_ROT_180
153 153
 
154
-  #define SD_DETECT_PIN     -1 // Pin 72 if using easy adapter board
154
+  #define SD_DETECT_PIN     -1   // Pin 72 if using easy adapter board
155 155
 
156 156
   #define STAT_LED_RED_PIN  22
157 157
   #define STAT_LED_BLUE_PIN 32

+ 80
- 44
Marlin/pins_TEENSY2.h View File

@@ -1,6 +1,6 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6 6
  * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -21,12 +21,53 @@
21 21
  */
22 22
 
23 23
 /**
24
+ *  Rev B  2 JUN 2017
25
+ *
26
+ *  Converted to Arduino pin numbering
27
+ */
28
+
29
+/**
30
+ *  There are two Arduino IDE extensions that are compatible with this board
31
+ *  and with the mainstream Marlin software.
32
+ *
33
+ *  Teensyduino - http://www.pjrc.com/teensy/teensyduino.html
34
+ *    Select Teensy++ 2.0 in Arduino IDE from the 'Tools -> Boards' menu
35
+ *
36
+ *    Installation instructions are at the above URL.  Don't bother loading the
37
+ *    libraries - they are not used with the Marlin software.
38
+ *
39
+ *  Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support
40
+ *
41
+ *    Installation:
42
+ *
43
+ *       1. Go to the above URL, click on the "Clone or Download" button and then
44
+ *          click on "Download ZIP" button.
45
+ *       2. Unzip the file, find the "printrboard" directory and then copy it to the
46
+ *          hardware directory in Arduino.  The Arduino hardware directory will probably
47
+ *          be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware.
48
+ *       3. Restart Arduino.
49
+ *       4. Select "Printrboard" from the 'Tools -> Boards' menu.
50
+ *
51
+ *  Teensyduino is the most popular option. Printrboard is used if your board doesn't have
52
+ *  the Teensyduino bootloader on it.
53
+ */
54
+
55
+/**
56
+ *  To burn the bootloader that comes with Printrboard:
57
+ *
58
+ *   1. Connect your programmer to the board.
59
+ *   2. In the Arduino IDE select "Printrboard" and then select the programmer.
60
+ *   3. In the 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
+
64
+/**
24 65
  * Teensy++ 2.0 Breadboard pin assignments (AT90USB1286)
25 66
  * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
26 67
  * http://www.pjrc.com/teensy/teensyduino.html
27 68
  * See http://reprap.org/wiki/Printrboard for more info
28 69
  *
29
- * CLI build: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make
70
+ * CLI build: HARDWARE_MOTHERBOARD=84 make
30 71
  *
31 72
  *  DaveX plan for Teensylu/printrboard-type pinouts for a TeensyBreadboard:
32 73
  *  (ref teensylu & sprinter)
@@ -66,12 +107,7 @@
66 107
  */
67 108
 
68 109
 #ifndef __AVR_AT90USB1286__
69
-  #error "Oops!  Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu."
70
-#endif
71
-
72
-#if DISABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS) // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical.
73
-  #error "Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config"
74
-  // (or build from command line)
110
+  #error "Oops!  Make sure you have 'Teensy++ 2.0' or 'Printrboard' selected from the 'Tools -> Boards' menu."
75 111
 #endif
76 112
 
77 113
 #define BOARD_NAME         "Teensy++2.0"
@@ -82,68 +118,68 @@
82 118
 //
83 119
 // Limit Switches
84 120
 //
85
-#define X_STOP_PIN          2
86
-#define Y_STOP_PIN          3
87
-#define Z_STOP_PIN          4
121
+#define X_STOP_PIN          2   // D2
122
+#define Y_STOP_PIN          3   // D3
123
+#define Z_STOP_PIN          4   // D4
88 124
 
89 125
 //
90 126
 // Steppers
91 127
 //
92
-#define X_STEP_PIN         28 // 0 Marlin
93
-#define X_DIR_PIN          29 // 1 Marlin
94
-#define X_ENABLE_PIN       26
128
+#define X_STEP_PIN         28   // A0 Marlin
129
+#define X_DIR_PIN          29   // A1 Marlin
130
+#define X_ENABLE_PIN       26   // B6
95 131
 
96
-#define Y_STEP_PIN         30 // 2 Marlin
97
-#define Y_DIR_PIN          31 // 3
98
-#define Y_ENABLE_PIN       26 // Shared w/x
132
+#define Y_STEP_PIN         30   // A2 Marlin
133
+#define Y_DIR_PIN          31   // A3
134
+#define Y_ENABLE_PIN       26   // B6 Shared w/x
99 135
 
100
-#define Z_STEP_PIN         32 // 4
101
-#define Z_DIR_PIN          33 // 5
102
-#define Z_ENABLE_PIN       26 // Shared w/x
136
+#define Z_STEP_PIN         32   // A4
137
+#define Z_DIR_PIN          33   // A5
138
+#define Z_ENABLE_PIN       26   // B6 Shared w/x
103 139
 
104
-#define E0_STEP_PIN        34 // 6
105
-#define E0_DIR_PIN         35 // 7
106
-#define E0_ENABLE_PIN      26 // Shared w/x
140
+#define E0_STEP_PIN        34   // A6
141
+#define E0_DIR_PIN         35   // A7
142
+#define E0_ENABLE_PIN      26   // B6 Shared w/x
107 143
 
108 144
 //
109 145
 // Temperature Sensors
110 146
 //
111
-#define TEMP_0_PIN          7   // Analog Input (Extruder)
112
-#define TEMP_BED_PIN        6   // Analog Input (Bed)
147
+#define TEMP_0_PIN          7   // F7 Analog Input (Extruder)
148
+#define TEMP_BED_PIN        6   // F6 Analog Input (Bed)
113 149
 
114 150
 //
115 151
 // Heaters / Fans
116 152
 //
117
-#define HEATER_0_PIN       15 // 21 // Extruder
118
-#define HEATER_BED_PIN     14 // 20 // Bed
119
-#define FAN_PIN            16 // 22 // Fan
153
+#define HEATER_0_PIN       15   // C5 PWM3B  Extruder
154
+#define HEATER_BED_PIN     14   // C4 PWM3C
155
+#define FAN_PIN            16   // C6 PWM3A  Fan
120 156
 
121 157
 //
122 158
 // Misc. Functions
123 159
 //
124
-#define SDSS               20 // 8
125
-#define LED_PIN             6
126
-#define PS_ON_PIN          27
127
-#define CASE_LIGHT_PIN      1 // MUST BE HARDWARE PWM
160
+#define SDSS               20   // B0
161
+#define LED_PIN             6   // D6
162
+#define PS_ON_PIN          27   // B7
163
+#define CASE_LIGHT_PIN      1   // D1 PWM2B  MUST BE HARDWARE PWM
128 164
 
129 165
 //
130 166
 // LCD / Controller
131 167
 //
132 168
 #if ENABLED(ULTIPANEL)
133
-  #define LCD_PINS_RS         8
134
-  #define LCD_PINS_ENABLE     9
135
-  #define LCD_PINS_D4        10
136
-  #define LCD_PINS_D5        11
137
-  #define LCD_PINS_D6        12
138
-  #define LCD_PINS_D7        13
139
-  #define BTN_EN1            38
140
-  #define BTN_EN2            39
141
-  #define BTN_ENC            40
169
+  #define LCD_PINS_RS       8   // E0
170
+  #define LCD_PINS_ENABLE   9   // E1
171
+  #define LCD_PINS_D4      10   // C0
172
+  #define LCD_PINS_D5      11   // C1
173
+  #define LCD_PINS_D6      12   // C2
174
+  #define LCD_PINS_D7      13   // C3
175
+  #define BTN_EN1          38   // F0
176
+  #define BTN_EN2          39   // F1
177
+  #define BTN_ENC          40   // F2
142 178
 #endif
143 179
 
144 180
 //
145 181
 // M3/M4/M5 - Spindle/Laser Control
146 182
 //
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
183
+#define SPINDLE_LASER_ENABLE_PIN  5  // D5  Pin should have a pullup!
184
+#define SPINDLE_LASER_PWM_PIN     0  // D0 PWM0B   MUST BE HARDWARE PWM
185
+#define SPINDLE_DIR_PIN           7  // D7

+ 74
- 87
Marlin/pins_TEENSYLU.h View File

@@ -21,54 +21,46 @@
21 21
  */
22 22
 
23 23
 /**
24
- *  rev B    30 DEC 2016
24
+ *  Rev C  2 JUN 2017
25 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.
26
+ *  Converted to Arduino pin numbering
27
+ */
28
+
29
+/**
30
+ *  There are two Arduino IDE extensions that are compatible with this board
31
+ *  and with the mainstream Marlin software.  All have been used with Arduino 1.6.12
32
+ *
33
+ *  Teensyduino - http://www.pjrc.com/teensy/teensyduino.html
34
+ *    Select Teensy++ 2.0 in Arduino IDE from the 'Tools -> Boards' menu
34 35
  *
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.
36
+ *    Installation instructions are at the above URL.  Don't bother loading the
37
+ *    libraries - they are not used with the Marlin software.
42 38
  *
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
39
+ *  Printrboard - https://github.com/scwimbush/Printrboard-HID-Arduino-IDE-Support
40
+ *    This is basically Teensyduino but with a bootloader that can handle image sizes
41
+ *    larger than 64K.
67 42
  *
43
+ *    Installation:
44
+ *
45
+ *       1. Go to the above URL, click on the "Clone or Download" button and then
46
+ *          click on "Download ZIP" button.
47
+ *       2. Unzip the file, find the "printrboard" directory and then copy it to the
48
+ *          hardware directory in Arduino.  The Arduino hardware directory will probably
49
+ *          be located in a path similar to this: C:\Program Files (x86)\Arduino\hardware.
50
+ *       3. Restart Arduino.
51
+ *       4. Select "Printrboard" from the 'Tools -> Boards' menu.
52
+ *
53
+ *  Teensyduino is the most popular option. Printrboard is used if your board doesn't have
54
+ *  the Teensyduino bootloader on it.
55
+ */
56
+
57
+/**
58
+ *  To burn the bootloader that comes with Printrboard:
68 59
  *
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't be used.
60
+ *   1. Connect your programmer to the board.
61
+ *   2. In the Arduino IDE select "Printrboard" and then select the programmer.
62
+ *   3. In the Arduino IDE click on "burn bootloader". Don't worry about the "verify failed at 1F000" error message.
63
+ *   4. The programmer is no longer needed. Remove it.
72 64
  */
73 65
 
74 66
  /**
@@ -81,13 +73,8 @@
81 73
   *  The pin assignments in this file match the silkscreen.
82 74
   */
83 75
 
84
-
85 76
 #if !defined(__AVR_AT90USB1286__) && !defined(__AVR_AT90USB1286P__)
86
-  #error "Oops!  Make sure you have 'AT90USB1286_STANDARD' selected from the 'Tools -> Boards' menu."
87
-#endif
88
-
89
-#if ENABLED(AT90USBxx_TEENSYPP_ASSIGNMENTS)
90
-  #error "please disable (comment out) the AT90USBxx_TEENSYPP_ASSIGNMENTS flag in FASTIO.h "
77
+  #error "Oops!  Make sure you have 'Teensy++ 2.0' or 'Printrboard' selected from the 'Tools -> Boards' menu."
91 78
 #endif
92 79
 
93 80
 #define BOARD_NAME         "Teensylu"
@@ -97,60 +84,60 @@
97 84
 
98 85
 
99 86
 //
100
-// Limit Switche definitions that match the SCHEMATIC
87
+// Limit Switch definitions that match the SCHEMATIC
101 88
 //
102
-//#define X_STOP_PIN              13
103
-//#define Y_STOP_PIN              14
104
-//#define Z_STOP_PIN              15
105
-//#define E_STOP_PIN              36
89
+//#define X_STOP_PIN              25   // B5
90
+//#define Y_STOP_PIN              26   // B6
91
+//#define Z_STOP_PIN              27   // B7
92
+//#define E_STOP_PIN              36   // E4
106 93
 
107 94
 
108 95
 //
109 96
 // Limit Switch definitions that match the SILKSCREEN
110 97
 //
111
-#define X_STOP_PIN              14
112
-#define Y_STOP_PIN              15
113
-#define Z_STOP_PIN              36
114
-//#define E_STOP_PIN              13
98
+#define X_STOP_PIN              26   // B6
99
+#define Y_STOP_PIN              27   // B7
100
+#define Z_STOP_PIN              36   // E4
101
+//#define E_STOP_PIN              25   // B5
115 102
 
116 103
 //
117 104
 // Steppers
118 105
 //
119
-#define X_STEP_PIN               0
120
-#define X_DIR_PIN                1
121
-#define X_ENABLE_PIN            39
106
+#define X_STEP_PIN              28   // A0
107
+#define X_DIR_PIN               29   // A1
108
+#define X_ENABLE_PIN            19   // E7
122 109
 
123
-#define Y_STEP_PIN               2
124
-#define Y_DIR_PIN                3
125
-#define Y_ENABLE_PIN            38
110
+#define Y_STEP_PIN              30   // A2
111
+#define Y_DIR_PIN               31   // A3
112
+#define Y_ENABLE_PIN            18   // E6
126 113
 
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
114
+#define Z_STEP_PIN              32   // A4
115
+#define Z_DIR_PIN               33   // A5
116
+#define Z_ENABLE_PIN            17   // C7
134 117
 
118
+#define E0_STEP_PIN             34   // A6
119
+#define E0_DIR_PIN              35   // A7
120
+#define E0_ENABLE_PIN           13   // C3
135 121
 
122
+//
136 123
 // Temperature Sensors
137
-
138
-#define TEMP_0_PIN               7  // Analog Input (Extruder)
139
-#define TEMP_BED_PIN             6  // Analog Input (Bed)
124
+//
125
+#define TEMP_0_PIN               7   // Analog Input (Extruder)
126
+#define TEMP_BED_PIN             6   // Analog Input (Bed)
140 127
 
141 128
 //
142 129
 // Heaters / Fans
143 130
 //
144
-#define HEATER_0_PIN            21  // Extruder
145
-#define HEATER_BED_PIN          20
131
+#define HEATER_0_PIN            15   // C5 PWM3B - Extruder
132
+#define HEATER_BED_PIN          14   // C4 PWM3C
146 133
 
147
-#define FAN_PIN                 22
134
+#define FAN_PIN                 16   // C6 PWM3A
148 135
 
149 136
 //
150 137
 // Misc. Functions
151 138
 //
152
-#define SDSS                     8
153
-#define CASE_LIGHT_PIN          24
139
+#define SDSS                    20   // B0 JP31-6
140
+#define CASE_LIGHT_PIN           0   // D0 IO-14  PWM0B
154 141
 
155 142
 //
156 143
 // LCD / Controller
@@ -160,11 +147,11 @@
160 147
   #define BEEPER_PIN            -1
161 148
 
162 149
   #if ENABLED(LCD_I2C_PANELOLU2)
163
-    #define BTN_EN1             27
164
-    #define BTN_EN2             26
165
-    #define BTN_ENC             43
166
-    #define SDSS                40  // use SD card on Panelolu2
167
-  #endif // LCD_I2C_PANELOLU2
150
+    #define BTN_EN1              3   // D3 IO-8
151
+    #define BTN_EN2              2   // D2 IO-10
152
+    #define BTN_ENC             41   // F3 IO-7
153
+    #define SDSS                38   // F0 IO-13 use SD card on Panelolu2
154
+  #endif
168 155
 
169 156
   #define SD_DETECT_PIN         -1
170 157
 
@@ -173,6 +160,6 @@
173 160
 //
174 161
 // M3/M4/M5 - Spindle/Laser Control
175 162
 //
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
163
+#define SPINDLE_LASER_PWM_PIN    24   // B4 IO-3 PWM2A - MUST BE HARDWARE PWM
164
+#define SPINDLE_LASER_ENABLE_PIN 39   // F1 IO-11 - Pin should have a pullup!
165
+#define SPINDLE_DIR_PIN          40   // F2 IO-9

+ 6
- 6
Marlin/pins_ULTIMAKER.h View File

@@ -109,7 +109,7 @@
109 109
 #define SDSS               53
110 110
 #define LED_PIN            13
111 111
 #define PS_ON_PIN          12
112
-#define SUICIDE_PIN        54  // PIN that has to be turned on right after start, to keep power flowing.
112
+#define SUICIDE_PIN        54   // PIN that has to be turned on right after start, to keep power flowing.
113 113
 #define CASE_LIGHT_PIN      8
114 114
 
115 115
 //
@@ -121,12 +121,12 @@
121 121
 
122 122
   #if ENABLED(NEWPANEL)
123 123
 
124
-    #define LCD_PINS_RS 20
124
+    #define LCD_PINS_RS    20
125 125
     #define LCD_PINS_ENABLE 17
126
-    #define LCD_PINS_D4 16
127
-    #define LCD_PINS_D5 21
128
-    #define LCD_PINS_D6 5
129
-    #define LCD_PINS_D7 6
126
+    #define LCD_PINS_D4    16
127
+    #define LCD_PINS_D5    21
128
+    #define LCD_PINS_D6     5
129
+    #define LCD_PINS_D7     6
130 130
 
131 131
     // buttons are directly attached
132 132
     #define BTN_EN1 40

+ 2
- 2
Marlin/stepper_dac.cpp View File

@@ -49,7 +49,7 @@
49 49
 
50 50
   bool dac_present = false;
51 51
   const uint8_t dac_order[NUM_AXIS] = DAC_STEPPER_ORDER;
52
-  uint16_t dac_channel_pct[XYZE] = DAC_MOTOR_CURRENT_DEFAULT;
52
+  uint8_t dac_channel_pct[XYZE] = DAC_MOTOR_CURRENT_DEFAULT;
53 53
 
54 54
   int dac_init() {
55 55
     #if PIN_EXISTS(DAC_DISABLE)
@@ -95,7 +95,7 @@
95 95
   static float dac_amps(int8_t n) { return mcp4728_getDrvPct(dac_order[n]) * (DAC_STEPPER_MAX) * 0.125 * (1.0 / (DAC_STEPPER_SENSE)); }
96 96
 
97 97
   int16_t dac_current_get_percent(AxisEnum axis) { return mcp4728_getDrvPct(dac_order[axis]); }
98
-  void dac_current_set_percents(int16_t pct[XYZE]) {
98
+  void dac_current_set_percents(const int8_t pct[XYZE]) {
99 99
     LOOP_XYZE(i) dac_channel_pct[i] = pct[dac_order[i]];
100 100
     mcp4728_setDrvPct(dac_channel_pct);
101 101
   }

+ 0
- 0
Marlin/ultralcd.cpp View File


+ 1
- 1
platformio.ini View File

@@ -50,7 +50,7 @@ lib_deps = ${common.lib_deps}
50 50
 platform = teensy
51 51
 framework = arduino
52 52
 board = teensy20pp
53
-build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_BRAINWAVE_PRO -D AT90USBxx_TEENSYPP_ASSIGNMENTS
53
+build_flags = -I $BUILDSRC_DIR -D MOTHERBOARD=BOARD_BRAINWAVE_PRO
54 54
 lib_deps = ${common.lib_deps}
55 55
 
56 56
 [env:rambo]

Loading…
Cancel
Save