🎨 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

@ -39,6 +39,19 @@
#include <avr/interrupt.h>
#include <avr/io.h>
//
// Default graphical display delays
//
#if F_CPU >= 20000000
#define CPU_ST7920_DELAY_1 DELAY_NS(150)
#define CPU_ST7920_DELAY_2 DELAY_NS( 0)
#define CPU_ST7920_DELAY_3 DELAY_NS(150)
#elif F_CPU == 16000000
#define CPU_ST7920_DELAY_1 DELAY_NS(125)
#define CPU_ST7920_DELAY_2 DELAY_NS( 0)
#define CPU_ST7920_DELAY_3 DELAY_NS(188)
#endif
#ifndef pgm_read_ptr
// Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for
// Windows Subsystem for Linux on Windows 10 as of 10/18/2019

View File

@ -63,9 +63,9 @@ uint8_t _getc();
extern MSerialT usb_serial;
#define MYSERIAL1 usb_serial
#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
//
// Interrupts

View File

@ -50,15 +50,9 @@ extern "C" volatile uint32_t _millis;
//
// Default graphical display delays
//
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(600)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(750)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(750)
#endif
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1;
extern DefaultSerial1 USBSerial;

View File

@ -99,9 +99,9 @@ extern MSerialT serial_stream_3;
#endif
#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
//
// Interrupts

View File

@ -37,6 +37,13 @@
#include <stdint.h>
//
// Default graphical display delays
//
#define CPU_ST7920_DELAY_1 DELAY_NS(300)
#define CPU_ST7920_DELAY_2 DELAY_NS( 40)
#define CPU_ST7920_DELAY_3 DELAY_NS(340)
//
// Serial Ports
//

View File

@ -51,6 +51,13 @@
// Defines
// ------------------------
//
// Default graphical display delays
//
#define CPU_ST7920_DELAY_1 DELAY_NS(300)
#define CPU_ST7920_DELAY_2 DELAY_NS( 40)
#define CPU_ST7920_DELAY_3 DELAY_NS(340)
#ifndef STM32_FLASH_SIZE
#if ANY(MCU_STM32F103RE, MCU_STM32F103VE, MCU_STM32F103ZE)
#define STM32_FLASH_SIZE 512

View File

@ -36,9 +36,9 @@
#include <stdint.h>
#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
//#undef MOTHERBOARD
//#define MOTHERBOARD BOARD_TEENSY31_32

View File

@ -37,9 +37,9 @@
#include <stdint.h>
#include <util/atomic.h>
#define ST7920_DELAY_1 DELAY_NS(600)
#define ST7920_DELAY_2 DELAY_NS(750)
#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
// ------------------------
// Defines

View File

@ -41,9 +41,9 @@
#include "../../feature/ethernet.h"
#endif
//#define ST7920_DELAY_1 DELAY_NS(600)
//#define ST7920_DELAY_2 DELAY_NS(750)
//#define ST7920_DELAY_3 DELAY_NS(750)
#define CPU_ST7920_DELAY_1 DELAY_NS(600)
#define CPU_ST7920_DELAY_2 DELAY_NS(750)
#define CPU_ST7920_DELAY_3 DELAY_NS(750)
// ------------------------
// Defines

View File

@ -237,11 +237,18 @@
#elif ENABLED(CR10_STOCKDISPLAY)
#define IS_RRD_FG_SC 1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#define LCD_ST7920_DELAY_1 DELAY_NS(125)
#define LCD_ST7920_DELAY_2 DELAY_NS(125)
#define LCD_ST7920_DELAY_3 DELAY_NS(125)
#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING, BQ_LCD_SMART_CONTROLLER, K3D_FULL_GRAPHIC_SMART_CONTROLLER)
#elif ENABLED(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING)
#define IS_RRD_FG_SC 1
#define LCD_ST7920_DELAY_1 DELAY_NS(150)
#define LCD_ST7920_DELAY_2 DELAY_NS(150)
#define LCD_ST7920_DELAY_3 DELAY_NS(150)
#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, BQ_LCD_SMART_CONTROLLER, K3D_FULL_GRAPHIC_SMART_CONTROLLER)
#define IS_RRD_FG_SC 1

View File

@ -33,60 +33,6 @@
#include "ultralcd_st7920_u8glib_rrd_AVR.h"
#if F_CPU >= 20000000
#define CPU_ST7920_DELAY_1 DELAY_NS(150)
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
#define CPU_ST7920_DELAY_3 DELAY_NS(150)
#elif MB(3DRAG, K8200, K8400)
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
#define CPU_ST7920_DELAY_2 DELAY_NS(188)
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
#elif MB(MINIRAMBO, EINSY_RAMBO, EINSY_RETRO, SILVER_GATE)
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
#define CPU_ST7920_DELAY_2 DELAY_NS(250)
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
#elif MB(RAMBO)
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
#elif MB(BQ_ZUM_MEGA_3D)
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
#define CPU_ST7920_DELAY_3 DELAY_NS(189)
#elif defined(ARDUINO_ARCH_STM32)
#define CPU_ST7920_DELAY_1 DELAY_NS(300)
#define CPU_ST7920_DELAY_2 DELAY_NS(40)
#define CPU_ST7920_DELAY_3 DELAY_NS(340)
#elif F_CPU == 16000000
#define CPU_ST7920_DELAY_1 DELAY_NS(125)
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
#define CPU_ST7920_DELAY_3 DELAY_NS(188)
#else
#error "No valid condition for delays in 'ultralcd_st7920_u8glib_rrd_AVR.h'"
#endif
#ifndef ST7920_DELAY_1
#ifdef BOARD_ST7920_DELAY_1
#define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
#else
#define ST7920_DELAY_1 CPU_ST7920_DELAY_1
#endif
#endif
#ifndef ST7920_DELAY_2
#ifdef BOARD_ST7920_DELAY_2
#define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
#else
#define ST7920_DELAY_2 CPU_ST7920_DELAY_2
#endif
#endif
#ifndef ST7920_DELAY_3
#ifdef BOARD_ST7920_DELAY_3
#define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
#else
#define ST7920_DELAY_3 CPU_ST7920_DELAY_3
#endif
#endif
// Optimize this code with -O3
#pragma GCC optimize (3)

