[2.0.x] Add new board: MKS Sbase (#7945)

* Add files via upload

* Add files via upload

* Add files via upload

* Checked LCD / edited / revised pins_MKS_BASE.h

As requested :)

* Delete Configuration_adv.h

* Delete Configuration.h

* Deleted /Marlin/Marlin/src/config/examples/MksSbase/*.* and moved them to /Marlin/Marlin/src/config/examples/Mks/Sbase/*.*

* Add files via upload
This commit is contained in:
Morten 2017-10-14 16:44:18 +02:00 committed by Roxy-3D
parent 4586acad8c
commit 91e28edda6
6 changed files with 3404 additions and 15 deletions

View File

@ -58,7 +58,7 @@ const adc_pin_data adc_pin_map[] = {
p == 0 ? 6: \
p == 1 ? 7: -1)
#define NUM_DIGITAL_PINS 80
#define NUM_DIGITAL_PINS 84
#define VALID_PIN(r) (r < 0 ? 0 :\
r == 7 ? 0 :\
@ -220,10 +220,11 @@ const pin_data pin_map[] = { // pin map for variable pin function
{1,4}, // DIO77 J12-10 ENET_TX_EN
{1,0}, // DIO78 J12-11 ENET_TXD0
{1,1}, // DIO79 J12-12 ENET_TXD1
// {0,6}, // DIO80 SD-CS on board SD card
// {0,7}, // DIO81 SD-SCK on board SD card
// {0,8}, // DIO82 SD-MISO on board SD card
// {0,9}, // DIO83 SD-MOSI on board SD card
{0,14}, // DIO80 MKS-SBASE J7-6 & EXP1-5
{0,7}, // DIO81 SD-SCK MKS-SBASE on board SD card and EXP2-2
{0,8}, // DIO82 SD-MISO MKS-SBASE on board SD card and EXP2-1
{0,9}, // DIO83 SD-MOSI MKS-SBASE n board SD card and EXP2-6
// {0,6}, // DIO84 SD-CS on board SD card
};
@ -417,19 +418,31 @@ const pin_data pin_map[] = { // pin map for variable pin function
//#define J12-12 79 // ENET_TXD1
#define DIO79_PORT 1
#define DIO79_PIN 1
/**
//#define SD-CS 80 // on board SD card
//#define J7-6 80 // MKS-SBASE J7-6
#define DIO80_PORT 0
#define DIO80_PIN 6
//#define SD-SCK 81 // on board SD card
#define DIO80_PIN 14
//#define EXP2-2 81 // MKS-SBASE on board SD card and EXP2
#define DIO81_PORT 0
#define DIO81_PIN 7
//#define SD-MISO 82 // on board SD card
#define DIO81_PIN 7
//#define EXP2-1 82 // MKS-SBASE on board SD card and EXP2
#define DIO82_PORT 0
#define DIO82_PIN 8
//#define SD-MOSI 83 // on board SD card
#define DIO82_PIN 8
//#define EXP2-6 83 // MKS-SBASE on board SD card and EXP2
#define DIO83_PORT 0
#define DIO83_PIN 9
#define DIO83_PIN 9
/**
//#define SD-CS 81 // on board SD card
#define DIO81_PORT 0
#define DIO81_PIN 6
//#define SD-SCK 82 // on board SD card
#define DIO82_PORT 0
#define DIO82_PIN 7
//#define SD-MISO 83 // on board SD card
#define DIO83_PORT 0
#define DIO83_PIN 8
//#define SD-MOSI 84 // on board SD card
#define DIO84_PORT 0
#define DIO84_PIN 9
*/
#endif //__PINMAP_RE_ARM_H__

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -128,7 +128,10 @@
#define BOARD_RAMPS_14_RE_ARM_EFF 1745 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
#define BOARD_RAMPS_14_RE_ARM_EEF 1746 // Re-ARM with RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
#define BOARD_RAMPS_14_RE_ARM_SF 1748 // Re-ARM with RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
#define BOARD_STM32F1R 1800 // STM3R Libmaple based stm32f1 controller
#define BOARD_STM32F1R 1800 // STM3R Libmaple based stm32f1 controller
#define BOARD_MKS_SBASE 1850 // MKS-Sbase (Power outputs: Hotend0, Hotend1, Bed, Fan)
#define MB(board) (MOTHERBOARD==BOARD_##board)

View File

@ -300,6 +300,8 @@
#include "pins_ALLIGATOR_R2.h"
#elif MB(STM32F1R)
#include "pins_STM32F1R.h"
#elif MB(MKS_SBASE)
#include "pins_MKS_SBASE.h"
#else
#error "Unknown MOTHERBOARD value set in Configuration.h"
#endif

View File

