🎨 EXP headers, ST7920 delays (#22641)

This commit is contained in:
Scott Lahteine
2021-08-28 15:27:52 -05:00
committed by Scott Lahteine
parent 9b0e196ba2
commit 7704d84419
65 changed files with 626 additions and 692 deletions

View File

@ -80,6 +80,7 @@
#if IS_ULTRA_LCD && IS_NEWPANEL
#undef BEEPER_PIN
// TODO: Remap EXP1/2 based on adapter
#undef LCD_PINS_RS
#undef LCD_PINS_ENABLE
#undef LCD_PINS_D4
@ -107,6 +108,12 @@
#endif // IS_ULTRA_LCD && IS_NEWPANEL
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 0)
#define BOARD_ST7920_DELAY_2 DELAY_NS(188)
#define BOARD_ST7920_DELAY_3 DELAY_NS( 0)
#endif
/**
* M3/M4/M5 - Spindle/Laser Control
*

View File

@ -38,12 +38,10 @@
#define SPINDLE_DIR_PIN 67
#define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
#include "pins_RAMPS.h"
//
// Temperature Sensors
//
#undef TEMP_0_PIN
#undef TEMP_1_PIN
#define TEMP_0_PIN 9 // Analog Input
#define TEMP_1_PIN 11 // Analog Input
#include "pins_RAMPS.h"

View File

@ -123,3 +123,10 @@
#undef HEATER_BED_PIN
#define HEATER_BED_PIN 8
#endif
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 0)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 0)
#define BOARD_ST7920_DELAY_3 DELAY_NS(189)
#endif

View File

@ -39,10 +39,8 @@
#define FIL_RUNOUT2_PIN 14
#endif
//
// LCD delays
//
#if HAS_MARLINUI_U8GLIB
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#define BOARD_ST7920_DELAY_2 DELAY_NS(250)
#define BOARD_ST7920_DELAY_3 DELAY_NS(250)

View File

@ -198,14 +198,9 @@
#define LCD_PINS_D7 29
#endif
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(200)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(200)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(200)
#endif
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS(200)
#define BOARD_ST7920_DELAY_2 DELAY_NS(200)
#define BOARD_ST7920_DELAY_3 DELAY_NS(200)
#endif

View File

@ -60,30 +60,9 @@
//
// Steppers
//
#undef X_STEP_PIN
#undef X_DIR_PIN
#undef X_ENABLE_PIN
#define X_STEP_PIN 54
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38
#undef Y_STEP_PIN
#undef Y_DIR_PIN
#undef Y_ENABLE_PIN
#define Y_STEP_PIN 60
#define Y_DIR_PIN 61
#define Y_ENABLE_PIN 56
#undef Z_ENABLE_PIN
#define Z_ENABLE_PIN 63
#undef E0_STEP_PIN
#undef E0_DIR_PIN
#undef E0_ENABLE_PIN
#define E0_STEP_PIN 26
#define E0_DIR_PIN 28
#define E0_ENABLE_PIN 24
//
// Heaters / Fans
//

View File

@ -54,6 +54,9 @@
#include "pins_RAMPS.h"
#undef EXP2_03_PIN
#define EXP2_03_PIN -1 // RESET
//
// LCD / Controller
//
@ -81,19 +84,21 @@
*
* This configuration uses the following arrangement:
*
* EXP1 D37 = EN2 D35 = EN1 EXP2 D50 = MISO D52 = SCK
* D17 = BLUE D16 = RED D31 = ENC D53 = SDCS
* D23 = KILL D25 = BUZZ D33 = --- D51 = MOSI
* D27 = A0 D29 = LCS D49 = SDCD RST = ---
* GND = GND 5V = 5V GND = --- D41 = ---
* ------ ------
* ENCB |10 9 | ENCA MISO |10 9 | SCK
* BLUE_LED | 8 7 | RED_LED ENCBTN | 8 7 | SDCS
* KILL 6 5 | BEEPER 6 5 | MOSI
* A0 | 4 3 | LCD_CS SDCD | 4 3 |
* GND | 2 1 | 5V GND | 2 1 | NC
* ------ ------
* EXP1 EXP2
*/
#undef SD_DETECT_PIN
#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC
#undef DOGLCD_A0
#undef DOGLCD_CS
#undef SD_DETECT_PIN
#undef BEEPER_PIN
#undef KILL_PIN
#undef STAT_LED_RED_PIN
@ -102,46 +107,24 @@
//
// VIKI2 12-wire lead
//
#define SD_DETECT_PIN EXP2_04_PIN // SDCD orange/white
#define BTN_EN1 EXP1_09_PIN // ENCA white
#define BTN_EN2 EXP1_10_PIN // ENCB green
#define BTN_ENC EXP2_08_PIN // ENCBTN purple
#define DOGLCD_A0 EXP1_04_PIN // A0 brown
#define DOGLCD_CS EXP1_03_PIN // LCS green/white
// orange/white SDCD
#define SD_DETECT_PIN 49
// EXP2_10_PIN gray MISO
// EXP2_05_PIN yellow MOSI
// EXP2_09_PIN orange SCK
// white ENCA
#define BTN_EN1 35
// green ENCB
#define BTN_EN2 37
// purple ENCBTN
#define BTN_ENC 31
// brown A0
#define DOGLCD_A0 27
// green/white LCS
#define DOGLCD_CS 29
// 50 gray MISO
// 51 yellow MOSI
// 52 orange SCK
// blue SDCS
//#define SDSS 53
//#define SDSS EXP2_07_PIN // SDCS blue
//
// VIKI2 4-wire lead
//
// blue BTN
#define KILL_PIN 23
// green BUZZER
#define BEEPER_PIN 25
// yellow RED-LED
#define STAT_LED_RED_PIN 16
// white BLUE-LED
#define STAT_LED_BLUE_PIN 17
#define KILL_PIN EXP1_06_PIN // BTN blue
#define BEEPER_PIN EXP1_05_PIN // BUZZER green
#define STAT_LED_RED_PIN EXP1_07_PIN // RED-LED yellow
#define STAT_LED_BLUE_PIN EXP1_08_PIN // BLUE-LED white
#endif