View File

@ -122,7 +122,7 @@
// LCDs and Controllers //
//////////////////////////
#if HAS_MARLINUI_U8GLIB
#if HAS_WIRED_LCD
#define LCD_PINS_RS 13
#define LCD_PINS_ENABLE 17

View File

@ -63,7 +63,6 @@
* ------ ------
* EXP2 EXP1
*/
#define EXP1_03_PIN -1
#define EXP1_04_PIN -1
#define EXP1_05_PIN -1

View File

@ -184,16 +184,15 @@
#endif
/**
* ------ ------
* NC | 1 2 | GND 5V | 1 2 | GND
* RESET | 3 4 | 1.31 (SD_DETECT) (LCD_D7) 1.23 | 3 4 | 1.22 (LCD_D6)
* (MOSI) 0.18 | 5 6 3.25 (BTN_EN2) (LCD_D5) 1.21 | 5 6 1.20 (LCD_D4)
* (SD_SS) 0.16 | 7 8 | 3.26 (BTN_EN1) (LCD_RS) 1.19 | 7 8 | 1.18 (LCD_EN)
* (SCK) 0.15 | 9 10 | 0.17 (MISO) (BTN_ENC) 0.28 | 9 10 | 1.30 (BEEPER)
* ------ ------
* EXP2 EXP1
* ------ ------
* (BEEPER) 1.30 |10 9 | 0.28 (BTN_ENC) (MISO) 0.17 |10 9 | 0.15 (SCK)
* (LCD_EN) 1.18 | 8 7 | 1.19 (LCD_RS) (BTN_EN1) 3.26 | 8 7 | 0.16 (SD_SS)
* (LCD_D4) 1.20 6 5 | 1.21 (LCD_D5) (BTN_EN2) 3.25 6 5 | 0.18 (MOSI)
* (LCD_D6) 1.22 | 4 3 | 1.23 (LCD_D7) (SD_DETECT) 1.31 | 4 3 | RESET
* GND | 2 1 | 5V GND | 2 1 | NC
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN P1_23
#define EXP1_04_PIN P1_22
#define EXP1_05_PIN P1_21

View File

@ -239,16 +239,15 @@
#define TMC_BAUD_RATE 19200
#endif
/** ------ ------
* NC | 1 2 | GND 5V | 1 2 | GND
* RESET | 3 4 | 1.31 1.23 | 3 4 | 1.22
* 0.18 | 5 6 3.25 1.21 | 5 6 1.20
* 0.16 | 7 8 | 3.26 1.19 | 7 8 | 1.18
* 0.15 | 9 10| 0.17 0.28 | 9 10| 1.30
* ------ ------
* EXP2 EXP1
/** ------ ------
* 1.30 |10 9 | 0.28 0.17 |10 9 | 0.15
* 1.18 | 8 7 | 1.19 3.26 | 8 7 | 0.16
* 1.20 6 5 | 1.21 3.25 6 5 | 0.18
* 1.22 | 4 3 | 1.23 1.31 | 4 3 | RESET
* GND | 2 1 | 5V GND | 2 1 | NC
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN P1_23
#define EXP1_04_PIN P1_22
#define EXP1_05_PIN P1_21
@ -258,7 +257,7 @@
#define EXP1_09_PIN P0_28
#define EXP1_10_PIN P1_30
#define EXP2_03_PIN -1
#define EXP2_03_PIN -1 // RESET
#define EXP2_04_PIN P1_31
#define EXP2_05_PIN P0_18
#define EXP2_06_PIN P3_25

View File

@ -237,7 +237,6 @@
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN P1_22
#define EXP1_04_PIN P1_00
#define EXP1_05_PIN P0_17

View File

@ -188,7 +188,6 @@
* ------
* EXP
*/
#define EXP1_03_PIN P0_18
#define EXP1_04_PIN P0_17
#define EXP1_05_PIN P0_15

View File

@ -119,7 +119,7 @@
//
// LCD / Controller
//
#if HAS_MARLINUI_U8GLIB
#if HAS_WIRED_LCD
// OVERLORD OLED pins
#define LCD_PINS_RS 20
#define LCD_PINS_D5 21

View File

@ -72,7 +72,7 @@
#define HEATER_BED_PIN 8
#define TEMP_BED_PIN 6
#if HAS_MARLINUI_U8GLIB
#if HAS_WIRED_LCD
#if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920
#define LCD_PINS_RS 30
#define LCD_PINS_ENABLE 20
@ -86,6 +86,9 @@
#define KILL_PIN 21
#define HOME_PIN 28
#endif
#define BOARD_ST7920_DELAY_1 DELAY_NS( 0)
#define BOARD_ST7920_DELAY_2 DELAY_NS(250)
#define BOARD_ST7920_DELAY_3 DELAY_NS( 0)
#endif
#endif

