Add ZRIB v53, patch G35 Z drop, related issues (#23636)

This commit is contained in:
Bones 2022-02-04 14:52:57 -07:00 committed by Scott Lahteine
parent 15eabba11d
commit 21935b41f0
12 changed files with 816 additions and 111 deletions

View file

@ -436,6 +436,9 @@
* 5 : 100 ATC Semitec 104GT-2/104NT-4-R025H42G - Used in ParCan, J-Head, and E3D, SliceEngineering 300°C
* 501 : 100 Zonestar - Tronxy X3A
* 502 : 100 Zonestar - used by hot bed in Zonestar Průša P802M
* 503 : 100 Zonestar (Z8XM2) Heated Bed thermistor
* 504 : 100 Zonestar P802QR2 (Part# QWG-104F-B3950) Hotend Thermistor
* 505 : 100 Zonestar P802QR2 (Part# QWG-104F-3950) Bed Thermistor
* 512 : 100 RPW-Ultra hotend
* 6 : 100 EPCOS - Not as accurate as table #1 (created using a fluke thermocouple)
* 7 : 100 Honeywell 135-104LAG-J01

View file

@ -115,6 +115,7 @@
#define BOARD_RAMPS_S_12_EFFB 1159 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
#define BOARD_LONGER3D_LK1_PRO 1160 // Longer LK1 PRO / Alfawise U20 Pro (PRO version)
#define BOARD_LONGER3D_LKx_PRO 1161 // Longer LKx PRO / Alfawise Uxx Pro (PRO version)
#define BOARD_ZRIB_V53 1162 // Zonestar zrib V5.3 (Chinese RAMPS replica)
//
// RAMBo and derivatives

View file

@ -106,7 +106,9 @@ void GcodeSuite::G35() {
// In BLTOUCH HS mode, the probe travels in a deployed state.
// Users of G35 might have a badly misaligned bed, so raise Z by the
// length of the deployed pin (BLTOUCH stroke < 7mm)
do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES + TERN0(BLTOUCH, bltouch.z_extra_clearance()));
// Unsure if this is even required. The probe seems to lift correctly after probe done.
do_blocking_move_to_z(SUM_TERN(BLTOUCH, Z_CLEARANCE_BETWEEN_PROBES, bltouch.z_extra_clearance()));
const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE, 0, true);
if (isnan(z_probed_height)) {

View file

@ -704,7 +704,8 @@ void MarlinUI::init() {
TERN_(HAS_MARLINUI_MENU, refresh());
#if HAS_ENCODER_ACTION
if (clear_buttons) buttons = 0;
if (clear_buttons)
TERN_(HAS_ADC_BUTTONS, keypad_buttons =) buttons = 0;
next_button_update_ms = millis() + 500;
#else
UNUSED(clear_buttons);

View file

@ -70,6 +70,10 @@
#define THERMISTOR_NAME "Zonestar (P802M Hot Bed)"
#elif THERMISTOR_ID == 503
#define THERMISTOR_NAME "Zonestar (Z8XM2 Bed)"
#elif THERMISTOR_ID == 504
#define THERMISTOR_NAME "Zonestar (P802QR2 Hot End)"
#elif THERMISTOR_ID == 505
#define THERMISTOR_NAME "Zonestar (P802QR2 Bed)"
#elif THERMISTOR_ID == 512
#define THERMISTOR_NAME "RPW-Ultra"
#elif THERMISTOR_ID == 6

View file

@ -0,0 +1,93 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
// QWG 104F B3950 thermistor
constexpr temp_entry_t temptable_504[] PROGMEM = {
{ OV( 15), 330 },
{ OV( 17), 315 },
{ OV( 19), 300 },
{ OV( 20), 295 },
{ OV( 21), 290 },
{ OV( 23), 285 },
{ OV( 25), 280 },
{ OV( 27), 275 },
{ OV( 28), 270 },
{ OV( 31), 265 },
{ OV( 33), 260 },
{ OV( 35), 255 },
{ OV( 38), 250 },
{ OV( 41), 245 },
{ OV( 44), 240 },
{ OV( 48), 235 },
{ OV( 52), 230 },
{ OV( 56), 225 },
{ OV( 61), 220 },
{ OV( 66), 215 },
{ OV( 78), 210 },
{ OV( 92), 205 },
{ OV( 100), 200 },
{ OV( 109), 195 },
{ OV( 120), 190 },
{ OV( 143), 185 },
{ OV( 148), 180 },
{ OV( 156), 175 },
{ OV( 171), 170 },
{ OV( 187), 165 },
{ OV( 205), 160 },
{ OV( 224), 155 },
{ OV( 268), 150 },
{ OV( 293), 145 },
{ OV( 320), 140 },
{ OV( 348), 135 },
{ OV( 379), 130 },
{ OV( 411), 125 },
{ OV( 445), 120 },
{ OV( 480), 115 },
{ OV( 516), 110 },
{ OV( 553), 105 },
{ OV( 591), 100 },
{ OV( 628), 95 },
{ OV( 665), 90 },
{ OV( 702), 85 },
{ OV( 737), 80 },
{ OV( 770), 75 },
{ OV( 801), 70 },
{ OV( 830), 65 },
{ OV( 857), 60 },
{ OV( 881), 55 },
{ OV( 903), 50 },
{ OV( 922), 45 },
{ OV( 939), 40 },
{ OV( 954), 35 },
{ OV( 966), 30 },
{ OV( 977), 25 },
{ OV( 985), 23 },
{ OV( 993), 20 },
{ OV( 999), 18 },
{ OV(1004), 15 },
{ OV(1008), 12 },
{ OV(1012), 8 },
{ OV(1016), 5 },
{ OV(1020), 0 },
{ OV(1023), -5 }
};

View file

@ -0,0 +1,82 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
// ZONESTAR hotbed QWG-104F-3950 thermistor
constexpr temp_entry_t temptable_505[] PROGMEM = {
{ OV( 1), 938 },
{ OV( 8), 320 },
{ OV( 16), 300 },
{ OV( 27), 290 },
{ OV( 36), 272 },
{ OV( 47), 258 },
{ OV( 56), 248 },
{ OV( 68), 245 },
{ OV( 78), 237 },
{ OV( 89), 228 },
{ OV( 99), 221 },
{ OV( 110), 215 },
{ OV( 120), 209 },
{ OV( 131), 204 },
{ OV( 141), 199 },
{ OV( 151), 195 },
{ OV( 161), 190 },
{ OV( 171), 187 },
{ OV( 181), 183 },
{ OV( 201), 179 },
{ OV( 221), 170 },
{ OV( 251), 165 },
{ OV( 261), 160 },
{ OV( 321), 150 },
{ OV( 361), 144 },
{ OV( 401), 140 },
{ OV( 421), 133 },
{ OV( 451), 130 },
{ OV( 551), 120 },
{ OV( 571), 117 },
{ OV( 596), 110 },
{ OV( 626), 105 },
{ OV( 666), 100 },
{ OV( 677), 95 },
{ OV( 697), 90 },
{ OV( 717), 85 },
{ OV( 727), 79 },
{ OV( 750), 72 },
{ OV( 789), 69 },
{ OV( 819), 65 },
{ OV( 861), 57 },
{ OV( 870), 55 },
{ OV( 881), 51 },
{ OV( 911), 45 },
{ OV( 922), 39 },
{ OV( 968), 28 },
{ OV( 977), 25 },
{ OV( 985), 23 },
{ OV( 993), 20 },
{ OV( 999), 18 },
{ OV(1004), 15 },
{ OV(1008), 12 },
{ OV(1012), 8 },
{ OV(1016), 5 },
{ OV(1020), 0 },
{ OV(1023), -5 }
};

View file

@ -78,6 +78,12 @@ typedef struct { int16_t value; celsius_t celsius; } temp_entry_t;
#if ANY_THERMISTOR_IS(503) // Zonestar (Z8XM2) Heated Bed thermistor
#include "thermistor_503.h"
#endif
#if ANY_THERMISTOR_IS(504) // Zonestar (P802QR2 Hot End) thermistors
#include "thermistor_504.h"
#endif
#if ANY_THERMISTOR_IS(505) // Zonestar (P802QR2 Bed) thermistor
#include "thermistor_505.h"
#endif
#if ANY_THERMISTOR_IS(512) // 100k thermistor in RPW-Ultra hotend, Pull-up = 4.7 kOhm, "unknown model"
#include "thermistor_512.h"
#endif

View file

@ -123,6 +123,8 @@
#include "ramps/pins_ZRIB_V20.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
#elif MB(ZRIB_V52)
#include "ramps/pins_ZRIB_V52.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
#elif MB(ZRIB_V53)
#include "ramps/pins_ZRIB_V53.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
#elif MB(FELIX2)
#include "ramps/pins_FELIX2.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280
#elif MB(RIGIDBOARD)

View file

@ -49,111 +49,111 @@
#include "pins_MKS_BASE_common.h" // ... RAMPS
/*
Available connectors on MKS BASE v1.4 (Basically same as ZRIB V5.2)
=======
| GND |
|-----| E0
| 10 | (10) PB4 ** Pin23 ** PWM10
|-----|
| GND |
|-----| E1
| 7 | ( 7) PH4 ** Pin16 ** PWM7
|-----|
| GND |
|-----| FAN
| 9 | ( 9) PH6 ** Pin18 ** PWM9
=======
=======
| GND |
|-----| Heated Bed
| 8 | ( 8) PH5 ** Pin17 ** PWM8
=======
==========
| 12-24V |
|--------| Power
| GND |
==========
XS3 Connector
=================
| 65 | GND | 5V | (65) PK3 ** Pin86 ** A11
|----|-----|----|
| 66 | GND | 5V | (66) PK4 ** Pin85 ** A12
=================
Servos Connector
=================
| 11 | GND | 5V | (11) PB5 ** Pin24 ** PWM11
|----|-----|----|
| 12 | GND | 5V | (12) PB6 ** Pin25 ** PWM12
=================
ICSP
=================
| 5V | 51 | GND | (51) PB2 ** Pin21 ** SPI_MOSI
|----|----|-----|
| 50 | 52 | RST | (50) PB3 ** Pin22 ** SPI_MISO
================= (52) PB1 ** Pin20 ** SPI_SCK
XS6/AUX-1 Connector
======================
| 5V | GND | NC | 20 | (20) PD1 ** Pin44 ** I2C_SDA
|----|-----|----|----|
| 50 | 51 | 52 | 21 | (50) PB3 ** Pin22 ** SPI_MISO
====================== (51) PB2 ** Pin21 ** SPI_MOSI
(52) PB1 ** Pin20 ** SPI_SCK
(21) PD0 ** Pin43 ** I2C_SCL
Temperature
==================================
| GND | 69 | GND | 68 | GND | 67 |
==================================
(69) PK7 ** Pin82 ** A15
(68) PK6 ** Pin83 ** A14
(67) PK5 ** Pin84 ** A13
Limit Switches
============
| 2 | GND | X+ ( 2) PE4 ** Pin6 ** PWM2
|----|-----|
| 3 | GND | X- ( 3) PE5 ** Pin7 ** PWM3
|----|-----|
| 15 | GND | Y+ (15) PJ0 ** Pin63 ** USART3_RX
|----|-----|
| 14 | GND | Y- (14) PJ1 ** Pin64 ** USART3_TX
|----|-----|
| 19 | GND | Z+ (19) PD2 ** Pin45 ** USART1_RX
|----|-----|
| 18 | GND | Z- (18) PD3 ** Pin46 ** USART1_TX
============
EXP1
============
| 37 | 35 | (37) PC0 ** Pin53 ** D37
|-----|----| (35) PC2 ** Pin55 ** D35
| 17 | 16 | (17) PH0 ** Pin12 ** USART2_RX
|-----|----| (16) PH1 ** Pin13 ** USART2_TX
| 23 | 25 | (23) PA1 ** Pin77 ** D23
|-----|----| (25) PA3 ** Pin75 ** D25
| 27 | 29 | (27) PA5 ** Pin73 ** D27
|-----|----| (29) PA7 ** Pin71 ** D29
| GND | 5V |
============
EXP2
============
| 50 | 52 | (50) PB3 ** Pin22 ** SPI_MISO
|-----|----| (52) PB1 ** Pin20 ** SPI_SCK
| 31 | 53 | (31) PC6 ** Pin59 ** D31
|-----|----| (53) PB0 ** Pin19 ** SPI_SS
| 33 | 51 | (33) PC4 ** Pin57 ** D33
|-----|----| (51) PB2 ** Pin21 ** SPI_MOSI
| 49 | 41 | (49) PL0 ** Pin35 ** D49
|-----|----| (41) PG0 ** Pin51 ** D41
| GND | NC |
============
/**
* Available connectors on MKS BASE v1.4 (Basically same as ZRIB V5.2)
*
* =======
* | GND |
* |-----| E0
* | 10 | (10) PB4 ** Pin23 ** PWM10
* |-----|
* | GND |
* |-----| E1
* | 7 | ( 7) PH4 ** Pin16 ** PWM7
* |-----|
* | GND |
* |-----| FAN
* | 9 | ( 9) PH6 ** Pin18 ** PWM9
* =======
*
* =======
* | GND |
* |-----| Heated Bed
* | 8 | ( 8) PH5 ** Pin17 ** PWM8
* =======
*
* ==========
* | 12-24V |
* |--------| Power
* | GND |
* ==========
*
* XS3 Connector
* =================
* | 65 | GND | 5V | (65) PK3 ** Pin86 ** A11
* |----|-----|----|
* | 66 | GND | 5V | (66) PK4 ** Pin85 ** A12
* =================
*
* Servos Connector
* =================
* | 11 | GND | 5V | (11) PB5 ** Pin24 ** PWM11
* |----|-----|----|
* | 12 | GND | 5V | (12) PB6 ** Pin25 ** PWM12
* =================
*
* ICSP
* =================
* | 5V | 51 | GND | (51) PB2 ** Pin21 ** SPI_MOSI
* |----|----|-----|
* | 50 | 52 | RST | (50) PB3 ** Pin22 ** SPI_MISO
* ================= (52) PB1 ** Pin20 ** SPI_SCK
*
* XS6/AUX-1 Connector
* ======================
* | 5V | GND | NC | 20 | (20) PD1 ** Pin44 ** I2C_SDA
* |----|-----|----|----|
* | 50 | 51 | 52 | 21 | (50) PB3 ** Pin22 ** SPI_MISO
* ====================== (51) PB2 ** Pin21 ** SPI_MOSI
* (52) PB1 ** Pin20 ** SPI_SCK
* (21) PD0 ** Pin43 ** I2C_SCL
*
* Temperature
* ==================================
* | GND | 69 | GND | 68 | GND | 67 |
* ==================================
* (69) PK7 ** Pin82 ** A15
* (68) PK6 ** Pin83 ** A14
* (67) PK5 ** Pin84 ** A13
*
* Limit Switches
* ============
* | 2 | GND | X+ ( 2) PE4 ** Pin6 ** PWM2
* |----|-----|
* | 3 | GND | X- ( 3) PE5 ** Pin7 ** PWM3
* |----|-----|
* | 15 | GND | Y+ (15) PJ0 ** Pin63 ** USART3_RX
* |----|-----|
* | 14 | GND | Y- (14) PJ1 ** Pin64 ** USART3_TX
* |----|-----|
* | 19 | GND | Z+ (19) PD2 ** Pin45 ** USART1_RX
* |----|-----|
* | 18 | GND | Z- (18) PD3 ** Pin46 ** USART1_TX
* ============
*
* EXP1
* ============
* | 37 | 35 | (37) PC0 ** Pin53 ** D37
* |-----|----| (35) PC2 ** Pin55 ** D35
* | 17 | 16 | (17) PH0 ** Pin12 ** USART2_RX
* |-----|----| (16) PH1 ** Pin13 ** USART2_TX
* | 23 | 25 | (23) PA1 ** Pin77 ** D23
* |-----|----| (25) PA3 ** Pin75 ** D25
* | 27 | 29 | (27) PA5 ** Pin73 ** D27
* |-----|----| (29) PA7 ** Pin71 ** D29
* | GND | 5V |
* ============
*
* EXP2
* ============
* | 50 | 52 | (50) PB3 ** Pin22 ** SPI_MISO
* |-----|----| (52) PB1 ** Pin20 ** SPI_SCK
* | 31 | 53 | (31) PC6 ** Pin59 ** D31
* |-----|----| (53) PB0 ** Pin19 ** SPI_SS
* | 33 | 51 | (33) PC4 ** Pin57 ** D33
* |-----|----| (51) PB2 ** Pin21 ** SPI_MOSI
* | 49 | 41 | (49) PL0 ** Pin35 ** D49
* |-----|----| (41) PG0 ** Pin51 ** D41
* | GND | NC |
* ============
*/

View file

@ -0,0 +1,511 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* ZRIB V5.3 Based on MKS BASE v1.4 with A4982 stepper drivers and digital micro-stepping
*/
#include "env_validate.h"
#if HOTENDS > 2
#error "ZRIB V5.3 only supports up to 2 hotends. Comment out this line to continue."
#elif E_STEPPERS > 3
#error "ZRIB V5.3 only supports up to 3 E-steppers. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "ZRIB V5.3"
//
// PIN 12 Connector
//
#define PIN_12_PIN 12
//
// XS1 Connector
//
#define XS1_01_PIN 42
#define XS1_03_PIN 43
#define XS1_05_PIN 44
#define XS1_07_PIN 45
#define XS1_08_PIN 47
//
// XS6 Connector
//
#define XS6_01_PIN 20
#define XS6_03_PIN 52
#define XS6_05_PIN 51
#define XS6_07_PIN 50
#define XS6_08_PIN 21
//
// Servos / XS3 Connector
//
#ifndef SERVO0_PIN
#define SERVO0_PIN 11 // Analog Output
#endif
#ifndef SERVO1_PIN
#define SERVO1_PIN 12 // Analog Output
#endif
//
// Limit Switches
//
#ifndef X_STOP_PIN
#ifndef X_MIN_PIN
#define X_MIN_PIN 3
#endif
#ifndef X_MAX_PIN
#define X_MAX_PIN 2
#endif
#endif
#ifndef Y_STOP_PIN
#ifndef Y_MIN_PIN
#define Y_MIN_PIN 14
#endif
#ifndef Y_MAX_PIN
#define Y_MAX_PIN 15
#endif
#endif
#ifndef Z_STOP_PIN
#ifndef Z_MIN_PIN
#define Z_MIN_PIN 18
#endif
#ifndef Z_MAX_PIN
#define Z_MAX_PIN 19
#endif
#endif
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 19
#endif
//
// Steppers
//
#define X_STEP_PIN 54
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38
#define Y_STEP_PIN 60
#define Y_DIR_PIN 61
#define Y_ENABLE_PIN 56
#define Z_STEP_PIN 46
#define Z_DIR_PIN 48
#define Z_ENABLE_PIN 62
#if NUM_Z_STEPPER_DRIVERS == 2
#define Z2_STEP_PIN 26 // E0 connector
#define Z2_DIR_PIN 28
#define Z2_ENABLE_PIN 24
#define E0_STEP_PIN 36 // E1 connector
#define E0_DIR_PIN 34
#define E0_ENABLE_PIN 30
#define E1_STEP_PIN 4 // E2 connector
#define E1_DIR_PIN 5
#define E1_ENABLE_PIN 22
#else
#define E0_STEP_PIN 26
#define E0_DIR_PIN 28
#define E0_ENABLE_PIN 24
#define E1_STEP_PIN 36
#define E1_DIR_PIN 34
#define E1_ENABLE_PIN 30
#define E2_STEP_PIN 4
#define E2_DIR_PIN 5
#define E2_ENABLE_PIN 22
#endif
//
// Temperature Sensors
//
#ifndef TEMP_0_PIN
#define TEMP_0_PIN 13 // Analog Input
#endif
#ifndef TEMP_1_PIN
#define TEMP_1_PIN 15 // Analog Input
#endif
#ifndef TEMP_BED_PIN
#define TEMP_BED_PIN 14 // Analog Input
#endif
//
// Heaters / Fans Connectors
//
#define HEATER_0_PIN 10
#define HEATER_1_PIN 7
#define FAN_PIN 9
#define HEATER_BED_PIN 8
#define FAN1_PIN 6
//
// Misc. Functions
//
#ifndef SDSS
#define SDSS 53
#endif
#define LED_PIN 13
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN XS1_01_PIN
#endif
#ifndef PS_ON_PIN
#define PS_ON_PIN XS1_03_PIN
#endif
#if HAS_TMC_UART
/**
* TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*
* Serial2 -- AUX-4 Pin 18 (D16 TX2) and AUX-4 Pin 17 (D17 RX2)
* Serial1 -- Pins D18 and D19 are used for Z-MIN and Z-MAX
*/
//#define X_HARDWARE_SERIAL Serial1
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
#ifndef X_SERIAL_TX_PIN
#define X_SERIAL_TX_PIN XS1_08_PIN
#endif
#ifndef X_SERIAL_RX_PIN
#define X_SERIAL_RX_PIN PIN_12_PIN
#endif
#ifndef X2_SERIAL_TX_PIN
#define X2_SERIAL_TX_PIN -1
#endif
#ifndef X2_SERIAL_RX_PIN
#define X2_SERIAL_RX_PIN -1
#endif
#ifndef Y_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN XS1_08_PIN
#endif
#ifndef Y_SERIAL_RX_PIN
#define Y_SERIAL_RX_PIN PIN_12_PIN
#endif
#ifndef Y2_SERIAL_TX_PIN
#define Y2_SERIAL_TX_PIN -1
#endif
#ifndef Y2_SERIAL_RX_PIN
#define Y2_SERIAL_RX_PIN -1
#endif
#ifndef Z_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN XS1_08_PIN
#endif
#ifndef Z_SERIAL_RX_PIN
#define Z_SERIAL_RX_PIN PIN_12_PIN
#endif
#ifndef Z2_SERIAL_TX_PIN
#define Z2_SERIAL_TX_PIN XS1_08_PIN
#endif
#ifndef Z2_SERIAL_RX_PIN
#define Z2_SERIAL_RX_PIN PIN_12_PIN
#endif
#ifndef E0_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN -1
#endif
#ifndef E0_SERIAL_RX_PIN
#define E0_SERIAL_RX_PIN -1
#endif
#ifndef E1_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN -1
#endif
#ifndef E1_SERIAL_RX_PIN
#define E1_SERIAL_RX_PIN -1
#endif
#ifndef E2_SERIAL_TX_PIN
#define E2_SERIAL_TX_PIN -1
#endif
#ifndef E2_SERIAL_RX_PIN
#define E2_SERIAL_RX_PIN -1
#endif
#ifndef E3_SERIAL_TX_PIN
#define E3_SERIAL_TX_PIN -1
#endif
#ifndef E3_SERIAL_RX_PIN
#define E3_SERIAL_RX_PIN -1
#endif
#ifndef E4_SERIAL_TX_PIN
#define E4_SERIAL_TX_PIN -1
#endif
#ifndef E4_SERIAL_RX_PIN
#define E4_SERIAL_RX_PIN -1
#endif
#ifndef E5_SERIAL_TX_PIN
#define E5_SERIAL_TX_PIN -1
#endif
#ifndef E5_SERIAL_RX_PIN
#define E5_SERIAL_RX_PIN -1
#endif
#ifndef E6_SERIAL_TX_PIN
#define E6_SERIAL_TX_PIN -1
#endif
#ifndef E6_SERIAL_RX_PIN
#define E6_SERIAL_RX_PIN -1
#endif
#ifndef E7_SERIAL_TX_PIN
#define E7_SERIAL_TX_PIN -1
#endif
#ifndef E7_SERIAL_RX_PIN
#define E7_SERIAL_RX_PIN -1
#endif
#endif
/**
* LCD adapter. NOTE: These come in two variants. The socket keys can be
* on either side, and may be backwards on some 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 | --
* ------ ------
* 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 EXP2_03_PIN 41
#define EXP2_04_PIN 49
#define EXP2_05_PIN XS6_05_PIN
#define EXP2_06_PIN 33
#define EXP2_07_PIN 53
#define EXP2_08_PIN 31
#define EXP2_09_PIN XS6_03_PIN
#define EXP2_10_PIN XS6_07_PIN
#endif
//////////////////////////
// LCDs and Controllers //
//////////////////////////
#if ENABLED(ZONESTAR_12864LCD)
#define LCDSCREEN_NAME "ZONESTAR LCD12864"
#define LCD_SDSS 16
#define LCD_PINS_RS 16 // ST7920_CS_PIN LCD_PIN_RS (PIN4 of LCD module)
#define LCD_PINS_ENABLE 23 // ST7920_DAT_PIN LCD_PIN_R/W (PIN5 of LCD module)
#define LCD_PINS_D4 17 // ST7920_CLK_PIN LCD_PIN_ENABLE (PIN6 of LCD module)
#define BTN_EN2 25
#define BTN_EN1 27
#define BTN_ENC 29
#define BEEPER_PIN 37
#define KILL_PIN 35
#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define LCDSCREEN_NAME "Reprap LCD12864"
// Use EXP1 & EXP2 connector
#define LCD_PINS_RS 16 // ST7920_CS_PIN LCD_PIN_RS
#define LCD_PINS_ENABLE 17 // ST7920_DAT_PIN LCD_PIN_ENABLE
#define LCD_PINS_D4 23 // ST7920_CLK_PIN LCD_PIN_R/W
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define BEEPER_PIN 37
#define KILL_PIN 41
#endif
//================================================================================
// OLED 128x64
//================================================================================
#if EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306)
#define LCDSCREEN_NAME "ZONESTAR 12864OLED"
#define LCD_SDSS 16
#define LCD_PINS_RS 23 // RESET Pull low for 1s to init
#define LCD_PINS_DC 17
#define DOGLCD_CS 16 // CS
#define BTN_EN2 25
#define BTN_EN1 27
#define BTN_ENC 29
#define BEEPER_PIN -1
#define KILL_PIN -1
#if EITHER(OLED_HW_IIC, OLED_HW_SPI)
#error "Oops! You must choose SW SPI for ZRIB V53 board and connect the OLED screen to EXP1 connector."
#else // SW_SPI
#define DOGLCD_A0 LCD_PINS_DC
#define DOGLCD_MOSI 35 // SDA
#define DOGLCD_SCK 37 // SCK
#endif
#endif // OLED 128x64
//================================================================================
// LCD 2004 KEYPAD
//================================================================================
#if ENABLED(ZONESTAR_LCD)
#define LCDSCREEN_NAME "LCD2004 ADCKEY"
#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
#define ADC_KEYPAD_PIN 10 // A10 for ADCKEY
#define BEEPER_PIN EXP1_10_PIN
#endif
/**
* ZRIB V5.3 Main Board
*
* Available connectors on ZRIB V5.3
*
* =======
* | GND |
* |-----| E0
* | 10 | (10) PB4 ** Pin23 ** PWM10
* |-----|
* | GND |
* |-----| E1
* | 7 | ( 7) PH4 ** Pin16 ** PWM7
* |-----|
* | GND |
* |-----| FAN
* | 9 | ( 9) PH6 ** Pin18 ** PWM9
* =======
* =======
* | GND |
* |-----| Heated Bed
* | 8 | ( 8) PH5 ** Pin17 ** PWM8
* =======
* ==========
* | 12-24V |
* |--------| Power
* | GND |
* ==========
* XS3 Connector
* =================
* | 65 | GND | 5V | (65) PK3 ** Pin86 ** A11
* |----|-----|----|
* | 66 | GND | 5V | (66) PK4 ** Pin85 ** A12
* =================
* XS3/Servos Connector
* =================
* | 11 | GND | 5V | (11) PB5 ** Pin24 ** PWM11
* |----|-----|----|
* | 12 | GND | 5V | (12) PB6 ** Pin25 ** PWM12
* =================
* ICSP
* =================
* | 5V | 51 | GND | (51) PB2 ** Pin21 ** SPI_MOSI
* |----|----|-----|
* | 50 | 52 | RST | (50) PB3 ** Pin22 ** SPI_MISO
* ================= (52) PB1 ** Pin20 ** SPI_SCK
* XS6 Connector
* ======================
* | 5V | GND | NC | 20 | (20) PD1 ** Pin44 ** I2C_SDA
* |----|-----|----|----|
* | 50 | 51 | 52 | 21 | (50) PB3 ** Pin22 ** SPI_MISO
* ====================== (51) PB2 ** Pin21 ** SPI_MOSI
* (52) PB1 ** Pin20 ** SPI_SCK
* (21) PD0 ** Pin43 ** I2C_SCL
* XS1 Connector
* ======================
* | 5V | GND | NC | 47 | (47) PL2 ** Pin37 ** D47
* |----|-----|----|----|
* | 42 | 43 | 44 | 45 | (45) PL4 ** Pin39 ** D45
* ====================== (44) PL5 ** Pin40 ** D44
* (43) PL6 ** Pin41 ** D43
* (42) PL7 ** Pin42 ** D42
* Temperature
* ==================================
* | GND | 69 | GND | 68 | GND | 67 |
* ==================================
* (69) PK7 ** Pin82 ** A15
* (68) PK6 ** Pin83 ** A14
* (67) PK5 ** Pin84 ** A13
* Limit Switches
* ============
* | 2 | GND | X+ ( 2) PE4 ** Pin6 ** PWM2
* |----|-----|
* | 3 | GND | X- ( 3) PE5 ** Pin7 ** PWM3
* |----|-----|
* | 15 | GND | Y+ (15) PJ0 ** Pin63 ** USART3_RX
* |----|-----|
* | 14 | GND | Y- (14) PJ1 ** Pin64 ** USART3_TX
* |----|-----|
* | 19 | GND | Z+ (19) PD2 ** Pin45 ** USART1_RX
* |----|-----|
* | 18 | GND | Z- (18) PD3 ** Pin46 ** USART1_TX
* ============
* EXP1
* ============
* | 37 | 35 | (37) PC0 ** Pin53 ** D37
* |-----|----| (35) PC2 ** Pin55 ** D35
* | 17 | 16 | (17) PH0 ** Pin12 ** USART2_RX
* |-----|----| (16) PH1 ** Pin13 ** USART2_TX
* | 23 | 25 | (23) PA1 ** Pin77 ** D23
* |-----|----| (25) PA3 ** Pin75 ** D25
* | 27 | 29 | (27) PA5 ** Pin73 ** D27
* |-----|----| (29) PA7 ** Pin71 ** D29
* | GND | 5V |
* ============
* EXP2
* ============
* | 50 | 52 | (50) PB3 ** Pin22 ** SPI_MISO
* |-----|----| (52) PB1 ** Pin20 ** SPI_SCK
* | 31 | 53 | (31) PC6 ** Pin59 ** D31
* |-----|----| (53) PB0 ** Pin19 ** SPI_SS
* | 33 | 51 | (33) PC4 ** Pin57 ** D33
* |-----|----| (51) PB2 ** Pin21 ** SPI_MOSI
* | 49 | 41 | (49) PL0 ** Pin35 ** D49
* |-----|----| (41) PG0 ** Pin51 ** D41
* | GND | NC |
* ============
*
* PIN 12
* ======
* | 12 | (12) PB6 ** Pin25 ** D12
* ======
*/

View file

@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (C) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm