2017-10-14 14:44:18 +00:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
|
|
|
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
|
|
* Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
|
|
*
|
|
|
|
* Based on Sprinter and grbl.
|
|
|
|
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* MKS SBASE pin assignments
|
|
|
|
*/
|
|
|
|
|
2017-10-26 18:37:26 +00:00
|
|
|
#ifndef TARGET_LPC1768
|
|
|
|
#error "Oops! Make sure you have LPC1768 selected."
|
2017-10-14 14:44:18 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef BOARD_NAME
|
|
|
|
#define BOARD_NAME "MKS SBASE"
|
|
|
|
#define DEFAULT_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SBASE"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// unused
|
|
|
|
/*
|
2017-10-26 18:37:26 +00:00
|
|
|
#define PIN_P0_27 P0_27
|
|
|
|
#define PIN_P0_28 P0_28
|
2017-10-14 14:44:18 +00:00
|
|
|
*/
|
|
|
|
|
2017-11-26 13:47:06 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Servo pin
|
|
|
|
//
|
|
|
|
#define SERVO0_PIN P1_23 // J8-3 (low jitter)
|
|
|
|
#define SERVO1_PIN P2_12 // J8-4
|
|
|
|
#define SERVO2_PIN P2_11 // J8-5
|
|
|
|
#define SERVO3_PIN P4_28 // J8-6
|
|
|
|
|
2017-10-14 14:44:18 +00:00
|
|
|
//
|
|
|
|
// Limit Switches
|
|
|
|
//
|
2017-10-26 18:37:26 +00:00
|
|
|
#define X_MIN_PIN P1_24 //10k pullup to 3.3V, 1K series
|
|
|
|
#define X_MAX_PIN P1_25 //10k pullup to 3.3V, 1K series
|
|
|
|
#define Y_MIN_PIN P1_26 //10k pullup to 3.3V, 1K series
|
|
|
|
#define Y_MAX_PIN P1_27 //10k pullup to 3.3V, 1K series
|
|
|
|
#define Z_MIN_PIN P1_28 //The original Mks Sbase DIO19 has a 10k pullup to 3.3V or 5V, 1K series, so when using a Zprobe we must use DIO41 (J8 P1.22)
|
|
|
|
#define Z_MAX_PIN P1_29 //10k pullup to 3.3V, 1K series
|
2017-10-14 14:44:18 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Steppers
|
|
|
|
//
|
2017-11-18 18:57:32 +00:00
|
|
|
#define X_STEP_PIN P2_00
|
|
|
|
#define X_DIR_PIN P0_05
|
|
|
|
#define X_ENABLE_PIN P0_04
|
2017-10-14 14:44:18 +00:00
|
|
|
|
2017-11-18 18:57:32 +00:00
|
|
|
#define Y_STEP_PIN P2_01
|
2017-10-26 18:37:26 +00:00
|
|
|
#define Y_DIR_PIN P0_11
|
|
|
|
#define Y_ENABLE_PIN P0_10
|
2017-10-14 14:44:18 +00:00
|
|
|
|
2017-11-18 18:57:32 +00:00
|
|
|
#define Z_STEP_PIN P2_02
|
2017-10-26 18:37:26 +00:00
|
|
|
#define Z_DIR_PIN P0_20
|
|
|
|
#define Z_ENABLE_PIN P0_19
|
2017-10-14 14:44:18 +00:00
|
|
|
|
2017-11-18 18:57:32 +00:00
|
|
|
#define E0_STEP_PIN P2_03
|
2017-10-26 18:37:26 +00:00
|
|
|
#define E0_DIR_PIN P0_22
|
|
|
|
#define E0_ENABLE_PIN P0_21
|
2017-10-14 14:44:18 +00:00
|
|
|
|
2017-11-18 18:57:32 +00:00
|
|
|
#define E1_STEP_PIN P2_08
|
2017-10-26 18:37:26 +00:00
|
|
|
#define E1_DIR_PIN P2_13
|
|
|
|
#define E1_ENABLE_PIN P4_29
|
2017-10-14 14:44:18 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Temperature Sensors
|
2017-10-24 22:55:23 +00:00
|
|
|
// 3.3V max when defined as an analog input
|
2017-10-14 14:44:18 +00:00
|
|
|
//
|
|
|
|
|
2017-11-02 18:50:23 +00:00
|
|
|
#define TEMP_BED_PIN 0 // A0 (TH1)
|
|
|
|
#define TEMP_0_PIN 1 // A1 (TH2)
|
2017-10-24 22:55:23 +00:00
|
|
|
#define TEMP_1_PIN 2 // A2 (TH3)
|
|
|
|
#define TEMP_2_PIN 3 // A3 (TH4)
|
2017-10-14 14:44:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Heaters / Fans
|
|
|
|
//
|
|
|
|
|
2017-11-18 18:57:32 +00:00
|
|
|
#define HEATER_BED_PIN P2_05
|
|
|
|
#define HEATER_0_PIN P2_07
|
|
|
|
#define HEATER_1_PIN P2_06
|
|
|
|
#define FAN_PIN P2_04
|
2017-10-14 14:44:18 +00:00
|
|
|
|
|
|
|
|
2017-10-26 18:37:26 +00:00
|
|
|
#define PS_ON_PIN P0_25
|
2017-10-14 14:44:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Connector J7
|
|
|
|
//
|
|
|
|
|
|
|
|
// 5V
|
|
|
|
// NC
|
|
|
|
// GND
|
2017-10-26 18:37:26 +00:00
|
|
|
#define PIN_P0_17 P0_17
|
|
|
|
#define PIN_P0_16 P0_16
|
|
|
|
#define PIN_P0_14 P0_14
|
2017-10-14 14:44:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Connector J8
|
|
|
|
//
|
|
|
|
|
|
|
|
// GND
|
2017-10-26 18:37:26 +00:00
|
|
|
#define PIN_P1_22 P1_22
|
|
|
|
#define PIN_P1_23 P1_23
|
|
|
|
#define PIN_P2_12 P2_12
|
|
|
|
#define PIN_P2_11 P2_11
|
|
|
|
#define PIN_P4_28 P4_28
|
2017-10-14 14:44:18 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Prusa i3 MK2 Multi Material Multiplexer Support
|
|
|
|
//
|
|
|
|
|
2017-10-26 18:37:26 +00:00
|
|
|
#if ENABLED(MK2_MULTIPLEXER)
|
2017-11-02 18:50:23 +00:00
|
|
|
#define E_MUX0_PIN P1_23 // J8-3
|
|
|
|
#define E_MUX1_PIN P2_12 // J8-4
|
|
|
|
#define E_MUX2_PIN P2_11 // J8-5
|
2017-10-26 18:37:26 +00:00
|
|
|
#endif
|
2017-10-14 14:44:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Smart LCD adapter
|
|
|
|
*
|
|
|
|
* The Smart LCD adapter can be used for the two 10 pin LCD controllers such as
|
|
|
|
* REPRAP_DISCOUNT_SMART_CONTROLLER. It can't be used for controllers that use
|
|
|
|
* DOGLCD_A0, DOGLCD_CS, LCD_PINS_D5, LCD_PINS_D6 or LCD_PINS_D7. A custom cable
|
|
|
|
* is needed to pick up 5V for the EXP1 connection.
|
|
|
|
*
|
|
|
|
* SD card on the LCD uses the same SPI signals as the LCD. This results in garbage/lines
|
|
|
|
* on the LCD display during accesses of the SD card. The menus/code has been arranged so
|
|
|
|
* that the garbage/lines are erased immediately after the SD card accesses are completed.
|
|
|
|
*/
|
|
|
|
|
2017-10-24 22:55:23 +00:00
|
|
|
#if ENABLED(ULTRA_LCD)
|
2017-10-26 18:37:26 +00:00
|
|
|
#define BEEPER_PIN P1_31 // EXP1.1
|
|
|
|
#define BTN_ENC P1_30 // EXP1.2
|
|
|
|
#define BTN_EN1 P3_26 // EXP2.5
|
|
|
|
#define BTN_EN2 P3_25 // EXP2.3
|
|
|
|
#define SD_DETECT_PIN P0_27 // EXP2.7
|
|
|
|
#define LCD_PINS_RS P0_16 // EXP1.4
|
|
|
|
#define LCD_SDSS P0_28 // EXP2.4
|
|
|
|
#define LCD_PINS_ENABLE P0_18 // EXP1.3
|
2017-11-02 18:50:23 +00:00
|
|
|
#define LCD_PINS_D4 P0_15 // EXP1.5
|
2017-10-14 14:44:18 +00:00
|
|
|
#endif // ULTRA_LCD
|
|
|
|
|
|
|
|
//
|
|
|
|
// Ethernet pins
|
|
|
|
//
|
|
|
|
#ifndef ULTIPANEL
|
2017-10-26 18:37:26 +00:00
|
|
|
#define ENET_MDIO P1_17 // J12-4
|
|
|
|
#define ENET_RX_ER P1_14 // J12-6
|
|
|
|
#define ENET_RXD1 P1_10 // J12-8
|
2017-10-14 14:44:18 +00:00
|
|
|
#endif
|
2017-10-26 18:37:26 +00:00
|
|
|
#define ENET_MOC P1_16 // J12-3
|
|
|
|
#define REF_CLK P1_15 // J12-5
|
2017-11-18 18:57:32 +00:00
|
|
|
#define ENET_RXD0 P1_09 // J12-7
|
|
|
|
#define ENET_CRS P1_08 // J12-9
|
|
|
|
#define ENET_TX_EN P1_04 // J12-10
|
|
|
|
#define ENET_TXD0 P1_00 // J12-11
|
|
|
|
#define ENET_TXD1 P1_01 // J12-12
|
2017-10-14 14:44:18 +00:00
|
|
|
|
|
|
|
/**
|
2017-10-24 22:55:23 +00:00
|
|
|
* PWMs
|
2017-10-14 14:44:18 +00:00
|
|
|
*
|
2017-10-24 22:55:23 +00:00
|
|
|
* There are 6 PWMs. Each PWM can be assigned to one of two pins.
|
2017-10-14 14:44:18 +00:00
|
|
|
*
|
|
|
|
* SERVO2 does NOT have a PWM assigned to it.
|
|
|
|
*
|
2017-10-26 18:37:26 +00:00
|
|
|
* PWM1.1 P1_18 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM
|
2017-11-18 18:57:32 +00:00
|
|
|
* PWM1.1 P2_00 E0_STEP_PIN
|
2017-10-26 18:37:26 +00:00
|
|
|
* PWM1.2 P1_20 SERVO0_PIN
|
2017-11-18 18:57:32 +00:00
|
|
|
* PWM1.2 P2_01 X_STEP_PIN
|
2017-10-26 18:37:26 +00:00
|
|
|
* PWM1.3 P1_21 SERVO1_PIN J5-1
|
2017-11-18 18:57:32 +00:00
|
|
|
* PWM1.3 P2_02 Y_STEP_PIN
|
2017-10-26 18:37:26 +00:00
|
|
|
* PWM1.4 P1_23 SDSS(SSEL0) J3-5 AUX-3
|
2017-11-18 18:57:32 +00:00
|
|
|
* PWM1.4 P2_03 Z_STEP_PIN
|
2017-10-26 18:37:26 +00:00
|
|
|
* PWM1.5 P1_24 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
|
2017-11-18 18:57:32 +00:00
|
|
|
* PWM1.5 P2_04 RAMPS_D9_PIN
|
2017-10-26 18:37:26 +00:00
|
|
|
* PWM1.6 P1_26 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
|
2017-11-18 18:57:32 +00:00
|
|
|
* PWM1.6 P2_05 RAMPS_D10_PIN
|
2017-10-14 14:44:18 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2017-10-24 22:55:23 +00:00
|
|
|
* Special pins
|
2017-10-26 18:37:26 +00:00
|
|
|
* P1_30 - not 5V tolerant
|
|
|
|
* P1_31 - not 5V tolerant
|
|
|
|
* P0_27 - open collector
|
|
|
|
* P0_28 - open collector
|
2017-10-14 14:44:18 +00:00
|
|
|
*
|
2017-10-24 22:55:23 +00:00
|
|
|
*/
|