View File

@ -1221,23 +1221,47 @@
//
// Default DOGLCD SPI delays
//
#if HAS_MARLINUI_U8GLIB
#if !defined(ST7920_DELAY_1) && defined(BOARD_ST7920_DELAY_1)
#define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
#if ENABLED(U8GLIB_ST7920)
#ifndef ST7920_DELAY_1
#ifdef LCD_ST7920_DELAY_1
#define ST7920_DELAY_1 LCD_ST7920_DELAY_1
#elif defined(BOARD_ST7920_DELAY_1)
#define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
#elif defined(CPU_ST7920_DELAY_1)
#define ST7920_DELAY_1 CPU_ST7920_DELAY_1
#endif
#endif
#if !defined(ST7920_DELAY_2) && defined(BOARD_ST7920_DELAY_2)
#define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
#ifndef ST7920_DELAY_2
#ifdef LCD_ST7920_DELAY_2
#define ST7920_DELAY_2 LCD_ST7920_DELAY_2
#elif defined(BOARD_ST7920_DELAY_2)
#define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
#elif defined(CPU_ST7920_DELAY_2)
#define ST7920_DELAY_2 CPU_ST7920_DELAY_2
#endif
#endif
#if !defined(ST7920_DELAY_3) && defined(BOARD_ST7920_DELAY_3)
#define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
#ifndef ST7920_DELAY_3
#ifdef LCD_ST7920_DELAY_3
#define ST7920_DELAY_3 LCD_ST7920_DELAY_3
#elif defined(BOARD_ST7920_DELAY_3)
#define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
#elif defined(CPU_ST7920_DELAY_3)
#define ST7920_DELAY_3 CPU_ST7920_DELAY_3
#endif
#endif
#else
#undef ST7920_DELAY_1
#undef ST7920_DELAY_2
#undef ST7920_DELAY_3
#undef LCD_ST7920_DELAY_1
#undef LCD_ST7920_DELAY_2
#undef LCD_ST7920_DELAY_3
#undef BOARD_ST7920_DELAY_1
#undef BOARD_ST7920_DELAY_2
#undef BOARD_ST7920_DELAY_3
#undef CPU_ST7920_DELAY_1
#undef CPU_ST7920_DELAY_2
#undef CPU_ST7920_DELAY_3
#endif
#if !NEED_CASE_LIGHT_PIN

View File

@ -205,4 +205,10 @@
#endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
#endif // HAS_WIRED_LCD
#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( 0)
#endif
#undef MK3_FAN_PINS

View File

@ -199,3 +199,10 @@
#endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE
#endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE
// 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( 0)
#endif

View File

@ -69,7 +69,7 @@
#define E0_DIR_PIN 43
#define E0_ENABLE_PIN 26
// Microstepping pins - Mapping not from fastio.h (?)
// Microstepping pins
#define X_MS1_PIN 40
#define X_MS2_PIN 41
#define Y_MS1_PIN 69
@ -192,3 +192,9 @@
#endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL
#endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL
#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( 0)
#endif

View File

@ -268,3 +268,10 @@
#endif // !IS_NEWPANEL
#endif // HAS_WIRED_LCD
// 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(0)
#endif

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

View File

@ -31,4 +31,17 @@
#define IS_MELZI 1
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS( 0)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(188)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS( 0)
#endif
#endif
#include "pins_SANGUINOLOLU_12.h"

View File

@ -36,16 +36,10 @@
#define BOARD_INFO_NAME "Melzi (Creality)"
// Alter timing for graphical display
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#include "pins_MELZI.h"
@ -137,11 +131,11 @@
/**
* EXP1 Connector EXP1 as CR10 STOCKDISPLAY
* ----- -----
* PA4 | 6 5 | PC0 BEEPER_PIN | 6 5 | BTN_ENC
* PD3 | 7 4 | RESET BTN_EN1 | 7 4 | RESET
* PD2 8 3 | PA1 BTN_EN2 8 3 | LCD_PINS_D4 (ST9720 CLK)
* PA3 | 9 2 | PC1 (ST9720 CS) LCD_PINS_RS | 9 2 | LCD_PINS_ENABLE (ST9720 DAT)
* GND |10 1 | 5V GND |10 1 | 5V
* ----- -----
* ------ ------
* PA4 |10 9 | PC0 BEEPER_PIN |10 9 | BTN_ENC
* PD3 | 8 7 | RESET BTN_EN1 | 8 7 | RESET
* PD2 6 5 | PA1 BTN_EN2 6 5 | LCD_PINS_D4 (ST9720 CLK)
* PA3 | 4 3 | PC1 (ST9720 CS) LCD_PINS_RS | 4 3 | LCD_PINS_ENABLE (ST9720 DAT)
* GND | 2 1 | 5V GND | 2 1 | 5V
* ------ ------
*/

View File

@ -27,19 +27,6 @@
#define BOARD_INFO_NAME "Melzi (Malyan)"
// Alter timing for graphical display
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#endif
#include "pins_MELZI.h"
#undef LCD_SDSS

View File

@ -27,16 +27,11 @@
#define BOARD_INFO_NAME "Melzi (Tronxy)"
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#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(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS( 0)
#endif
#include "pins_MELZI.h"

View File

