Move pins files to subfolders #14573

This commit is contained in:
Scott Lahteine
2019-07-11 02:32:24 -05:00
committed by GitHub
parent e5a5273edb
commit 7de605c5c3
169 changed files with 443 additions and 400 deletions

View File

@ -0,0 +1,160 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 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/>.
*
*/
#pragma once
/**
* AZSMZ MINI pin assignments
*/
#ifndef TARGET_LPC1768
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#define BOARD_NAME "AZSMZ MINI"
//
// Servos
//
#define SERVO0_PIN P1_23
//
// Limit Switches
//
#define X_MIN_PIN P1_24
#define Y_MIN_PIN P1_26
#define Z_MIN_PIN P1_28
#define Z_MAX_PIN P1_29
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
#define E1_STEP_PIN P2_08
#define E1_DIR_PIN P2_13
#define E1_ENABLE_PIN P4_29
//
// 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)
//
// Heaters / Fans
//
// EFB
#define HEATER_0_PIN P2_04
#define HEATER_BED_PIN P2_05
#ifndef FAN_PIN
#define FAN_PIN P2_07
#endif
#define FAN1_PIN P0_26
#define LCD_SDSS P0_16 // LCD SD chip select
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#if ENABLED(AZSMZ_12864)
#define BEEPER_PIN P1_30
#define DOGLCD_A0 P2_06
#define DOGLCD_CS P1_22
#define BTN_EN1 P4_28
#define BTN_EN2 P1_27
#define BTN_ENC P3_26
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION LCD
#endif
#endif
#if SD_CONNECTION_IS(LCD)
#define SCK_PIN P0_15
#define MISO_PIN P0_17
#define MOSI_PIN P0_18
#define SS_PIN LCD_SDSS
#define SD_DETECT_PIN P3_25
#elif SD_CONNECTION_IS(ONBOARD)
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
//
// Ethernet pins
//
#define ENET_MDIO P1_17
#define ENET_RX_ER P1_14
#define ENET_RXD1 P1_10
#define ENET_MOC P1_16
#define REF_CLK P1_15
#define ENET_RXD0 P1_09
#define ENET_CRS P1_08
#define ENET_TX_EN P1_04
#define ENET_TXD0 P1_00
#define ENET_TXD1 P1_01
/**
* 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
*/

View File

@ -0,0 +1,272 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 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/>.
*
*/
#pragma once
#ifndef TARGET_LPC1768
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#define BOARD_NAME "BIGTREE SKR 1.1"
//
// Limit Switches
//
#define X_MIN_PIN P1_29
#define X_MAX_PIN P1_28
#define Y_MIN_PIN P1_27
#define Y_MAX_PIN P1_26
#define Z_MIN_PIN P1_25
#define Z_MAX_PIN P1_24
//
// Steppers
//
#define X_STEP_PIN P0_04
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P4_28
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P2_02
#define Y_ENABLE_PIN P2_00
#define Z_STEP_PIN P0_20
#define Z_DIR_PIN P0_21
#define Z_ENABLE_PIN P0_19
#define E0_STEP_PIN P0_11
#define E0_DIR_PIN P2_13
#define E0_ENABLE_PIN P2_12
#define E1_STEP_PIN P0_01
#define E1_DIR_PIN P0_00
#define E1_ENABLE_PIN P0_10
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_BED_PIN 0 // Analog Input
#define TEMP_0_PIN 1 // Analog Input
#define TEMP_1_PIN 2 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN P2_07
#if HOTENDS == 1
#define FAN1_PIN P2_04
#else
#define HEATER_1_PIN P2_04
#endif
#define FAN_PIN P2_03
#define HEATER_BED_PIN P2_05
/**
* LCD / Controller
*
* As of 20 JAN 2019 only the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER display has
* been tested with these settings. It can be connected to the SKR using standard cables
* via the EXP1 and EXP2 ports. Other displays may need a custom cable and/or changes to
* the pins defined below.
*
* The SD card on the LCD controller uses the same SPI signals as the LCD, resulting in
* garbage/lines on the LCD display during SD card access. The LCD code mitigates this
* by redrawing the screen after SD card accesses.
*/
#if HAS_SPI_LCD
#define BEEPER_PIN P1_30
#define BTN_EN1 P3_26
#define BTN_EN2 P3_25
#define BTN_ENC P2_11
#define SD_DETECT_PIN P1_31
#define LCD_SDSS P1_23
#define LCD_PINS_RS P0_16
#define LCD_PINS_ENABLE P0_18
#define LCD_PINS_D4 P0_15
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS P2_06
#define DOGLCD_A0 P0_16
#endif
#endif
//
// SD Support
//
// MKS_MINI_12864 strongly prefers the SD card on the display and
// requires jumpers on the SKR V1.1 board as documented here:
// https://www.facebook.com/groups/505736576548648/permalink/630639874058317/
#ifndef SDCARD_CONNECTION
#if ENABLED(MKS_MINI_12864)
#define SDCARD_CONNECTION LCD
#else
#define SDCARD_CONNECTION ONBOARD
#endif
#endif
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#if SD_CONNECTION_IS(LCD)
#define SCK_PIN P0_15
#define MISO_PIN P0_17
#define MOSI_PIN P0_18
#define SS_PIN P1_23
#elif SD_CONNECTION_IS(ONBOARD)
#undef SD_DETECT_PIN
#define SD_DETECT_PIN P0_27
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
// Trinamic driver support
#if HAS_TRINAMIC
// Using TMC devices in intelligent mode requires extra connections to each device. Unfortunately
// the SKR does not have many free pins (especially if a display is in use). The SPI-based devices
// will require 3 connections (clock, mosi, miso), plus a chip select line (CS) for each driver.
// The UART-based devices require 2 pis per deriver (one of which must be interrupt capable).
// The same SPI pins can be shared with the display/SD card reader, meaning SPI-based devices are
// probably a good choice for this board.
//
// SOFTWARE_DRIVER_ENABLE is a good option. It uses SPI to control the driver enable and allows the
// hardware ENABLE pins for each driver to be repurposed as SPI chip select. To use this mode the
// driver modules will probably need to be modified, removing the pin used for the enable line from
// the module and wiring this connection directly to GND (as is the case for TMC2130).
// Using this option and sharing all of the SPI pins allows 5 TMC2130 drivers to be used along with
// a REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER without requiring the use of any extra pins.
//
// Other options will probably require the use of any free pins and the TFT serial port or a
// different type of display (like the TFT), using the pins normally used for the display and encoder.
// Unfortunately, tests show it's not possible to use endstop and thermistor pins for chip-select.
// Sample settings are provided below, but only some have been tested.
//
// Another option is to share the enable and chip-select pins when using SPI. Several users have
// reported that this works. However, it's unlikely that this configuration will allow SPI communi-
// cation with the device when the drivers are active, meaning that some of the more advanced TMC
// options may not be available.
// When using any TMC SPI-based drivers, software SPI is used
// because pins may be shared with the display or SD card.
#define TMC_USE_SW_SPI
#define TMC_SW_MOSI P0_18
#define TMC_SW_MISO P0_17
// To minimize pin usage use the same clock pin as the display/SD card reader. (May generate LCD noise.)
#define TMC_SW_SCK P0_15
// If pin 2_06 is unused, it can be used for the clock to avoid the LCD noise.
//#define TMC_SW_SCK P2_06
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
// Software enable allows the enable pins to be repurposed as chip-select pins.
// Note: Requires the driver modules to be modified to always be enabled with the enable pin removed.
#if AXIS_DRIVER_TYPE_X(TMC2130)
#define X_CS_PIN P4_28
#undef X_ENABLE_PIN
#define X_ENABLE_PIN -1
#endif
#if AXIS_DRIVER_TYPE_Y(TMC2130)
#define Y_CS_PIN P2_00
#undef Y_ENABLE_PIN
#define Y_ENABLE_PIN -1
#endif
#if AXIS_DRIVER_TYPE_Z(TMC2130)
#define Z_CS_PIN P0_19
#undef Z_ENABLE_PIN
#define Z_ENABLE_PIN -1
#endif
#if AXIS_DRIVER_TYPE_E0(TMC2130)
#define E0_CS_PIN P2_12
#undef E0_ENABLE_PIN
#define E0_ENABLE_PIN -1
#endif
#if AXIS_DRIVER_TYPE_E1(TMC2130)
#define E1_CS_PIN P0_10
#undef E1_ENABLE_PIN
#define E1_ENABLE_PIN -1
#endif
#else // !SOFTWARE_DRIVER_ENABLE
// A chip-select pin is needed for each driver.
// EXAMPLES
// Example 1: No LCD attached or a TFT style display using the AUX header RX/TX pins.
// SDCARD_CONNECTION must not be 'LCD'. Nothing should be connected to EXP1/EXP2.
//#define SKR_USE_LCD_PINS_FOR_CS
#if ENABLED(SKR_USE_LCD_PINS_FOR_CS)
#if SD_CONNECTION_IS(LCD)
#error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_PINS_FOR_CS."
#endif
#define X_CS_PIN P1_23
#define Y_CS_PIN P3_26
#define Z_CS_PIN P2_11
#define E0_CS_PIN P3_25
#define E1_CS_PIN P1_31
#endif
// Example 2: A REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
// The SD card reader attached to the LCD (if present) can't be used because
// the pins will be in use. So SDCARD_CONNECTION must not be 'LCD'.
//#define SKR_USE_LCD_SD_CARD_PINS_FOR_CS
#if ENABLED(SKR_USE_LCD_SD_CARD_PINS_FOR_CS)
#if SD_CONNECTION_IS(LCD)
#error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_SD_CARD_PINS_FOR_CS."
#endif
#define X_CS_PIN P0_02
#define Y_CS_PIN P0_03
#define Z_CS_PIN P2_06
// We use SD_DETECT_PIN for E0
#undef SD_DETECT_PIN
#define E0_CS_PIN P1_31
// We use LCD_SDSS pin for E1
#undef LCD_SDSS
#define LCD_SDSS -1
#define E1_CS_PIN P1_23
#endif
// Example 3: Use the driver enable pins for chip-select.
// Commands must not be sent to the drivers when enabled. So certain
// advanced features (like driver monitoring) will not be available.
//#define SKR_USE_ENABLE_CS
#if ENABLED(SKR_USE_ENABLE_FOR_CS)
#define X_CS_PIN X_ENABLE_PIN
#define Y_CS_PIN Y_ENABLE_PIN
#define Z_CS_PIN Z_ENABLE_PIN
#define E0_CS_PIN E0_ENABLE_PIN
#define E1_CS_PIN E1_ENABLE_PIN
#endif
#endif // SOFTWARE_DRIVER_ENABLE
#endif

