Prusa MINI Firmware overview
pins_RAMPS_OLD.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4  *
5  * Based on Sprinter and grbl.
6  * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 #pragma once
23 
24 /**
25  * Arduino Mega with RAMPS v1.0, v1.1, v1.2 pin assignments
26  */
27 
28 #if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
29  #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
30 #endif
31 
32 #define BOARD_INFO_NAME "RAMPS <1.2"
33 
34 // Uncomment the following line for RAMPS v1.0
35 //#define RAMPS_V_1_0
36 
37 //
38 // Limit Switches
39 //
40 #define X_MIN_PIN 3
41 #define X_MAX_PIN 2
42 #define Y_MIN_PIN 16
43 #define Y_MAX_PIN 17
44 #define Z_MIN_PIN 18
45 #define Z_MAX_PIN 19
46 
47 //
48 // Z Probe (when not Z_MIN_PIN)
49 //
50 #ifndef Z_MIN_PROBE_PIN
51  #define Z_MIN_PROBE_PIN 19
52 #endif
53 
54 //
55 // Steppers
56 //
57 #define X_STEP_PIN 26
58 #define X_DIR_PIN 28
59 #define X_ENABLE_PIN 24
60 
61 #define Y_STEP_PIN 38
62 #define Y_DIR_PIN 40
63 #define Y_ENABLE_PIN 36
64 
65 #define Z_STEP_PIN 44
66 #define Z_DIR_PIN 46
67 #define Z_ENABLE_PIN 42
68 
69 #define E0_STEP_PIN 32
70 #define E0_DIR_PIN 34
71 #define E0_ENABLE_PIN 30
72 
73 //
74 // Temperature Sensors
75 //
76 #define TEMP_0_PIN 2 // Analog Input
77 #define TEMP_BED_PIN 1 // Analog Input
78 
79 // SPI for Max6675 or Max31855 Thermocouple
80 #if DISABLED(SDSUPPORT)
81  #define MAX6675_SS_PIN 66 // Don't use 53 if there is even the remote possibility of using Display/SD card
82 #else
83  #define MAX6675_SS_PIN 66 // Don't use 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
84 #endif
85 
86 //
87 // Heaters / Fans
88 //
89 #if ENABLED(RAMPS_V_1_0)
90  #define HEATER_0_PIN 12
91  #define HEATER_BED_PIN -1
92  #ifndef FAN_PIN
93  #define FAN_PIN 11
94  #endif
95 #else // RAMPS_V_1_1 or RAMPS_V_1_2
96  #define HEATER_0_PIN 10
97  #define HEATER_BED_PIN 8
98  #ifndef FAN_PIN
99  #define FAN_PIN 9
100  #endif
101 #endif
102 
103 //
104 // Misc. Functions
105 //
106 #define SDPOWER_PIN 48
107 #define SDSS 53
108 #define LED_PIN 13
109 #define CASE_LIGHT_PIN 45 // Hardware PWM
110 
111 //
112 // M3/M4/M5 - Spindle/Laser Control
113 //
114 #define SPINDLE_LASER_ENA_PIN 41 // Pullup or pulldown!
115 #define SPINDLE_LASER_PWM_PIN 45 // Hardware PWM
116 #define SPINDLE_DIR_PIN 43