@ -24,16 +24,11 @@
#define BOARD_INFO_NAME "Melzi V2"
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(400)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#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(400)
#define BOARD_ST7920_DELAY_3 DELAY_NS( 0)
#endif
#include "pins_MELZI.h"

View File

@ -165,16 +165,6 @@
#define KILL_PIN 10
#define BEEPER_PIN 27
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(188)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#endif
#elif ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
#if IS_MELZI
@ -185,19 +175,6 @@
// Marlin so this can be used for BEEPER_PIN. You can use this pin
// with M42 instead of BEEPER_PIN.
#define BEEPER_PIN 27
#if IS_RRD_FG_SC
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(0)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(188)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(0)
#endif
#endif
#else // Sanguinololu >=1.3
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17

View File

@ -189,10 +189,9 @@
#endif
#define LCD_PINS_D4 10 // ST7920_CLK_PIN LCD_PIN_ENABLE (PIN6 of LCD module)
// Alter timing for graphical display
#define ST7920_DELAY_1 DELAY_2_NOP
#define ST7920_DELAY_2 DELAY_2_NOP
#define ST7920_DELAY_3 DELAY_2_NOP
#define BOARD_ST7920_DELAY_1 DELAY_2_NOP
#define BOARD_ST7920_DELAY_2 DELAY_2_NOP
#define BOARD_ST7920_DELAY_3 DELAY_2_NOP
#elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306)
//

View File

@ -68,7 +68,7 @@
#define E0_DIR_PIN PB0
#define E0_ENABLE_PIN PC4
#if ENABLED(TMC_USE_SW_SPI)
#if ENABLED(TMC_USE_SW_SPI) // Shared with EXP2
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PB3
#endif
@ -93,33 +93,48 @@
#define TEMP_BED_PIN PB1 // Analog Input
#define TEMP_0_PIN PA0 // Analog Input
//
// LCD Pins
//
/**
* ----- -----
* NC | · · | GND 5V | · · | GND
* RESET | · · | PB9 (SD_DETECT) (LCD_D7) PC14 | · · | PC15 (LCD_D6)
* (MOSI) PB5 | · · | PB8 (BTN_EN2) (LCD_D5) PB7 | · · | PC13 (LCD_D4)
* (SD_SS) PA15 | · · | PD2 (BTN_EN1) (LCD_RS) PC12 | · · | PB6 (LCD_EN)
* (SCK) PB3 | · · | PB4 (MISO) (BTN_ENC) PC11 | · · | PC10 (BEEPER)
* ----- -----
* EXP2 EXP1
/** ------ ------
* (BEEPER) PC10 |10 9 | PC11 (BTN_ENC) (MISO) PB4 |10 9 | PB3 (SCK)
* (LCD_EN) PB6 | 8 7 | PC12 (LCD_RS) (BTN_EN1) PD2 | 8 7 | PA15 (SD_SS)
* (LCD_D4) PC13 | 6 5 | PB7 (LCD_D5) (BTN_EN2) PB8 | 6 5 | PB5 (MOSI)
* (LCD_D6) PC15 | 4 3 | PC14 (LCD_D7) (SD_DETECT) PB9 | 4 3 | RESET
* GND | 2 1 | 5V GND | 2 1 | NC
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN PC14
#define EXP1_04_PIN PC15
#define EXP1_05_PIN PB7
#define EXP1_06_PIN PC13
#define EXP1_07_PIN PC12
#define EXP1_08_PIN PB6
#define EXP1_09_PIN PC11
#define EXP1_10_PIN PC10
#define EXP2_03_PIN -1 // RESET
#define EXP2_04_PIN PB9
#define EXP2_05_PIN PB5
#define EXP2_06_PIN PB8
#define EXP2_07_PIN PA15
#define EXP2_08_PIN PD2
#define EXP2_09_PIN PB3
#define EXP2_10_PIN PB4
//
// LCD / Controller
//
#if HAS_WIRED_LCD
#define BEEPER_PIN PC10
#define BTN_ENC PC11
#define BEEPER_PIN EXP1_10_PIN
#define BTN_ENC EXP1_09_PIN
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS PC15
#define LCD_PINS_RS EXP1_04_PIN
#define BTN_EN1 PB6
#define BTN_EN2 PC13
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_06_PIN
#define LCD_PINS_ENABLE PC14
#define LCD_PINS_D4 PB7
#define LCD_PINS_ENABLE EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#elif IS_TFTGLCD_PANEL
@ -127,56 +142,56 @@
#undef BTN_ENC
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS PD2
#define TFTGLCD_CS EXP2_08_PIN
#endif
#define SD_DETECT_PIN PB9
#define SD_DETECT_PIN EXP2_04_PIN
#else
#define LCD_PINS_RS PC12
#define LCD_PINS_RS EXP1_07_PIN
#define BTN_EN1 PD2
#define BTN_EN2 PB8
#define BTN_EN1 EXP2_08_PIN
#define BTN_EN2 EXP2_06_PIN
#define LCD_PINS_ENABLE PB6
#define LCD_PINS_ENABLE EXP1_08_PIN
#if ENABLED(FYSETC_MINI_12864)
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN PC13
#define DOGLCD_A0 PC12
#define DOGLCD_CS PB6
#define DOGLCD_SCK PB3
#define DOGLCD_MOSI PB5
#define LCD_RESET_PIN EXP1_06_PIN
#define DOGLCD_A0 EXP1_07_PIN
#define DOGLCD_CS EXP1_08_PIN
#define DOGLCD_SCK EXP2_09_PIN
#define DOGLCD_MOSI EXP2_05_PIN
#define FORCE_SOFT_SPI // SPI MODE3
#define LED_PIN PB7 // red pwm
//#define LED_PIN PC15 // green
//#define LED_PIN PC14 // blue
#define LED_PIN EXP1_05_PIN // red pwm
//#define LED_PIN EXP1_04_PIN // green
//#define LED_PIN EXP1_03_PIN // blue
//#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
// #ifndef RGB_LED_R_PIN
// #define RGB_LED_R_PIN PB7
// #define RGB_LED_R_PIN EXP1_05_PIN
// #endif
// #ifndef RGB_LED_G_PIN
// #define RGB_LED_G_PIN PC15
// #define RGB_LED_G_PIN EXP1_04_PIN
// #endif
// #ifndef RGB_LED_B_PIN
// #define RGB_LED_B_PIN PC14
// #define RGB_LED_B_PIN EXP1_03_PIN
// #endif
//#elif ENABLED(FYSETC_MINI_12864_2_1)
// #define NEOPIXEL_PIN PB7
// #define NEOPIXEL_PIN EXP1_05_PIN
//#endif
#else // !FYSETC_MINI_12864
#define LCD_PINS_D4 PC13
#define LCD_PINS_D4 EXP1_06_PIN
#if IS_ULTIPANEL
#define LCD_PINS_D5 PB7
#define LCD_PINS_D6 PC15
#define LCD_PINS_D7 PC14
#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
@ -186,16 +201,11 @@
#endif // !FYSETC_MINI_12864
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#endif
@ -214,11 +224,11 @@
#if SD_CONNECTION_IS(LCD)
#define SPI_DEVICE 3
#define SD_DETECT_PIN PB9
#define SD_SCK_PIN PB3
#define SD_MISO_PIN PB4
#define SD_MOSI_PIN PB5
#define SD_SS_PIN PA15
#define SD_DETECT_PIN EXP2_04_PIN
#define SD_SCK_PIN EXP2_09_PIN
#define SD_MISO_PIN EXP2_10_PIN
#define SD_MOSI_PIN EXP2_05_PIN
#define SD_SS_PIN EXP2_07_PIN
#elif SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN PA3
#define SD_SCK_PIN PA5

View File

@ -122,41 +122,43 @@
#define NEOPIXEL_PIN PC7 // The NEOPIXEL LED driving pin
/**
* 1 ----- 2
* PB5 | · · | PB6
* PA2 | · · | RESET
* PA3 | · · | PB8
* PB7 | · · | PA4
* GND | · · | VCC5
* 9 ----- 10
* LCD EXP
* ------
* PB5 |10 9 | PB6
* PA2 | 8 7 | RESET
* PA3 6 5 | PB8
* PB7 | 4 3 | PA4
* GND | 2 1 | VCC5
* ------
* EXP1
*/
#define EXP1_03_PIN PA4
#define EXP1_04_PIN PB7
#define EXP1_05_PIN PB8
#define EXP1_06_PIN PA3
#define EXP1_07_PIN -1 // RESET
#define EXP1_08_PIN PA2
#define EXP1_09_PIN PB6
#define EXP1_10_PIN PB5
//
// LCD / Controller
//
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN PB5
#define BTN_EN1 PA2
#define BTN_EN2 PA3
#define BTN_ENC PB6
#define BEEPER_PIN EXP1_10_PIN
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_06_PIN
#define BTN_ENC EXP1_09_PIN
#define LCD_PINS_RS PB7 // CS -- SOFT SPI for ENDER3 LCD
#define LCD_PINS_D4 PB8 // SCLK
#define LCD_PINS_ENABLE PA4 // DATA MOSI
#define LCD_PINS_RS EXP1_04_PIN // CS -- SOFT SPI for ENDER3 LCD
#define LCD_PINS_D4 EXP1_05_PIN // SCLK
#define LCD_PINS_ENABLE EXP1_03_PIN // DATA MOSI
#endif
// Alter timing for graphical display
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
//