@ -0,0 +1,256 @@
/**
* 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
*/
//#if !defined(TARGET_LPC1768)
#if DISABLED(IS_REARM)
#error "Oops! Make sure you have Re-Arm selected."
#endif
#ifndef BOARD_NAME
#define BOARD_NAME "MKS SBASE"
#define DEFAULT_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SBASE"
#endif
#define LARGE_FLASH true
// unused
/*
#define D57 57
#define D58 58
*/
//
// Servos
//
//
// Limit Switches
//
#define X_MIN_PIN 3 //10k pullup to 3.3V, 1K series
#define X_MAX_PIN 2 //10k pullup to 3.3V, 1K series
#define Y_MIN_PIN 14 //10k pullup to 3.3V, 1K series
#define Y_MAX_PIN 15 //10k pullup to 3.3V, 1K series
#define Z_MIN_PIN 19 //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 18 //10k pullup to 3.3V, 1K series
//
// Steppers
//
#define X_STEP_PIN 26
#define X_DIR_PIN 28
#define X_ENABLE_PIN 24
#define Y_STEP_PIN 54
#define Y_DIR_PIN 55
#define Y_ENABLE_PIN 38
#define Z_STEP_PIN 60
#define Z_DIR_PIN 61
#define Z_ENABLE_PIN 56
#define E0_STEP_PIN 46
#define E0_DIR_PIN 48
#define E0_ENABLE_PIN 62
#define E1_STEP_PIN 36
#define E1_DIR_PIN 34
#define E1_ENABLE_PIN 30
#define X2_STEP_PIN 36
#define X2_DIR_PIN 34
#define X2_ENABLE_PIN 30
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN 0 //A0 (TH1)
#define TEMP_BED_PIN 1 //A1 (TH2)
#define TEMP_1_PIN 2 //A2 (TH3)
#define TEMP_2_PIN 3 //A3 (TH4)
//
// Heaters / Fans
//
#define HEATER_BED_PIN 10
#define HEATER_0_PIN 8
#define HEATER_1_PIN 59
#define FAN_PIN 9
#define PS_ON_PIN 69
//
// Connector J7
//
// 5V
// NC
// GND
#define PIN_P0_17 50
#define PIN_P0_16 16
#define PIN_P0_14 80
//
// Connector J8
//
// GND
#define PIN_P1_22 41
#define PIN_P1_23 53
#define PIN_P2_12 12
#define PIN_P2_11 35
#define PIN_P4_28 13
//
// Prusa i3 MK2 Multi Material Multiplexer Support
//
#define E_MUX0_PIN 50 // J7-4
#define E_MUX1_PIN 16 // J7-5
#define E_MUX2_PIN 80 // J7-6
/**
* 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.
*/
#if ENABLED(ULTRA_LCD) //
#define BEEPER_PIN 49 // EXP1.1
#define BTN_ENC 37 // EXP1.2
#define BTN_EN1 31 // EXP2.5
#define BTN_EN2 33 // EXP2.3
#define SD_DETECT_PIN 57 // EXP2.7
#define KILL_PIN -1 // Not connected
#define LCD_PINS_RS 16 // EXP1.4
#define LCD_SDSS 58 // EXP2.4
#define LCD_BACKLIGHT_PIN -1 // Not connected
#define LCD_PINS_ENABLE 51 // EXP1.3
#define LCD_PINS_D4 80 // EXP1.5
#define DOGLCD_A0 -1 // Not connected
#define DOGLCD_CS -1 // Not connected
#ifdef ULTIPANEL
#define LCD_PINS_D5 -1 // EXP1.6 Not connected
#define LCD_PINS_D6 -1 // EXP1.7 Not connected
#define LCD_PINS_D7 -1 // EXP1.8 Not connected
#endif
#if ENABLED(SDSUPPORT)
#define SDCARD_SORT_ALPHA // Using SORT feature to keep one directory level in RAM
// When going up/down directory levels the SD card is
// accessed but the garbage/lines are removed when the
// LCD updates
// SD Card Sorting options
#if ENABLED(SDCARD_SORT_ALPHA)
#define SDSORT_LIMIT 255 // Maximum number of sorted items (10-256).
#define FOLDER_SORTING -1 // -1=above 0=none 1=below
#define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
#define SDSORT_USES_RAM true // Pre-allocate a static array for faster pre-sorting.
#define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
#define SDSORT_CACHE_NAMES true // Keep sorted items in RAM longer for speedy performance. Most expensive option.
#define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
#endif
#endif
#endif // ULTRA_LCD
//
// Ethernet pins
//
#ifndef ULTIPANEL
#define ENET_MDIO 71 // J12-4
#define ENET_RX_ER 73 // J12-6
#define ENET_RXD1 75 // J12-8
#endif
#define ENET_MOC 70 // J12-3
#define REF_CLK 72 // J12-5
#define ENET_RXD0 74 // J12-7
#define ENET_CRS 76 // J12-9
#define ENET_TX_EN 77 // J12-10
#define ENET_TXD0 78 // J12-11
#define ENET_TXD1 79 // J12-12
/**
* PWMS
*
* There are 6 PWMS. Each PWM can be assigned to one of two pins.
*
* SERVO2 does NOT have a PWM assigned to it.
*
* PWM1.1 DIO4 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM
* PWM1.1 DIO26 E0_STEP_PIN
* PWM1.2 DIO11 SERVO0_PIN
* PWM1.2 DIO54 X_STEP_PIN
* PWM1.3 DIO6 SERVO1_PIN J5-1
* PWM1.3 DIO60 Y_STEP_PIN
* PWM1.4 DIO53 SDSS(SSEL0) J3-5 AUX-3
* PWM1.4 DIO46 Z_STEP_PIN
* PWM1.5 DIO3 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
* PWM1.5 DIO9 RAMPS_D9_PIN
* PWM1.6 DIO14 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
* PWM1.6 DIO10 RAMPS_D10_PIN
*/
/**
* special pins
* D37 - not 5V tolerant
* D49 - not 5V tolerant
* D57 - open collector
* D58 - open collector
*
*/