View File

@ -0,0 +1,291 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 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/>.
*
*/
#pragma once
#ifndef TARGET_LPC1768
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#define BOARD_NAME "BIGTREE SKR 1.3"
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
//
// Servos
//
#define SERVO0_PIN P2_00
//
// Limit Switches
//
#define X_MIN_PIN P1_29
#define X_MAX_PIN P1_28
#define Y_MIN_PIN P1_27
#define Y_MAX_PIN P1_26
#define Z_MIN_PIN P1_25
#define Z_MAX_PIN P1_24
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P1_24
#endif
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN P1_28
#endif
//
// Steppers
//
#define X_STEP_PIN P2_02
#define X_DIR_PIN P2_06
#define X_ENABLE_PIN P2_01
#ifndef X_CS_PIN
#define X_CS_PIN P1_17
#endif
#define Y_STEP_PIN P0_19
#define Y_DIR_PIN P0_20
#define Y_ENABLE_PIN P2_08
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_15
#endif
#define Z_STEP_PIN P0_22
#define Z_DIR_PIN P2_11
#define Z_ENABLE_PIN P0_21
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_10
#endif
#define E0_STEP_PIN P2_13
#define E0_DIR_PIN P0_11
#define E0_ENABLE_PIN P2_12
#ifndef E0_CS_PIN
#define E0_CS_PIN P1_08
#endif
#define E1_STEP_PIN P0_01
#define E1_DIR_PIN P0_00
#define E1_ENABLE_PIN P0_10
#ifndef E1_CS_PIN
#define E1_CS_PIN P1_01
#endif
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI P4_28
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO P0_05
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK P0_04
#endif
#endif
#if HAS_TMC220x
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
//
// Software serial
//
#define X_SERIAL_TX_PIN P4_29
#define X_SERIAL_RX_PIN P1_17
#define Y_SERIAL_TX_PIN P1_16
#define Y_SERIAL_RX_PIN P1_15
#define Z_SERIAL_TX_PIN P1_14
#define Z_SERIAL_RX_PIN P1_10
#define E0_SERIAL_TX_PIN P1_09
#define E0_SERIAL_RX_PIN P1_08
#define E1_SERIAL_TX_PIN P1_04
#define E1_SERIAL_RX_PIN P1_01
#define Z2_SERIAL_TX_PIN P1_04
#define Z2_SERIAL_RX_PIN P1_01
#endif
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_BED_PIN 0 // A0 (T0) - (67) - TEMP_BED_PIN
#define TEMP_0_PIN 1 // A1 (T1) - (68) - TEMP_0_PIN
#define TEMP_1_PIN 2 // A2 (T2) - (69) - TEMP_1_PIN
//
// Heaters / Fans
//
#define HEATER_0_PIN P2_07
#if HOTENDS == 1
#define FAN1_PIN P2_04
#else
#define HEATER_1_PIN P2_04
#endif
#define FAN_PIN P2_03
#define HEATER_BED_PIN P2_05
/**
* _____ _____
* NC | · · | GND 5V | · · | GND
* RESET | · · | 1.31(SD_DETECT) (LCD_D7) 1.23 | · · | 1.22 (LCD_D6)
* (MOSI)0.18 | · · | 3.25(BTN_EN2) (LCD_D5) 1.21 | · · | 1.20 (LCD_D4)
* (SD_SS)0.16 | · · | 3.26(BTN_EN1) (LCD_RS) 1.19 | · · | 1.18 (LCD_EN)
* (SCK)0.15 | · · | 0.17(MISO) (BTN_ENC) 0.28 | · · | 1.30 (BEEPER)
* ----- -----
* EXP2 EXP1
*/
#if HAS_SPI_LCD
#define BEEPER_PIN P1_30 // (37) not 5V tolerant
#define BTN_ENC P0_28 // (58) open-drain
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS P1_22
#define BTN_EN1 P1_18
#define BTN_EN2 P1_20
#define LCD_PINS_ENABLE P1_23
#define LCD_PINS_D4 P1_21
#else
#define LCD_PINS_RS P1_19
#define BTN_EN1 P3_26 // (31) J3-2 & AUX-4
#define BTN_EN2 P3_25 // (33) J3-4 & AUX-4
#define LCD_PINS_ENABLE P1_18
#define LCD_PINS_D4 P1_20
#define LCD_SDSS P0_16 // (16) J3-7 & AUX-4
#define SD_DETECT_PIN P1_31 // (49) (NOT 5V tolerant)
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS P1_18
#define DOGLCD_A0 P1_19
#define DOGLCD_SCK P0_15
#define DOGLCD_MOSI P0_18
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
#define LCD_RESET_PIN P1_20 // Must be high or open for LCD to operate normally.
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN P1_21
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN P1_22
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN P1_23
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN P1_21
#endif
#else // !FYSETC_MINI_12864
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS P1_21
#define DOGLCD_A0 P1_22
#endif
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 P1_21
#define LCD_PINS_D6 P1_22
#define LCD_PINS_D7 P1_23
#endif
#endif // !FYSETC_MINI_12864
#endif
#endif // HAS_SPI_LCD
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION LCD
#endif
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#if SD_CONNECTION_IS(LCD)
#define SCK_PIN P0_15
#define MISO_PIN P0_17
#define MOSI_PIN P0_18
#define SS_PIN P0_16
#elif SD_CONNECTION_IS(ONBOARD)
#undef SD_DETECT_PIN
#define SD_DETECT_PIN P0_27
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
/**
* Special pins
* P1_30 (37) (NOT 5V tolerant)
* P1_31 (49) (NOT 5V tolerant)
* P0_27 (57) (Open collector)
* P0_28 (58) (Open collector)
*/