View File

@ -83,13 +83,13 @@
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI PB15
#define TMC_SW_MOSI EXP2_05_PIN
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO PB14
#define TMC_SW_MISO EXP2_10_PIN
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PB13
#define TMC_SW_SCK EXP2_09_PIN
#endif
#endif
@ -120,52 +120,69 @@
#define TEMP_BED_PIN PC0 // Analog Input
#define TEMP_0_PIN PC1 // Analog Input
//
// LCD Pins
//
/** ------ ------
* (BEEPER) PC14 |10 9 | PC13 (BTN_ENC) (MISO) PB14 |10 9 | PB13 (SD_SCK)
* (LCD_EN) PB9 | 8 7 | PB8 (LCD_RS) (BTN_EN1) PB3 | 8 7 | PB12 (SD_CS2)
* (LCD_D4) PB7 | 6 5 PB6 (LCD_D5) (BTN_EN2) PD2 | 6 5 PB15 (SD_MOSI)
* (LCD_D6) PB5 | 4 3 | PB4 (LCD_D7) (SD_DETECT) PB11 | 4 3 | RESET
* GND | 2 1 | 5V GND | 2 1 | NC
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN PB4
#define EXP1_04_PIN PB5
#define EXP1_05_PIN PB6
#define EXP1_06_PIN PB7
#define EXP1_07_PIN PB8
#define EXP1_08_PIN PB9
#define EXP1_09_PIN PC13
#define EXP1_10_PIN PC14
#define EXP2_03_PIN -1 // RESET
#define EXP2_04_PIN PB11
#define EXP2_05_PIN PB15
#define EXP2_06_PIN PD2
#define EXP2_07_PIN PB12
#define EXP2_08_PIN PB3
#define EXP2_09_PIN PB13
#define EXP2_10_PIN PB14
//
// LCD / Controller
//
#define SPI_DEVICE 2
#define SD_SS_PIN PB12
#define SD_SCK_PIN PB13
#define SD_MISO_PIN PB14
#define SD_MOSI_PIN PB15
#if HAS_WIRED_LCD
#define SDSS SD_SS_PIN
#define SD_DETECT_PIN PB11
#define SPI_DEVICE 2
#define SD_SS_PIN EXP2_07_PIN
#define SD_SCK_PIN EXP2_09_PIN
#define SD_MISO_PIN EXP2_10_PIN
#define SD_MOSI_PIN EXP2_05_PIN
#define BEEPER_PIN PC14
#define SDSS SD_SS_PIN
#define SD_DETECT_PIN EXP2_04_PIN
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PB9
#define LCD_PINS_D4 PB7
#define LCD_PINS_D5 PB6
#define LCD_PINS_D6 PB5
#define LCD_PINS_D7 PB4
#define BEEPER_PIN EXP1_10_PIN
#define BTN_EN1 PD2
#define BTN_EN2 PB3
#define BTN_ENC PC13
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#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
#define BTN_EN1 EXP2_06_PIN
#define BTN_EN2 EXP2_08_PIN
#define BTN_ENC EXP1_09_PIN
//
// Filament runout
//
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
//
// ST7920 Delays
//
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(96)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(715)
#endif
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#endif
#endif // HAS_WIRED_LCD

View File

@ -157,16 +157,11 @@
//#define LCD_UART_RX PD9
#endif
#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(715)
#endif
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#endif
#endif // HAS_WIRED_LCD

View File

@ -165,16 +165,11 @@
//#define LCD_UART_RX PD9
#endif
#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(715)
#endif
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#endif
#endif // HAS_WIRED_LCD

View File

@ -162,16 +162,11 @@
//#define LCD_UART_RX PD9
#endif
#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(715)
#endif
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#endif
#endif // HAS_WIRED_LCD

View File

@ -167,16 +167,11 @@
//#define LCD_UART_RX PD9
#endif
#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(715)
#endif
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#endif
#endif // HAS_WIRED_LCD

View File

@ -342,15 +342,9 @@
#endif
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif // !MKS_MINI_12864

View File

@ -133,52 +133,82 @@
#endif
/**
* ----- ----- -----
* (BEEPER) PC1 | 1 2 | PC3 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SD_SCK) 5V | 1 2 | GND
* (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS) (BTN_EN1) PB11 | 3 4 | PA15 (SD_SS) (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS)
* (LCD_D4) PA6 | 5 6 PA7 (LCD_D5) (BTN_EN2) PB0 | 5 6 PB15 (SD_MOSI) (LCD_D4) PA6 | 5 6 PB0 (BTN_EN2)
* (LCD_D6) PC4 | 7 8 | PC5 (LCD_D7) (SD_DETECT) PC10 | 7 8 | RESET RESET | 7 8 | PB11 (BTN_EN1)
* GND | 9 10| 5V GND | 9 10| NC (BTN_ENC) PC3 | 9 10| PC1 (BEEPER)
* ----- ----- -----
* EXP1 EXP2 EXP3
* ------ ------ ------
* (BEEPER) PC1 |10 9 | PC3 (BTN_ENC) (MISO) PB14 |10 9 | PB13 (SD_SCK) (BEEPER) PC1 |10 9 | PC3 (BTN_ENC)
* (LCD_EN) PA4 | 8 7 | PA5 (LCD_RS) (BTN_EN1) PB11 | 8 7 | PA15 (SD_SS) (BTN_EN1) PB11 | 8 7 | RESET
* (LCD_D4) PA6 6 5 | PA7 (LCD_D5) (BTN_EN2) PB0 6 5 | PB15 (SD_MOSI) (BTN_EN2) PB0 6 5 | PA6 (LCD_D4)
* (LCD_D6) PC4 | 4 3 | PC5 (LCD_D7) (SD_DETECT) PC10 | 4 3 | RESET (LCD_RS) PA5 | 4 3 | PA4 (LCD_EN)
* GND | 2 1 | 5V GND | 2 1 | NC GND | 2 1 | 5V
* ------ ------ ------
* EXP1 EXP2 "Ender-3 EXP1"
*/
#define EXP1_03_PIN PC5
#define EXP1_04_PIN PC4
#define EXP1_05_PIN PA7
#define EXP1_06_PIN PA6
#define EXP1_07_PIN PA5
#define EXP1_08_PIN PA4
#define EXP1_09_PIN PC3
#define EXP1_10_PIN PC1
#define EXP2_03_PIN -1 // RESET
#define EXP2_04_PIN PC10
#define EXP2_05_PIN PB15
#define EXP2_06_PIN PB0
#define EXP2_07_PIN PA15
#define EXP2_08_PIN PB11
#define EXP2_09_PIN PB13
#define EXP2_10_PIN PB14
// "Ender-3 EXP1"
#define E3_EXP1_03_PIN PA4
#define E3_EXP1_04_PIN PA5
#define E3_EXP1_05_PIN PA6
#define E3_EXP1_06_PIN PB0
#define E3_EXP1_07_PIN -1 // RESET
#define E3_EXP1_08_PIN PB11
#define E3_EXP1_09_PIN PC3
#define E3_EXP1_10_PIN PC1
#if HAS_WIRED_LCD
#define BEEPER_PIN PC1
#define BTN_ENC PC3
#define LCD_PINS_ENABLE PA4
#define LCD_PINS_RS PA5
#define BTN_EN1 PB11
#define BTN_EN2 PB0
#define BEEPER_PIN EXP1_10_PIN
#define BTN_ENC EXP1_09_PIN
#define LCD_PINS_ENABLE EXP1_08_PIN
#define LCD_PINS_RS EXP1_07_PIN
#define BTN_EN1 EXP2_08_PIN
#define BTN_EN2 EXP2_06_PIN
// MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
#if ENABLED(MKS_MINI_12864)
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN -1
#define DOGLCD_A0 PC4
#define DOGLCD_CS PA7
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15
#define DOGLCD_A0 EXP1_04_PIN
#define DOGLCD_CS EXP1_05_PIN
#define DOGLCD_SCK EXP2_09_PIN
#define DOGLCD_MOSI EXP2_05_PIN
#elif ENABLED(MKS_MINI_12864_V3)
#define ENABLE_SPI3
#define DOGLCD_CS PA4
#define DOGLCD_A0 PA5
#define DOGLCD_CS EXP1_08_PIN
#define DOGLCD_A0 EXP1_07_PIN
#define LCD_PINS_DC DOGLCD_A0
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN PA6
#define NEOPIXEL_PIN PA7
#define DOGLCD_MOSI PB15
#define DOGLCD_SCK PB13
#define LCD_RESET_PIN EXP1_06_PIN
#define NEOPIXEL_PIN EXP1_05_PIN
#define DOGLCD_MOSI EXP2_05_PIN
#define DOGLCD_SCK EXP2_09_PIN
#define FORCE_SOFT_SPI
#define SOFTWARE_SPI
//#define LCD_SCREEN_ROT_180
#else
#define LCD_PINS_D4 PA6
#define LCD_PINS_D4 EXP1_06_PIN
#if IS_ULTIPANEL
#define LCD_PINS_D5 PA7
#define LCD_PINS_D6 PC4
#define LCD_PINS_D7 PC5
#define LCD_PINS_D5 EXP1_05_PIN
#define LCD_PINS_D6 EXP1_04_PIN
#define LCD_PINS_D7 EXP1_03_PIN
#if !defined(BTN_ENC_EN) && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
@ -190,30 +220,33 @@
#endif // HAS_WIRED_LCD
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#endif
//
// SD Card
//
#define SDCARD_CONNECTION ONBOARD
#define SPI_DEVICE 2
#define ONBOARD_SPI_DEVICE 2
#define SDSS SD_SS_PIN
#define SDCARD_CONNECTION ONBOARD
#define SD_DETECT_PIN PC10
#define ONBOARD_SD_CS_PIN SD_SS_PIN
#define SD_DETECT_PIN PC10 // EXP2_04_PIN
#define NO_SD_HOST_DRIVE
// TODO: This is the only way to set SPI for SD on STM32 (for now)
#define ENABLE_SPI2
#define SD_SCK_PIN PB13
#define SD_MISO_PIN PB14
#define SD_MOSI_PIN PB15
#define SD_SS_PIN PA15
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#define SD_SCK_PIN EXP2_09_PIN
#define SD_MISO_PIN EXP2_10_PIN
#define SD_MOSI_PIN EXP2_05_PIN
#define SD_SS_PIN EXP2_07_PIN

