Skip to content

Commit

Permalink
♻️ Migrate ANET_FULL_GRAPHICS_LCD
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Apr 8, 2023
1 parent 84194bf commit 76ecb3a
Show file tree
Hide file tree
Showing 4 changed files with 168 additions and 155 deletions.
42 changes: 6 additions & 36 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,47 +221,17 @@

// Migrated to pins_lcd.h

#elif HAS_WIRED_LCD
#if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
#error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING only applies to the ANET 1.0 board."
#elif ENABLED(ANET_FULL_GRAPHICS_LCD)

#elif ENABLED(ANET_FULL_GRAPHICS_LCD)
// Migrated to pins_lcd.h

#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_3.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
#elif ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING)

/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
* 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.)
* 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
*
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
*
* The ANET_FULL_GRAPHICS_LCD connector plug:
*
* BEFORE AFTER
* ------ ------
* (CLK) | 1 2 | (BEEPER) (BEEPER) |10 9 | --
* -- | 3 4 | (BTN_ENC) (BTN_ENC) | 8 7 | (CLK)
* (SID) 5 6 | (BTN_EN1) (BTN_EN1) 6 5 | (SID)
* (CS) | 7 8 | (BTN_EN2) (BTN_EN2) | 4 3 | (CS)
* GND | 9 10 | 5V GND | 2 1 | 5V
* ------ ------
* LCD LCD
*/

#define LCD_PINS_RS EXP1_08_PIN
#error "ANET_FULL_GRAPHICS_LCD_ALT_WIRING only applies to the ANET 1.0 board."

#define BTN_EN1 EXP1_05_PIN
#define BTN_EN2 EXP1_07_PIN
#define BTN_ENC EXP1_03_PIN

#define LCD_PINS_EN EXP1_06_PIN
#define LCD_PINS_D4 EXP1_04_PIN
#elif HAS_WIRED_LCD

#elif ENABLED(WYH_L12864)
#if ENABLED(WYH_L12864)

#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! WYH_L12864 requires wiring modifications. See 'pins_BTT_SKR_V1_3.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
Expand Down
77 changes: 5 additions & 72 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@

// Migrated to pins_lcd.h

#elif EITHER(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING)

// Migrated to pins_lcd.h

#elif HAS_DWIN_E3V2 || IS_DWIN_MARLINUI

// RET6 DWIN ENCODER LCD
Expand All @@ -290,78 +294,7 @@

#elif HAS_WIRED_LCD

#if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ANET_FULL_GRAPHICS_LCD_ALT_WIRING requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif

/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
*
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
*
* The ANET_FULL_GRAPHICS_LCD_ALT_WIRING connector plug:
*
* BEFORE AFTER
* ------ ------
* (BEEPER) | 1 2 | (CLK) (BEEPER) |10 9 | (CLK)
* (BTN_ENC) | 3 4 | -- (BTN_ENC) | 8 7 | --
* (BTN_EN1) 5 6 | (SID) (BTN_EN1) 6 5 | (SID)
* (BTN_EN2) | 7 8 | (CS) (BTN_EN2) | 4 3 | (CS)
* 5V | 9 10 | GND GND | 2 1 | 5V
* ------ ------
* LCD LCD
*/

#define LCD_PINS_RS EXP1_04_PIN

#define BTN_EN1 EXP1_06_PIN
#define BTN_EN2 EXP1_07_PIN
#define BTN_ENC EXP1_01_PIN

#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define BEEPER_PIN EXP1_08_PIN

#elif ENABLED(ANET_FULL_GRAPHICS_LCD)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif

/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
* 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.)
* 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
*
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
*
* The ANET_FULL_GRAPHICS_LCD connector plug:
*
* BEFORE AFTER
* ------ ------
* (BEEPER) | 1 2 | (CLK) (BEEPER) |10 9 | --
* (BTN_ENC) | 3 4 | -- (BTN_ENC) | 8 7 | (CLK)
* (BTN_EN1) 5 6 | (SID) (BTN_EN1) 6 5 | (SID)
* (BTN_EN2) | 7 8 | (CS) (BTN_EN2) | 4 3 | (CS)
* 5V | 9 10 | GND GND | 2 1 | 5V
* ------ ------
* LCD LCD
*/

#define LCD_PINS_RS EXP1_08_PIN

#define BTN_EN1 EXP1_05_PIN
#define BTN_EN2 EXP1_07_PIN
#define BTN_ENC EXP1_03_PIN

#define LCD_PINS_EN EXP1_06_PIN
#define LCD_PINS_D4 EXP1_04_PIN

#define BEEPER_PIN EXP1_01_PIN

#elif ENABLED(ENDER2_STOCKDISPLAY)
#if ENABLED(ENDER2_STOCKDISPLAY)

/** Creality Ender-2 display pinout
* ------
Expand Down
74 changes: 74 additions & 0 deletions Marlin/src/pins/pins_lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,80 @@

#endif

#elif ENABLED(ANET_FULL_GRAPHICS_LCD) && !defined(LCD_PINS_EN)

// IS_RRD_FG_SC ... (as above)

/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
* 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.)
* 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
*
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
*
* The ANET_FULL_GRAPHICS_LCD connector plug:
*
* BEFORE AFTER
* ------ ------
* (BEEPER) | 1 2 | (CLK) (BEEPER) |10 9 | --
* (BTN_ENC) | 3 4 | -- (BTN_ENC) | 8 7 | (CLK)
* (BTN_EN1) 5 6 | (SID) (BTN_EN1) 6 5 | (SID)
* (BTN_EN2) | 7 8 | (CS) (BTN_EN2) | 4 3 | (CS)
* 5V | 9 10 | GND GND | 2 1 | 5V
* ------ ------
* LCD LCD
*/
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_lcd.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif

#define BEEPER_PIN EXP1_01_PIN

#define BTN_ENC EXP1_03_PIN
#define BTN_EN1 EXP1_05_PIN
#define BTN_EN2 EXP1_07_PIN

#define LCD_PINS_D4 EXP1_04_PIN
#define LCD_PINS_EN EXP1_06_PIN
#define LCD_PINS_RS EXP1_08_PIN

#elif ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) && !defined(LCD_PINS_EN)

// IS_RRD_FG_SC ... (as above)

/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
*
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
*
* The ANET_FULL_GRAPHICS_LCD_ALT_WIRING connector plug:
*
* BEFORE AFTER
* ------ ------
* (BEEPER) | 1 2 | (CLK) (BEEPER) |10 9 | (CLK)
* (BTN_ENC) | 3 4 | -- (BTN_ENC) | 8 7 | --
* (BTN_EN1) 5 6 | (SID) (BTN_EN1) 6 5 | (SID)
* (BTN_EN2) | 7 8 | (CS) (BTN_EN2) | 4 3 | (CS)
* 5V | 9 10 | GND GND | 2 1 | 5V
* ------ ------
* LCD LCD
*/
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ANET_FULL_GRAPHICS_LCD_ALT_WIRING requires wiring modifications. See 'pins_lcd.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif

#define BEEPER_PIN EXP1_08_PIN

#define BTN_ENC EXP1_01_PIN
#define BTN_EN1 EXP1_06_PIN
#define BTN_EN2 EXP1_07_PIN

#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_D4 EXP1_05_PIN

#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) && !defined(LCD_PINS_EN)

// DOGLCD IS_U8GLIB_ST7920 IS_ULTIPANEL HAS_WIRED_LCD IS_NEWPANEL HAS_MARLINUI_MENU
Expand Down
Loading

0 comments on commit 76ecb3a

Please sign in to comment.