/ Repetier / pins.h
pins.h
   1  #ifndef PINS_H
   2  #define PINS_H
   3  
   4  /*
   5  The board assignment defines the capabilities of the motherboard and the used pins.
   6  Each board definition follows the following scheme:
   7  
   8  CPU_ARCH
   9    ARCH_AVR for AVR based boards
  10    ARCH_ARM for all arm based boards
  11  
  12  STEPPER_CURRENT_CONTROL
  13    CURRENT_CONTROL_MANUAL  1  // mechanical poti, default if not defined
  14    CURRENT_CONTROL_DIGIPOT 2  // Use a digipot like RAMBO does
  15    CURRENT_CONTROL_LTC2600 3  // Use LTC2600 like Foltyn 3D Master
  16  
  17  */
  18  
  19  #define ARCH_AVR 1
  20  #define ARCH_ARM 2
  21  
  22  #define CURRENT_CONTROL_MANUAL  1  // mechanical poti, default if not defined
  23  #define CURRENT_CONTROL_DIGIPOT 2  // Use a digipot like RAMBO does
  24  #define CURRENT_CONTROL_LTC2600 3  // Use LTC2600 like Foltyn 3D Master
  25  
  26  /****************************************************************************************
  27  * Arduino pin assignment
  28  *
  29  *                  ATMega168
  30  *                   +-\/-+
  31  *             PC6  1|    |28  PC5 (AI 5 / D19)
  32  *       (D 0) PD0  2|    |27  PC4 (AI 4 / D18)
  33  *       (D 1) PD1  3|    |26  PC3 (AI 3 / D17)
  34  *       (D 2) PD2  4|    |25  PC2 (AI 2 / D16)
  35  *  PWM+ (D 3) PD3  5|    |24  PC1 (AI 1 / D15)
  36  *       (D 4) PD4  6|    |23  PC0 (AI 0 / D14)
  37  *             VCC  7|    |22  GND
  38  *             GND  8|    |21  AREF
  39  *             PB6  9|    |20  AVCC
  40  *             PB7 10|    |19  PB5 (D 13)
  41  *  PWM+ (D 5) PD5 11|    |18  PB4 (D 12)
  42  *  PWM+ (D 6) PD6 12|    |17  PB3 (D 11) PWM
  43  *       (D 7) PD7 13|    |16  PB2 (D 10) PWM
  44  *       (D 8) PB0 14|    |15  PB1 (D 9)  PWM
  45  *                   +----+
  46  ****************************************************************************************/
  47  #if MOTHERBOARD == 0
  48  #define KNOWN_BOARD 1
  49  
  50  #ifndef __AVR_ATmega168__
  51  #error Oops!  Make sure you have 'Arduino Diecimila' selected from the boards menu.
  52  #endif
  53  
  54  #define X_STEP_PIN          2
  55  #define X_DIR_PIN           3
  56  #define X_ENABLE_PIN       -1
  57  #define X_MIN_PIN           4
  58  #define X_MAX_PIN           9
  59  
  60  #define Y_STEP_PIN         10
  61  #define Y_DIR_PIN           7
  62  #define Y_ENABLE_PIN       -1
  63  #define Y_MIN_PIN           8
  64  #define Y_MAX_PIN          13
  65  
  66  #define Z_STEP_PIN         19
  67  #define Z_DIR_PIN          18
  68  #define Z_ENABLE_PIN        5
  69  #define Z_MIN_PIN          17
  70  #define Z_MAX_PIN          16
  71  
  72  #define E0_STEP_PIN         11
  73  #define E0_DIR_PIN          12
  74  #define E0_ENABLE_PIN       -1
  75  
  76  #define SDPOWER          -1
  77  #define SDSS          -1
  78  #define LED_PIN            -1
  79  #define FAN_PIN            -1
  80  #define PS_ON_PIN          15
  81  #define KILL_PIN           -1
  82  
  83  #define HEATER_0_PIN        6
  84  #define TEMP_0_PIN          0    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  85  
  86  
  87  #endif
  88  
  89  
  90  
  91  /****************************************************************************************
  92  * Sanguino/RepRap Motherboard with direct-drive extruders
  93  *
  94  *                        ATMega644P
  95  *
  96  *                        +---\/---+
  97  *            (D 0) PB0  1|        |40  PA0 (AI 0 / D31)
  98  *            (D 1) PB1  2|        |39  PA1 (AI 1 / D30)
  99  *       INT2 (D 2) PB2  3|        |38  PA2 (AI 2 / D29)
 100  *        PWM (D 3) PB3  4|        |37  PA3 (AI 3 / D28)
 101  *        PWM (D 4) PB4  5|        |36  PA4 (AI 4 / D27)
 102  *       MOSI (D 5) PB5  6|        |35  PA5 (AI 5 / D26)
 103  *       MISO (D 6) PB6  7|        |34  PA6 (AI 6 / D25)
 104  *        SCK (D 7) PB7  8|        |33  PA7 (AI 7 / D24)
 105  *                  RST  9|        |32  AREF
 106  *                  VCC 10|        |31  GND 
 107  *                  GND 11|        |30  AVCC
 108  *                XTAL2 12|        |29  PC7 (D 23)
 109  *                XTAL1 13|        |28  PC6 (D 22)
 110  *       RX0 (D 8)  PD0 14|        |27  PC5 (D 21) TDI
 111  *       TX0 (D 9)  PD1 15|        |26  PC4 (D 20) TDO
 112  *  INT0 RX1 (D 10) PD2 16|        |25  PC3 (D 19) TMS
 113  *  INT1 TX1 (D 11) PD3 17|        |24  PC2 (D 18) TCK
 114  *       PWM (D 12) PD4 18|        |23  PC1 (D 17) SDA
 115  *       PWM (D 13) PD5 19|        |22  PC0 (D 16) SCL
 116  *       PWM (D 14) PD6 20|        |21  PD7 (D 15) PWM
 117  *                        +--------+
 118  *
 119  ****************************************************************************************/
 120  #if MOTHERBOARD == 1
 121  #define KNOWN_BOARD 1
 122  
 123  #ifndef __AVR_ATmega644P__
 124  #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
 125  #endif
 126  
 127  #define X_STEP_PIN         15
 128  #define X_DIR_PIN          18
 129  #define X_ENABLE_PIN       19
 130  #define X_MIN_PIN          20
 131  #define X_MAX_PIN          21
 132  
 133  #define Y_STEP_PIN         23
 134  #define Y_DIR_PIN          22
 135  #define Y_ENABLE_PIN       19
 136  #define Y_MIN_PIN          25
 137  #define Y_MAX_PIN          26
 138  
 139  #define Z_STEP_PIN         29
 140  #define Z_DIR_PIN          30
 141  #define Z_ENABLE_PIN       31
 142  #define Z_MIN_PIN           2
 143  #define Z_MAX_PIN           1
 144  
 145  #define E0_STEP_PIN         12
 146  #define E0_DIR_PIN          16
 147  #define E0_ENABLE_PIN        3
 148  
 149  #define SDPOWER          -1
 150  #define SDSS          -1
 151  #define LED_PIN             0
 152  #define FAN_PIN            -1
 153  #define PS_ON_PIN          -1
 154  #define KILL_PIN           -1
 155  
 156  #define HEATER_0_PIN       14
 157  #define TEMP_0_PIN          4 //D27   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
 158  
 159  /*  Unused (1) (2) (3) 4 5 6 7 8 9 10 11 12 13 (14) (15) (16) 17 (18) (19) (20) (21) (22) (23) 24 (25) (26) (27) 28 (29) (30) (31)  */
 160  
 161  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 162  #define E1_PINS
 163  
 164  
 165  #endif
 166  
 167  
 168  /****************************************************************************************
 169  * RepRap Motherboard  ****---NOOOOOO RS485/EXTRUDER CONTROLLER!!!!!!!!!!!!!!!!!---*******
 170  *
 171  ****************************************************************************************/
 172  #if MOTHERBOARD == 2
 173  #define KNOWN_BOARD 1
 174  
 175  #ifndef __AVR_ATmega644P__
 176  #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
 177  #endif
 178  
 179  #define X_STEP_PIN      15
 180  #define X_DIR_PIN       18
 181  #define X_ENABLE_PIN    19
 182  #define X_MIN_PIN       20
 183  #define X_MAX_PIN       21
 184  
 185  #define Y_STEP_PIN      23
 186  #define Y_DIR_PIN       22
 187  #define Y_ENABLE_PIN    24
 188  #define Y_MIN_PIN       25
 189  #define Y_MAX_PIN       26
 190  
 191  #define Z_STEP_PINN     27
 192  #define Z_DIR_PINN      28
 193  #define Z_ENABLE_PIN    29
 194  #define Z_MIN_PIN       30
 195  #define Z_MAX_PIN       31
 196  
 197  #define E0_STEP_PIN      17
 198  #define E0_DIR_PIN       16
 199  #define E0_ENABLE_PIN    -1
 200  
 201  #define SDPOWER          -1
 202  #define SDSS          4
 203  #define LED_PIN          0
 204  
 205  #define SD_CARD_WRITE    2
 206  #define SD_CARD_DETECT   3
 207  #define SD_CARD_SELECT   4
 208  
 209  //our RS485 pins
 210  #define TX_ENABLE_PIN	12
 211  #define RX_ENABLE_PIN	13
 212  
 213  //pin for controlling the PSU.
 214  #define PS_ON_PIN       14
 215  
 216  #define FAN_PIN         -1
 217  #define KILL_PIN        -1
 218  
 219  #define HEATER_0_PIN    -1
 220  #define TEMP_0_PIN      -1    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
 221  
 222  
 223  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 224  #define E1_PINS
 225  
 226  
 227  #endif
 228  
 229  /****************************************************************************************
 230  * Arduino Mega pin assignment
 231  *
 232  ****************************************************************************************/
 233  #if MOTHERBOARD == 33
 234    #define MOTHERBOARD 3
 235    #define RAMPS_V_1_3
 236  #endif
 237  #if MOTHERBOARD == 3
 238    #define KNOWN_BOARD 1
 239  
 240  //////////////////FIX THIS//////////////
 241    #ifndef __AVR_ATmega1280__
 242      #ifndef __AVR_ATmega2560__
 243       #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
 244      #endif
 245    #endif
 246  
 247  // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
 248  // #define RAMPS_V_1_3
 249  // #define RAMPS_V_1_0
 250  
 251  #ifdef RAMPS_V_1_3
 252  
 253  #define X_STEP_PIN         54
 254  #define X_DIR_PIN          55
 255  #define X_ENABLE_PIN       38
 256  #define X_MIN_PIN          3
 257  #define X_MAX_PIN          2
 258  
 259  #define Y_STEP_PIN         60
 260  #define Y_DIR_PIN          61
 261  #define Y_ENABLE_PIN       56
 262  #define Y_MIN_PIN          14
 263  #define Y_MAX_PIN          15
 264  
 265  #define Z_STEP_PIN         46
 266  #define Z_DIR_PIN          48
 267  #define Z_ENABLE_PIN       62
 268  #define Z_MIN_PIN          18
 269  #define Z_MAX_PIN          19
 270  
 271  #define E0_STEP_PIN         26
 272  #define E0_DIR_PIN          28
 273  #define E0_ENABLE_PIN       24
 274  
 275  #define E1_STEP_PIN         36
 276  #define E1_DIR_PIN          34
 277  #define E1_ENABLE_PIN       30
 278  
 279  #define SDPOWER            -1
 280  #define SDSS               53
 281  #define SDCARDDETECT 	    49
 282  
 283  #define LED_PIN            13
 284  #define FAN_PIN            9
 285  #define PS_ON_PIN          12
 286  #define KILL_PIN           -1
 287  
 288  #define HEATER_0_PIN       10
 289  #define HEATER_1_PIN       8
 290  #define TEMP_0_PIN         13   // ANALOG NUMBERING
 291  #define TEMP_1_PIN         14   // ANALOG NUMBERING
 292  #define TEMP_2_PIN         15
 293  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 294  #define E1_PINS E1_STEP_PIN,E1_DIR_PIN,E1_ENABLE_PIN,
 295  
 296  
 297  #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default
 298  
 299  #define X_STEP_PIN         26
 300  #define X_DIR_PIN          28
 301  #define X_ENABLE_PIN       24
 302  #define X_MIN_PIN           3
 303  #define X_MAX_PIN          -1    //2
 304  
 305  #define Y_STEP_PIN         38
 306  #define Y_DIR_PIN          40
 307  #define Y_ENABLE_PIN       36
 308  #define Y_MIN_PIN          16
 309  #define Y_MAX_PIN          -1    //17
 310  
 311  #define Z_STEP_PIN         44
 312  #define Z_DIR_PIN          46
 313  #define Z_ENABLE_PIN       42
 314  #define Z_MIN_PIN          18
 315  #define Z_MAX_PIN          -1    //19
 316  
 317  #define E0_STEP_PIN         32
 318  #define E0_DIR_PIN          34
 319  #define E0_ENABLE_PIN       30
 320  
 321  #define SDPOWER            48
 322  #define SDSS               53
 323  #define LED_PIN            13
 324  #define PS_ON_PIN          -1
 325  #define KILL_PIN           -1
 326  //#define SCL                21
 327  //#define SDA                20
 328  
 329  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 330  #define E1_PINS
 331  
 332  
 333  #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
 334    #define HEATER_0_PIN     12    // RAMPS 1.0
 335    #define HEATER_1_PIN     -1    // RAMPS 1.0
 336    #define FAN_PIN          11    // RAMPS 1.0
 337  
 338  #else // RAMPS_V_1_1 or RAMPS_V_1_2
 339    #define HEATER_0_PIN     10    // RAMPS 1.1
 340    #define HEATER_1_PIN      8    // RAMPS 1.1
 341    #define FAN_PIN           9    // RAMPS 1.1
 342  #endif
 343  
 344  #define TEMP_0_PIN          2    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
 345  #define TEMP_1_PIN          1    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
 346  #endif
 347  
 348  // SPI for Max6675 Thermocouple 
 349  
 350  // these pins are defined in the SD library if building with SD support  
 351  #define SCK_PIN          52
 352  #define MISO_PIN         50
 353  #define MOSI_PIN         51
 354  #define MAX6675_SS       53
 355  
 356  
 357  #endif
 358  
 359  /****************************************************************************************
 360  * RUMBA pin assignment
 361  *
 362  ****************************************************************************************/
 363  #if MOTHERBOARD == 80
 364  #define KNOWN_BOARD 1
 365  
 366  #ifndef __AVR_ATmega2560__
 367   #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
 368  #endif
 369  
 370  #define X_STEP_PIN         17
 371  #define X_DIR_PIN          16
 372  #define X_ENABLE_PIN       48
 373  #define X_MIN_PIN          37
 374  #define X_MAX_PIN          36   //Max endstops default to disabled "-1"
 375  
 376  #define Y_STEP_PIN         54
 377  #define Y_DIR_PIN          47 
 378  #define Y_ENABLE_PIN       55
 379  #define Y_MIN_PIN          35
 380  #define Y_MAX_PIN          34 
 381  
 382  #define Z_STEP_PIN         57 
 383  #define Z_DIR_PIN          56
 384  #define Z_ENABLE_PIN       62 
 385  #define Z_MIN_PIN          33
 386  #define Z_MAX_PIN          32
 387  
 388  #define E0_STEP_PIN         23
 389  #define E0_DIR_PIN          22
 390  #define E0_ENABLE_PIN       24
 391  
 392  #define E1_STEP_PIN        26
 393  #define E1_DIR_PIN         25
 394  #define E1_ENABLE_PIN      27
 395  
 396  #define E2_STEP_PIN        29
 397  #define E2_DIR_PIN         28
 398  #define E2_ENABLE_PIN      39
 399  
 400  #define LED_PIN            13
 401  
 402  #define FAN_PIN            7 
 403  //additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
 404  
 405  #define PS_ON_PIN          45
 406  #define KILL_PIN           46
 407  
 408  #define HEATER_0_PIN       2    // EXTRUDER 1
 409  #define HEATER_1_PIN       3    // EXTRUDER 2
 410  #define HEATER_2_PIN       6    // EXTRUDER 3
 411  //optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN       8    // EXTRUDER 4
 412  #define HEATER_BED_PIN     9    // BED
 413  
 414  #define TEMP_0_PIN         15   // ANALOG NUMBERING
 415  #define TEMP_1_PIN         14   // ANALOG NUMBERING
 416  #define TEMP_2_PIN         13   // ANALOG NUMBERING
 417  //optional for extruder 4 or chamber: #define TEMP_2_PIN         12   // ANALOG NUMBERING
 418  #define TEMP_BED_PIN       11   // ANALOG NUMBERING
 419  
 420  #define SDPOWER            -1
 421  #define SDSS               53
 422  #define SCK_PIN          52
 423  #define MISO_PIN         50
 424  #define MOSI_PIN         51
 425  
 426  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 427  #define E1_PINS E1_STEP_PIN,E1_DIR_PIN,E1_ENABLE_PIN,
 428  #define E2_PINS E2_STEP_PIN,E2_DIR_PIN,E2_ENABLE_PIN,
 429  
 430  #endif //MOTHERBOARD==80
 431  
 432  /****************************************************************************************
 433  * Duemilanove w/ ATMega328P pin assignment
 434  *
 435  ****************************************************************************************/
 436  #if MOTHERBOARD == 4
 437  #define KNOWN_BOARD 1
 438  
 439  #ifndef __AVR_ATmega328P__
 440  #error Oops!  Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
 441  #endif
 442  
 443  #define X_STEP_PIN         19
 444  #define X_DIR_PIN          18
 445  #define X_ENABLE_PIN       -1
 446  #define X_MIN_PIN          17
 447  #define X_MAX_PIN          -1
 448  
 449  #define Y_STEP_PIN         10
 450  #define Y_DIR_PIN           7
 451  #define Y_ENABLE_PIN       -1
 452  #define Y_MIN_PIN           8
 453  #define Y_MAX_PIN          -1
 454  
 455  #define Z_STEP_PIN         13
 456  #define Z_DIR_PIN           3
 457  #define Z_ENABLE_PIN        2
 458  #define Z_MIN_PIN           4
 459  #define Z_MAX_PIN          -1
 460  
 461  #define E0_STEP_PIN         11
 462  #define E0_DIR_PIN          12
 463  #define E0_ENABLE_PIN       -1
 464  
 465  #define SDPOWER          -1
 466  #define SDSS          -1
 467  #define LED_PIN            -1
 468  #define FAN_PIN             5
 469  #define PS_ON_PIN          -1
 470  #define KILL_PIN           -1
 471  
 472  #define HEATER_0_PIN        6
 473  #define TEMP_0_PIN          0    // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
 474  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 475  #define E1_PINS
 476  
 477  
 478  #endif
 479  
 480  /****************************************************************************************
 481  * Gen6 pin assignment (5) and Gen6 deluxe assignment (51)
 482  *
 483  ****************************************************************************************/
 484  #if MOTHERBOARD == 5 || MOTHERBOARD == 51
 485      #define KNOWN_BOARD 1
 486  
 487  #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
 488      #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
 489  #endif
 490  
 491  //x axis pins
 492      #define X_STEP_PIN      15
 493      #define X_DIR_PIN       18
 494      #define X_ENABLE_PIN    19
 495      #define X_MIN_PIN       20
 496      #define X_MAX_PIN       -1
 497      
 498      //y axis pins
 499      #define Y_STEP_PIN      23
 500      #define Y_DIR_PIN       22
 501      #define Y_ENABLE_PIN    24
 502      #define Y_MIN_PIN       25
 503      #define Y_MAX_PIN       -1
 504      
 505      //z axis pins
 506      #define Z_STEP_PIN      27
 507      #define Z_DIR_PIN       28
 508      #define Z_ENABLE_PIN    29
 509      #define Z_MIN_PIN       30
 510      #define Z_MAX_PIN       -1
 511      
 512      //extruder pins
 513      #define E0_STEP_PIN      4     //Edited @ EJE Electronics 20100715
 514      #define E0_DIR_PIN       2     //Edited @ EJE Electronics 20100715
 515      #define E0_ENABLE_PIN    3     //Added @ EJE Electronics 20100715
 516      #define TEMP_0_PIN      5     //changed @ rkoeppl 20110410
 517      #define HEATER_0_PIN    14    //changed @ rkoeppl 20110410
 518  #if MOTHERBOARD == 5
 519      #define HEATER_1_PIN  -1    //changed @ rkoeppl 20110410
 520      #define TEMP_1_PIN    -1    //changed @ rkoeppl 20110410
 521  #else
 522      #define HEATER_1_PIN   1    //changed @ rkoeppl 20110410
 523      #define TEMP_1_PIN     0    //changed @ rkoeppl 20110410
 524  #endif
 525      
 526      
 527      #define SDPOWER          -1
 528      #define SDSS          16 // SCL pin of I2C header
 529      #define LED_PIN         -1    //changed @ rkoeppl 20110410
 530      #define TEMP_1_PIN      -1    //changed @ rkoeppl 20110410
 531      #define FAN_PIN         -1    //changed @ rkoeppl 20110410
 532      #define PS_ON_PIN       -1    //changed @ rkoeppl 20110410
 533      //our pin for debugging.
 534      
 535      #define DEBUG_PIN        0
 536      
 537      //our RS485 pins
 538      #define TX_ENABLE_PIN	12
 539      #define RX_ENABLE_PIN	13
 540      #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 541      #define E1_PINS
 542      
 543      #define SCK_PIN          7
 544      #define MISO_PIN         6
 545      #define MOSI_PIN         5
 546  
 547     // #define SCL 16
 548     // #define SDA 17
 549  
 550  #endif
 551  /****************************************************************************************
 552  * Sanguinololu pin assignment
 553  *
 554  ****************************************************************************************/
 555  #if MOTHERBOARD == 62
 556      #define MOTHERBOARD 6
 557      #define SANGUINOLOLU_V_1_2 
 558  #endif
 559  #if MOTHERBOARD == 6
 560      #define KNOWN_BOARD 1
 561      //#ifndef __AVR_ATmega644P__
 562      #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
 563        #error Oops!  Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
 564      #endif
 565  
 566      #define X_STEP_PIN         15
 567      #define X_DIR_PIN          21
 568      #define X_MIN_PIN          18
 569      #define X_MAX_PIN           -2
 570  
 571      #define Y_STEP_PIN         22
 572      #define Y_DIR_PIN          23
 573      #define Y_MIN_PIN          19
 574      #define Y_MAX_PIN          -1
 575  
 576      #define Z_STEP_PIN         3
 577      #define Z_DIR_PIN          2
 578      #define Z_MIN_PIN          20
 579      #define Z_MAX_PIN          -1
 580  
 581      #define E0_STEP_PIN         1
 582      #define E0_DIR_PIN          0
 583  
 584      #define LED_PIN            -1
 585  
 586      #define FAN_PIN            -1 
 587  
 588      #define PS_ON_PIN          -1
 589      #define KILL_PIN           -1
 590  
 591      #define HEATER_0_PIN       13 // (extruder)
 592  
 593      #ifdef SANGUINOLOLU_V_1_2
 594  
 595        #define HEATER_1_PIN       12 // (bed)
 596        #define X_ENABLE_PIN       14
 597        #define Y_ENABLE_PIN       14
 598        #define Z_ENABLE_PIN       26
 599        #define E0_ENABLE_PIN       14
 600  
 601      #else
 602  
 603        #define HEATER_1_PIN       14  // (bed)
 604        #define X_ENABLE_PIN       -1
 605        #define Y_ENABLE_PIN       -1
 606        #define Z_ENABLE_PIN       -1
 607        #define E0_ENABLE_PIN       -1
 608  
 609      #endif
 610  
 611      #define TEMP_0_PIN          7   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
 612      #define TEMP_1_PIN          6   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
 613      #define SDPOWER          -1
 614      #define SDSS          31
 615      
 616      #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 617      #define E1_PINS
 618  
 619  #ifndef KNOWN_BOARD
 620  #error Unknown MOTHERBOARD value in configuration.h
 621  #endif
 622  
 623  #endif
 624  
 625  /****************************************************************************************
 626  * Gen7 1.1 and above pin assignment
 627  *
 628  ****************************************************************************************/
 629  #if MOTHERBOARD == 7
 630  #define KNOWN_BOARD 1
 631  
 632  #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
 633      #error Oops!  Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
 634  #endif
 635  
 636  //x axis pins
 637  #define X_STEP_PIN      19
 638  #define X_DIR_PIN       18
 639  #define X_ENABLE_PIN    24
 640  #define X_MIN_PIN       7
 641  #define X_MAX_PIN       -1
 642      
 643  //y axis pins
 644  #define Y_STEP_PIN      23
 645  #define Y_DIR_PIN       22
 646  #define Y_ENABLE_PIN    24
 647  #define Y_MIN_PIN       5
 648  #define Y_MAX_PIN       -1
 649      
 650  //z axis pins
 651  #define Z_STEP_PIN      26
 652  #define Z_DIR_PIN       25
 653  #define Z_ENABLE_PIN    24
 654  #define Z_MIN_PIN       1
 655  #define Z_MAX_PIN       -1
 656      
 657  //extruder pins
 658  #define E0_STEP_PIN      28     
 659  #define E0_DIR_PIN       27     
 660  #define E0_ENABLE_PIN    24     
 661  #define TEMP_0_PIN      1 
 662  #define TEMP_1_PIN      2    
 663  #define HEATER_0_PIN    4    
 664  #define HEATER_1_PIN    3    
 665      
 666      
 667  #define SDPOWER          -1
 668  #define SDSS          -1 // SCL pin of I2C header
 669  #define LED_PIN         -1    
 670         
 671  #define FAN_PIN         31    
 672  #define PS_ON_PIN       15    
 673  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 674  #define E1_PINS
 675  
 676      //our pin for debugging.
 677      
 678      #define DEBUG_PIN        0
 679      
 680      //our RS485 pins
 681      #define TX_ENABLE_PIN	12
 682      #define RX_ENABLE_PIN	13
 683  
 684  #define SCK_PIN          7
 685  #define MISO_PIN         6
 686  #define MOSI_PIN         5
 687  
 688  #endif
 689  /****************************************************************************************
 690  * Gen7 1.4.1 pin assignment
 691  *
 692  ****************************************************************************************/
 693  #if MOTHERBOARD == 71
 694  #define KNOWN_BOARD 1
 695  
 696  #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
 697      #error Oops!  Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
 698  #endif
 699  
 700  //x axis pins
 701    #define X_STEP_PIN      29
 702    #define X_DIR_PIN       28
 703    #define X_ENABLE_PIN    25
 704    #define X_MIN_PIN       0
 705    #define X_MAX_PIN       -1
 706      
 707    //y axis pins
 708    #define Y_STEP_PIN      27
 709    #define Y_DIR_PIN       26
 710    #define Y_ENABLE_PIN    25
 711    #define Y_MIN_PIN       1
 712    #define Y_MAX_PIN       -1
 713      
 714    //z axis pins
 715    #define Z_STEP_PIN      23
 716    #define Z_DIR_PIN       22
 717    #define Z_ENABLE_PIN    25
 718    #define Z_MIN_PIN       2
 719    #define Z_MAX_PIN       -1
 720      
 721    //extruder pins
 722    #define E0_STEP_PIN      19     
 723    #define E0_DIR_PIN       18     
 724    #define E0_ENABLE_PIN    25     
 725    #define TEMP_0_PIN      0 
 726    #define TEMP_1_PIN      1    
 727    #define HEATER_0_PIN    4    
 728    #define HEATER_1_PIN    3    
 729      
 730      
 731    #define SDPOWER          -1
 732    #define SDSS            -1 
 733    #define LED_PIN         -1    
 734         
 735    #define FAN_PIN         -1    
 736    #define PS_ON_PIN       15    
 737      //our pin for debugging.
 738      
 739    #define DEBUG_PIN        0
 740      
 741      //our RS485 pins
 742    #define TX_ENABLE_PIN	12
 743    #define RX_ENABLE_PIN	13
 744  
 745    #define SDPOWER          -1
 746    #define SDSS          -1
 747  
 748    #define SCK_PIN          7
 749    #define MISO_PIN         6
 750    #define MOSI_PIN         5
 751    #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 752    #define E1_PINS
 753  #endif
 754  
 755  /****************************************************************************************
 756  * Teensylu 0.7 pin assingments (ATMEGA90USB)
 757  * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
 758  ****************************************************************************************/
 759  #if MOTHERBOARD == 8
 760  #define MOTHERBOARD 8
 761  #define KNOWN_BOARD 1
 762  
 763  #define X_STEP_PIN         28
 764  #define X_DIR_PIN          29
 765  #define X_ENABLE_PIN       19
 766  #define X_MIN_PIN          25
 767  #define X_MAX_PIN          -1
 768  
 769  #define Y_STEP_PIN         30
 770  #define Y_DIR_PIN          31
 771  #define Y_ENABLE_PIN       20 //26
 772  #define Y_MIN_PIN          26 // 20
 773  #define Y_MAX_PIN          -1
 774  
 775  #define Z_STEP_PIN         32
 776  #define Z_DIR_PIN          33
 777  #define Z_ENABLE_PIN       17
 778  #define Z_MIN_PIN          27
 779  #define Z_MAX_PIN          -1
 780  
 781  #define E0_STEP_PIN         34
 782  #define E0_DIR_PIN          35
 783  #define E0_ENABLE_PIN       13
 784  
 785  #define TEMP_0_PIN          7 // Extruder - ANALOG PIN NUMBER!
 786  #define TEMP_1_PIN          6 // Bed - ANALOG PIN NUMBER! 
 787  #define HEATER_0_PIN       15 // Extruder
 788  #define HEATER_1_PIN       14 // bed
 789  
 790  #define SDPOWER            -1
 791  #define SDSS                20
 792  #define LED_PIN            -1
 793  
 794  #define FAN_PIN            16 // Fan
 795  #define PS_ON_PIN          -1
 796  
 797  #define KILL_PIN           -1
 798  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 799  #define E1_PINS
 800  
 801  #ifndef SDSUPPORT
 802  // these pins are defined in the SD library if building with SD support
 803    #define SCK_PIN          21
 804    #define MISO_PIN         22
 805    #define MOSI_PIN         23
 806  #endif
 807  
 808  #endif
 809  
 810  
 811  /****************************************************************************************
 812  * Printrboard Rev. B pin assingments (ATMEGA90USB1286)
 813  * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
 814  * See http://reprap.org/wiki/Printrboard for more info
 815  ****************************************************************************************/
 816  #if MOTHERBOARD == 9
 817  #define MOTHERBOARD 9
 818  #define KNOWN_BOARD 1
 819  
 820  #define X_STEP_PIN         28
 821  #define X_DIR_PIN          29
 822  #define X_ENABLE_PIN       19
 823  #define X_MIN_PIN          47
 824  #define X_MAX_PIN          -1
 825  
 826  #define Y_STEP_PIN         30
 827  #define Y_DIR_PIN          31
 828  #define Y_ENABLE_PIN       18
 829  #define Y_MIN_PIN           20 // Don't use this if you want to use SD card. Use 37 and put the endstop in the e-stop slot!!!
 830  #define Y_MAX_PIN          -1
 831  
 832  #define Z_STEP_PIN         32
 833  #define Z_DIR_PIN          33
 834  #define Z_ENABLE_PIN       17
 835  #define Z_MIN_PIN          36
 836  #define Z_MAX_PIN          -1
 837  
 838  #define E0_STEP_PIN         34
 839  #define E0_DIR_PIN          35
 840  #define E0_ENABLE_PIN       13
 841  #define TEMP_0_PIN          1 // Extruder - ANALOG PIN NUMBER!
 842  #define TEMP_1_PIN          0 // Bed - ANALOG PIN NUMBER! 
 843  #define HEATER_0_PIN       15 // Extruder
 844  #define HEATER_1_PIN       14 // bed
 845  
 846  #define SDPOWER            -1
 847  #define SDSS                26 // old value 2
 848  #define LED_PIN            -1
 849  
 850  #define FAN_PIN            16 // Fan
 851  #define PS_ON_PIN          -1
 852  
 853  #define KILL_PIN           -1
 854  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 855  #define E1_PINS
 856  #ifndef SDSUPPORT
 857  // these pins are defined in the SD library if building with SD support
 858    #define SCK_PIN          21
 859    #define MISO_PIN         22
 860    #define MOSI_PIN         23
 861  #endif
 862  
 863  #endif
 864  
 865  /****************************************************************************************
 866  * 3D Master pin assignment
 867  *
 868  ****************************************************************************************/
 869  #if MOTHERBOARD == 12
 870    #define KNOWN_BOARD 1
 871  
 872    #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
 873    #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
 874    #endif
 875  
 876  // Definition for current control
 877  #define STEPPER_CURRENT_CONTROL  CURRENT_CONTROL_LTC2600
 878  #define LTC2600_CHANNELS {0x30,0x31,0x32,0x33,0x34}
 879  #define LTC2600_NUM_CHANNELS 5
 880  #define	LTC2600_CS_PIN		   92	// PIND.4, 47, DA_CS
 881  #define LTC2600_SCK_PIN		   93	// PIND.5, 48, DA_SCK
 882  #define LTC2600_SDI_PIN		   94	// PIND.6, 49, DA_SDI
 883  
 884  // On board beeper, so define values already here
 885  #define BEEPER_PIN 23
 886  #define BEEPER_TYPE 1
 887  #define SDSUPPORT true  // sd card reader on board
 888  #define SDCARDDETECT -1
 889  
 890  // digital pin mappings
 891  #define X_STEP_PIN         54	// PINF.0, 97, STP_DRV1
 892  #define X_DIR_PIN          55	// PINF.1, 96, DIR_DRV1
 893  #define X_ENABLE_PIN       38	// PIND.7, 50, ENA_DRV1
 894  #define X_MIN_PIN           3	// PINE.5,  7, OPTO1
 895  #define X_MAX_PIN          -1   // PINJ.0, 63, OPTO4 (would be "15", -1 = disabled)
 896  
 897  #define Y_STEP_PIN         60	// PINF.6, 91, STP_DRV2
 898  #define Y_DIR_PIN          61	// PINF.7, 90, DIR_DRV2
 899  #define Y_ENABLE_PIN       56	// PINF.2, 95, ENA_DRV2
 900  #define Y_MIN_PIN           2	// PINE.4,  6, OPTO2
 901  #define Y_MAX_PIN          -1   // PIND.3, 46, OPTO5 (would be "18", -1 = disabled
 902  
 903  #define Z_STEP_PIN         46	// PINL.3, 38, STP_DRV3
 904  #define Z_DIR_PIN          48	// PINL.1, 36, DIR_DRV3
 905  #define Z_ENABLE_PIN       62	// PINK.0, 89, ENA_DRV3
 906  #define Z_MIN_PIN          14	// PINJ.1, 64, OPTO3
 907  #define Z_MAX_PIN          -1   // PIND.2, 45, OPTO6 (would be "19", -1 = disabled)
 908  
 909  #define E0_STEP_PIN         26	// PINA.4, 74, STP_DRV4
 910  #define E0_DIR_PIN          28	// PINA.6, 72, DIR_DRV4
 911  #define E0_ENABLE_PIN       24	// PINA.2, 76 ENA_DRV4
 912  
 913  #define E1_STEP_PIN       36	// PINC.1, 54, STP_DRV5
 914  #define E1_DIR_PIN        34	// PINC.3, 56, DIR_DRV5
 915  #define E1_ENABLE_PIN     30	// PINC.7, 60, ENA_DRV5
 916  
 917  #define SDPOWER            -1
 918  #define SDSS               53	// PINB.0, 19, SS
 919  #define LED_PIN            13	// PINB.7, 26, LED13
 920  #define FAN_PIN            25	// OUT1 PINA.3, 75, OUT1
 921  #define FAN_BOARD_PIN      27   // OUT2
 922  #define PS_ON_PIN          -1
 923  #define KILL_PIN           -1
 924  
 925  #define HEATER_0_PIN       10	// PINB.4, 23, HZ1
 926  #define HEATER_1_PIN        9	// PINH.6, 18, HZ2
 927  #define HEATER_2_PIN	    8	// PINH.5, 17, HZ3
 928  
 929  // analog pin mappings
 930  #define TEMP_0_PIN         13   // PINK.5, 84, TH1
 931  #define TEMP_1_PIN         14   // PINK.6, 83, TH2
 932  #define TEMP_2_PIN         15   // PINK.7, 82, TH3
 933  
 934  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
 935  #define E1_PINS E1_STEP_PIN,E1_DIR_PIN,E1_ENABLE_PIN,
 936  
 937  // these pins are defined in the SD library if building with SD support  
 938  #define SCK_PIN          52	// PINB.1, 20, SCK
 939  #define MISO_PIN         50	// PINB.3, 22, MISO
 940  #define MOSI_PIN         51	// PINB.2, 21, MOSI
 941  #define MAX6675_SS       53	// PINB.0, 19, SS
 942  
 943  #endif // MOTHERBOARD == 12
 944  
 945  
 946  /****************************************************************************************
 947  * MegaTronics
 948  *
 949  ****************************************************************************************/
 950  #if MOTHERBOARD == 70
 951  #define KNOWN_BOARD 1
 952  
 953  //////////////////FIX THIS//////////////
 954  
 955   #ifndef __AVR_ATmega2560__
 956   #error Oops!  Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
 957   #endif
 958  
 959  
 960  
 961  
 962  #define X_STEP_PIN         26
 963  #define X_DIR_PIN          28
 964  #define X_ENABLE_PIN       24
 965  #define X_MIN_PIN          41
 966  #define X_MAX_PIN          37   //2 //Max endstops default to disabled "-1", set to commented value to enable.
 967  
 968  #define Y_STEP_PIN         60 // A6
 969  #define Y_DIR_PIN          61 // A7
 970  #define Y_ENABLE_PIN       22
 971  #define Y_MIN_PIN          14
 972  #define Y_MAX_PIN          15   //15
 973  
 974  #define Z_STEP_PIN         54 // A0
 975  #define Z_DIR_PIN          55 // A1
 976  #define Z_ENABLE_PIN       56 // A2
 977  #define Z_MIN_PIN          18
 978  #define Z_MAX_PIN          19
 979  
 980  #define E0_STEP_PIN         31
 981  #define E0_DIR_PIN          32
 982  #define E0_ENABLE_PIN       38
 983  
 984  #define E1_STEP_PIN        34
 985  #define E1_DIR_PIN         36
 986  #define E1_ENABLE_PIN      30
 987  
 988  #define SDPOWER            -1
 989  #define SDSS               53
 990  #define LED_PIN            13
 991  
 992  
 993  #define FAN_PIN            7 // IO pin. Buffer needed
 994  #define PS_ON_PIN          12
 995  #define KILL_PIN           -1
 996  
 997  #define HEATER_0_PIN       9    // EXTRUDER 1
 998  #define HEATER_1_PIN       8    // EXTRUDER 2 (FAN On Sprinter)
 999  #define HEATER_2_PIN       -1  