View File

@ -112,16 +112,11 @@
#endif // !MKS_MINI_12864
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#endif // HAS_WIRED_LCD

View File

@ -378,13 +378,9 @@
#endif
#ifndef BOARD_ST7920_DELAY_1
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif

View File

@ -299,16 +299,11 @@
#endif
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif
#define HAS_SPI_FLASH 1

View File

@ -331,7 +331,8 @@
#define ADC_KEYPAD_PIN PC0 // PIN6 of AUX1
#endif
#if HAS_MARLINUI_U8GLIB
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(250)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)

View File

@ -304,7 +304,8 @@
#define BTN_ENC EXP2_05_PIN // PE15
#endif
#if HAS_MARLINUI_U8GLIB
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS(200) // Tclk_fall <200ns
#define BOARD_ST7920_DELAY_2 DELAY_NS(250) // Tdata_width >200ns
#define BOARD_ST7920_DELAY_3 DELAY_NS(200) // Tclk_rise <200ns

View File

@ -182,7 +182,6 @@
* EXP2 EXP1 |
* --------------------------------------------------------------------------------------
*/
#define EXP1_03_PIN PE13
#define EXP1_04_PIN PE12
#define EXP1_05_PIN PE11
@ -286,16 +285,10 @@
#endif
// 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(600)
#endif
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
#endif
#endif // HAS_WIRED_LCD

