Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FYSETC S6 pins #16559

Merged
merged 4 commits into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1944,10 +1944,11 @@
// FYSETC variant of the MINI12864 graphic controller with SD support
// https://wiki.fysetc.com/Mini12864_Panel/
//
//#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default
//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on)
//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight
//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight
//#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default
//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on)
//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight
//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight
//#define FYSETC_GENERIC_12864_1_1 // Larger display with basic ON/OFF backlight.

//
// Factory display for Creality CR-10
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@

#define MINIPANEL

#elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
#elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1)

#define FYSETC_MINI_12864
#define DOGLCD
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define _LCD_CONTRAST_MIN 120
#define _LCD_CONTRAST_INIT 195
#elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
#elif ENABLED(FYSETC_MINI_12864)
#define _LCD_CONTRAST_INIT 220
#elif ENABLED(ULTI_CONTROLLER)
#define _LCD_CONTRAST_INIT 127
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -1904,6 +1904,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
+ ENABLED(FYSETC_MINI_12864_1_2) \
+ ENABLED(FYSETC_MINI_12864_2_0) \
+ ENABLED(FYSETC_MINI_12864_2_1) \
+ ENABLED(FYSETC_GENERIC_12864_1_1) \
+ ENABLED(CR10_STOCKDISPLAY) \
+ ENABLED(ANET_FULL_GRAPHICS_LCD) \
+ ENABLED(AZSMZ_12864) \
Expand Down
6 changes: 4 additions & 2 deletions Marlin/src/pins/ramps/pins_FYSETC_F6_13.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,11 @@
#define DOGLCD_A0 16
#define DOGLCD_CS 17

#define LCD_BACKLIGHT_PIN -1
#define KILL_PIN 41
#if ENABLED(FYSETC_GENERIC_12864_1_1)
#define LCD_BACKLIGHT_PIN 27
#endif

#define KILL_PIN 41
#define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally.
// Seems to work best if left open.

Expand Down
136 changes: 77 additions & 59 deletions Marlin/src/pins/stm32/pins_FYSETC_S6.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
//
#define FLASH_EEPROM_EMULATION
//#define SRAM_EEPROM_EMULATION
//#define I2C_EEPROM
#ifdef I2C_EEPROM
#undef E2END // Defined in Arduino Core STM32 to be used with EEPROM emulation. This board uses a real EEPROM.
#define E2END 0xFFF // 4KB
#endif

//
// Limit Switches
Expand Down Expand Up @@ -93,9 +98,9 @@
#define E2_CS_PIN PC15

#if HAS_TMC220x
/**
* TMC2208/TMC2209 stepper drivers
*/
//
// TMC2208/TMC2209 stepper drivers
//

//
// Software serial
Expand Down Expand Up @@ -159,70 +164,83 @@
//
// LCD / Controller
//
#if HAS_SPI_LCD
#define BEEPER_PIN PC9
#define BTN_ENC PA8

#define BEEPER_PIN PC9
#define SD_DETECT_PIN PB10

#if ENABLED(FYSETC_MINI_12864)
//
// See https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8
//
#define DOGLCD_A0 PD2
#define DOGLCD_CS PC11

//#define LCD_BACKLIGHT_PIN -1
//#define KILL_PIN -1
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS PD0

#define BTN_EN1 PC11
#define BTN_EN2 PC10

#define LCD_PINS_ENABLE PD1
#define LCD_PINS_D4 PC12

// CR10_Stock Display needs a different delay setting on SKR PRO v1.1, so undef it here.
// It will be defined again at the #HAS_GRAPHICAL_LCD section below.
#undef ST7920_DELAY_1
#undef ST7920_DELAY_2
#undef ST7920_DELAY_3

#else

#define LCD_PINS_RS PD2

#define BTN_EN1 PC6
#define BTN_EN2 PC7
#define SD_DETECT_PIN PB10

#define LCD_SDSS PA4

#define LCD_PINS_ENABLE PC11
#define LCD_PINS_D4 PC10

#if ENABLED(FYSETC_MINI_12864)
// See https://wiki.fysetc.com/Mini12864_Panel
#define DOGLCD_CS PC11
#define DOGLCD_A0 PD2
#if ENABLED(FYSETC_GENERIC_12864_1_1)
#define LCD_BACKLIGHT_PIN PD0
#endif
#define LCD_RESET_PIN PC10 // 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
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PD0
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PD1
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN PC12
#endif
#endif // !FYSETC_MINI_12864

#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 PC12
#define LCD_PINS_D6 PD0
#define LCD_PINS_D7 PD1
#endif

#define LCD_RESET_PIN PC10 // Must be high or open for LCD to operate normally.
// Seems to work best if left open.
#endif

#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PC12
// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(96)
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PD0
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PD1
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(600)
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN PC12
#endif

#elif HAS_GRAPHICAL_LCD
#define LCD_PINS_RS PD2
#define LCD_PINS_ENABLE PC11
#define LCD_PINS_D4 PC10
#define LCD_PINS_D5 PC12
#define LCD_PINS_D6 PD0
#define LCD_PINS_D7 PD1

#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS PC12
#define DOGLCD_A0 PD0
#endif

#endif

#if ENABLED(NEWPANEL)
#define BTN_EN1 PC6
#define BTN_EN2 PC7
#define BTN_ENC PA8
#endif

// Alter timing for graphical display
#if HAS_GRAPHICAL_LCD
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(103)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(51)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(642)
#endif
#endif
#endif // HAS_SPI_LCD

#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PB6
Expand Down