Browse Source

🎨 Define FYSETC S6 and TH3D EZBoard EXP1/2 pins

vanilla_fb_2.0.x
Scott Lahteine 3 years ago
parent
commit
6bf2be66ed
  1. 97
      Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h
  2. 126
      Marlin/src/pins/stm32f4/pins_FYSETC_S6.h

97
Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h

@ -27,20 +27,30 @@
#include "env_validate.h"
//#define V3_EZABL_ON_SERVO // As in TH3D Firmware Config
#define BOARD_INFO_NAME "TH3D EZBoard"
#define BOARD_WEBSITE_URL "th3dstudio.com"
//
// Servos
//
#define SERVO0_PIN P2_04
#if ENABLED(V3_EZABL_ON_SERVO)
#define SERVO0_PIN -1
#else
#define SERVO0_PIN P2_04
#endif
//
// Limit Switches
//
#define X_STOP_PIN P1_24
#define Y_STOP_PIN P1_25
#define Z_STOP_PIN P1_26
#if ENABLED(V3_EZABL_ON_SERVO)
#define Z_STOP_PIN P2_04
#else
#define Z_STOP_PIN P1_26
#endif
//
// Filament Runout Sensor
@ -103,13 +113,6 @@
#endif
#define TEMP_BED_PIN P0_24_A1 // Analog Input P0_24
#define TEMP_1_PIN P0_25_A2 // Analog Input P0_25
#if ENABLED(FILAMENT_WIDTH_SENSOR)
#define FILWIDTH_PIN P0_26_A3 // Analog Input P0_26
#else
#define TEMP_2_PIN P0_26_A3 // Analog Input P0_26
#endif
//
// Heaters / Fans
@ -141,6 +144,7 @@
#define SDCARD_CONNECTION ONBOARD
//#define SD_DETECT_PIN P0_25 // SD_CD
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
@ -152,14 +156,14 @@
//
/**
* _____
* 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
* ______
* 5V | 1 2 | GND
* P0_18 | 3 4 | P0_16
* P0_15 | 5 6 P3_25
* P2_11 | 7 8 | P3_26
* P1_30 | 9 10 | P1_31
* ------
* 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.
@ -167,16 +171,57 @@
* A remote SD card is currently not supported because the pins routed to the EXP2
* connector are shared with the onboard SD card.
*/
#define EXP1_03_PIN P0_18
#define EXP1_04_PIN P0_16
#define EXP1_05_PIN P0_15
#define EXP1_06_PIN P3_25
#define EXP1_07_PIN P2_11
#define EXP1_08_PIN P3_26
#define EXP1_09_PIN P1_30
#define EXP1_10_PIN P1_31
#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
/** ______
* 5V | 1 2 | GND
* LCD_EN | 3 4 | LCD_RS
* LCD_D4 | 5 6 EN2
* KILL | 7 8 | EN1
* ENC | 9 10 | BEEPER
* ------
*/
#define BEEPER_PIN EXP1_10_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define KILL_PIN EXP1_07_PIN
#elif ENABLED(MKS_MINI_12864)
/** ______
* 5V | 1 2 | GND
* SPI-MOSI | 3 4 | SPI-CS
* A0 | 5 6 EN2
* -- | 7 8 | EN1
* ENC | 9 10 | SPI-SCK
* ------
*/
#define DOGLCD_CS EXP1_04_PIN
#define DOGLCD_A0 EXP1_05_PIN
#define DOGLCD_SCK EXP1_10_PIN
#define DOGLCD_MOSI EXP1_03_PIN
#define LCD_CONTRAST_INIT 160
#define LCD_CONTRAST_MIN 120
#define LCD_CONTRAST_MAX 180
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#elif HAS_WIRED_LCD
#error "Only the CR10_STOCKDISPLAY is supported with TH3D EZBoard."
#error "Only CR10_STOCKDISPLAY or MKS_MINI_12864 are supported with TH3D EZBoard."
#endif
#if EITHER(CR10_STOCKDISPLAY, MKS_MINI_12864)
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_06_PIN
#define BTN_ENC EXP1_09_PIN
#endif

126
Marlin/src/pins/stm32f4/pins_FYSETC_S6.h

@ -184,13 +184,6 @@
#define FAN1_PIN PB1
#define FAN2_PIN PB2
//
// SPI
//
#define SD_SCK_PIN PA5
#define SD_MISO_PIN PA6
#define SD_MOSI_PIN PA7
//
// Misc. Functions
//
@ -198,84 +191,119 @@
//#define PS_ON_PIN PE11
//#define KILL_PIN PC5
#define SDSS PA4
#define SD_DETECT_PIN PB10
/**
* ______ ______
* 5V | 1 2 | GND 5V | 1 2 | GND
* PD1 | 3 4 | PD0 RESET | 3 4 | PB10
* PC12 | 5 6 PC10 PA7 | 5 6 PC7
* PD2 | 7 8 | PC11 PA4 | 7 8 | PC6
* PA8 | 9 10 | PC9 PA5 | 9 10 | PA6
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN PD1
#define EXP1_04_PIN PD0
#define EXP1_05_PIN PC12
#define EXP1_06_PIN PC10
#define EXP1_07_PIN PD2
#define EXP1_08_PIN PC11
#define EXP1_09_PIN PA8
#define EXP1_10_PIN PC9
#define EXP2_03_PIN -1 // RESET
#define EXP2_04_PIN PB10
#define EXP2_05_PIN PA7
#define EXP2_06_PIN PC7
#define EXP2_07_PIN PA4
#define EXP2_08_PIN PC6
#define EXP2_09_PIN PA5
#define EXP2_10_PIN PA6
//
// SPI / SD Card
//
#define SD_SCK_PIN EXP2_09_PIN
#define SD_MISO_PIN EXP2_10_PIN
#define SD_MOSI_PIN EXP2_05_PIN
#define SDSS EXP2_07_PIN
#define SD_DETECT_PIN EXP2_04_PIN
//
// LCD / Controller
//
#if ENABLED(FYSETC_242_OLED_12864)
#define BTN_EN1 PC9
#define BTN_EN2 PD1
#define BTN_ENC PA8
#define BTN_EN1 EXP1_10_PIN
#define BTN_EN2 EXP1_03_PIN
#define BTN_ENC EXP1_09_PIN
#define BEEPER_PIN PC6
#define BEEPER_PIN EXP2_08_PIN
#define LCD_PINS_DC PC12
#define LCD_PINS_RS PC7 // LCD_RST
#define DOGLCD_CS PD2
#define DOGLCD_MOSI PC10
#define DOGLCD_SCK PC11
#define LCD_PINS_DC EXP1_05_PIN
#define LCD_PINS_RS EXP2_06_PIN // LCD_RST
#define DOGLCD_CS EXP1_07_PIN
#define DOGLCD_MOSI EXP1_06_PIN
#define DOGLCD_SCK EXP1_08_PIN
#define DOGLCD_A0 LCD_PINS_DC
#define FORCE_SOFT_SPI
#define KILL_PIN -1 // NC
#define NEOPIXEL_PIN PD0
#define NEOPIXEL_PIN EXP1_04_PIN
#elif HAS_WIRED_LCD
#define BEEPER_PIN PC9
#define BTN_ENC PA8
#define BEEPER_PIN EXP1_10_PIN
#define BTN_ENC EXP1_09_PIN
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS PD0
#define LCD_PINS_RS EXP1_04_PIN
#define BTN_EN1 PC11
#define BTN_EN2 PC10
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_06_PIN
#define LCD_PINS_ENABLE PD1
#define LCD_PINS_D4 PC12
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#else
#define LCD_PINS_RS PD2
#define LCD_PINS_RS EXP1_07_PIN
#define BTN_EN1 PC6
#define BTN_EN2 PC7
#define BTN_EN1 EXP2_08_PIN
#define BTN_EN2 EXP2_06_PIN
#define LCD_SDSS PA4
#define LCD_SDSS EXP2_07_PIN
#define LCD_PINS_ENABLE PC11
#define LCD_PINS_D4 PC10
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#if ENABLED(FYSETC_MINI_12864)
// See https://wiki.fysetc.com/Mini12864_Panel
#define DOGLCD_CS PC11
#define DOGLCD_A0 PD2
#define DOGLCD_CS EXP1_08_PIN
#define DOGLCD_A0 EXP1_07_PIN
#if ENABLED(FYSETC_GENERIC_12864_1_1)
#define LCD_BACKLIGHT_PIN PD0
#define LCD_BACKLIGHT_PIN EXP1_04_PIN
#endif
#define LCD_RESET_PIN PC10 // Must be high or open for LCD to operate normally.
#define LCD_RESET_PIN EXP1_06_PIN // 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 PC12
#define RGB_LED_R_PIN EXP1_05_PIN
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PD0
#define RGB_LED_G_PIN EXP1_04_PIN
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PD1
#define RGB_LED_B_PIN EXP1_03_PIN
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN PC12
#define NEOPIXEL_PIN EXP1_05_PIN
#endif
#endif
#if IS_ULTIPANEL
#define LCD_PINS_D5 PC12
#define LCD_PINS_D6 PD0
#define LCD_PINS_D7 PD1
#define LCD_PINS_D5 EXP1_05_PIN
#define LCD_PINS_D6 EXP1_04_PIN
#define LCD_PINS_D7 EXP1_03_PIN
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
@ -287,15 +315,9 @@
// Alter timing for graphical display
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(640)
#endif
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(640)
#endif
#ifndef RGB_LED_R_PIN

Loading…
Cancel
Save