View File

@ -282,16 +282,10 @@
#endif
// 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(600)
#endif
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
#endif
#endif // HAS_WIRED_LCD

View File

@ -488,16 +488,10 @@
#endif
// 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(600)
#endif
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
#endif
#endif // HAS_WIRED_LCD

View File

@ -310,17 +310,15 @@
#define TMC_BAUD_RATE 19200
#endif
/**
* ------ ------
* NC | 1 2 | GND 5V | 1 2 | GND
* RESET | 3 4 | PC15 (SD_DETECT) (LCD_D7) PE15 | 3 4 | PE14 (LCD_D6)
* (MOSI) PA7 | 5 6 PB1 (BTN_EN2) (LCD_D5) PE13 | 5 6 PE12 (LCD_D4)
* (SD_SS) PA4 | 7 8 | PB2 (BTN_EN1) (LCD_RS) PE10 | 7 8 | PE9 (LCD_EN)
* (SCK) PA5 | 9 10 | PA6 (MISO) (BTN_ENC) PE7 | 9 10 | PE8 (BEEPER)
* ------ -----
* EXP2 EXP1
/** ------ ------
* (BEEPER) PE8 |10 9 | PE7 (BTN_ENC) (MISO) PA6 |10 9 | PA5 (SCK)
* (LCD_EN) PE9 | 8 7 | PE10 (LCD_RS) (BTN_EN1) PB2 | 8 7 | PA4 (SD_SS)
* (LCD_D4) PE12 6 5 | PE13 (LCD_D5) (BTN_EN2) PB1 6 5 | PA7 (MOSI)
* (LCD_D6) PE14 | 4 3 | PE15 (LCD_D7) (SD_DETECT) PC15 | 4 3 | RESET
* GND | 2 1 | 5V GND | 2 1 | NC
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN PE15
#define EXP1_04_PIN PE14
#define EXP1_05_PIN PE13
@ -485,16 +483,10 @@
#endif // HAS_WIRED_LCD
// Alter timing for graphical display
#if HAS_MARLINUI_U8GLIB
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(120) // DELAY_NS(96)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(80) // DELAY_NS(48)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(580) // DELAY_NS(600)
#endif
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS(120)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 80)
#define BOARD_ST7920_DELAY_3 DELAY_NS(580)
#endif
#if HAS_SPI_TFT

View File

@ -311,17 +311,15 @@
#define SDCARD_CONNECTION LCD
#endif
/**
* ----- -----
* NC | 1 2 | GND 5V | 1 2 | GND
* RESET | 3 4 | PF12(SD_DETECT) (LCD_D7) PG7 | 3 4 | PG6 (LCD_D6)
* (MOSI)PB15 | 5 6 PF11(BTN_EN2) (LCD_D5) PG3 | 5 6 PG2 (LCD_D4)
* (SD_SS)PB12 | 7 8 | PG10(BTN_EN1) (LCD_RS) PD10 | 7 8 | PD11 (LCD_EN)
* (SCK)PB13 | 9 10| PB14(MISO) (BTN_ENC) PA8 | 9 10| PG4 (BEEPER)
* ----- -----
* EXP2 EXP1
/** ------ ------
* (BEEPER) PG4 |10 9 | PA8 (BTN_ENC) (MISO) PB14 |10 9 | PB13 (SCK)
* (LCD_EN) PD11 | 8 7 | PD10 (LCD_RS) (BTN_EN1) PG10 | 8 7 | PB12 (SD_SS)
* (LCD_D4) PG2 6 5 | PG3 (LCD_D5) (BTN_EN2) PF11 6 5 | PB15 (MOSI)
* (LCD_D6) PG6 | 4 3 | PG7 (LCD_D7) (SD_DETECT) PF12 | 4 3 | RESET
* GND | 2 1 | 5V GND | 2 1 | NC
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN PG7
#define EXP1_04_PIN PG6
#define EXP1_05_PIN PG3
@ -506,12 +504,12 @@
#endif // HAS_WIRED_LCD
// Alter timing for graphical display
#if HAS_MARLINUI_U8GLIB
#if ENABLED(U8GLIB_ST7920)
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(90)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 90)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)

View File

@ -303,7 +303,6 @@
* ----- -----
* EXP2 EXP1
*/
#define EXP1_03_PIN PE13
#define EXP1_04_PIN PE12
#define EXP1_05_PIN PE11
@ -489,12 +488,12 @@
#endif // HAS_WIRED_LCD
// Alter timing for graphical display
#if HAS_MARLINUI_U8GLIB
#if ENABLED(U8GLIB_ST7920)
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(120)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(80)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 80)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(580)

