Marlin_Firmware/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h

213 lines
7.1 KiB
C
Raw Normal View History

2019-04-08 23:10:45 -05:00
/**
* Marlin 3D Printer Firmware
2020-02-03 08:00:57 -06:00
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
2019-04-08 23:10:45 -05:00
*
* Based on Sprinter and grbl.
2019-06-27 23:57:50 -05:00
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
2019-04-08 23:10:45 -05:00
*
* 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
2020-07-22 22:20:14 -05:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2019-04-08 23:10:45 -05:00
*
*/
2019-07-04 22:44:12 -05:00
#pragma once
2019-04-08 23:10:45 -05:00
/**
* Azteeg X5 MINI pin assignments
*/
#ifndef MCU_LPC1769
2019-04-08 23:10:45 -05:00
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
2019-08-20 19:08:58 -05:00
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Azteeg X5 MINI"
2019-04-08 23:10:45 -05:00
#endif
2019-08-22 18:17:13 -05:00
#define BOARD_WEBSITE_URL "tiny.cc/x5_mini"
2019-04-08 23:10:45 -05:00
//
// LED
//
2020-03-21 21:13:19 -05:00
#define LED_PIN P1_18
2019-04-08 23:10:45 -05:00
//
// Servos
//
2020-03-21 21:13:19 -05:00
#define SERVO0_PIN P1_29
2019-04-08 23:10:45 -05:00
//
// Limit Switches
//
2020-03-21 21:13:19 -05:00
#define X_STOP_PIN P1_24
#define Y_STOP_PIN P1_26
#define Z_STOP_PIN P1_28
2019-04-08 23:10:45 -05:00
#ifndef FIL_RUNOUT_PIN
2020-03-21 21:13:19 -05:00
#define FIL_RUNOUT_PIN P2_04
#endif
2019-04-08 23:10:45 -05:00
#ifndef FILWIDTH_PIN
2020-03-21 21:13:19 -05:00
#define FILWIDTH_PIN P0_25_A2 // Analog Input (P0_25)
2019-04-08 23:10:45 -05:00
#endif
//
// Steppers
//
2020-03-21 21:13:19 -05:00
#define X_STEP_PIN P2_01
#define X_DIR_PIN P0_11
#define X_ENABLE_PIN P0_10
2019-04-08 23:10:45 -05:00
2020-03-21 21:13:19 -05:00
#define Y_STEP_PIN P2_02
#define Y_DIR_PIN P0_20
#define Y_ENABLE_PIN P0_19
2019-04-08 23:10:45 -05:00
2020-03-21 21:13:19 -05:00
#define Z_STEP_PIN P2_03
#define Z_DIR_PIN P0_22
#define Z_ENABLE_PIN P0_21
2019-04-08 23:10:45 -05:00
2020-03-21 21:13:19 -05:00
#define E0_STEP_PIN P2_00
#define E0_DIR_PIN P0_05
#define E0_ENABLE_PIN P0_04
2019-04-08 23:10:45 -05:00
//
// DIGIPOT slave addresses
//
#ifndef DIGIPOT_I2C_ADDRESS_A
2020-08-22 01:22:14 -05:00
#define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT
2019-04-08 23:10:45 -05:00
#endif
#ifndef DIGIPOT_I2C_ADDRESS_B
2020-08-22 01:22:14 -05:00
#define DIGIPOT_I2C_ADDRESS_B 0x2E // unshifted slave address for second DIGIPOT
2019-04-08 23:10:45 -05:00
#endif
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
2020-03-21 21:13:19 -05:00
#define TEMP_BED_PIN P0_23_A0 // A0 (TH1)
#define TEMP_0_PIN P0_24_A1 // A1 (TH2)
2019-04-08 23:10:45 -05:00
//
// Heaters / Fans
//
2020-03-21 21:13:19 -05:00
#define HEATER_BED_PIN P2_07
#define HEATER_0_PIN P2_05
2019-04-08 23:10:45 -05:00
#ifndef FAN_PIN
2020-03-21 21:13:19 -05:00
#define FAN_PIN P0_26
2019-04-08 23:10:45 -05:00
#endif
2020-03-21 21:13:19 -05:00
#define FAN1_PIN P1_25
2019-04-08 23:10:45 -05:00
//
// Display
//
#if HAS_SPI_LCD
2019-04-08 23:10:45 -05:00
#if ENABLED(CR10_STOCKDISPLAY)
// Re-Arm can support Creality stock display without SD card reader and single cable on EXP3.
// Re-Arm J3 pins 1 (p1.31) & 2 (P3.26) are not used. Stock cable will need to have one
// 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3.
// Requires REVERSE_ENCODER_DIRECTION in Configuration.h
2020-03-21 21:13:19 -05:00
#define BEEPER_PIN P2_11 // J3-3 & AUX-4
2019-04-08 23:10:45 -05:00
2020-03-21 21:13:19 -05:00
#define BTN_EN1 P0_16 // J3-7 & AUX-4
#define BTN_EN2 P1_23 // J3-5 & AUX-4
#define BTN_ENC P3_25 // J3-4 & AUX-4
2019-04-08 23:10:45 -05:00
2020-03-21 21:13:19 -05:00
#define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS)
#define LCD_PINS_ENABLE P0_18 // J3-10 & AUX-3 (SID, MOSI)
#define LCD_PINS_D4 P2_06 // J3-8 & AUX-3 (SCK, CLK)
2019-04-08 23:10:45 -05:00
#else
2020-03-21 21:13:19 -05:00
#define BTN_EN1 P3_26 // (31) J3-2 & AUX-4
#define BTN_EN2 P3_25 // (33) J3-4 & AUX-4
#define BTN_ENC P2_11 // (35) J3-3 & AUX-4
2019-04-08 23:10:45 -05:00
2020-03-21 21:13:19 -05:00
#define SD_DETECT_PIN P1_31 // (49) not 5V tolerant J3-1 & AUX-3
#define KILL_PIN P1_22 // (41) J5-4 & AUX-4
#define LCD_PINS_RS P0_16 // (16) J3-7 & AUX-4
#define LCD_SDSS P0_16 // (16) J3-7 & AUX-4
#define LCD_BACKLIGHT_PIN P0_16 // (16) J3-7 & AUX-4 - only used on DOGLCD controllers
#define LCD_PINS_ENABLE P0_18 // (51) (MOSI) J3-10 & AUX-3
#define LCD_PINS_D4 P0_15 // (52) (SCK) J3-9 & AUX-3
2019-04-08 23:10:45 -05:00
2020-03-21 21:13:19 -05:00
#define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2
2019-04-08 23:10:45 -05:00
#if ENABLED(REPRAPWORLD_KEYPAD)
2020-03-21 21:13:19 -05:00
#define SHIFT_OUT P0_18 // (51) (MOSI) J3-10 & AUX-3
#define SHIFT_CLK P0_15 // (52) (SCK) J3-9 & AUX-3
#define SHIFT_LD P1_31 // (49) not 5V tolerant J3-1 & AUX-3
2019-04-08 23:10:45 -05:00
#elif DISABLED(NEWPANEL)
2020-03-21 21:13:19 -05:00
//#define SHIFT_OUT P2_11 // (35) J3-3 & AUX-4
//#define SHIFT_CLK P3_26 // (31) J3-2 & AUX-4
//#define SHIFT_LD P3_25 // (33) J3-4 & AUX-4
//#define SHIFT_EN P1_22 // (41) J5-4 & AUX-4
2019-04-08 23:10:45 -05:00
#endif
#if ANY(VIKI2, miniVIKI)
//#define LCD_SCREEN_ROT_180
2020-03-21 21:13:19 -05:00
#define BEEPER_PIN P1_30 // (37) may change if cable changes
#define DOGLCD_CS P0_26 // (63) J5-3 & AUX-2
#define DOGLCD_SCK SCK_PIN
#define DOGLCD_MOSI MOSI_PIN
2019-04-08 23:10:45 -05:00
2020-03-21 21:13:19 -05:00
#define STAT_LED_BLUE_PIN P0_26 // (63) may change if cable changes
#define STAT_LED_RED_PIN P1_21 // ( 6) may change if cable changes
2019-04-08 23:10:45 -05:00
#else
#if ENABLED(ULTIPANEL)
2020-03-21 21:13:19 -05:00
#define LCD_PINS_D5 P1_17 // (71) ENET_MDIO
#define LCD_PINS_D6 P1_14 // (73) ENET_RX_ER
#define LCD_PINS_D7 P1_10 // (75) ENET_RXD1
2019-04-08 23:10:45 -05:00
#endif
2020-03-21 21:13:19 -05:00
#define BEEPER_PIN P1_30 // (37) not 5V tolerant
#define DOGLCD_CS P0_16 // (16)
2019-04-08 23:10:45 -05:00
#endif
#if ENABLED(MINIPANEL)
// GLCD features
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#endif
#endif
#endif // HAS_SPI_LCD
2019-04-08 23:10:45 -05:00
//
// SD Support
//
#ifndef SDCARD_CONNECTION
2020-03-21 21:13:19 -05:00
#define SDCARD_CONNECTION ONBOARD
#endif
2019-04-08 23:10:45 -05:00
2020-03-21 21:13:19 -05:00
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#if SD_CONNECTION_IS(LCD)
2020-03-21 21:13:19 -05:00
#define SCK_PIN P0_15
#define MISO_PIN P0_17
#define MOSI_PIN P0_18
#define SS_PIN P1_23
#elif SD_CONNECTION_IS(ONBOARD)
#undef SD_DETECT_PIN
2020-03-21 21:13:19 -05:00
#define SCK_PIN P0_07
#define MISO_PIN P0_08
#define MOSI_PIN P0_09
#define SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
2019-04-08 23:10:45 -05:00
#endif