View File

@ -0,0 +1,183 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 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/>.
*
*/
#pragma once
/**
* BIQU BQ111-A4
*
* Applies to the following boards:
*
* BOARD_BIQU_BQ111_A4 (Hotend, Fan, Bed)
*
*/
#ifndef TARGET_LPC1768
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#ifndef BOARD_NAME
#define BOARD_NAME "BIQU Thunder B300 V1.0"
#endif
//
// Limit Switches
//
#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 // 10k pullup to 3.3V, 1K series
#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V, 1K series
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#ifndef X_CS_PIN
#define X_CS_PIN P1_15 // ETH
#endif
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_14 // ETH
#endif
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_16 // ETH
#endif
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
#ifndef E0_CS_PIN
#define E0_CS_PIN P1_17 // ETH
#endif
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI P0_18 // ETH
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO P0_17 // ETH
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK P0_15 // ETH
#endif
#endif
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN 1 // A0 (T0)
#define TEMP_BED_PIN 0 // A1 (T1)
//
// Heaters / Fans
//
#define HEATER_0_PIN P2_07
#define HEATER_BED_PIN P2_05
#ifndef FAN_PIN
#define FAN_PIN P2_04
#endif
//
// Unused
//
//#define PIN_P2_10 P2_10 // IBOOT-1
//#define PIN_P0_27 P0_27 // Onboard SD Detect
/**
* LCD / Controller
*
* REPRAP_DISCOUNT_SMART_CONTROLLER is not supported due to the lack of LCD_PINS_D5,
* LCD_PINS_D6 or LCD_PINS_D7 in the EXP1 connector.
*
* A remote SD card is not supported as the pins routed to EXP2 are the same as used
* for the onboard SD card, and a chip select signal is not provided for the remote
* SD card.
*/
#if HAS_SPI_LCD
#define BEEPER_PIN P1_31 // EXP1-1
#define BTN_EN1 P3_26 // EXP2-3
#define BTN_EN2 P3_25 // EXP2-5
#define BTN_ENC P1_30 // EXP1-2
#define SD_DETECT_PIN P0_27 // EXP2-7
#define LCD_PINS_RS P0_16 // EXP1-4
#define LCD_PINS_ENABLE P0_18 // (MOSI) EXP1-3
#define LCD_PINS_D4 P0_15 // (SCK) EXP1-5
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) && HAS_CHARACTER_LCD
#error "REPRAP_DISCOUNT_SMART_CONTROLLER is not supported by the BIQU B300 v1.0"
#endif
#if ENABLED(SDSUPPORT)
#error "SDSUPPORT is not supported by the BIQU B300 v1.0 when an LCD controller is used"
#endif
#endif // HAS_SPI_LCD
/**
* SD Card Reader
*
* Software SPI is used to interface with a stand-alone SD card reader connected to EXP1.
* Hardware SPI can't be used because P0_17 (MISO) is not brought out on this board.
*/
#if ENABLED(SDSUPPORT)
#define SCK_PIN P0_15 // EXP1-5
#define MISO_PIN P0_16 // EXP1-4
#define MOSI_PIN P0_18 // EXP1-3
#define SS_PIN P1_30 // EXP1-2
#define SDSS SS_PIN
#endif
/**
* PWMS
*
* There are 6 PWMS. Each PWM can be assigned to one of two pins.
*
* PWM1.1 P0_18 LCD_PINS_ENABLE
* PWM1.1 P2_0 X_STEP_PIN
* PWM1.2 P1_20 <none>
* PWM1.2 P2_1 Y_STEP_PIN
* PWM1.3 P1_21 <none>
* PWM1.3 P2_2 Z_STEP_PIN
* PWM1.4 P1_23 <none>
* PWM1.4 P2_3 E0_STEP_PIN
* PWM1.5 P1_24 X_MIN_PIN
* PWM1.5 P2_4 FAN_PIN
* PWM1.6 P1_26 Y_MIN_PIN
* PWM1.6 P2_5 HEATER_BED_PIN
*/

View File

@ -0,0 +1,161 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 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/>.
*
*/
#pragma once
/**
* BIQU BQ111-A4
*
* Applies to the following boards:
*
* BOARD_BIQU_BQ111_A4 (Hotend, Fan, Bed)
*
*/
#ifndef TARGET_LPC1768
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#define BOARD_NAME "BIQU BQ111-A4"
//
// Limit Switches
//
#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 // 10k pullup to 3.3V, 1K series
#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V, 1K series
//
// Steppers
//
#define X_STEP_PIN P2_0
#define X_DIR_PIN P0_5
#define X_ENABLE_PIN P0_4
#define Y_STEP_PIN P2_1
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#define Z_STEP_PIN P2_2
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#define E0_STEP_PIN P2_3
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN 0 // A0 (T0)
#define TEMP_BED_PIN 1 // A1 (T1)
//
// Heaters / Fans
//
#define HEATER_0_PIN P2_7
#define HEATER_BED_PIN P2_5
#ifndef FAN_PIN
#define FAN_PIN P2_4
#endif
//
// Unused
//
//#define PIN_P2_10 P2_10 // IBOOT-1
//#define PIN_P0_27 P0_27 // Onboard SD Detect
/**
* LCD / Controller
*
* REPRAP_DISCOUNT_SMART_CONTROLLER is not supported due to the lack of LCD_PINS_D5,
* LCD_PINS_D6 or LCD_PINS_D7 in the EXP1 connector.
*
* A remote SD card is not supported as the pins routed to EXP2 are the same as used
* for the onboard SD card, and a chip select signal is not provided for the remote
* SD card.
*/
#if HAS_SPI_LCD
#define BEEPER_PIN P1_31 // EXP1-1
#define BTN_EN1 P3_26 // EXP2-3
#define BTN_EN2 P3_25 // EXP2-5
#define BTN_ENC P1_30 // EXP1-2
#define SD_DETECT_PIN P0_27 // EXP2-7
#define LCD_PINS_RS P0_16 // EXP1-4
#define LCD_PINS_ENABLE P0_18 // (MOSI) EXP1-3
#define LCD_PINS_D4 P0_15 // (SCK) EXP1-5
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) && HAS_CHARACTER_LCD
#error "REPRAP_DISCOUNT_SMART_CONTROLLER is not supported by the BIQU BQ111-A4"
#endif
#if ENABLED(SDSUPPORT)
#error "SDSUPPORT is not supported by the BIQU BQ111-A4 when an LCD controller is used"
#endif
#endif // HAS_SPI_LCD
/**
* SD Card Reader
*
* Software SPI is used to interface with a stand-alone SD card reader connected to EXP1.
* Hardware SPI can't be used because P0_17 (MISO) is not brought out on this board.
*/
#if ENABLED(SDSUPPORT)
#define SCK_PIN P0_15 // EXP1-5
#define MISO_PIN P0_16 // EXP1-4
#define MOSI_PIN P0_18 // EXP1-3
#define SS_PIN P1_30 // EXP1-2
#define SDSS SS_PIN
#endif // SDSUPPORT
/**
* PWMS
*
* There are 6 PWMS. Each PWM can be assigned to one of two pins.
*
* PWM1.1 P0_18 LCD_PINS_ENABLE
* PWM1.1 P2_0 X_STEP_PIN
* PWM1.2 P1_20 <none>
* PWM1.2 P2_1 Y_STEP_PIN
* PWM1.3 P1_21 <none>
* PWM1.3 P2_2 Z_STEP_PIN
* PWM1.4 P1_23 <none>
* PWM1.4 P2_3 E0_STEP_PIN
* PWM1.5 P1_24 X_MIN_PIN
* PWM1.5 P2_4 FAN_PIN
* PWM1.6 P1_26 Y_MIN_PIN
* PWM1.6 P2_5 HEATER_BED_PIN
*/

View File

@ -0,0 +1,160 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 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/>.
*
*/
#pragma once
#ifndef TARGET_LPC1768
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#define BOARD_NAME "GMARSH X6 REV1"
// Ignore temp readings during develpment.
//#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
//
// Enable 12MHz clock output on P1.27 pin to sync TMC2208 chip clocks
//
#define LPC1768_ENABLE_CLKOUT_12M
//
// Servos
//
#define SERVO0_PIN P1_26 // PWM1[6]
#define SERVO1_PIN P1_18 // PWM1[1]
//
// Limit Switches
//
#define X_MIN_PIN P0_00
#define X_MAX_PIN P0_01
#define Y_MIN_PIN P0_10
#define Y_MAX_PIN P0_21
#define Z_MIN_PIN P2_13
#define Z_MAX_PIN P2_22
//
// Steppers
//
#define X_STEP_PIN P1_01
#define X_DIR_PIN P1_04
#define X_ENABLE_PIN P0_26
#define Y_STEP_PIN P1_10
#define Y_DIR_PIN P1_14
#define Y_ENABLE_PIN P1_08
#define Z_STEP_PIN P1_17
#define Z_DIR_PIN P4_29
#define Z_ENABLE_PIN P1_15
#define E0_STEP_PIN P0_05
#define E0_DIR_PIN P2_00
#define E0_ENABLE_PIN P4_28
#define E1_STEP_PIN P2_03
#define E1_DIR_PIN P2_04
#define E1_ENABLE_PIN P2_01
#define E2_STEP_PIN P2_07
#define E2_DIR_PIN P2_08
#define E2_ENABLE_PIN P2_05
//
// TMC2208 UART pins
//
#if HAS_DRIVER(TMC2208)
#define X_SERIAL_TX_PIN P1_00
#define X_SERIAL_RX_PIN P1_00
#define Y_SERIAL_TX_PIN P1_09
#define Y_SERIAL_RX_PIN P1_09
#define Z_SERIAL_TX_PIN P1_16
#define Z_SERIAL_RX_PIN P1_16
#define E0_SERIAL_TX_PIN P0_04
#define E0_SERIAL_RX_PIN P0_04
#define E1_SERIAL_TX_PIN P2_02
#define E1_SERIAL_RX_PIN P2_02
#define E2_SERIAL_TX_PIN P2_06
#define E2_SERIAL_RX_PIN P2_06
#else
#error "TMC2208 UART configuration is required for GMarsh X6."
#endif
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN 1 // AD0[0] on P0_23
#define TEMP_BED_PIN 0 // AD0[1] on P0_24
//
// Heaters / Fans
//
#define HEATER_BED_PIN P1_19 // Not a PWM pin, software PWM required
#define HEATER_0_PIN P3_26 // PWM1[3]
#define FAN_PIN P3_25 // Part cooling fan - connected to PWM1[2]
#define E0_AUTO_FAN_PIN P0_27 // Extruder cooling fan
//
// Misc. Functions
//
#define LED_PIN P1_31
//
// LCD
//
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN P0_19
#define BTN_EN1 P1_23
#define BTN_EN2 P1_24
#define BTN_ENC P1_25
#define LCD_PINS_RS P0_20
#define LCD_PINS_ENABLE P0_21
#define LCD_PINS_D4 P2_11
#define LCD_PINS_D5 P0_22
#define LCD_PINS_D6 P1_29
#define LCD_PINS_D7 P1_28
#endif
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION LCD
#endif
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#if SD_CONNECTION_IS(LCD)
#define SCK_PIN P0_15
#define MISO_PIN P0_17
#define MOSI_PIN P0_18
#define SS_PIN P0_16
#elif SD_CONNECTION_IS(ONBOARD)
#undef SD_DETECT_PIN
#define SD_DETECT_PIN P0_27
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN ONBOARD_SD_CS_PIN
#endif

View File

@ -0,0 +1,369 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 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/>.
*
*/
#pragma once
/**
* MKS SBASE pin assignments
*/
#ifndef TARGET_LPC1768
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#ifndef BOARD_NAME
#define BOARD_NAME "MKS SBASE"
#endif
#ifndef BOARD_WEBSITE_URL
#define BOARD_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SBASE"
#endif
#define LED_PIN P1_18 // Used as a status indicator
#define LED2_PIN P1_19
#define LED3_PIN P1_20
#define LED4_PIN P1_21
//
// 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
//
// Limit Switches - Not Interrupt Capable
//
#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
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P4_28 // Connector J8
#endif
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
#define E1_STEP_PIN P2_08
#define E1_DIR_PIN P2_13
#define E1_ENABLE_PIN P4_29
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_BED_PIN 0 // A0 (TH1)
#define TEMP_0_PIN 1 // A1 (TH2)
#define TEMP_1_PIN 2 // A2 (TH3)
#define TEMP_2_PIN 3 // A3 (TH4)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_0_PIN P2_07
#define HEATER_1_PIN P2_06
#ifndef FAN_PIN
#define FAN_PIN P2_04
#endif
//
// Connector J7
// Note: These pins are all digitally shared with the EXP1/EXP2 Connector.
// Using them with an LCD connected or configured will lead to hangs & crashes.
//
// 5V
// NC
// GND
#define PIN_P0_17 P0_17
#define PIN_P0_16 P0_16
#define PIN_P0_15 P0_15
//
// Connector J8
//
// GND
#define PIN_P1_22 P1_22
#define PIN_P1_23 P1_23 // PWM Capable
#define PIN_P2_12 P2_12 // Interrupt Capable
#define PIN_P2_11 P2_11 // Interrupt Capable
//
// Průša i3 MK2 Multi Material Multiplexer Support
//
#if ENABLED(MK2_MULTIPLEXER)
#define E_MUX0_PIN P1_23 // J8-3
#define E_MUX1_PIN P2_12 // J8-4
#define E_MUX2_PIN P2_11 // J8-5
#endif
//
// Misc. Functions
//
#define PS_ON_PIN P0_25 // TH3 Connector
//
// Ethernet pins
//
#ifndef ULTIPANEL
#define ENET_MDIO P1_17 // J12-4
#define ENET_RX_ER P1_14 // J12-6
#define ENET_RXD1 P1_10 // J12-8
#endif
#define ENET_MOC P1_16 // J12-3
#define REF_CLK P1_15 // J12-5
#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
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#if SD_CONNECTION_IS(CUSTOM_CABLE)
/**
* A custom cable is needed. See the README file in the
* Marlin\src\config\examples\Mks\Sbase directory
* P0.27 is on EXP2 and the on-board SD card's socket. That means it can't be
* used as the SD_DETECT for the LCD's SD card.
*
* The best solution is to use the custom cable to connect the LCD's SD_DETECT
* to a pin NOT on EXP2.
*
* If you can't find a pin to use for the LCD's SD_DETECT then comment out
* SD_DETECT_PIN entirely and remove that wire from the the custom cable.
*/
#define SD_DETECT_PIN P2_11 // J8-5 (moved from EXP2 P0.27)
#define SCK_PIN P1_22 // J8-2 (moved from EXP2 P0.7)
#define MISO_PIN P1_23 // J8-3 (moved from EXP2 P0.8)
#define MOSI_PIN P2_12 // J8-4 (moved from EXP2 P0.9)
#define SS_PIN P0_28
#define LPC_SOFTWARE_SPI // With a custom cable we need software SPI because the
// selected pins are not on a hardware SPI controller
#elif SD_CONNECTION_IS(LCD)
// use standard cable and header, SPI and SD detect sre shared with on-board SD card
// hardware SPI is used for both SD cards. The detect pin is shred between the
// LCD and onboard SD readers so we disable it.
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN P0_28
#elif SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN P0_27
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN ONBOARD_SD_CS_PIN
#endif
/**
* 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 HAS_SPI_LCD
#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 LCD_PINS_RS P0_16 // EXP1.4
#define LCD_SDSS P0_28 // EXP2.4
#define LCD_PINS_ENABLE P0_18 // EXP1.3
#define LCD_PINS_D4 P0_15 // EXP1.5
#if ANY(VIKI2, miniVIKI)
#define DOGLCD_SCK SCK_PIN
#define DOGLCD_MOSI MOSI_PIN
#endif
#if ENABLED(FYSETC_MINI_12864)
/**
* The Fysetc display can NOT use the SCK and MOSI pins on EXP2, so a
* special cable is needed to go between EXP2 on the FYSETC and the
* controller board's EXP2 and J8. It also means that a software SPI
* is needed to drive those pins.
*
* The Fysetc requires mode 3 SPI interface.
*
* Pins 6, 7 & 8 on EXP2 are no connects. That means a second special
* cable will be needed if the RGB LEDs are to be active.
*/
#define DOGLCD_CS LCD_PINS_ENABLE // EXP1.3 (LCD_EN on Fysetc schematic)
#define DOGLCD_A0 LCD_PINS_RS // EXP1.4 (LCD_A0 on Fysetc schematic)
#define DOGLCD_SCK P2_11 // J8-5 (SCK on Fysetc schematic)
#define DOGLCD_MOSI P4_28 // J8-6 (MOSI on Fysetc schematic)
//#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN P2_12 // J8-4 (LCD_D6 on Fysetc schematic)
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN P1_23 // J8-3 (LCD_D5 on Fysetc schematic)
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN P1_22 // J8-2 (LCD_D7 on Fysetc schematic)
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN P2_12
#endif
#elif ENABLED(MINIPANEL)
// GLCD features
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#endif
#endif
/**
* Example for trinamic drivers using the J8 connector on MKs Sbase.
* 2130s need 1 pin for each driver. 2208/2209s need 2 pins for serial control.
* This board does not have enough pins to use hardware serial.
*/
#if HAS_DRIVER(TMC2130)
// J8
#define X_CS_PIN P1_22
#define Y_CS_PIN P1_23
#define Z_CS_PIN P2_12
#define E0_CS_PIN P2_11
#define E1_CS_PIN P4_28
// Hardware SPI is on EXP2. See if you can make it work:
// https://github.com/makerbase-mks/MKS-SBASE/issues/25
#define TMC_USE_SW_SPI
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI P0_03 // AUX1
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO P0_02 // AUX1
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK P0_26 // TH4
#endif
#endif
#endif
#if MB(MKS_SBASE) && HAS_TMC220x
// The shortage of pins becomes apparent.
// Worst case you may have to give up the LCD
// RX pins need to be interrupt capable
#define X_SERIAL_TX_PIN P1_22 // J8-2
#define X_SERIAL_RX_PIN P2_12 // J8-4 Interrupt Capable
#define Y_SERIAL_TX_PIN P1_23 // J8-3
#define Y_SERIAL_RX_PIN P2_11 // J8-5 Interrupt Capable
#define Z_SERIAL_TX_PIN P2_12 // J8-4
#define Z_SERIAL_RX_PIN P0_25 // TH3
#define E0_SERIAL_TX_PIN P4_28 // J8-6
#define E0_SERIAL_RX_PIN P0_26 // TH4
#endif
// UNUSED
#define PIN_P0_27 P0_27 // EXP2/Onboard SD
#define PIN_P0_28 P0_28 // EXP2
#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
/**
* 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 P1_18 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM
* PWM1.1 P2_00 E0_STEP_PIN
* PWM1.2 P1_20 SERVO0_PIN
* PWM1.2 P2_01 X_STEP_PIN
* PWM1.3 P1_21 SERVO1_PIN J5-1
* PWM1.3 P2_02 Y_STEP_PIN
* PWM1.4 P1_23 SDSS(SSEL0) J3-5 AUX-3
* PWM1.4 P2_03 Z_STEP_PIN
* PWM1.5 P1_24 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
* PWM1.5 P2_04 RAMPS_D9_PIN
* PWM1.6 P1_26 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
* PWM1.6 P2_05 RAMPS_D10_PIN
*/
/**
* Special pins
* P1_30 - not 5V tolerant - EXP1
* P1_31 - not 5V tolerant - EXP1
* P0_27 - open collector - EXP2
* P0_28 - open collector - EXP2
*
*/
/**
* Serial Ports
* P0_00 - Port 3
* P0_01 - SD Card (Onboard)
* P0_10 - Port 2
* P0_11 - Y_EN/Y_DIR
* P0_15 - Port 1
* P0_16 - EXP1
* P0_02 - Port 0
* P0_03 - AUX1
* P0_29 - Port -1
* P0_30 - USB
*
*/

View File