View File

@ -185,7 +185,6 @@
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN PE7
#define EXP1_04_PIN PE8
#define EXP1_05_PIN PE9
@ -305,17 +304,9 @@
#define FIL_RUNOUT_PIN PA3
//
// ST7920 Delays
//
#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(715)
#endif
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#endif

View File

@ -250,16 +250,10 @@
#endif // HAS_WIRED_LCD
// 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(600)
#endif
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
#endif
#if ENABLED(TOUCH_UI_FTDI_EVE)

View File

@ -314,16 +314,10 @@
#endif // HAS_WIRED_LCD
// 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
#if ENABLED(U8GLIB_ST7920)
#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

View File

@ -276,7 +276,6 @@
* ------ ------
* EXP1 EXP2
*/
#define EXP1_03_PIN PD10
#define EXP1_04_PIN PD11
#define EXP1_05_PIN PE15

View File

@ -167,20 +167,13 @@
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#endif
// 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
#endif
#endif // HAS_WIRED_LCD
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#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

View File

@ -182,15 +182,9 @@
#define BTN_ENC PB12
#endif
//
// ST7920 Delays
//
#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
// Alter timing for graphical display
#if ENABLED(U8GLIB_ST7920)
#define BOARD_ST7920_DELAY_1 DELAY_NS( 96)
#define BOARD_ST7920_DELAY_2 DELAY_NS( 48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#endif