View File

@ -120,14 +120,14 @@
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38
#ifndef X_CS_PIN
#define X_CS_PIN EXP2_07_PIN
#define X_CS_PIN AUX3_03_PIN
#endif
#define Y_STEP_PIN 60
#define Y_DIR_PIN 61
#define Y_ENABLE_PIN 56
#ifndef Y_CS_PIN
#define Y_CS_PIN EXP2_04_PIN
#define Y_CS_PIN AUX3_07_PIN
#endif
#ifndef Z_STEP_PIN
@ -242,7 +242,7 @@
// Misc. Functions
//
#ifndef SDSS
#define SDSS EXP2_07_PIN
#define SDSS AUX3_03_PIN
#endif
#define LED_PIN 13
@ -424,58 +424,79 @@
#endif
//
// Aux 3 GND D52 D50 5V
// NC D53 D51 D49
// AUX3 : GND D52 D50 5V
// NC D53 D51 D49
#define AUX3_03_PIN 53
#define AUX3_04_PIN 52
#define AUX3_05_PIN 51
#define AUX3_06_PIN 50
#define AUX3_07_PIN 49
//
// Aux 4 D16 D17 D23 D25 D27 D29 D31 D33 D35 D37 D39 D41 D43 D45 D47 D32 GND 5V
// AUX4 : D16 D17 D23 D25 D27 D29 D31 D33 D35 D37 D39 D41 D43 D45 D47 D32 GND 5V
//
#define AUX4_03_PIN 32
#define AUX4_04_PIN 47
#define AUX4_05_PIN 45
#define AUX4_06_PIN 43
#define AUX4_07_PIN 41
#define AUX4_08_PIN 39
#define AUX4_09_PIN 37
#define AUX4_10_PIN 35
#define AUX4_11_PIN 33
#define AUX4_12_PIN 31
#define AUX4_13_PIN 29
#define AUX4_14_PIN 27
#define AUX4_15_PIN 25
#define AUX4_16_PIN 23
#define AUX4_17_PIN 17
#define AUX4_18_PIN 16
/**
* LCD adapter. Please note: These comes in two variants. The socket keys can be
* LCD adapter. NOTE: These come in two variants. The socket keys can be
* on either side, and may be backwards on some boards / displays.
* ----- -----
* D37 |10 9 | D35 (MISO) D50 |10 9 | D52 (SCK)
* D17 | 8 7 | D16 D31 | 8 7 | D53
* D23 6 5 D25 D33 6 5 D51 (MOSI)
* D27 | 4 3 | D29 D49 | 4 3 | D41
* GND | 2 1 | 5V GND | 2 1 | NC
* ----- -----
* EXP1 EXP2
* ------ ------
* D37 |10 9 | D35 (MISO) D50 |10 9 | D52 (SCK)
* D17 | 8 7 | D16 D31 | 8 7 | D53
* D23 6 5 D25 D33 6 5 D51 (MOSI)
* D27 | 4 3 | D29 D49 | 4 3 | D41
* GND | 2 1 | 5V GND | 2 1 | NC
* ------ ------
* EXP1 EXP2
*/
#ifndef EXP1_03_PIN
#define EXP1_03_PIN 29
#define EXP1_04_PIN 27
#define EXP1_05_PIN 25
#define EXP1_06_PIN 23
#define EXP1_07_PIN 16
#define EXP1_08_PIN 17
#define EXP1_09_PIN 35
#define EXP1_10_PIN 37
#define EXP1_03_PIN AUX4_13_PIN
#define EXP1_04_PIN AUX4_14_PIN
#define EXP1_05_PIN AUX4_15_PIN
#define EXP1_06_PIN AUX4_16_PIN
#define EXP1_07_PIN AUX4_18_PIN
#define EXP1_08_PIN AUX4_17_PIN
#define EXP1_09_PIN AUX4_10_PIN
#define EXP1_10_PIN AUX4_09_PIN
#define EXP2_03_PIN 41
#define EXP2_04_PIN 49
#define EXP2_05_PIN 51
#define EXP2_06_PIN 33
#define EXP2_07_PIN 53
#define EXP2_08_PIN 31
#define EXP2_09_PIN 52
#define EXP2_10_PIN 50
#define EXP2_03_PIN AUX4_07_PIN
#define EXP2_04_PIN AUX3_07_PIN
#define EXP2_05_PIN AUX3_05_PIN
#define EXP2_06_PIN AUX4_11_PIN
#define EXP2_07_PIN AUX3_03_PIN
#define EXP2_08_PIN AUX4_12_PIN
#define EXP2_09_PIN AUX3_04_PIN
#define EXP2_10_PIN AUX3_06_PIN
#endif
//////////////////////////
// LCDs and Controllers //
//////////////////////////
// GLCD features
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#if HAS_WIRED_LCD
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
//
// LCD Display output pins
//
@ -587,7 +608,7 @@
#endif
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
#define LCD_BACKLIGHT_PIN 39
#define LCD_BACKLIGHT_PIN AUX4_08_PIN
#endif
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
@ -599,9 +620,9 @@
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47
#define BTN_EN2 43
#define BTN_ENC 32
#define BTN_EN1 AUX4_04_PIN
#define BTN_EN2 AUX4_06_PIN
#define BTN_ENC AUX4_03_PIN
#define LCD_SDSS SDSS
#define KILL_PIN EXP2_03_PIN
@ -725,13 +746,23 @@
// Pins only defined for RAMPS_SMART currently
#elif ENABLED(G3D_PANEL)
#define BEEPER_PIN EXP2_06_PIN
#define SD_DETECT_PIN EXP2_04_PIN
#define KILL_PIN EXP2_03_PIN
#define BTN_EN1 EXP1_10_PIN
#define BTN_EN2 EXP1_09_PIN
#define BTN_ENC EXP2_08_PIN
#elif IS_TFTGLCD_PANEL
#define SD_DETECT_PIN EXP2_04_PIN
#else
// Beeper on AUX-4
#define BEEPER_PIN EXP2_06_PIN
// Buttons are directly attached to AUX-2
@ -745,11 +776,6 @@
#define BTN_ENC EXP2_08_PIN
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN EXP2_04_PIN
#define KILL_PIN EXP2_03_PIN
#endif
#endif
#endif // IS_NEWPANEL