@ -0,0 +1,288 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 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/>.
*
*/
#pragma once
/**
* MKS SGEN-L pin assignments
*/
#ifndef TARGET_LPC1768
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#define BOARD_NAME "MKS SGen-L"
#define BOARD_WEBSITE_URL "https://github.com/makerbase-mks/MKS-SGEN_L"
//
// Servo pin
//
#define SERVO0_PIN P1_23 // SERVO P1.23
#define SERVO1_PIN P2_00 // SERVO P2.0
//
// Limit Switches
//
#define X_MIN_PIN P1_29
#define X_MAX_PIN P1_28
#define Y_MIN_PIN P1_27
#define Y_MAX_PIN P1_26
#define Z_MIN_PIN P1_25
#define Z_MAX_PIN P1_24
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P1_24
#endif
//
// Steppers
//
#define X_STEP_PIN P2_02
#define X_DIR_PIN P2_03
#define X_ENABLE_PIN P2_01
#ifndef X_CS_PIN
#define X_CS_PIN P1_01
#endif
#define Y_STEP_PIN P0_19
#define Y_DIR_PIN P0_20
#define Y_ENABLE_PIN P2_08
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_08
#endif
#define Z_STEP_PIN P0_22
#define Z_DIR_PIN P2_11
#define Z_ENABLE_PIN P0_21
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_10
#endif
#define E0_STEP_PIN P2_13
#define E0_DIR_PIN P0_11
#define E0_ENABLE_PIN P2_12
#ifndef E0_CS_PIN
#define E0_CS_PIN P1_15
#endif
#define E1_STEP_PIN P0_01
#define E1_DIR_PIN P0_00
#define E1_ENABLE_PIN P0_10
#ifndef E1_CS_PIN
#define E1_CS_PIN P1_17
#endif
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI P4_28
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO P0_05
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK P0_04
#endif
#endif
#if HAS_TMC220x
/**
* TMC2208 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
//
// Software serial
//
#define X_SERIAL_TX_PIN P1_04
#define X_SERIAL_RX_PIN P1_01
#define Y_SERIAL_TX_PIN P1_09
#define Y_SERIAL_RX_PIN P1_08
#define Z_SERIAL_TX_PIN P1_14
#define Z_SERIAL_RX_PIN P1_10
#define E0_SERIAL_TX_PIN P1_16
#define E0_SERIAL_RX_PIN P1_15
#define E1_SERIAL_TX_PIN P4_29
#define E1_SERIAL_RX_PIN P1_17
#define Z2_SERIAL_TX_PIN P4_29
#define Z2_SERIAL_RX_PIN P1_17
#endif // TMC2208 || TMC2209
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN 0 // Analog Input A0 (TH1)
#define TEMP_BED_PIN 1 // Analog Input A1 (TB)
#define TEMP_1_PIN 2 // Analog Input A2 (TH2)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_0_PIN P2_07
#define HEATER_1_PIN P2_06
#ifndef FAN_PIN
#define FAN_PIN P2_04
#endif
//
// Misc. Functions
//
#define LED_PIN P1_18 // Used as a status indicator
#define LED2_PIN P1_19
#define LED3_PIN P1_20
#define LED4_PIN P1_21
/**
* _____ _____
* (BEEPER) 1.31 | · · | 1.30 (BTN_ENC) (MISO) 0.8 | · · | 0.7 (SD_SCK)
* (LCD_EN) 0.18 | · · | 0.16 (LCD_RS) (BTN_EN1) 3.25 | · · | 0.28 (SD_CS2)
* (LCD_D4) 0.15 | · · | 0.17 (LCD_D5) (BTN_EN2) 3.26 | · · | 1.20 (SD_MOSI)
* (LCD_D6) 1.0 | · · | 1.22 (LCD_D7) (SD_DETECT) 0.27 | · · | RST
* GND | · · | 5V GND | · · | NC
* ----- -----
* EXP1 EXP2
*/
#if HAS_SPI_LCD
#define BEEPER_PIN P1_31
#define BTN_ENC P1_30
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS P1_0
#define BTN_EN1 P0_18
#define BTN_EN2 P0_15
#define LCD_PINS_ENABLE P1_22
#define LCD_PINS_D4 P0_17
#else
#define LCD_PINS_RS P0_16
#define BTN_EN1 P3_25
#define BTN_EN2 P3_26
#define LCD_PINS_ENABLE P0_18
#define LCD_PINS_D4 P0_15
#define LCD_SDSS P0_28
#define SD_DETECT_PIN P0_27
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS P0_18
#define DOGLCD_A0 P0_16
#define DOGLCD_SCK P0_7
#define DOGLCD_MOSI P1_20
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
#define LCD_RESET_PIN P0_15 // Must be high or open for LCD to operate normally.
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN P0_17
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN P1_0
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN P1_22
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN P0_17
#endif
#else // !FYSETC_MINI_12864
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS P0_17
#define DOGLCD_A0 P1_0
#endif
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 P0_17
#define LCD_PINS_D6 P1_0
#define LCD_PINS_D7 P1_22
#endif
#endif // !FYSETC_MINI_12864
#endif
#endif // HAS_SPI_LCD
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#if SD_CONNECTION_IS(LCD)
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN P0_28
#elif SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN P0_27
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
//
// Other Pins
//
//#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
//#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
//#define PS_ON_PIN P1_23 // SERVO P1.23

View File

@ -0,0 +1,486 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 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/>.
*
*/
#pragma once
/**
* Re-ARM with RAMPS v1.4 pin assignments
*
* Applies to the following boards:
*
* RAMPS_14_EFB (Hotend, Fan, Bed)
* RAMPS_14_EEB (Hotend0, Hotend1, Bed)
* RAMPS_14_EFF (Hotend, Fan0, Fan1)
* RAMPS_14_EEF (Hotend0, Hotend1, Fan)
* RAMPS_14_SF (Spindle, Controller Fan)
*
*/
// Numbers in parentheses () are the corresponding mega2560 pin numbers
#ifndef TARGET_LPC1768
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#define BOARD_NAME "Re-ARM RAMPS 1.4"
//
// Servos
//
#define SERVO0_PIN P1_20 // (11)
#define SERVO1_PIN P1_21 // ( 6) also on J5-1
#define SERVO2_PIN P1_19 // ( 5)
#define SERVO3_PIN P1_18 // ( 4) 5V output
//
// Limit Switches
//
#define X_MIN_PIN P1_24 // ( 3) 10k pullup to 3.3V, 1K series
#define X_MAX_PIN P1_25 // ( 2) 10k pullup to 3.3V, 1K series
#define Y_MIN_PIN P1_26 // (14) 10k pullup to 3.3V, 1K series
#define Y_MAX_PIN P1_27 // (15) 10k pullup to 3.3V, 1K series
#define Z_MIN_PIN P1_29 // (18) 10k pullup to 3.3V, 1K series
#define Z_MAX_PIN P1_28 // (19) 10k pullup to 3.3V, 1K series
//
// Steppers
//
#define X_STEP_PIN P2_01 // (54)
#define X_DIR_PIN P0_11 // (55)
#define X_ENABLE_PIN P0_10 // (38)
#ifndef X_CS_PIN
#define X_CS_PIN P1_01 // ETH
#endif
#define Y_STEP_PIN P2_02 // (60)
#define Y_DIR_PIN P0_20 // (61)
#define Y_ENABLE_PIN P0_19 // (56)
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_04 // ETH
#endif
#define Z_STEP_PIN P2_03 // (46)
#define Z_DIR_PIN P0_22 // (48)
#define Z_ENABLE_PIN P0_21 // (62)
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_10 // ETH
#endif
#define E0_STEP_PIN P2_00 // (26)
#define E0_DIR_PIN P0_05 // (28)
#define E0_ENABLE_PIN P0_04 // (24)
#ifndef E0_CS_PIN
#define E0_CS_PIN P1_14 // ETH
#endif
#define E1_STEP_PIN P2_08 // (36)
#define E1_DIR_PIN P2_13 // (34)
#define E1_ENABLE_PIN P4_29 // (30)
#ifndef E1_CS_PIN
#define E1_CS_PIN -1
#endif
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI P1_00 // ETH
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO P1_08 // ETH
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK P1_09 // ETH
#endif
#endif
#if HAS_TMC220x
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
/**
* Software serial
*/
// P2_08 E1-Step
// P2_13 E1-Dir
#define X_SERIAL_TX_PIN P2_13
#define X_SERIAL_RX_PIN P2_13
#define Y_SERIAL_TX_PIN P0_00
#define Y_SERIAL_RX_PIN P0_00
#define Z_SERIAL_TX_PIN P0_01
#define Z_SERIAL_RX_PIN P0_01
#define E0_SERIAL_TX_PIN P2_08
#define E0_SERIAL_RX_PIN P2_08
#endif
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN 0 // A0 (T0) - (67) - TEMP_0_PIN
#define TEMP_BED_PIN 1 // A1 (T1) - (68) - TEMP_BED_PIN
#define TEMP_1_PIN 2 // A2 (T2) - (69) - TEMP_1_PIN
#define TEMP_2_PIN 3 // A3 - (63) - J5-3 & AUX-2
#define TEMP_3_PIN 4 // A4 - (37) - BUZZER_PIN
//#define TEMP_4_PIN 5 // A5 - (49) - SD_DETECT_PIN
//#define ?? 6 // A6 - ( 0) - RXD0 - J4-4 & AUX-1
#define FILWIDTH_PIN 7 // A7 - ( 1) - TXD0 - J4-5 & AUX-1
//
// Augmentation for auto-assigning RAMPS plugs
//
#if NONE(IS_RAMPS_EEB, IS_RAMPS_EEF, IS_RAMPS_EFB, IS_RAMPS_EFF, IS_RAMPS_SF) && !PIN_EXISTS(MOSFET_D)
#if HOTENDS > 1
#if TEMP_SENSOR_BED
#define IS_RAMPS_EEB
#else
#define IS_RAMPS_EEF
#endif
#elif TEMP_SENSOR_BED
#define IS_RAMPS_EFB
#else
#define IS_RAMPS_EFF
#endif
#endif
//
// Heaters / Fans
//
#ifndef MOSFET_D_PIN
#define MOSFET_D_PIN -1
#endif
#ifndef RAMPS_D8_PIN
#define RAMPS_D8_PIN P2_07 // (8)
#endif
#ifndef RAMPS_D9_PIN
#define RAMPS_D9_PIN P2_04 // (9)
#endif
#ifndef RAMPS_D10_PIN
#define RAMPS_D10_PIN P2_05 // (10)
#endif
#define HEATER_0_PIN RAMPS_D10_PIN
#if ENABLED(IS_RAMPS_EFB) // Hotend, Fan, Bed
#define HEATER_BED_PIN RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_EEF) // Hotend, Hotend, Fan
#define HEATER_1_PIN RAMPS_D9_PIN
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
#define HEATER_1_PIN RAMPS_D9_PIN
#define HEATER_BED_PIN RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_EFF) // Hotend, Fan, Fan
#define FAN1_PIN RAMPS_D8_PIN
#elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE")
#define HEATER_BED_PIN RAMPS_D8_PIN
#if HOTENDS == 1
#define FAN1_PIN MOSFET_D_PIN
#else
#define HEATER_1_PIN MOSFET_D_PIN
#endif
#endif
#ifndef FAN_PIN
#if EITHER(IS_RAMPS_EFB, IS_RAMPS_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
#define FAN_PIN RAMPS_D9_PIN
#elif EITHER(IS_RAMPS_EEF, IS_RAMPS_SF) // Hotend, Hotend, Fan or Spindle, Fan
#define FAN_PIN RAMPS_D8_PIN
#elif ENABLED(IS_RAMPS_EEB) // Hotend, Hotend, Bed
#define FAN_PIN P1_18 // (4) IO pin. Buffer needed
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
#define FAN_PIN RAMPS_D9_PIN
#endif
#endif
//
// Misc. Functions
//
#define LED_PIN P4_28 // (13)
// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN P1_18 // (4)
#endif
#define PS_ON_PIN P2_12 // (12)
#if !defined(MAX6675_SS_PIN) && DISABLED(USE_ZMAX_PLUG)
#define MAX6675_SS_PIN P1_28
#endif
#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENA_PIN)
#if !defined(NUM_SERVOS) || NUM_SERVOS < 4 // Try to use servo connector
#define CASE_LIGHT_PIN P1_18 // (4) MUST BE HARDWARE PWM
#endif
#endif
//
// M3/M4/M5 - Spindle/Laser Control
// Use servo pins, if available
//
#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
#if NUM_SERVOS > 1
#if ENABLED(SPINDLE_FEATURE)
#error "SPINDLE_FEATURE requires 3 free servo pins."
#else
#error "LASER_FEATURE requires 3 free servo pins."
#endif
#endif
#define SPINDLE_LASER_ENA_PIN SERVO1_PIN // (6) Pin should have a pullup/pulldown!
#define SPINDLE_LASER_PWM_PIN SERVO3_PIN // (4) MUST BE HARDWARE PWM
#define SPINDLE_DIR_PIN SERVO2_PIN // (5)
#endif
//
// Průša i3 MK2 Multiplexer Support
//
#if SERIAL_PORT != 0 && SERIAL_PORT_2 != 0
#define E_MUX0_PIN P0_03 // ( 0) Z_CS_PIN
#define E_MUX1_PIN P0_02 // ( 1) E0_CS_PIN
#endif
#define E_MUX2_PIN P0_26 // (63) E1_CS_PIN
/**
* LCD / Controller
*
* All controllers can use J3 and J5 on the Re-ARM board. Custom cabling will be required.
*
* - https://github.com/wolfmanjm/universal-panel-adapter
* - http://panucattdevices.freshdesk.com/support/solutions/articles/1000243195-lcd-display-installation
*/
/**
* 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(CR10_STOCKDISPLAY)
// Re-Arm can support Creality stock display without SD card reader and single cable on EXP3.
// Re-Arm J3 pins 1 (p1.31) & 2 (P3.26) are not used. Stock cable will need to have one
// 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3.
// Requires REVERSE_ENCODER_DIRECTION in Configuration.h
#define BEEPER_PIN P2_11 // J3-3 & AUX-4
#define BTN_EN1 P0_16 // J3-7 & AUX-4
#define BTN_EN2 P1_23 // J3-5 & AUX-4
#define BTN_ENC P3_25 // J3-4 & AUX-4
#define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS)
#define LCD_PINS_ENABLE P0_18 // J3-10 & AUX-3 (SID, MOSI)
#define LCD_PINS_D4 P2_06 // J3-8 & AUX-3 (SCK, CLK)
#elif HAS_SPI_LCD
//#define SCK_PIN P0_15 // (52) system defined J3-9 & AUX-3
//#define MISO_PIN P0_17 // (50) system defined J3-10 & AUX-3
//#define MOSI_PIN P0_18 // (51) system defined J3-10 & AUX-3
//#define SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS)
#if ENABLED(FYSETC_MINI_12864)
#define BEEPER_PIN P1_01
#define BTN_ENC P1_04
#else
#define BEEPER_PIN P1_30 // (37) not 5V tolerant
#define BTN_ENC P2_11 // (35) J3-3 & AUX-4
#endif
#define BTN_EN1 P3_26 // (31) J3-2 & AUX-4
#define BTN_EN2 P3_25 // (33) J3-4 & AUX-4
#define SD_DETECT_PIN P1_31 // (49) J3-1 & AUX-3 (NOT 5V tolerant)
#define KILL_PIN P1_22 // (41) J5-4 & AUX-4
#define LCD_PINS_RS P0_16 // (16) J3-7 & AUX-4
#define LCD_SDSS P0_16 // (16) J3-7 & AUX-4
#if ENABLED(NEWPANEL)
#if ENABLED(REPRAPWORLD_KEYPAD)
#define SHIFT_OUT P0_18 // (51) (MOSI) J3-10 & AUX-3
#define SHIFT_CLK P0_15 // (52) (SCK) J3-9 & AUX-3
#define SHIFT_LD P1_31 // (49) J3-1 & AUX-3 (NOT 5V tolerant)
#endif
#else
//#define SHIFT_CLK P3_26 // (31) J3-2 & AUX-4
//#define SHIFT_LD P3_25 // (33) J3-4 & AUX-4
//#define SHIFT_OUT P2_11 // (35) J3-3 & AUX-4
//#define SHIFT_EN P1_22 // (41) J5-4 & AUX-4
#endif
#if ANY(VIKI2, miniVIKI)
// #define LCD_SCREEN_ROT_180
#define DOGLCD_CS P0_16 // (16)
#define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2
#define DOGLCD_SCK SCK_PIN
#define DOGLCD_MOSI MOSI_PIN
#define STAT_LED_BLUE_PIN P0_26 //(63) may change if cable changes
#define STAT_LED_RED_PIN P1_21 // ( 6) may change if cable changes
#else
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_SCK P0_15
#define DOGLCD_MOSI P0_18
// EXP1 on LCD adapter is not usable - using Ethernet connector instead
#define DOGLCD_CS P1_09
#define DOGLCD_A0 P1_14
//#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
#define LCD_RESET_PIN P0_16 // Must be high or open for LCD to operate normally.
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN P1_00
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN P1_01
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN P1_08
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN P1_00
#endif
#else
#define DOGLCD_CS P0_26 // (63) J5-3 & AUX-2
#define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2
#endif
#define LCD_BACKLIGHT_PIN P0_16 //(16) J3-7 & AUX-4 - only used on DOGLCD controllers
#define LCD_PINS_ENABLE P0_18 // (51) (MOSI) J3-10 & AUX-3
#define LCD_PINS_D4 P0_15 // (52) (SCK) J3-9 & AUX-3
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 P1_17 // (71) ENET_MDIO
#define LCD_PINS_D6 P1_14 // (73) ENET_RX_ER
#define LCD_PINS_D7 P1_10 // (75) ENET_RXD1
#endif
#endif
#if ENABLED(MINIPANEL)
// GLCD features
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#endif
#endif // HAS_SPI_LCD
//
// Ethernet pins
//
#if DISABLED(ULTIPANEL)
#define ENET_MDIO P1_17 // (71) J12-4
#define ENET_RX_ER P1_14 // (73) J12-6
#define ENET_RXD1 P1_10 // (75) J12-8
#endif
#define ENET_MOC P1_16 // (70) J12-3
#define REF_CLK P1_15 // (72) J12-5
#define ENET_RXD0 P1_09 // (74) J12-7
#define ENET_CRS P1_08 // (76) J12-9
#define ENET_TX_EN P1_04 // (77) J12-10
#define ENET_TXD0 P1_00 // (78) J12-11
#define ENET_TXD1 P1_01 // (79) J12-12
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#if SD_CONNECTION_IS(LCD)
#define SCK_PIN P0_15 // (52) system defined J3-9 & AUX-3
#define MISO_PIN P0_17 // (50) system defined J3-10 & AUX-3
#define MOSI_PIN P0_18 // (51) system defined J3-10 & AUX-3
#define SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin
#elif SD_CONNECTION_IS(ONBOARD)
#undef SD_DETECT_PIN
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
/**
* Fast PWMs
*
* The LPC1768's hardware PWM controller has 6 channels. Each channel
* can be setup to either control a dedicated pin directly or to generate
* an interrupt. The direct method's duty cycle is accurate to within a
* a microsecond. The interrupt method's average duty cycle has the
* the same accuracy but the individual cycles can vary because of higher
* priority interrupts.
*
* All Fast PWMs have a 50Hz rate.
*
* The following pins/signals use the direct method. All other pins use the
* the interrupt method. Note that SERVO2_PIN and RAMPS_D8_PIN use the
* interrupt method.
*
* P1_20 (11) SERVO0_PIN
* P1_21 ( 6) SERVO1_PIN J5-1
* P0_18 ( 4) SERVO3_PIN 5V output
* *P2_04 ( 9) RAMPS_D9_PIN
* *P2_05 (10) RAMPS_D10_PIN
*
* * - If used as a heater driver then a Fast PWM is NOT assigned. If used as
* a fan driver then enabling FAST_PWM_FAN assigns a Fast PWM to it.
*/
/**
* Special pins
* P1_30 (37) (NOT 5V tolerant)
* P1_31 (49) (NOT 5V tolerant)
* P0_27 (57) (Open collector)
* P0_28 (58) (Open collector)
*/
/**
* The following mega2560 pins are NOT available in a Re-ARM system:
*
* 7, 17, 22, 23, 25, 27, 29, 32, 39, 40, 42, 43, 44, 45, 47, 64, 65, 66
*/