1000  
1001  #if TEMP_SENSOR_0 == -1 
1002  #define TEMP_0_PIN         8   // ANALOG NUMBERING
1003  #else
1004  #define TEMP_0_PIN         13   // ANALOG NUMBERING
1005  
1006  #endif
1007  
1008  #define TEMP_1_PIN         15   // ANALOG NUMBERING
1009  #define TEMP_2_PIN         -1   // ANALOG NUMBERING
1010  #define HEATER_BED_PIN     10   // BED
1011  #define TEMP_BED_PIN       14   // ANALOG NUMBERING
1012  
1013  #define BEEPER 33			// Beeper on AUX-4
1014  
1015  
1016  #ifdef ULTRA_LCD
1017  
1018    #ifdef NEWPANEL
1019    //arduino pin which triggers an piezzo beeper
1020      
1021      #define LCD_PINS_RS 16 
1022      #define LCD_PINS_ENABLE 17
1023      #define LCD_PINS_D4 23
1024      #define LCD_PINS_D5 25 
1025      #define LCD_PINS_D6 27
1026      #define LCD_PINS_D7 29
1027      
1028      //buttons are directly attached using AUX-2
1029      #define BTN_EN1 37
1030      #define BTN_EN2 35
1031      #define BTN_ENC 43  //the click
1032      
1033      #define BLEN_C 2
1034      #define BLEN_B 1
1035      #define BLEN_A 0
1036      
1037      #define SDCARDDETECT -1		// Ramps does not use this port
1038      
1039        //encoder rotation values
1040      #define encrot0 0
1041      #define encrot1 2
1042      #define encrot2 3
1043      #define encrot3 1
1044  #endif
1045  #endif //ULTRA_LCD
1046  
1047  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,
1048  #define E1_PINS
1049  
1050  #endif
1051  
1052  
1053  #if MOTHERBOARD == 301
1054  #define KNOWN_BOARD
1055  /*****************************************************************
1056  * Rambo Pin Assignments
1057  ******************************************************************/
1058  #ifndef __AVR_ATmega2560__
1059  #error Oops!  Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
1060  #endif
1061  
1062  #define X_STEP_PIN     37
1063  #define X_DIR_PIN      48
1064  #define X_MIN_PIN      12
1065  #define X_MAX_PIN      24
1066  #define X_ENABLE_PIN   29
1067  #define X_MS1_PIN      40
1068  #define X_MS2_PIN      41
1069  
1070  #define Y_STEP_PIN     36
1071  #define Y_DIR_PIN      49
1072  #define Y_MIN_PIN      11
1073  #define Y_MAX_PIN      23
1074  #define Y_ENABLE_PIN   28
1075  #define Y_MS1_PIN      69
1076  #define Y_MS2_PIN      39
1077  
1078  #define Z_STEP_PIN     35
1079  #define Z_DIR_PIN      47
1080  #define Z_MIN_PIN      10
1081  #define Z_MAX_PIN      30
1082  #define Z_ENABLE_PIN   27
1083  #define Z_MS1_PIN      68
1084  #define Z_MS2_PIN      67
1085  
1086  #define HEATER_BED_PIN 3
1087  #define TEMP_BED_PIN   2 
1088  
1089  #define HEATER_0_PIN   9
1090  #define TEMP_0_PIN     0
1091  
1092  #define HEATER_1_PIN   -1 //7
1093  #define TEMP_1_PIN      1  
1094  
1095  
1096  #define HEATER_2_PIN   -1
1097  #define TEMP_2_PIN     -1
1098  
1099  #define E0_STEP_PIN    34
1100  #define E0_DIR_PIN     43
1101  #define E0_ENABLE_PIN  26
1102  #define E0_MS1_PIN     65
1103  #define E0_MS2_PIN     66
1104  
1105  #define E1_STEP_PIN    33
1106  #define E1_DIR_PIN     42
1107  #define E1_ENABLE_PIN  25
1108  #define E1_MS1_PIN     63
1109  #define E1_MS2_PIN     64
1110  
1111  #define DIGIPOTSS_PIN  38
1112  #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
1113  #define STEPPER_CURRENT_CONTROL  CURRENT_CONTROL_DIGIPOT
1114  
1115  
1116  #define SDPOWER        -1
1117  #define SDSS           53
1118  #define LED_PIN        13
1119  #define FAN_PIN        8
1120  #define PS_ON_PIN      4
1121  #define KILL_PIN       80
1122  #define SUICIDE_PIN    -1  //PIN that has to be turned on right after start, to keep power flowing.
1123  
1124  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,E0_MS1_PIN,E0_MS2_PIN,
1125  #define E1_PINS
1126  
1127  #define SCK_PIN          52
1128  #define MISO_PIN         50
1129  #define MOSI_PIN         51
1130  #define MAX6675_SS       53
1131  
1132  #endif
1133  
1134  #if MOTHERBOARD == 401
1135  #ifndef __SAM3X8E__
1136  #error Oops!  Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
1137  #endif
1138  
1139  #define KNOWN_BOARD
1140  #define CPU_ARCH ARCH_ARM
1141  /*****************************************************************
1142  * Arduino Due Pin Assignments
1143  ******************************************************************/
1144  
1145  #define X_STEP_PIN     36
1146  #define X_DIR_PIN      48
1147  #define X_MIN_PIN      12
1148  #define X_MAX_PIN      19
1149  #define X_ENABLE_PIN   29
1150  #define X_MS1_PIN      40
1151  #define X_MS2_PIN      41
1152  
1153  #define Y_STEP_PIN     36
1154  #define Y_DIR_PIN      49
1155  #define Y_MIN_PIN      11
1156  #define Y_MAX_PIN      18
1157  #define Y_ENABLE_PIN   28
1158  #define Y_MS1_PIN      69
1159  #define Y_MS2_PIN      39
1160  
1161  #define Z_STEP_PIN     35
1162  #define Z_DIR_PIN      47
1163  #define Z_MIN_PIN      10
1164  #define Z_MAX_PIN      15
1165  #define Z_ENABLE_PIN   27
1166  #define Z_MS1_PIN      68
1167  #define Z_MS2_PIN      67
1168  
1169  #define HEATER_BED_PIN 3
1170  #define TEMP_BED_PIN   65 
1171  
1172  #define HEATER_0_PIN   9
1173  #define TEMP_0_PIN     63
1174  
1175  #define HEATER_1_PIN   7
1176  #define TEMP_1_PIN     64
1177  
1178  #define HEATER_2_PIN   -1
1179  #define TEMP_2_PIN     -1
1180  
1181  #define E0_STEP_PIN    34
1182  #define E0_DIR_PIN     43
1183  #define E0_ENABLE_PIN  26
1184  #define E0_MS1_PIN     65
1185  #define E0_MS2_PIN     66
1186  
1187  #define E1_STEP_PIN    33
1188  #define E1_DIR_PIN     42
1189  #define E1_ENABLE_PIN  25
1190  #define E1_MS1_PIN     63
1191  #define E1_MS2_PIN     64
1192  
1193  #define SDPOWER        -1
1194  #define SDSS           53
1195  #define LED_PIN        13
1196  #define FAN_PIN        8
1197  #define PS_ON_PIN      4
1198  #define KILL_PIN       -1
1199  #define SUICIDE_PIN    -1  //PIN that has to be turned on right after start, to keep power flowing.
1200  
1201  #define E0_PINS E0_STEP_PIN,E0_DIR_PIN,E0_ENABLE_PIN,E0_MS1_PIN,E0_MS2_PIN,
1202  #define E1_PINS
1203  
1204  #endif
1205  
1206  #ifndef CPU_ARCH  // Set default architecture
1207  #define CPU_ARCH ARCH_AVR
1208  #endif
1209  
1210  #ifndef STEPPER_CURRENT_CONTROL // Set default stepper current control if not set yet.
1211  #define STEPPER_CURRENT_CONTROL  CURRENT_CONTROL_MANUAL
1212  #endif
1213  
1214  #ifndef FAN_BOARD_PIN
1215  #define FAN_BOARD_PIN -1
1216  #endif
1217  
1218  #if NUM_EXTRUDER==1
1219  #define E1_PINS
1220  #endif
1221  
1222  #if NUM_EXTRUDER<3
1223  #define E2_PINS
1224  #endif
1225  
1226  #define SENSITIVE_PINS {0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, LED_PIN, PS_ON_PIN, \
1227                          HEATER_0_PIN, HEATER_1_PIN, FAN_PIN, E0_PINS E1_PINS E2_PINS TEMP_0_PIN, TEMP_1_PIN,SDSS }
1228  #endif
1229