View File

@ -0,0 +1,115 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 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/>.
*
*/
#pragma once
/**
* Selena Compact pin assignments
*/
#ifndef TARGET_LPC1768
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#define BOARD_NAME "Selena Compact"
#define BOARD_WEBSITE_URL "https://github.com/Ales2-k/Selena"
//
// Limit Switches
//
#define X_MIN_PIN P1_28
#define X_MAX_PIN P1_25
#define Y_MIN_PIN P2_11
#define Y_MAX_PIN -1
#define Z_MIN_PIN P1_27
#define Z_MAX_PIN -1
#define Z_PROBE P1_22
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
#define E1_STEP_PIN P2_08
#define E1_DIR_PIN P2_13
#define E1_ENABLE_PIN P4_29
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_BED_PIN 0 // A0 (TH1)
#define TEMP_0_PIN 1 // A1 (TH2)
#define TEMP_1_PIN 2 // A2 (TH3)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_BED2_PIN P2_04
#define HEATER_0_PIN P2_07
#define HEATER_1_PIN P2_06
#ifndef FAN_PIN
#define FAN_PIN P1_24
#endif
#define FAN1_PIN P1_26
//
// Display
//
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define LCD_PINS_RS P0_16
#define LCD_PINS_ENABLE P0_18
#define LCD_PINS_D4 P0_15
#define LCD_PINS_D5 P1_00
#define LCD_PINS_D6 P1_01
#define LCD_PINS_D7 P1_04
#define BEEPER_PIN P1_31
#define BTN_EN1 P3_25
#define BTN_EN2 P3_26
#define BTN_ENC P1_30
#define SD_DETECT_PIN -1
#endif // REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
//
// Servo
//
#define SERVO0_PIN P1_23

View File

@ -0,0 +1,166 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2019 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/>.
*
*/
#pragma once
/**
* TH3D EZBoard pin assignments
*/
#ifndef TARGET_LPC1768
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#define BOARD_NAME "TH3D EZBoard"
#define BOARD_WEBSITE_URL "https://www.th3dstudio.com/product/ezboard-lite/"
//
// Servos
//
#define SERVO0_PIN P2_04
//
// Limit Switches
//
#define X_STOP_PIN P1_24
#define Y_STOP_PIN P1_25
#define Z_STOP_PIN P1_26
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN P1_27
#endif
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P1_16
#define X_ENABLE_PIN P1_17
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P1_10
#define Y_ENABLE_PIN P1_09
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P1_15
#define Z_ENABLE_PIN P1_14
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P1_04
#define E0_ENABLE_PIN P1_08
#define E1_STEP_PIN P2_08
#define E1_DIR_PIN P2_13
#define E1_ENABLE_PIN P4_29
#if HAS_DRIVER(TMC2208)
//
// TMC2208 stepper drivers
// Software serial
//
#define X_SERIAL_TX_PIN P0_04
#define X_SERIAL_RX_PIN P0_05
#define Y_SERIAL_TX_PIN P0_10
#define Y_SERIAL_RX_PIN P0_11
#define Z_SERIAL_TX_PIN P0_19
#define Z_SERIAL_RX_PIN P0_20
#define E0_SERIAL_TX_PIN P0_22
#define E0_SERIAL_RX_PIN P0_21
#endif
//
// Temp Sensors
// 3.3V max when defined as an Analog Input!
//
#define TEMP_0_PIN 0 // Analog Input P0_23
#define TEMP_BED_PIN 1 // Analog Input P0_24
#define TEMP_1_PIN 2 // Analog Input P0_25
#if ENABLED(FILAMENT_WIDTH_SENSOR)
#define FILWIDTH_PIN 3 // Analog Input P0_26
#else
#define TEMP_2_PIN 3 // Analog Input P0_26
#endif
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_0_PIN P2_07
#ifndef FAN_PIN
#define FAN_PIN P2_06
#endif
#define FAN1_PIN P1_22
//
// Auto fans
//
#define AUTO_FAN_PIN P1_22 // FET 3
#define ORIG_E0_AUTO_FAN_PIN AUTO_FAN_PIN
#define ORIG_E1_AUTO_FAN_PIN AUTO_FAN_PIN
#define ORIG_E2_AUTO_FAN_PIN AUTO_FAN_PIN
//
// SD Card
//
#define SDCARD_CONNECTION ONBOARD
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06
#define SS_PIN ONBOARD_SD_CS_PIN
//
// LCD / Controller
//
/**
* _____
* 5V | · · | GND
* (LCD_EN) P0_18 | · · | P0_16 (LCD_RS)
* (LCD_D4) P0_15 | · · | P3_25 (BTN_EN2)
* (RESET) P2_11 | · · | P3_26 (BTN_EN1)
* (BTN_ENC) P1_30 | · · | P1_31 (BEEPER)
* -----
* EXP1
*
* LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be
* defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER.
*
* A remote SD card is currently not supported because the pins routed to the EXP2
* connector are shared with the onboard SD card.
*
*/
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN P1_31
#define BTN_EN1 P3_26
#define BTN_EN2 P3_25
#define BTN_ENC P1_30
#define LCD_PINS_RS P0_16
#define LCD_PINS_ENABLE P0_18
#define LCD_PINS_D4 P0_15
#define KILL_PIN P2_11
#endif