Commit b3267d28 authored by MagoKimbra's avatar MagoKimbra

Merge remote-tracking branch 'refs/remotes/origin/master' into dev

parents c8b078fb 7abefaf8
......@@ -61,7 +61,8 @@
* M105 - Read current temp
* M106 - Fan on
* M107 - Fan off
* M109 - S[xxx] Wait for extruder current temp to reach target temp. Waits only when heating - R[xxx] Wait for extruder current temp to reach target temp. Waits when heating and cooling
* M109 - S[xxx] Wait for extruder current temp to reach target temp. Waits only when heating
- R[xxx] Wait for extruder current temp to reach target temp. Waits when heating and cooling
* M111 - Debug Dryrun Repetier
* M112 - Emergency stop
* M114 - Output current position to serial port, (V)erbose for user
......@@ -81,7 +82,8 @@
* M163 - Set a single proportion for a mixing extruder. Requires COLOR_MIXING_EXTRUDER.
* M164 - Save the mix as a virtual extruder. Requires COLOR_MIXING_EXTRUDER and MIXING_VIRTUAL_TOOLS.
* M165 - Set the proportions for a mixing extruder. Use parameters ABCDHI to set the mixing factors. Requires COLOR_MIXING_EXTRUDER.
* M190 - S[xxx] Wait for bed current temp to reach target temp. Waits only when heating - R[xxx] Wait for bed current temp to reach target temp. Waits when heating and cooling
* M190 - S[xxx] Wait for bed current temp to reach target temp. Waits only when heating
- R[xxx] Wait for bed current temp to reach target temp. Waits when heating and cooling
* M200 - D[millimeters]- set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters).
* M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000 Z1000 E0 S1000 E1 S1000 E2 S1000 E3 S1000) in mm/sec^2
* M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E0 S1000 E1 S1000 E2 S1000 E3 S1000) in mm/sec
......
### Version 4.2.8
* Add board folder with files of various board containing the pins
* Rewrite macros
* Fix M109 so it won't wait for cooling
* Clear code
* Bug fix
### Version 4.2.7
* Add M906 Set motor Currents for ALLIGATOR board
* Add M408 JSON OUTPUT
......
......@@ -98,6 +98,7 @@
#define BOARD_DUEMILANOVE_328P 4 // Duemilanove w/ ATMega328P pin assignments
#define BOARD_MKS_BASE 40 // MKS BASE 1.0
#define BOARD_MKS_MINI 41 // MKS MINI 1.0
#define BOARD_RADDS 402 // RADDS ARM 32
#define BOARD_RAMPS_FD_V1 403 // RAMPS-FD V1 ARM 32
#define BOARD_RAMPS_FD_V2 404 // RAMPS-FD V2 ARM 32
......
......@@ -2,9 +2,10 @@
#define CONFIGURATION_VERSION_H
#define FIRMWARE_NAME "MK"
#define SHORT_BUILD_VERSION "4.2.7_dev"
#define SHORT_BUILD_VERSION "4.2.8_dev"
#define BUILD_VERSION FIRMWARE_NAME "_" SHORT_BUILD_VERSION
#define STRING_DISTRIBUTION_DATE __DATE__ " " __TIME__ // build date and time
// It might also be appropriate to define a location where additional information can be found
#define FIRMWARE_BIT_BOARDS 8
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#endif
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -60,7 +60,7 @@
#endif
if (useU2X) {
M_UCSRxA = BIT(M_U2Xx);
M_UCSRxA = _BV(M_U2Xx);
baud_setting = (F_CPU / 4 / baud - 1) / 2;
}
else {
......
......@@ -101,7 +101,6 @@ millis_t print_job_start_ms = 0; ///< Print job start time
millis_t print_job_stop_ms = 0; ///< Print job stop time
static uint8_t target_extruder;
bool no_wait_for_cooling = true;
bool target_direction;
bool software_endstops = true;
unsigned long printer_usage_seconds;
......@@ -1320,8 +1319,8 @@ static void clean_up_after_endstop_move() {
enum ProbeAction {
ProbeStay = 0,
ProbeDeploy = BIT(0),
ProbeStow = BIT(1),
ProbeDeploy = _BV(0),
ProbeStow = _BV(1),
ProbeDeployAndStow = (ProbeDeploy | ProbeStow)
};
......@@ -1499,8 +1498,8 @@ static void clean_up_after_endstop_move() {
destination[axis] = current_position[axis];
feedrate = 0.0;
endstops_hit_on_purpose(); // clear endstop hit flags
BITSET(axis_was_homed, axis);
BITSET(axis_known_position, axis);
SBI(axis_was_homed, axis);
SBI(axis_known_position, axis);
#if ENABLED(Z_PROBE_SLED)
// bring probe back
......@@ -1606,8 +1605,8 @@ static void clean_up_after_endstop_move() {
destination[axis] = current_position[axis];
feedrate = 0.0;
endstops_hit_on_purpose(); // clear endstop hit flags
BITSET(axis_was_homed, axis);
BITSET(axis_known_position, axis);
SBI(axis_was_homed, axis);
SBI(axis_known_position, axis);
}
}
#define HOMEAXIS(LETTER) homeaxis(LETTER##_AXIS)
......@@ -2680,7 +2679,7 @@ static void clean_up_after_endstop_move() {
static void dock_sled(bool dock, int offset=0) {
if (debugLevel & DEBUG_INFO) ECHO_LMV(INFO, "dock_sled", dock);
if (axis_known_position & (BIT(X_AXIS)|BIT(Y_AXIS)) != (BIT(X_AXIS)|BIT(Y_AXIS))) {
if (axis_known_position & (_BV(X_AXIS)|_BV(Y_AXIS)) != (_BV(X_AXIS)|_BV(Y_AXIS))) {
LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
ECHO_LM(DB, MSG_POSITION_UNKNOWN);
return;
......@@ -2761,76 +2760,68 @@ static void clean_up_after_endstop_move() {
#endif
inline void wait_heater() {
millis_t temp_ms = millis();
/* See if we are heating up or cooling down */
target_direction = isHeatingHotend(target_extruder); // true if heating, false if cooling
cancel_heatup = false;
// Exit if the temperature is above target and not waiting for cooling
if (no_wait_for_cooling && !isHeatingHotend(target_extruder)) return;
#if ENABLED(TEMP_RESIDENCY_TIME)
long residency_start_ms = -1;
/* continue to loop until we have reached the target temp
_and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
while((!cancel_heatup)&&((residency_start_ms == -1) ||
(residency_start_ms >= 0 && (((millis_t) (millis() - residency_start_ms)) < (TEMP_RESIDENCY_TIME * 1000UL)))) )
// Loop until the temperature has stabilized
#define TEMP_CONDITIONS (residency_start_ms < 0 || now < residency_start_ms + TEMP_RESIDENCY_TIME * 1000UL)
#else
while ( target_direction ? (isHeatingHotend(target_extruder)) : (isCoolingHotend(target_extruder)&&(no_wait_for_cooling==false)) )
// Loop until the temperature is exactly on target
#define TEMP_CONDITIONS (degHotend(target_extruder) != degTargetHotend(target_extruder))
#endif // TEMP_RESIDENCY_TIME
{ // while loop
if (millis() > temp_ms + 1000UL) { //Print temp & remaining time every 1s while waiting
#if HAS(TEMP_0) || HAS(TEMP_BED) || ENABLED(HEATER_0_USES_MAX6675)
print_heaterstates();
#endif
#if ENABLED(TEMP_RESIDENCY_TIME)
ECHO_M(" " SERIAL_W);
if (residency_start_ms > -1) {
temp_ms = ((TEMP_RESIDENCY_TIME * 1000UL) - (millis() - residency_start_ms)) / 1000UL;
ECHO_EV(temp_ms);
}
else {
ECHO_EM("?");
}
#else
ECHO_E;
#endif
temp_ms = millis();
}
idle();
cancel_heatup = false;
millis_t now = millis(), next_temp_ms = now + 1000UL;
while (!cancel_heatup && TEMP_CONDITIONS) {
now = millis();
if (now > next_temp_ms) { // Print temp & remaining time every 1s while waiting
next_temp_ms = now + 1000UL;
#if HAS(TEMP_0) || HAS(TEMP_BED) || ENABLED(HEATER_0_USES_MAX6675)
print_heaterstates();
#endif
#if ENABLED(TEMP_RESIDENCY_TIME)
// start/restart the TEMP_RESIDENCY_TIME timer whenever we reach target temp for the first time
// or when current temp falls outside the hysteresis after target temp was reached
if ((residency_start_ms == -1 && target_direction && (degHotend(target_extruder) >= (degTargetHotend(target_extruder)-TEMP_WINDOW))) ||
(residency_start_ms == -1 && !target_direction && (degHotend(target_extruder) <= (degTargetHotend(target_extruder)+TEMP_WINDOW))) ||
(residency_start_ms > -1 && labs(degHotend(target_extruder) - degTargetHotend(target_extruder)) > TEMP_HYSTERESIS) )
{
residency_start_ms = millis();
ECHO_M(" " SERIAL_W);
if (residency_start_ms >= 0) {
long rem = ((TEMP_RESIDENCY_TIME * 1000UL) - (now - residency_start_ms)) / 1000UL;
ECHO_EV(rem);
}
else {
ECHO_EM("?");
}
#endif // TEMP_RESIDENCY_TIME
#else
ECHO_E;
#endif
}
idle();
#if ENABLED(TEMP_RESIDENCY_TIME)
// Start the TEMP_RESIDENCY_TIME timer when we reach target temp for the first time.
// Restart the timer whenever the temperature falls outside the hysteresis.
if (labs(degHotend(target_extruder) - degTargetHotend(target_extruder)) > ((residency_start_ms < 0) ? TEMP_WINDOW : TEMP_HYSTERESIS))
residency_start_ms = millis();
#endif // TEMP_RESIDENCY_TIME
} // while(!cancel_heatup && TEMP_CONDITIONS)
LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
refresh_cmd_timeout();
print_job_start_ms = previous_cmd_ms;
}
inline void wait_bed() {
millis_t temp_ms = millis();
// Exit if the temperature is above target and not waiting for cooling
if (no_wait_for_cooling && !isHeatingBed()) return;
cancel_heatup = false;
target_direction = isHeatingBed(); // true if heating, false if cooling
while ((target_direction && !cancel_heatup) ? isHeatingBed() : isCoolingBed() && !no_wait_for_cooling) {
millis_t ms = millis();
if (ms > temp_ms + 1000UL) { //Print Temp Reading every 1 second while heating up.
temp_ms = ms;
#if HAS(TEMP_0) || HAS(TEMP_BED) || ENABLED(HEATER_0_USES_MAX6675)
print_heaterstates();
ECHO_E;
#endif
millis_t now = millis(), next_temp_ms = now + 1000UL;
while (!cancel_heatup && degTargetBed() != degBed()) {
millis_t now = millis();
if (now > next_temp_ms) { // Print Temp Reading every 1 second while heating up.
next_temp_ms = now + 1000UL;
print_heaterstates();
ECHO_E;
}
idle();
}
......@@ -3336,7 +3327,7 @@ inline void gcode_G28() {
else if (homeZ) { // Don't need to Home Z twice
// Let's see if X and Y are homed
if (axis_was_homed & (BIT(X_AXIS)|BIT(Y_AXIS)) == (BIT(X_AXIS)|BIT(Y_AXIS))) {
if (axis_was_homed & (_BV(X_AXIS)|_BV(Y_AXIS)) == (_BV(X_AXIS)|_BV(Y_AXIS))) {
// Make sure the probe is within the physical limits
// NOTE: This doesn't necessarily ensure the probe is also within the bed!
......@@ -3380,7 +3371,7 @@ inline void gcode_G28() {
if (home_all_axis || homeZ) {
// Let's see if X and Y are homed
if (axis_was_homed & (BIT(X_AXIS)|BIT(Y_AXIS)) == (BIT(X_AXIS)|BIT(Y_AXIS))) {
if (axis_was_homed & (_BV(X_AXIS)|_BV(Y_AXIS)) == (_BV(X_AXIS)|_BV(Y_AXIS))) {
current_position[Z_AXIS] = 0;
sync_plan_position();
......@@ -3505,7 +3496,7 @@ inline void gcode_G28() {
if (debugLevel & DEBUG_INFO) ECHO_LM(INFO, "gcode_G29 >>>");
// Don't allow auto-leveling without homing first
if (axis_known_position & (BIT(X_AXIS)|BIT(Y_AXIS)) != (BIT(X_AXIS)|BIT(Y_AXIS))) {
if (axis_known_position & (_BV(X_AXIS)|_BV(Y_AXIS)) != (_BV(X_AXIS)|_BV(Y_AXIS))) {
LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
ECHO_LM(ER, MSG_POSITION_UNKNOWN);
return;
......@@ -5116,7 +5107,8 @@ inline void gcode_M105() {
#endif // HAS(FAN)
/**
* M109: Wait for extruder(s) to reach temperature
* M109: Sxxx Wait for extruder(s) to reach temperature. Waits only when heating.
* Rxxx Wait for extruder(s) to reach temperature. Waits when heating and cooling.
*/
inline void gcode_M109() {
if (setTargetedExtruder(109)) return;
......@@ -6238,7 +6230,7 @@ inline void gcode_M400() { st_synchronize(); }
ECHO_M("\",\"coords\": {");
ECHO_M("\"axesHomed\":[");
if (axis_was_homed & (BIT(X_AXIS)|BIT(Y_AXIS)|BIT(Z_AXIS)) == (BIT(X_AXIS)|BIT(Y_AXIS)|BIT(Z_AXIS)))
if (axis_was_homed & (_BV(X_AXIS)|_BV(Y_AXIS)|_BV(Z_AXIS)) == (_BV(X_AXIS)|_BV(Y_AXIS)|_BV(Z_AXIS)))
ECHO_M("1, 1, 1");
else
ECHO_M("0, 0, 0");
......
......@@ -60,12 +60,12 @@ void Stop();
* Debug flags - with repetier
*/
enum DebugFlags {
DEBUG_ECHO = BIT(0),
DEBUG_INFO = BIT(1),
DEBUG_ERRORS = BIT(2),
DEBUG_DRYRUN = BIT(3),
DEBUG_COMMUNICATION = BIT(4),
DEBUG_DEBUG = BIT(5)
DEBUG_ECHO = _BV(0),
DEBUG_INFO = _BV(1),
DEBUG_ERRORS = _BV(2),
DEBUG_DRYRUN = _BV(3),
DEBUG_COMMUNICATION = _BV(4),
DEBUG_DEBUG = _BV(5)
};
void clamp_to_software_endstops(float target[3]);
......
/****************************************************************************************
* 77
* 3DRAG
****************************************************************************************/
#define KNOWN_BOARD
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 63
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN -1
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 25
#define LED_PIN 13
#define ORIG_FAN_PIN 8 // IO pin. Buffer needed
#define ORIG_PS_ON_PIN 12
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41
#else
#define KILL_PIN -1
#endif
#define ORIG_HEATER_0_PIN 10 // HOTEND 1
#define ORIG_HEATER_1_PIN 12 // HOTEND 2
#define ORIG_HEATER_2_PIN 6 // HOTEND 3
#define ORIG_HEATER_3_PIN -1
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 9 // NO BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 11
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 4
#endif
#endif
#endif
#endif
#define ORIG_BEEPER_PIN 33
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
#define ORIG_BEEPER_PIN -1
#define LCD_PINS_RS 27
#define LCD_PINS_ENABLE 29
#define LCD_PINS_D4 37
#define LCD_PINS_D5 35
#define LCD_PINS_D6 33
#define LCD_PINS_D7 31
// Buttons
#define BTN_EN1 16
#define BTN_EN2 17
#define BTN_ENC 23 //the click
#endif // ULTRA_LCD && NEWPANEL
// SPI for Max6675 Thermocouple
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
/****************************************************************************************
* 88
* 5DPrint D8 Driver board
* https://bitbucket.org/makible/5dprint-d8-controller-board
****************************************************************************************/
#define KNOWN_BOARD
#define AT90USB 1286 // Disable MarlinSerial etc.
#ifndef __AVR_AT90USB1286__
#error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 0
#define ORIG_X_DIR_PIN 1
#define ORIG_X_ENABLE_PIN 23
#define X_STOP_PIN 37
#define ORIG_Y_STEP_PIN 2
#define ORIG_Y_DIR_PIN 3
#define ORIG_Y_ENABLE_PIN 19
#define Y_STOP_PIN 36
#define ORIG_Z_STEP_PIN 4
#define ORIG_Z_DIR_PIN 5
#define ORIG_Z_ENABLE_PIN 18
#define Z_STOP_PIN 39
#define ORIG_E0_STEP_PIN 6
#define ORIG_E0_DIR_PIN 7
#define ORIG_E0_ENABLE_PIN 17
#define ORIG_HEATER_0_PIN 21 // Extruder
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 20 // Bed
// You may need to change ORIG_FAN_PIN to 16 because Marlin isn't using fastio.h
// for the fan and Teensyduino uses a different pin mapping.
#define ORIG_FAN_PIN 16 // Fan
#define ORIG_TEMP_0_PIN 1 // Extruder / Analog pin numbering
#define ORIG_TEMP_BED_PIN 0 // Bed / Analog pin numbering
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define SDPOWER -1
#define LED_PIN -1
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ALARM_PIN -1
// The SDSS pin uses a different pin mapping from file Sd2PinMap.h
#define SDSS 20
// Microstepping pins
// Note that the pin mapping is not from fastio.h
// See Sd2PinMap.h for the pin configurations
#define X_MS1_PIN 25
#define X_MS2_PIN 26
#define Y_MS1_PIN 9
#define Y_MS2_PIN 8
#define Z_MS1_PIN 7
#define Z_MS2_PIN 6
#define E0_MS1_PIN 5
#define E0_MS2_PIN 4
/****************************************************************************************
* 99
* Custom board
****************************************************************************************/
#define KNOWN_BOARD 1
#define ORIG_X_STEP_PIN 2
#define ORIG_X_DIR_PIN 3
#define ORIG_X_ENABLE_PIN -1
#define X_STOP_PIN 16
#define ORIG_Y_STEP_PIN 5
#define ORIG_Y_DIR_PIN 6
#define ORIG_Y_ENABLE_PIN -1
#define Y_STOP_PIN 67
#define ORIG_Z_STEP_PIN 62
#define ORIG_Z_DIR_PIN 63
#define ORIG_Z_ENABLE_PIN -1
#define Z_STOP_PIN 59
#define ORIG_E0_STEP_PIN 65
#define ORIG_E0_DIR_PIN 66
#define ORIG_E0_ENABLE_PIN -1
#define SDPOWER -1
#define SDSS 53
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#define ORIG_PS_ON_PIN 9
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 13
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_TEMP_0_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define ORIG_TEMP_1_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define ORIG_TEMP_2_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define ORIG_HEATER_BED_PIN 4
#define ORIG_TEMP_BED_PIN 10
/****************************************************************************************
* 502
* Alligator R2
* http://www.3dartists.org/
****************************************************************************************/
#define KNOWN_BOARD
#ifndef __SAM3X8E__
#error Oops! Make sure you have 'Alligator 3D Printer Board' selected from the 'Tools -> Boards' menu.
#endif
#define ALLIGATOR
#define SPI_CHAN_DAC 1
// X AXIS
#define ORIG_X_STEP_PIN 96 // PB24
#define ORIG_X_DIR_PIN 2 // PB25
#define ORIG_X_ENABLE_PIN 24 // PA15, motor RESET pin
#define ORIG_X_MIN_PIN 33 // PC1
#define ORIG_X_MAX_PIN 34 // PC2
#define X_MS1_PIN 99 // PC10
// Y AXIS
#define ORIG_Y_STEP_PIN 94 // PB22
#define ORIG_Y_DIR_PIN 95 // PB23
#define ORIG_Y_ENABLE_PIN 24 // PA15, motor RESET pin
#define ORIG_Y_MIN_PIN 35 // PC3
#define ORIG_Y_MAX_PIN 37 // PC5
#define Y_MS1_PIN 10 // PC29
// Z AXIS
#define ORIG_Z_STEP_PIN 98 // PC27
#define ORIG_Z_DIR_PIN 3 // PC28
#define ORIG_Z_ENABLE_PIN 24 // PA15, motor RESET pin
#define ORIG_Z_MIN_PIN 38 // PC6
#define ORIG_Z_MAX_PIN 39 // PC7
#define Z_MS1_PIN 44 // PC19
// E0 AXIS
#define ORIG_E0_STEP_PIN 5 // PC25
#define ORIG_E0_DIR_PIN 4 // PC26
#define ORIG_E0_ENABLE_PIN 24 // PA15, motor RESET pin
#define E0_MS1_PIN 45 // PC18
// E1 AXIS
#define ORIG_E1_STEP_PIN 28 // PD3 on piggy
#define ORIG_E1_DIR_PIN 27 // PD2 on piggy
#define ORIG_E1_ENABLE_PIN 24 // PA15, motor RESET pin
// E2 AXIS
#define ORIG_E2_STEP_PIN 11 // PD7 on piggy
#define ORIG_E2_DIR_PIN 29 // PD6 on piggy
#define ORIG_E2_ENABLE_PIN 24 // PA15, motor RESET pin
// E3 AXIS
#define ORIG_E3_STEP_PIN 30 // PD9 on piggy
#define ORIG_E3_DIR_PIN 12 // PD8 on piggy
#define ORIG_E3_ENABLE_PIN 24 // PA15, motor RESET pin
#define MOTOR_FAULT_PIN 22 // PB26 , motor X-Y-Z-E0 motor FAULT
#define SDPOWER -1
#define SDSS 77 // PA28
#define SD_DETECT_PIN 87 // PA29
#define LED_PIN -1
#define ORIG_FAN_PIN 92 // PA5
#define ORIG_FAN2_PIN 31 // PA7
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
// Note that on the Due pin A0 on the board is channel 2 on the ARM chip
#define ORIG_HEATER_BED_PIN 69 // PA0
#define ORIG_HEATER_0_PIN 68 // PA1
#define ORIG_HEATER_1_PIN 8 // PC22 on piggy
#define ORIG_HEATER_2_PIN 9 // PC21 on piggy
#define ORIG_HEATER_3_PIN 97 // PC20 on piggy
#define ORIG_TEMP_BED_PIN 0 // PA16
#define ORIG_TEMP_0_PIN 1 // PA24, analog pin
#define ORIG_TEMP_1_PIN 2 // PA23 analog pin on piggy
#define ORIG_TEMP_2_PIN 3 // PA22, analog pin on piggy
#define ORIG_TEMP_3_PIN 4 // PA6, analog on piggy
#define LED_PWM1_PIN 40 // PC8
#define LED_PWM2_PIN 41 // PC9
#define LED_PWM3_PIN 36 // PC4
#define EXP_VOLTAGE_LEVEL_PIN 65
#define DAC0_SYNC 53 // PB14
#define DAC1_SYNC 6 // PC24
//64K SPI EEPROM
#define SPI_CHAN_EEPROM1 2
#define SPI_EEPROM1_CS 25 // PD0
//2K SPI EEPROM
#define SPI_EEPROM2_CS 26 // PD1
//** FLASH SPI**/
//32Mb
#define SPI_FLASH_CS 23 //PA14
/** Display **/
// GLCD on expansion port
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define LCD_PINS_RS 18
#define LCD_PINS_ENABLE 15
#define LCD_PINS_D4 19
#define ORIG_BEEPER_PIN 64
#define BTN_EN1 14
#define BTN_EN2 16
#define BTN_ENC 17
#if UI_VOLTAGE_LEVEL != 1
#undef UI_VOLTAGE_LEVEL
#define UI_VOLTAGE_LEVEL 1
#endif
#endif //REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#if NUM_SERVOS > 0
#define SERVO0_PIN 36
#if NUM_SERVOS > 1
#define SERVO1_PIN 40
#if NUM_SERVOS > 2
#define SERVO2_PIN 41
#if NUM_SERVOS > 3
#define SERVO3_PIN -1
#endif
#endif
#endif
#endif
/****************************************************************************************
* 67
* AZTEEG X3
****************************************************************************************/
#define KNOWN_BOARD 1
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 9
#define ORIG_PS_ON_PIN 12
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41
#else
#define KILL_PIN -1
#endif
#define ORIG_HEATER_0_PIN 10 // HOTEND 1
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_3_PIN -1
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 11
#endif
#if NUM_SERVOS > 0
#define SERVO0_PIN 11
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 4
#endif
#endif
#endif
#endif
#if ENABLED(TEMP_STAT_LEDS)
#define STAT_LED_RED 6
#define STAT_LED_BLUE 11
#endif
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define ORIG_BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 //reverse if the encoder turns the wrong way.
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 //reverse if the encoder turns the wrong way.
#define BTN_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#else
//arduino pin which triggers an piezzo beeper
#define ORIG_BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31 //the click
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
#endif
#endif
#else //old style panel with shift register
//arduino pin witch triggers an piezzo beeper
#define ORIG_BEEPER_PIN 33 //No Beeper added
//buttons are attached to a shift register
// Not wired this yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif
#endif //ULTRA_LCD
// SPI for Max6675 Thermocouple
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
/****************************************************************************************
* 68
* AZTEEG X3 PRO
****************************************************************************************/
#define KNOWN_BOARD 1
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define ORIG_E2_STEP_PIN 23
#define ORIG_E2_DIR_PIN 25
#define ORIG_E2_ENABLE_PIN 40
#define ORIG_E3_STEP_PIN 27
#define ORIG_E3_DIR_PIN 29
#define ORIG_E3_ENABLE_PIN 41
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 6
#define ORIG_BEEPER_PIN 33
#define ORIG_PS_ON_PIN 12
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41
#else
#define KILL_PIN -1
#endif
#define ORIG_HEATER_0_PIN 10 // HOTEND 1
#define ORIG_HEATER_1_PIN 9 // HOTEND 2
#define ORIG_HEATER_2_PIN 16 // HOTEND 3
#define ORIG_HEATER_3_PIN 17 // HOTEND 4
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN 12 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN 11 // ANALOG NUMBERING
#define TC1 4 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
#define TC2 5 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 47
#if NUM_SERVOS > 1
#define SERVO1_PIN -1
#if NUM_SERVOS > 2
#define SERVO2_PIN -1
#if NUM_SERVOS > 3
#define SERVO3_PIN -1
#endif
#endif
#endif
#endif
#if ENABLED(TEMP_STAT_LEDS)
#define STAT_LED_RED 32
#define STAT_LED_BLUE 35
#endif
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define ORIG_BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 //reverse if the encoder turns the wrong way.
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 //reverse if the encoder turns the wrong way.
#define BTN_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#else
//arduino pin which triggers an piezzo beeper
#define ORIG_BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31 //the click
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
#endif
#endif
#else //old style panel with shift register
//arduino pin witch triggers an piezzo beeper
#define ORIG_BEEPER_PIN 33 //No Beeper added
//buttons are attached to a shift register
// Not wired this yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif
#endif //ULTRA_LCD
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
#define ORIG_BEEPER_PIN 33
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 45
#define LCD_SCREEN_ROT_180
//The encoder and click button
#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 39 // the click switch
#define SDSS 53
#define SD_DETECT_PIN 49
#define KILL_PIN 31
#endif
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
/****************************************************************************************
* 82
* Brainwave 1.0 pin assignments (AT90USB646)
* Requires hardware bundle for Arduino:
* https://github.com/unrepentantgeek/brainwave-arduino
****************************************************************************************/
#define KNOWN_BOARD 1
#define AT90USB 646 // Disable MarlinSerial etc.
#ifndef __AVR_AT90USB646__
#error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
#endif
#define ORIG_X_STEP_PIN 27
#define ORIG_X_DIR_PIN 29
#define ORIG_X_ENABLE_PIN 28
#define X_STOP_PIN 7
#define X_ATT_PIN 26
#define ORIG_Y_STEP_PIN 31
#define ORIG_Y_DIR_PIN 33
#define ORIG_Y_ENABLE_PIN 32
#define Y_STOP_PIN 6
#define Y_ATT_PIN 30
#define ORIG_Z_STEP_PIN 17
#define ORIG_Z_DIR_PIN 19
#define ORIG_Z_ENABLE_PIN 18
#define Z_STOP_PIN 5
#define Z_ATT_PIN 16
#define ORIG_E0_STEP_PIN 21
#define ORIG_E0_DIR_PIN 23
#define ORIG_E0_ENABLE_PIN 22
#define E0_ATT_PIN 20
#define ORIG_HEATER_0_PIN 4 // Extruder
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 38 // Bed
#define ORIG_FAN_PIN 3 // Fan
#define ORIG_TEMP_0_PIN 7 // Extruder / Analog pin numbering
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 6 // Bed / Analog pin numbering
#define SDPOWER -1
#define SDSS -1
#define LED_PIN 39
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ALARM_PIN -1
/****************************************************************************************
* 2
* Cheaptronic v1.0
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
//X motor stepper
#define ORIG_X_STEP_PIN 14
#define ORIG_X_DIR_PIN 15
#define ORIG_X_ENABLE_PIN 24
//X endstop
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN -1
//Y motor stepper
#define ORIG_Y_STEP_PIN 35
#define ORIG_Y_DIR_PIN 36
#define ORIG_Y_ENABLE_PIN 31
//Y endstop
#define ORIG_Y_MIN_PIN 2
#define ORIG_Y_MAX_PIN -1
//Z motor stepper
#define ORIG_Z_STEP_PIN 40
#define ORIG_Z_DIR_PIN 41
#define ORIG_Z_ENABLE_PIN 37
//Z endstop
#define ORIG_Z_MIN_PIN 5
#define ORIG_Z_MAX_PIN -1
//Extruder 0 stepper
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 25
//Extruder 1 stepper
#define ORIG_E1_STEP_PIN 33
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS -1
#define LED_PIN -1
//FAN
#define ORIG_FAN_PIN -1
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 19 // EXTRUDER 1
#define ORIG_HEATER_1_PIN 23 // EXTRUDER 2
//HeatedBad
#define ORIG_HEATER_BED_PIN 22
//Cheaptronic v1.0 hasent EXTRUDER 3
#define ORIG_HEATER_2_PIN -1
//Temperature sensors
#define ORIG_TEMP_0_PIN 15
#define ORIG_TEMP_1_PIN 14
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 13
//Cheaptronic v1.0 dont support LCD
#define LCD_PINS_RS -1
#define LCD_PINS_ENABLE -1
#define LCD_PINS_D4 -1
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
//Cheaptronic v1.0 dont support keypad
#define BTN_EN1 -1
#define BTN_EN2 -1
#define BTN_ENC -1
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
//Cheaptronic v1.0 does not use this port
#define SD_DETECT_PIN -1
/****************************************************************************************
* 4
* Duemilanove w/ ATMega328P
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega328P__
#error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
#endif
#define ORIG_X_STEP_PIN 19
#define ORIG_X_DIR_PIN 18
#define ORIG_X_ENABLE_PIN -1
#define X_STOP_PIN 17
#define ORIG_Y_STEP_PIN 10
#define ORIG_Y_DIR_PIN 7
#define ORIG_Y_ENABLE_PIN -1
#define Y_STOP_PIN 8
#define ORIG_Z_STEP_PIN 13
#define ORIG_Z_DIR_PIN 3
#define ORIG_Z_ENABLE_PIN 2
#define Z_STOP_PIN 4
#define ORIG_E0_STEP_PIN 11
#define ORIG_E0_DIR_PIN 12
#define ORIG_E0_ENABLE_PIN -1
#define SDPOWER -1
#define SDSS -1
#define LED_PIN -1
#define ORIG_FAN_PIN 5
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 6
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_HEATER_BED_PIN -1
#define ORIG_TEMP_BED_PIN -1
/****************************************************************************************
* 21
* Elefu RA Board
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define ORIG_X_STEP_PIN 49
#define ORIG_X_DIR_PIN 13
#define ORIG_X_ENABLE_PIN 48
#define ORIG_X_MIN_PIN 35
#define ORIG_X_MAX_PIN -1 // 34
#define ORIG_Y_STEP_PIN 11
#define ORIG_Y_DIR_PIN 9
#define ORIG_Y_ENABLE_PIN 12
#define ORIG_Y_MIN_PIN 33
#define ORIG_Y_MAX_PIN -1 // 32
#define ORIG_Z_STEP_PIN 7
#define ORIG_Z_DIR_PIN 6
#define ORIG_Z_ENABLE_PIN 8
#define ORIG_Z_MIN_PIN 31
#define ORIG_Z_MAX_PIN -1 // 30
#define ORIG_E2_STEP_PIN 43
#define ORIG_E2_DIR_PIN 47
#define ORIG_E2_ENABLE_PIN 42
#define ORIG_E1_STEP_PIN 18
#define ORIG_E1_DIR_PIN 19
#define ORIG_E1_ENABLE_PIN 38
#define ORIG_E0_STEP_PIN 40
#define ORIG_E0_DIR_PIN 41
#define ORIG_E0_ENABLE_PIN 37
#define SDPOWER -1
#define LED_PIN -1 // Use +12V Aux port for LED Ring
#define ORIG_FAN_PIN 16 // 5V PWM
#define ORIG_PS_ON_PIN 10 // Set to -1 if using a manual switch on the PWRSW Connector
#define SLEEP_WAKE_PIN 26 // This feature still needs work
#define ORIG_HEATER_0_PIN 45 // 12V PWM1
#define ORIG_HEATER_1_PIN 46 // 12V PWM2
#define ORIG_HEATER_2_PIN 17 // 12V PWM3
#define ORIG_HEATER_BED_PIN 44 // DOUBLE 12V PWM
#define ORIG_TEMP_0_PIN 3 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 2 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN 1 // ANALOG NUMBERING
#define ORIG_TEMP_BED_PIN 0 // ANALOG NUMBERING
#define ORIG_BEEPER_PIN 36
#define KILL_PIN -1
// M240 Triggers a camera by emulating a Canon RC-1 Remote
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
#define PHOTOGRAPH_PIN 29
#if ENABLED(RA_CONTROL_PANEL)
#define SDSS 53
#define SD_DETECT_PIN 28
#define BTN_EN1 14
#define BTN_EN2 39
#define BTN_ENC 15 // the click
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#endif // RA_CONTROL_PANEL
#if ENABLED(RA_DISCO)
//variables for which pins the TLC5947 is using
#define TLC_CLOCK_PIN 25
#define TLC_BLANK_PIN 23
#define TLC_XLAT_PIN 22
#define TLC_DATA_PIN 24
//We also need to define pin to port number mapping for the 2560 to match the pins listed above. If you change the TLC pins, update this as well per the 2560 datasheet!
//This currently only works with the RA Board.
#define TLC_CLOCK_BIT 3 //bit 3 on port A
#define TLC_CLOCK_PORT &PORTA //bit 3 on port A
#define TLC_BLANK_BIT 1 //bit 1 on port A
#define TLC_BLANK_PORT &PORTA //bit 1 on port A
#define TLC_DATA_BIT 2 //bit 2 on port A
#define TLC_DATA_PORT &PORTA //bit 2 on port A
#define TLC_XLAT_BIT 0 //bit 0 on port A
#define TLC_XLAT_PORT &PORTA //bit 0 on port A
//change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful
//Leave it at at least 1 if you have enabled RA_LIGHTING
//The number of TLC5947 boards chained together for use with the animation, additional ones will repeat the animation on them, but are not individually addressable and mimic those before them. You can leave the default at 2 even if you only have 1 TLC5947 module.
#define NUM_TLCS 2
//These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions.
//Modify them according to your specific situation.
//NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs.
#define TRANS_ARRAY {0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8} //forwards
//#define TRANS_ARRAY {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15} //backwards
#endif //RA_LIGHTING
/****************************************************************************************
* 22
* Gen3 Monolithic Electronics
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega644P__
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
#define DEBUG_PIN 0
// x axis
#define ORIG_X_STEP_PIN 15
#define ORIG_X_DIR_PIN 18
#define ORIG_X_MIN_PIN 20
//Alex Checar #define X_STOP_PIN 20
#define ORIG_X_ENABLE_PIN 24 // actually uses ORIG_Y_DIR_PIN
#define ORIG_X_MAX_PIN -1
// y axes
#define ORIG_Y_STEP_PIN 23
#define ORIG_Y_DIR_PIN 22
#define ORIG_Y_MIN_PIN 25
//Alex Checar #define Y_STOP_PIN 25
#define ORIG_Y_ENABLE_PIN 24 // shared with ORIG_X_ENABLE_PIN
#define ORIG_Y_MAX_PIN -1
// z axes
#define ORIG_Z_STEP_PIN 27
#define ORIG_Z_DIR_PIN 28
#define ORIG_Z_MIN_PIN 30
//Alex Checar #define Z_STOP_PIN 30
#define ORIG_Z_ENABLE_PIN 29
#define ORIG_Z_MAX_PIN -1
//extruder pins
#define ORIG_E0_STEP_PIN 12
#define ORIG_E0_DIR_PIN 17
#define ORIG_E0_ENABLE_PIN 3
#define ORIG_HEATER_0_PIN 16
#define ORIG_TEMP_0_PIN 0
#define ORIG_FAN_PIN -1
//bed pins
#define ORIG_HEATER_BED_PIN -1
#define ORIG_TEMP_BED_PIN -1
#define SDSS -1
#define SDPOWER -1
#define LED_PIN -1
//pin for controlling the PSU.
#define ORIG_PS_ON_PIN 14
//Alex extras from Gen3+
#define KILL_PIN -1
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_HEATER_2_PIN -1
/****************************************************************************************
* 9
* Gen3+
****************************************************************************************/
#define MOTHERBOARD BOARD_SANGUINOLOLU_11 /*TODO: Figure out, Why is this done?*/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega644P__
#ifndef __AVR_ATmega1284P__
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
#endif
#define ORIG_X_STEP_PIN 15
#define ORIG_X_DIR_PIN 18
#define X_STOP_PIN 20
#define ORIG_Y_STEP_PIN 23
#define ORIG_Y_DIR_PIN 22
#define Y_STOP_PIN 25
#define ORIG_Z_STEP_PIN 27
#define ORIG_Z_DIR_PIN 28
#define Z_STOP_PIN 30
#define ORIG_E0_STEP_PIN 17
#define ORIG_E0_DIR_PIN 21
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#define ORIG_PS_ON_PIN 14
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 12 // (extruder)
#define ORIG_HEATER_BED_PIN 16 // (bed)
#define ORIG_X_ENABLE_PIN 19
#define ORIG_Y_ENABLE_PIN 24
#define ORIG_Z_ENABLE_PIN 29
#define ORIG_E0_ENABLE_PIN 13
#define ORIG_TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
#define SDPOWER -1
#define SDSS 4
#define ORIG_HEATER_2_PIN -1
/****************************************************************************************
* 5 - 51
* Gen6 - Gen6 Deluxe
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega644P__
#ifndef __AVR_ATmega1284P__
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
#endif
//x axis pins
#define ORIG_X_STEP_PIN 15
#define ORIG_X_DIR_PIN 18
#define ORIG_X_ENABLE_PIN 19
#define X_STOP_PIN 20
//y axis pins
#define ORIG_Y_STEP_PIN 23
#define ORIG_Y_DIR_PIN 22
#define ORIG_Y_ENABLE_PIN 24
#define Y_STOP_PIN 25
//z axis pins
#define ORIG_Z_STEP_PIN 27
#define ORIG_Z_DIR_PIN 28
#define ORIG_Z_ENABLE_PIN 29
#define Z_STOP_PIN 30
//extruder pins
#define ORIG_E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
#define ORIG_E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
#define ORIG_E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
#define ORIG_TEMP_0_PIN 5 //changed @ rkoeppl 20110410
#define ORIG_TEMP_1_PIN -1 //changed @ rkoeppl 20110410
#define ORIG_TEMP_2_PIN -1 //changed @ rkoeppl 20110410
#define ORIG_HEATER_0_PIN 14 //changed @ rkoeppl 20110410
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#if MOTHERBOARD == 5
#define ORIG_HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
#define ORIG_TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
#else
#define ORIG_HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
#define ORIG_TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
#endif
#define SDPOWER -1
#define SDSS 17
#define LED_PIN -1 //changed @ rkoeppl 20110410
#define ORIG_FAN_PIN -1 //changed @ rkoeppl 20110410
#define ORIG_PS_ON_PIN -1 //changed @ rkoeppl 20110410
#define KILL_PIN -1 //changed @ drakelive 20120830
//our pin for debugging.
#define DEBUG_PIN 0
//our RS485 pins
#define TORIG_X_ENABLE_PIN 12
#define RORIG_X_ENABLE_PIN 13
/****************************************************************************************
* 11
* Gen7 v1.1, v1.2
****************************************************************************************/
#define KNOWN_BOARD
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
#error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
#endif
#if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 12 // v1.x
#endif
//X axis pins
#define ORIG_X_STEP_PIN 19
#define ORIG_X_DIR_PIN 18
#define ORIG_X_ENABLE_PIN 24
#define X_STOP_PIN 7
//Y axis pins
#define ORIG_Y_STEP_PIN 23
#define ORIG_Y_DIR_PIN 22
#define ORIG_Y_ENABLE_PIN 24
#define Y_STOP_PIN 5
//Z axis pins
#define ORIG_Z_STEP_PIN 26
#define ORIG_Z_DIR_PIN 25
#define ORIG_Z_ENABLE_PIN 24
#define ORIG_Z_MIN_PIN 1
#define ORIG_Z_MAX_PIN 0
//extruder pins
#define ORIG_E0_STEP_PIN 28
#define ORIG_E0_DIR_PIN 27
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_TEMP_0_PIN 1
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 2
#define ORIG_HEATER_0_PIN 4
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 3
#define KILL_PIN -1
#define SDPOWER -1
#define SDSS -1 // SCL pin of I2C header
#define LED_PIN -1
#define ORIG_FAN_PIN 31
#define ORIG_PS_ON_PIN 15
//All these generations of Gen7 supply thermistor power
//via PS_ON, so ignore bad thermistor readings
#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
//our pin for debugging.
#define DEBUG_PIN 0
//our RS485 pins
#define TORIG_X_ENABLE_PIN 12
#define RORIG_X_ENABLE_PIN 13
/****************************************************************************************
* 12
* Gen7 v1.3
****************************************************************************************/
#define KNOWN_BOARD
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
#error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
#endif
#if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 13 // v1.x
#endif
//X axis pins
#define ORIG_X_STEP_PIN 19
#define ORIG_X_DIR_PIN 18
#define ORIG_X_ENABLE_PIN 24
#define X_STOP_PIN 7
//Y axis pins
#define ORIG_Y_STEP_PIN 23
#define ORIG_Y_DIR_PIN 22
#define ORIG_Y_ENABLE_PIN 24
#define Y_STOP_PIN 5
//Z axis pins
#define ORIG_Z_STEP_PIN 26
#define ORIG_Z_DIR_PIN 25
#define ORIG_Z_ENABLE_PIN 24
#define ORIG_Z_MIN_PIN 1
#define ORIG_Z_MAX_PIN 0
//extruder pins
#define ORIG_E0_STEP_PIN 28
#define ORIG_E0_DIR_PIN 27
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_TEMP_0_PIN 1
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 2
#define ORIG_HEATER_0_PIN 4
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 3
#define KILL_PIN -1
#define SDPOWER -1
#define SDSS -1 // SCL pin of I2C header
#define LED_PIN -1
#define ORIG_FAN_PIN -1 // Gen7 v1.3 removed the fan pin
#define ORIG_PS_ON_PIN 15
//All these generations of Gen7 supply thermistor power
//via PS_ON, so ignore bad thermistor readings
#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
//our pin for debugging.
#define DEBUG_PIN 0
//our RS485 pins
#define TORIG_X_ENABLE_PIN 12
#define RORIG_X_ENABLE_PIN 13
/****************************************************************************************
* 13
* Gen7 v1.4 pin assignment
****************************************************************************************/
#define GEN7_VERSION 14 // v1.4
#define KNOWN_BOARD
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
#error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
#endif
//X axis pins
#define ORIG_X_STEP_PIN 29
#define ORIG_X_DIR_PIN 28
#define ORIG_X_ENABLE_PIN 25
#define X_STOP_PIN 0
//Y axis pins
#define ORIG_Y_STEP_PIN 27
#define ORIG_Y_DIR_PIN 26
#define ORIG_Y_ENABLE_PIN 25
#define Y_STOP_PIN 1
//Z axis pins
#define ORIG_Z_STEP_PIN 23
#define ORIG_Z_DIR_PIN 22
#define ORIG_Z_ENABLE_PIN 25
#define Z_STOP_PIN 2
//extruder pins
#define ORIG_E0_STEP_PIN 19
#define ORIG_E0_DIR_PIN 18
#define ORIG_E0_ENABLE_PIN 25
#define ORIG_TEMP_0_PIN 1
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 0
#define ORIG_HEATER_0_PIN 4
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 3
#define KILL_PIN -1
#define SDPOWER -1
#define SDSS -1 // SCL pin of I2C header
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#define ORIG_PS_ON_PIN 15
//our pin for debugging.
#define DEBUG_PIN 0
//our RS485 pins
#define TORIG_X_ENABLE_PIN 12
#define RORIG_X_ENABLE_PIN 13
/******************************************************************************
* 10
* Gen7 Alfons
* These Pins are assigned for the modified GEN7
* Board from Alfons3 Please review the pins and adjust it for your needs
******************************************************************************/
#define KNOWN_BOARD
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
#error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
#endif
//x axis pins
#define ORIG_X_STEP_PIN 21 // different from standard GEN7
#define ORIG_X_DIR_PIN 20 // different from standard GEN7
#define ORIG_X_ENABLE_PIN 24
#define X_STOP_PIN 0
//y axis pins
#define ORIG_Y_STEP_PIN 23
#define ORIG_Y_DIR_PIN 22
#define ORIG_Y_ENABLE_PIN 24
#define Y_STOP_PIN 1
//z axis pins
#define ORIG_Z_STEP_PIN 26
#define ORIG_Z_DIR_PIN 25
#define ORIG_Z_ENABLE_PIN 24
#define Z_STOP_PIN 2
//extruder pins
#define ORIG_E0_STEP_PIN 28
#define ORIG_E0_DIR_PIN 27
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_TEMP_0_PIN 2
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
#define ORIG_HEATER_0_PIN 4
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 3 // (bed)
#define SDPOWER -1
#define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#define ORIG_PS_ON_PIN 19
//our pin for debugging.
#define DEBUG_PIN -1
//our RS485 pins
//#define TORIG_X_ENABLE_PIN 12
//#define RORIG_X_ENABLE_PIN 13
#define ORIG_BEEPER_PIN -1
#define SD_DETECT_PIN -1
#define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
#define KILL_PIN -1
//Pins for 4bit LCD Support
#define LCD_PINS_RS 18
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 16
#define LCD_PINS_D5 15
#define LCD_PINS_D6 13
#define LCD_PINS_D7 14
//buttons are directly attached
#define BTN_EN1 11
#define BTN_EN2 10
#define BTN_ENC 12 //the click
/****************************************************************************************
* 78
* K8200
****************************************************************************************/
#define KNOWN_BOARD 1
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN -1
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 25
#define LED_PIN 13
#define ORIG_FAN_PIN 8 // IO pin. Buffer needed
#define ORIG_PS_ON_PIN 12
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41
#else
#define KILL_PIN -1
#endif
#define ORIG_HEATER_0_PIN 10 // HOTEND 1
#define ORIG_HEATER_1_PIN 12 // HOTEND 2
#define ORIG_HEATER_2_PIN 6 // HOTEND 3
#define ORIG_HEATER_3_PIN -1
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 9 // NO BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 11
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 4
#endif
#endif
#endif
#endif
#define ORIG_BEEPER_PIN 33
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
#define ORIG_BEEPER_PIN -1
#define LCD_PINS_RS 27
#define LCD_PINS_ENABLE 29
#define LCD_PINS_D4 37
#define LCD_PINS_D5 35
#define LCD_PINS_D6 33
#define LCD_PINS_D7 31
// Buttons
#define BTN_EN1 16
#define BTN_EN2 17
#define BTN_ENC 23 //the click
#endif // ULTRA_LCD && NEWPANEL
// SPI for Max6675 Thermocouple
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
/****************************************************************************************
* 999
* Leapfrog Driver board
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega1280__
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#endif
#define ORIG_X_STEP_PIN 28
#define ORIG_X_DIR_PIN 63
#define ORIG_X_ENABLE_PIN 29
#define ORIG_X_MIN_PIN 47
#define ORIG_X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
#define ORIG_Y_STEP_PIN 14 // A6
#define ORIG_Y_DIR_PIN 15 // A0
#define ORIG_Y_ENABLE_PIN 39
#define ORIG_Y_MIN_PIN 48
#define ORIG_Y_MAX_PIN -1 //15
#define ORIG_Z_STEP_PIN 31 // A2
#define ORIG_Z_DIR_PIN 32 // A6
#define ORIG_Z_ENABLE_PIN 30 // A1
#define ORIG_Z_MIN_PIN 49
#define ORIG_Z_MAX_PIN -1
#define ORIG_E0_STEP_PIN 34 //34
#define ORIG_E0_DIR_PIN 35 //35
#define ORIG_E0_ENABLE_PIN 33 //33
#define ORIG_E1_STEP_PIN 37 //37
#define ORIG_E1_DIR_PIN 40 //40
#define ORIG_E1_ENABLE_PIN 36 //36
#define Y2_STEP_PIN 37
#define Y2_DIR_PIN 40
#define Y2_ENABLE_PIN 36
#define Z2_STEP_PIN 37
#define Z2_DIR_PIN 40
#define Z2_ENABLE_PIN 36
#define SDPOWER -1
#define SDSS 11
#define SD_DETECT_PIN -1 // 10 optional also used as mode pin
#define LED_PIN 13
#define ORIG_FAN_PIN 7
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define SOL1_PIN 16
#define SOL2_PIN 17
#define ORIG_HEATER_0_PIN 9
#define ORIG_HEATER_1_PIN 8 // 12
#define ORIG_HEATER_2_PIN 11 //-1 // 13
#define ORIG_TEMP_0_PIN 13 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define ORIG_TEMP_1_PIN 15 // 1
#define ORIG_TEMP_2_PIN -1 // 2
#define ORIG_HEATER_BED_PIN 10 // 14/15
#define ORIG_TEMP_BED_PIN 14 // 1,2 or I2C
/* Unused (1) (2) (3) 4 5 6 7 8 9 10 11 12 13 (14) (15) (16) 17 (18) (19) (20) (21) (22) (23) 24 (25) (26) (27) 28 (29) (30) (31) */
/****************************************************************************************
* 70
* MegaTronics
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 26
#define ORIG_X_DIR_PIN 28
#define ORIG_X_ENABLE_PIN 24
#define ORIG_X_MIN_PIN 41
#define ORIG_X_MAX_PIN 37
#define ORIG_Y_STEP_PIN 60 // A6
#define ORIG_Y_DIR_PIN 61 // A7
#define ORIG_Y_ENABLE_PIN 22
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define ORIG_Z_STEP_PIN 54 // A0
#define ORIG_Z_DIR_PIN 55 // A1
#define ORIG_Z_ENABLE_PIN 56 // A2
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define ORIG_E0_STEP_PIN 31
#define ORIG_E0_DIR_PIN 32
#define ORIG_E0_ENABLE_PIN 38
#define ORIG_E1_STEP_PIN 34
#define ORIG_E1_DIR_PIN 36
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 7 // IO pin. Buffer needed
#define ORIG_PS_ON_PIN 12
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 9 // EXTRUDER 1
#define ORIG_HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
#define ORIG_HEATER_2_PIN -1
#if TEMP_SENSOR_0 == -1
#define ORIG_TEMP_0_PIN 8 // ANALOG NUMBERING
#else
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#endif
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 10 // BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#define ORIG_BEEPER_PIN 33 // Beeper on AUX-4
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
//arduino pin which triggers an piezzo beeper
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
//buttons are directly attached using AUX-2
#define BTN_EN1 59
#define BTN_EN2 64
#define BTN_ENC 43 //the click
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define SD_DETECT_PIN -1 // Ramps does not use this port
#endif //NEWPANEL
#endif //ULTRA_LCD
/****************************************************************************************
* 701
* MegaTronics v2.0
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 26
#define ORIG_X_DIR_PIN 27
#define ORIG_X_ENABLE_PIN 25
#define ORIG_X_MIN_PIN 37
#define ORIG_X_MAX_PIN 40 //2 //Max endstops default to disabled "-1", set to commented value to enable.
#define ORIG_Y_STEP_PIN 4 // A6
#define ORIG_Y_DIR_PIN 54 // A0
#define ORIG_Y_ENABLE_PIN 5
#define ORIG_Y_MIN_PIN 41
#define ORIG_Y_MAX_PIN 38 //15
#define ORIG_Z_STEP_PIN 56 // A2
#define ORIG_Z_DIR_PIN 60 // A6
#define ORIG_Z_ENABLE_PIN 55 // A1
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define ORIG_E0_STEP_PIN 35
#define ORIG_E0_DIR_PIN 36
#define ORIG_E0_ENABLE_PIN 34
#define ORIG_E1_STEP_PIN 29
#define ORIG_E1_DIR_PIN 39
#define ORIG_E1_ENABLE_PIN 28
#define ORIG_E2_STEP_PIN 23
#define ORIG_E2_DIR_PIN 24
#define ORIG_E2_ENABLE_PIN 22
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 7
#define ORIG_FAN2_PIN 6
#define ORIG_PS_ON_PIN 12
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 9 // EXTRUDER 1
#define ORIG_HEATER_1_PIN 8 // EXTRUDER 2
#define ORIG_HEATER_2_PIN -1
#define SHIFT_CLK 63
#define SHIFT_LD 42
#define SHIFT_OUT 17
#define SHIFT_EN 17
#if TEMP_SENSOR_0 == -1
#define ORIG_TEMP_0_PIN 4 // ANALOG NUMBERING
#else
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#endif
#if TEMP_SENSOR_1 == -1
#define ORIG_TEMP_1_PIN 8 // ANALOG NUMBERING
#else
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#endif
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 10 // BED
#if TEMP_SENSOR_BED == -1
#define ORIG_TEMP_BED_PIN 8 // ANALOG NUMBERING
#else
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#endif
#define ORIG_BEEPER_PIN 64
#define LCD_PINS_RS 14
#define LCD_PINS_ENABLE 15
#define LCD_PINS_D4 30
#define LCD_PINS_D5 31
#define LCD_PINS_D6 32
#define LCD_PINS_D7 33
//buttons are directly attached using keypad
#define BTN_EN1 61
#define BTN_EN2 59
#define BTN_ENC 43 //the click
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define SD_DETECT_PIN -1 // Megatronics does not use this port
/****************************************************************************************
* 703
* MegaTronics v3.0
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 58
#define ORIG_X_DIR_PIN 57
#define ORIG_X_ENABLE_PIN 59
#define ORIG_X_MIN_PIN 37
#define ORIG_X_MAX_PIN 40 //2 //Max endstops default to disabled "-1", set to commented value to enable.
#define ORIG_Y_STEP_PIN 5 // A6
#define ORIG_Y_DIR_PIN 17 // A0
#define ORIG_Y_ENABLE_PIN 4
#define ORIG_Y_MIN_PIN 41
#define ORIG_Y_MAX_PIN 38 //15
#define ORIG_Z_STEP_PIN 16 // A2
#define ORIG_Z_DIR_PIN 11 // A6
#define ORIG_Z_ENABLE_PIN 3 // A1
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define ORIG_E0_STEP_PIN 28
#define ORIG_E0_DIR_PIN 27
#define ORIG_E0_ENABLE_PIN 29
#define ORIG_E1_STEP_PIN 25
#define ORIG_E1_DIR_PIN 24
#define ORIG_E1_ENABLE_PIN 26
#define ORIG_E2_STEP_PIN 22
#define ORIG_E2_DIR_PIN 60
#define ORIG_E2_ENABLE_PIN 23
#define ORIG_E3_STEP_PIN 54
#define ORIG_E3_DIR_PIN 55
#define ORIG_E3_ENABLE_PI 55
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#if NUM_SERVOS > 0
#define SERVO0_PIN 46 //AUX3-6
#if NUM_SERVOS > 1
#define SERVO1_PIN 47 //AUX3-5
#if NUM_SERVOS > 2
#define SERVO2_PIN 48 //AUX3-4
#if NUM_SERVOS > 3
#define SERVO2_PIN 49 //AUX3-3
#endif
#endif
#endif
#endif
#define ORIG_PS_ON_PIN 12
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 2
#define ORIG_HEATER_1_PIN 8
#define ORIG_HEATER_2_PIN 9
#define ORIG_HEATER_BED_PIN 10
#define ORIG_FAN_PIN 6
#define ORIG_FAN2_PIN 7
#if TEMP_SENSOR_0 == -1
#define ORIG_TEMP_0_PIN 11 // ANALOG NUMBERING
#else
#define ORIG_TEMP_0_PIN 15 // ANALOG NUMBERING
#endif
#if TEMP_SENSOR_1 == -1
#define ORIG_TEMP_1_PIN 10 // ANALOG NUMBERING
#else
#define ORIG_TEMP_1_PIN 13 // ANALOG NUMBERING
#endif
#if TEMP_SENSOR_2 == -1
#define ORIG_TEMP_2_PIN 9 // ANALOG NUMBERING
#else
#define ORIG_TEMP_2_PIN 12 // ANALOG NUMBERING
#endif
#if TEMP_SENSOR_BED == -1
#define ORIG_TEMP_BED_PIN 8 // ANALOG NUMBERING
#else
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#endif
#define ORIG_BEEPER_PIN 61
#define LCD_PINS_RS 32
#define LCD_PINS_ENABLE 31
#define LCD_PINS_D4 14
#define LCD_PINS_D5 30
#define LCD_PINS_D6 39
#define LCD_PINS_D7 15
#define SHIFT_CLK 43
#define SHIFT_LD 35
#define SHIFT_OUT 34
#define SHIFT_EN 44
//buttons are directly attached using keypad
#define BTN_EN1 44
#define BTN_EN2 45
#define BTN_ENC 33 //the click
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define SD_DETECT_PIN -1 // Megatronics does not use this port
/****************************************************************************************
* 702
* Minitronics v1.0
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega1281__
#error Oops! Make sure you have 'Minitronics ' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 48
#define ORIG_X_DIR_PIN 47
#define ORIG_X_ENABLE_PIN 49
#define ORIG_X_MIN_PIN 5
#define ORIG_X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
#define ORIG_Y_STEP_PIN 39 // A6
#define ORIG_Y_DIR_PIN 40 // A0
#define ORIG_Y_ENABLE_PIN 38
#define ORIG_Y_MIN_PIN 2
#define ORIG_Y_MAX_PIN -1 //15
#define ORIG_Z_STEP_PIN 42 // A2
#define ORIG_Z_DIR_PIN 43 // A6
#define ORIG_Z_ENABLE_PIN 41 // A1
#define ORIG_Z_MIN_PIN 6
#define ORIG_Z_MAX_PIN -1
#define ORIG_E0_STEP_PIN 45
#define ORIG_E0_DIR_PIN 44
#define ORIG_E0_ENABLE_PIN 27
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 35
#define ORIG_E1_ENABLE_PIN 37
#define ORIG_E2_STEP_PIN -1
#define ORIG_E2_DIR_PIN -1
#define ORIG_E2_ENABLE_PIN -1
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 46
#define ORIG_FAN_PIN 9
#define ORIG_FAN2_PIN -1
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 7 // EXTRUDER 1
#define ORIG_HEATER_1_PIN 8 // EXTRUDER 2
#define ORIG_HEATER_2_PIN 9 // thermo couple
#if TEMP_SENSOR_0 == -1
#define ORIG_TEMP_0_PIN 5 // ANALOG NUMBERING
#else
#define ORIG_TEMP_0_PIN 7 // ANALOG NUMBERING
#endif
#define ORIG_TEMP_1_PIN 6 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 3 // BED
#define ORIG_TEMP_BED_PIN 6 // ANALOG NUMBERING
#define ORIG_BEEPER_PIN -1
#define LCD_PINS_RS -1
#define LCD_PINS_ENABLE -1
#define LCD_PINS_D4 -1
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
//buttons are directly attached using keypad
#define BTN_EN1 -1
#define BTN_EN2 -1
#define BTN_ENC -1 //the click
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define SD_DETECT_PIN -1 // Megatronics does not use this port
/**
* MKS BASE 1.0 – Arduino Mega2560 with RAMPS v1.4 pin assignments
*/
#define KNOWN_BOARD 1
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
// X axis pins
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
// Y axis pins
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
// Z axis pins
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
// E axis pins
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 9
#define PS_ON_PIN 12
#define ORIG_HEATER_0_PIN 10 // Hotend 1
#define ORIG_HEATER_1_PIN 7 // Hotend 2
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_3_PIN -1
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41
#else
#define KILL_PIN -1
#endif
#if NUM_SERVOS > 0
#define SERVO0_PIN 11
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 4
#endif
#endif
#endif
#endif
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#else
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // PANEL_ONE
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define ORIG_BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 // reverse if the encoder turns the wrong way.
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // reverse if the encoder turns the wrong way.
#define BTN_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define ORIG_BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_PIN_BL 33
#else
// arduino pin which triggers an piezzo beeper
#define ORIG_BEEPER_PIN 33 // Beeper on AUX-4
// buttons are directly attached using AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31 // the click
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
#endif
#endif
#else // old style panel with shift register
// arduino pin witch triggers an piezo beeper
#define ORIG_BEEPER_PIN 33 // No Beeper added
//buttons are attached to a shift register
// Not wired this yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // NEWPANEL
#endif // ULTRA_LCD
// SPI for Max6675 Thermocouple
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
/**
* MKS MINI 1.0 – Arduino Mega2560
*/
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
/*
#define LARGE_FLASH true
#ifdef IS_RAMPS_14
#define SERVO0_PIN 11
#else
#define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
#endif
#define SERVO1_PIN 6
#define SERVO2_PIN 5
#define SERVO3_PIN 4
*/
#define X_STEP_PIN 54
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38
#define X_MIN_PIN -1 // unused for deltabot, was 3
#define X_MAX_PIN 2
#define Y_STEP_PIN 60
#define Y_DIR_PIN 61
#define Y_ENABLE_PIN 56
#define Y_MIN_PIN -1 // unused for deltabot, was 14
#define Y_MAX_PIN 15
#define Z_STEP_PIN 46
#define Z_DIR_PIN 48
#define Z_ENABLE_PIN 62
#define Z_MIN_PIN 18
#define Z_MAX_PIN 19
#define E0_STEP_PIN 26
#define E0_DIR_PIN 28
#define E0_ENABLE_PIN 24
#define E1_STEP_PIN -1 // 36
#define E1_DIR_PIN -1 // 34
#define E1_ENABLE_PIN -1 // 30
#define SDPOWER -1
#define LED_PIN 13
#define FAN_PIN 9
#define PS_ON_PIN 12
#define HEATER_0_PIN 10 // EXTRUDER 1
#define HEATER_1_PIN -1 // EXTRUDER 2 ( Not supported on MKS Mini )
#define HEATER_2_PIN -1 // EXTRUDER 3 ( Not supported on MKS Mini )
#define TEMP_0_PIN 13 // ANALOG NUMBERING
#define TEMP_1_PIN -1 // ANALOG NUMBERING
#define TEMP_2_PIN -1 // ANALOG NUMBERING
#define HEATER_BED_PIN -1 // NO BED
#define TEMP_BED_PIN -1 // ANALOG NUMBERING
// #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define KILL_PIN 41
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#define BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#define SD_DETECT_PIN 49
#define SDSS 53
#define MAX6675_SS 58
// #endif
#if ENABLED(FILAMENT_SENSOR) // FMM added for Filament Extruder
// define analog pin for the filament width sensor input
// Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
#define FILWIDTH_PIN 5
#endif
#if ENABLED(Z_MIN_PROBE_ENDSTOP)
// Define a pin to use as the signal pin on Arduino for the Z_PROBE endstop.
#define Z_MIN_PROBE_PIN 32
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
#define FILRUNOUT_PIN 4
#endif
#if ENABLED(Z_PROBE_SLED)
#define SLED_PIN -1
#endif
/*
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41
#else
#define KILL_PIN -1
#endif
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#else
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 // reverse if the encoder turns the wrong way.
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // reverse if the encoder turns the wrong way.
#define BTN_EN2 7 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf
// tells about 40/42.
// 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_PIN_BL 33
#elif ENABLED(MINIPANEL)
#define BEEPER_PIN 42
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 66
#define LCD_PIN_BL 65 // backlight LED on A11/D65
#define SDSS 53
#define KILL_PIN 64
// GLCD features
//#define LCD_CONTRAST 190
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
//The encoder and click button
#define BTN_EN1 40
#define BTN_EN2 63
#define BTN_ENC 59 //the click switch
//not connected to a pin
#define SD_DETECT_PIN 49
#else
#define BEEPER_PIN 33 // Beeper on AUX-4
// buttons are directly attached using AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31 // the click
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps doesn't use this
#endif
#endif
#else // !NEWPANEL (Old-style panel with shift register)
#define BEEPER_PIN 33 // No Beeper added
// Buttons are attached to a shift register
// Not wired yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // !NEWPANEL
#endif // ULTRA_LCD
// SPI for Max6675 Thermocouple
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 58 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 58 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
#define MOSI_PIN 51
#endif
*/
/****************************************************************************************
* 90 - 91
* Open Motion controller with enable based extruders
*
* ATMega644
*
* +---\/---+
* (D 0) PB0 1| |40 PA0 (AI 0 / D31)
* (D 1) PB1 2| |39 PA1 (AI 1 / D30)
* INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
* PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
* PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
* MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
* MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
* SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
* RST 9| |32 AREF
* VCC 10| |31 GND
* GND 11| |30 AVCC
* XTAL2 12| |29 PC7 (D 23)
* XTAL1 13| |28 PC6 (D 22)
* RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
* TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
* INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
* INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
* PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
* PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
* PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
* +--------+
*
****************************************************************************************/
#define KNOWN_BOARD 1
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
#endif
#define ORIG_X_STEP_PIN 26
#define ORIG_X_DIR_PIN 25
#define ORIG_X_ENABLE_PIN 10
#define X_STOP_PIN 0
#define ORIG_Y_STEP_PIN 28
#define ORIG_Y_DIR_PIN 27
#define ORIG_Y_ENABLE_PIN 10
#define Y_STOP_PIN 1
#define ORIG_Z_STEP_PIN 23
#define ORIG_Z_DIR_PIN 22
#define ORIG_Z_ENABLE_PIN 10
#define Z_STOP_PIN 2
#define ORIG_E0_STEP_PIN 24
#define ORIG_E0_DIR_PIN 21
#define ORIG_E0_ENABLE_PIN 10
/* future proofing */
#define __FS 20
#define __FD 19
#define __GS 18
#define __GD 13
#define UNUSED_PWM 14 /* PWM on LEFT connector */
#define ORIG_E1_STEP_PIN -1 // 21
#define ORIG_E1_DIR_PIN -1 // 20
#define ORIG_E1_ENABLE_PIN -1 // 19
#define ORIG_E2_STEP_PIN -1 // 21
#define ORIG_E2_DIR_PIN -1 // 20
#define ORIG_E2_ENABLE_PIN -1 // 18
#define SDPOWER -1
#define SDSS 11
#define SD_DETECT_PIN -1 // 10 optional also used as mode pin
#define LED_PIN -1
#define ORIG_FAN_PIN 14 /* PWM on MIDDLE connector */
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
#define ORIG_TEMP_1_PIN 1 // ANALOG
#define ORIG_TEMP_2_PIN -1 // 2
#define ORIG_HEATER_BED_PIN 4
#define ORIG_TEMP_BED_PIN 2 // 1,2 or I2C
#define I2C_SCL 16
#define I2C_SDA 17
/****************************************************************************************
* 90 - 91
* Open Motion controller with enable based extruders
*
* ATMega644
*
* +---\/---+
* (D 0) PB0 1| |40 PA0 (AI 0 / D31)
* (D 1) PB1 2| |39 PA1 (AI 1 / D30)
* INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
* PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
* PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
* MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
* MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
* SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
* RST 9| |32 AREF
* VCC 10| |31 GND
* GND 11| |30 AVCC
* XTAL2 12| |29 PC7 (D 23)
* XTAL1 13| |28 PC6 (D 22)
* RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
* TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
* INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
* INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
* PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
* PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
* PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
* +--------+
*
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega644__
#error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
#endif
#define ORIG_X_STEP_PIN 21
#define ORIG_X_DIR_PIN 20
#define ORIG_X_ENABLE_PIN 24
#define X_STOP_PIN 0
#define ORIG_Y_STEP_PIN 23
#define ORIG_Y_DIR_PIN 22
#define ORIG_Y_ENABLE_PIN 24
#define Y_STOP_PIN 1
#define ORIG_Z_STEP_PIN 26
#define ORIG_Z_DIR_PIN 25
#define ORIG_Z_ENABLE_PIN 24
#define Z_STOP_PIN 2
#define ORIG_E0_STEP_PIN 28
#define ORIG_E0_DIR_PIN 27
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN -1 // 19
#define ORIG_E1_DIR_PIN -1 // 18
#define ORIG_E1_ENABLE_PIN 24
#define ORIG_E2_STEP_PIN -1 // 17
#define ORIG_E2_DIR_PIN -1 // 16
#define ORIG_E2_ENABLE_PIN 24
#define SDPOWER -1
#define SDSS 11
#define SD_DETECT_PIN -1 // 10 optional also used as mode pin
#define LED_PIN -1
#define ORIG_FAN_PIN 3
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 4
#define ORIG_HEATER_1_PIN -1 // 12
#define ORIG_HEATER_2_PIN -1 // 13
#define ORIG_TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define ORIG_TEMP_1_PIN -1 // 1
#define ORIG_TEMP_2_PIN -1 // 2
#define ORIG_HEATER_BED_PIN -1 // 14/15
#define ORIG_TEMP_BED_PIN -1 // 1,2 or I2C
/* Unused (1) (2) (3) 4 5 6 7 8 9 10 11 12 13 (14) (15) (16) 17 (18) (19) (20) (21) (22) (23) 24 (25) (26) (27) 28 (29) (30) (31) */
/****************************************************************************************
* 316
* PiBot Controller Rev2.0
****************************************************************************************/
#define KNOWN_BOARD
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
// X axis pins
#define ORIG_X_STEP_PIN 24
#define ORIG_X_DIR_PIN 23
#define ORIG_X_ENABLE_PIN 22
#define ORIG_X_MIN_PIN 62
#define ORIG_X_MAX_PIN 63
// Y axis pins
#define ORIG_Y_STEP_PIN 27
#define ORIG_Y_DIR_PIN 26
#define ORIG_Y_ENABLE_PIN 25
#define ORIG_Y_MIN_PIN 64
#define ORIG_Y_MAX_PIN 65
// Z axis pins
#define ORIG_Z_STEP_PIN 15
#define ORIG_Z_DIR_PIN 14
#define ORIG_Z_ENABLE_PIN 39
#define ORIG_Z_MIN_PIN 66
#define ORIG_Z_MAX_PIN 67
// E axis pins
#define ORIG_E0_STEP_PIN 32
#define ORIG_E0_DIR_PIN 31
#define ORIG_E0_ENABLE_PIN 30
#define ORIG_E1_STEP_PIN 35
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 33
#define SDPOWER -1
#define SDSS 53
#define LED_PIN -1
#define SD_DETECT_PIN 40
#define ORIG_FAN_PIN 6
#define ORIG_FAN2_PIN 7
#define ORIG_PS_ON_PIN 17
#define ORIG_HEATER_0_PIN 5
#define ORIG_HEATER_1_PIN 2
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_3_PIN -1
#define ORIG_TEMP_0_PIN 2 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 4 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 4 // BED
#define ORIG_TEMP_BED_PIN 1 // ANALOG NUMBERING
/****************************************************************************************
* 401
*
* RADDS
****************************************************************************************/
#define KNOWN_BOARD
#ifndef __SAM3X8E__
#error Oops! Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
#endif
#define RADDS
#define ORIG_X_STEP_PIN 24
#define ORIG_X_DIR_PIN 23
#define ORIG_X_ENABLE_PIN 26
#define ORIG_Y_STEP_PIN 17
#define ORIG_Y_DIR_PIN 16
#define ORIG_Y_ENABLE_PIN 22
#define ORIG_Z_STEP_PIN 2
#define ORIG_Z_DIR_PIN 3
#define ORIG_Z_ENABLE_PIN 15
#define ORIG_X_MIN_PIN 28
#define ORIG_X_MAX_PIN 34
#define ORIG_Y_MIN_PIN 30
#define ORIG_Y_MAX_PIN 36
#define ORIG_Z_MIN_PIN 32
#define ORIG_Z_MAX_PIN 38
#define ORIG_E0_STEP_PIN 61
#define ORIG_E0_DIR_PIN 60
#define ORIG_E0_ENABLE_PIN 62
#define ORIG_E1_STEP_PIN 64
#define ORIG_E1_DIR_PIN 63
#define ORIG_E1_ENABLE_PIN 65
#define ORIG_E2_STEP_PIN 51
#define ORIG_E2_DIR_PIN 53
#define ORIG_E2_ENABLE_PIN 49
#define ORIG_E3_STEP_PIN 35
#define ORIG_E3_DIR_PIN 33
#define ORIG_E3_ENABLE_PIN 37
#define ORIG_E4_STEP_PIN 29
#define ORIG_E4_DIR_PIN 27
#define ORIG_E4_ENABLE_PIN 31
#define SDPOWER -1
#define SDSS 4
#define LED_PIN -1
#define ORIG_BEEPER_PIN 41
#define ORIG_FAN_PIN 9
#define ORIG_FAN2_PIN 8
#define ORIG_PS_ON_PIN 40
#define KILL_PIN -1
#define ORIG_HEATER_BED_PIN 7 // BED
#define ORIG_HEATER_0_PIN 13
#define ORIG_HEATER_1_PIN 12
#define ORIG_HEATER_2_PIN 11
#define ORIG_TEMP_BED_PIN 4 // ANALOG NUMBERING
#define ORIG_TEMP_0_PIN 0 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 1 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN 2 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN 3 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 5
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 39
#if NUM_SERVOS > 3
#define SERVO3_PIN 40
#endif
#endif
#endif
#endif
#if ENABLED(ULTRA_LCD)
// RADDS LCD panel
#if ENABLED(RADDS_DISPLAY)
#define LCD_PINS_RS 42
#define LCD_PINS_ENABLE 43
#define LCD_PINS_D4 44
#define LCD_PINS_D5 45
#define LCD_PINS_D6 46
#define LCD_PINS_D7 47
#define BEEPER 41
#define BTN_EN1 50
#define BTN_EN2 52
#define BTN_ENC 48
#define BTN_BACK 71
#undef SDSS
#define SDSS 10
#define SD_DETECT_PIN 14
#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define LCD_PINS_RS 46
#define LCD_PINS_ENABLE 47
#define LCD_PINS_D4 44
#define ORIG_BEEPER_PIN 41
#define BTN_EN1 50
#define BTN_EN2 52
#define BTN_ENC 48
#elif ENABLED(SSD1306_OLED_I2C_CONTROLLER)
#define BTN_EN1 50
#define BTN_EN2 52
#define BTN_ENC 48
#define BEEPER 41
#define LCD_SDSS 10
#define SD_DETECT_PIN 14
#define KILL_PIN -1
#elif ENABLED(SPARK_FULL_GRAPHICS)
#define LCD_PINS_D4 29
#define LCD_PINS_ENABLE 27
#define LCD_PINS_RS 25
#define BTN_EN1 35
#define BTN_EN2 33
#define BTN_ENC 37
#define KILL_PIN -1
#undef BEEPER
#define BEEPER -1
#endif // SPARK_FULL_GRAPHICS
#endif // ULTRA_LCD
/****************************************************************************************
* 301
* Rambo
****************************************************************************************/
#define KNOWN_BOARD
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 37
#define ORIG_X_DIR_PIN 48
#define ORIG_X_MIN_PIN 12
#define ORIG_X_MAX_PIN 24
#define ORIG_X_ENABLE_PIN 29
#define X_MS1_PIN 40
#define X_MS2_PIN 41
#define ORIG_Y_STEP_PIN 36
#define ORIG_Y_DIR_PIN 49
#define ORIG_Y_MIN_PIN 11
#define ORIG_Y_MAX_PIN 23
#define ORIG_Y_ENABLE_PIN 28
#define Y_MS1_PIN 69
#define Y_MS2_PIN 39
#define ORIG_Z_STEP_PIN 35
#define ORIG_Z_DIR_PIN 47
#define ORIG_Z_MIN_PIN 10
#define ORIG_Z_MAX_PIN 30
#define ORIG_Z_ENABLE_PIN 27
#define Z_MS1_PIN 68
#define Z_MS2_PIN 67
#define ORIG_HEATER_BED_PIN 3
#define ORIG_TEMP_BED_PIN 2
#define ORIG_HEATER_0_PIN 9
#define ORIG_TEMP_0_PIN 0
#define ORIG_HEATER_1_PIN 7
#define ORIG_TEMP_1_PIN 1
#if ENABLED(BARICUDA)
#define ORIG_HEATER_2_PIN 6
#else
#define ORIG_HEATER_2_PIN -1
#endif
#define ORIG_TEMP_2_PIN -1
#define ORIG_E0_STEP_PIN 34
#define ORIG_E0_DIR_PIN 43
#define ORIG_E0_ENABLE_PIN 26
#define E0_MS1_PIN 65
#define E0_MS2_PIN 66
#define ORIG_E1_STEP_PIN 33
#define ORIG_E1_DIR_PIN 42
#define ORIG_E1_ENABLE_PIN 25
#define E1_MS1_PIN 63
#define E1_MS2_PIN 64
#define DIGIPOTSS_PIN 38
#define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 8
#define ORIG_PS_ON_PIN 4
#define KILL_PIN -1 // 80 with Smart Controller LCD
#define SUICIDE_PIN -1 // PIN that has to be turned on right after start, to keep power flowing.
#if ENABLED(ULTRA_LCD)
#define KILL_PIN 80
#if ENABLED(NEWPANEL)
// arduino pin which triggers an piezzo beeper
#define ORIG_BEEPER_PIN 79 // Beeper on AUX-4
#define LCD_PINS_RS 70
#define LCD_PINS_ENABLE 71
#define LCD_PINS_D4 72
#define LCD_PINS_D5 73
#define LCD_PINS_D6 74
#define LCD_PINS_D7 75
//buttons are directly attached using AUX-2
#define BTN_EN1 76
#define BTN_EN2 77
#define BTN_ENC 78 //the click
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define SD_DETECT_PIN 81 // Ramps does not use this port
#else //old style panel with shift register
//arduino pin witch triggers an piezzo beeper
#define ORIG_BEEPER_PIN 33 No Beeper added
//buttons are attached to a shift register
// Not wired this yet
// #define SHIFT_CLK 38
// #define SHIFT_LD 42
// #define SHIFT_OUT 40
// #define SHIFT_EN 17
#define LCD_PINS_RS 75
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
//bits in the shift register that carry the buttons for:
// left up center down right red
#define BL_LE 7
#define BL_UP 6
#define BL_MI 5
#define BL_DW 4
#define BL_RI 3
#define BL_ST 2
#define BLEN_B 1
#define BLEN_A 0
#endif
#endif //ULTRA_LCD
/****************************************************************************************
* 433
* Arduino Due pin assignment
* for RAMPS4DUE (http://forums.reprap.org/read.php?219,479626,page=1)
****************************************************************************************/
#define KNOWN_BOARD
#ifndef __SAM3X8E__
#error Oops! Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
#endif
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define ORIG_HEATER_0_PIN 10
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_TEMP_0_PIN 9 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN -1 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_TEMP_BED_PIN 10 // ANALOG NUMBERING
#define ORIG_FAN_PIN 9
#define ORIG_PS_ON_PIN 12
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
/****************************************************************************************
* 33
* RAMPS 1.3 / 1.4
* RAMPS_13_HFB (Hotend0, Fan, Bed)
****************************************************************************************/
#define KNOWN_BOARD
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
// X axis pins
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
// Y axis pins
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
// Z axis pins
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
// E axis pins
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 9
#define ORIG_PS_ON_PIN 12
#define ORIG_HEATER_0_PIN 10 // Hotend 1
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_3_PIN -1
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41
#else
#define KILL_PIN -1
#endif
#if NUM_SERVOS > 0
#define SERVO0_PIN 11
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 4
#endif
#endif
#endif
#endif
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#else
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // PANEL_ONE
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define ORIG_BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 // reverse if the encoder turns the wrong way.
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // reverse if the encoder turns the wrong way.
#define BTN_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define ORIG_BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_PIN_BL 33
#else
// arduino pin which triggers an piezzo beeper
#define ORIG_BEEPER_PIN 33 // Beeper on AUX-4
// buttons are directly attached using AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31 // the click
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
#endif
#endif
#else // old style panel with shift register
// arduino pin witch triggers an piezo beeper
#define ORIG_BEEPER_PIN 33 // No Beeper added
//buttons are attached to a shift register
// Not wired this yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // NEWPANEL
#endif // ULTRA_LCD
// SPI for Max6675 Thermocouple
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
/****************************************************************************************
* 35
* RAMPS 1.3 / 1.4
* RAMPS_13_HFF (Hotend0, Fan, Fan)
****************************************************************************************/
#define KNOWN_BOARD
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
// X axis pins
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
// Y axis pins
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
// Z axis pins
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
// E axis pins
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 9
#define ORIG_PS_ON_PIN 12
#define ORIG_HEATER_0_PIN 10 // HOTEND 1
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_3_PIN -1
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN -1 // BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 11
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 4
#endif
#endif
#endif
#endif
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#else
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // PANEL_ONE
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define ORIG_BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 // reverse if the encoder turns the wrong way.
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // reverse if the encoder turns the wrong way.
#define BTN_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define ORIG_BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_PIN_BL 33
#else
// arduino pin which triggers an piezzo beeper
#define ORIG_BEEPER_PIN 33 // Beeper on AUX-4
// buttons are directly attached using AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31 // the click
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
#endif
#endif
#else // old style panel with shift register
// arduino pin witch triggers an piezo beeper
#define ORIG_BEEPER_PIN 33 // No Beeper added
//buttons are attached to a shift register
// Not wired this yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // NEWPANEL
#endif // ULTRA_LCD
// SPI for Max6675 Thermocouple
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
/****************************************************************************************
* 34
* RAMPS 1.3 / 1.4
* RAMPS_13_HHB (Hotend0, Hotend1, Bed)
****************************************************************************************/
#define KNOWN_BOARD
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
// X axis pins
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
// Y axis pins
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
// Z axis pins
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
// E axis pins
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 4
#define ORIG_PS_ON_PIN 12
#define ORIG_HEATER_0_PIN 10 // HOTEND 1
#define ORIG_HEATER_1_PIN 9 // HOTEND 2
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_3_PIN -1
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 11
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 4
#endif
#endif
#endif
#endif
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#else
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // PANEL_ONE
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define ORIG_BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 // reverse if the encoder turns the wrong way.
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // reverse if the encoder turns the wrong way.
#define BTN_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define ORIG_BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_PIN_BL 33
#else
// arduino pin which triggers an piezzo beeper
#define ORIG_BEEPER_PIN 33 // Beeper on AUX-4
// buttons are directly attached using AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31 // the click
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
#endif
#endif
#else // old style panel with shift register
// arduino pin witch triggers an piezo beeper
#define ORIG_BEEPER_PIN 33 // No Beeper added
//buttons are attached to a shift register
// Not wired this yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // NEWPANEL
#endif // ULTRA_LCD
// SPI for Max6675 Thermocouple
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
/****************************************************************************************
* 36
* RAMPS 1.3 / 1.4
* RAMPS_13_HHF (Hotend0, Hotend1, Fan)
****************************************************************************************/
#define KNOWN_BOARD
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
// X axis pins
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
// Y axis pins
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
// Z axis pins
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
// E axis pins
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 8
#define ORIG_PS_ON_PIN 12
#define ORIG_HEATER_0_PIN 10 // HOTEND 1
#define ORIG_HEATER_1_PIN 9 // HOTEND 2
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_3_PIN -1
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN -1 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 11
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 4
#endif
#endif
#endif
#endif
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#else
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // PANEL_ONE
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define ORIG_BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 // reverse if the encoder turns the wrong way.
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // reverse if the encoder turns the wrong way.
#define BTN_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define ORIG_BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_PIN_BL 33
#else
// arduino pin which triggers an piezzo beeper
#define ORIG_BEEPER_PIN 33 // Beeper on AUX-4
// buttons are directly attached using AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31 // the click
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
#endif
#endif
#else // old style panel with shift register
// arduino pin witch triggers an piezo beeper
#define ORIG_BEEPER_PIN 33 // No Beeper added
// buttons are attached to a shift register
// Not wired this yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // NEWPANEL
#endif // ULTRA_LCD
// SPI for Max6675 Thermocouple
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
/****************************************************************************************
* 37
* RAMPS 1.3 / 1.4
* RAMPS_13_HHH (Hotend0, Hotend1, Hotend2)
****************************************************************************************/
#define KNOWN_BOARD
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
// X axis pins
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
// Y axis pins
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
// Z axis pins
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
// E axis pins
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 8
#define ORIG_PS_ON_PIN 12
#define ORIG_HEATER_0_PIN 10 // HOTEND 1
#define ORIG_HEATER_1_PIN 9 // HOTEND 2
#define ORIG_HEATER_2_PIN 8 // HOTEND 3
#define ORIG_HEATER_3_PIN -1
#define ORIG_TEMP_0_PIN 13 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 15 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN 14 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN -1 // ANALOG NUMBERING
#define ORIG_HEATER_BED_PIN -1 // BED
#define ORIG_TEMP_BED_PIN -1 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 11
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 4
#endif
#endif
#endif
#endif
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#else
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // PANEL_ONE
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define ORIG_BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 // reverse if the encoder turns the wrong way.
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // reverse if the encoder turns the wrong way.
#define BTN_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define ORIG_BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_PIN_BL 33
#else
// arduino pin which triggers an piezzo beeper
#define ORIG_BEEPER_PIN 33 // Beeper on AUX-4
// buttons are directly attached using AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31 // the click
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
#endif
#endif
#else // old style panel with shift register
// arduino pin witch triggers an piezo beeper
#define ORIG_BEEPER_PIN 33 // No Beeper added
// buttons are attached to a shift register
// Not wired this yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#endif // NEWPANEL
#endif // ULTRA_LCD
// SPI for Max6675 Thermocouple
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
/****************************************************************************************
* 403 - 404
* Arduino pin assignment
* Ramps - FD v1 & v2
****************************************************************************************/
#define KNOWN_BOARD
#ifndef __SAM3X8E__
#error Oops! Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
#endif
#if MB(RAMPS_FD_V1)
#define RAMPS_FD_V1
#define INVERTED_HEATER_PINS
#define INVERTED_BED_PINS
// No EEPROM
// Use 4k7 thermistor tables
#else
#define RAMPS_FD_V2
// EEPROM supported
// Use 1k thermistor tables
#endif
#define ORIG_X_STEP_PIN 63
#define ORIG_X_DIR_PIN 62
#define ORIG_X_ENABLE_PIN 48
#define ORIG_X_MIN_PIN 22
#define ORIG_X_MAX_PIN 30
#define ORIG_Y_STEP_PIN 65
#define ORIG_Y_DIR_PIN 64
#define ORIG_Y_ENABLE_PIN 46
#define ORIG_Y_MIN_PIN 24
#define ORIG_Y_MAX_PIN 38
#define ORIG_Z_STEP_PIN 67
#define ORIG_Z_DIR_PIN 66
#define ORIG_Z_ENABLE_PIN 44
#define ORIG_Z_MIN_PIN 26
#define ORIG_Z_MAX_PIN 34
#define ORIG_E0_STEP_PIN 36
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 42
#define ORIG_E1_STEP_PIN 43
#define ORIG_E1_DIR_PIN 41
#define ORIG_E1_ENABLE_PIN 39
#define ORIG_E2_STEP_PIN 32
#define ORIG_E2_DIR_PIN 47
#define ORIG_E2_ENABLE_PIN 45
#define SDPOWER -1
#define SDSS 4
#define LED_PIN 13
#define ORIG_BEEPER_PIN -1
#define ORIG_FAN_PIN -1
#define CONTROLLER_FAN_PIN -1
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_HEATER_0_PIN 9
#define ORIG_HEATER_1_PIN 10
#define ORIG_HEATER_2_PIN 11
#define ORIG_TEMP_BED_PIN 0 // ANALOG NUMBERING
#define ORIG_TEMP_0_PIN 1 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 2 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN 3 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN 4 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 7
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 3
#endif
#endif
#endif
#endif
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
// ramps-fd lcd adaptor
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define ORIG_BEEPER_PIN 37
#define BTN_EN1 33
#define BTN_EN2 31
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#endif
#endif
#endif //ULTRA_LCD
// SPI for Max6675 Thermocouple
#define MAX6675_SS 53
/****************************************************************************************
* 3
* RAMPS OLD
****************************************************************************************/
#define KNOWN_BOARD 1
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
// Uncomment the following line for RAMPS v1.0
//#define RAMPS_V_1_0
#define ORIG_X_STEP_PIN 26
#define ORIG_X_DIR_PIN 28
#define ORIG_X_ENABLE_PIN 24
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
#define ORIG_Y_STEP_PIN 38
#define ORIG_Y_DIR_PIN 40
#define ORIG_Y_ENABLE_PIN 36
#define ORIG_Y_MIN_PIN 16
#define ORIG_Y_MAX_PIN 17
#define ORIG_Z_STEP_PIN 44
#define ORIG_Z_DIR_PIN 46
#define ORIG_Z_ENABLE_PIN 42
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define ORIG_E0_STEP_PIN 32
#define ORIG_E0_DIR_PIN 34
#define ORIG_E0_ENABLE_PIN 30
#define SDPOWER 48
#define SDSS 53
#define LED_PIN 13
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#if ENABLED(RAMPS_V_1_0) // RAMPS_V_1_0
#define ORIG_HEATER_0_PIN 12 // RAMPS 1.0
#define ORIG_HEATER_BED_PIN -1 // RAMPS 1.0
#define ORIG_FAN_PIN 11 // RAMPS 1.0
#else // RAMPS_V_1_1 or RAMPS_V_1_2
#define ORIG_HEATER_0_PIN 10 // RAMPS 1.1
#define ORIG_HEATER_BED_PIN 8 // RAMPS 1.1
#define ORIG_FAN_PIN 9 // RAMPS 1.1
#endif
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
// SPI for Max6675 Thermocouple
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
/****************************************************************************************
* 80
* RUMBA
****************************************************************************************/
#define KNOWN_BOARD 1
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#define ORIG_X_STEP_PIN 17
#define ORIG_X_DIR_PIN 16
#define ORIG_X_ENABLE_PIN 48
#define ORIG_X_MIN_PIN 37
#define ORIG_X_MAX_PIN 36
#define ORIG_Y_STEP_PIN 54
#define ORIG_Y_DIR_PIN 47
#define ORIG_Y_ENABLE_PIN 55
#define ORIG_Y_MIN_PIN 35
#define ORIG_Y_MAX_PIN 34
#define Y2_STEP_PIN 26
#define Y2_DIR_PIN 25
#define Y2_ENABLE_PIN 27
#define ORIG_Z_STEP_PIN 57
#define ORIG_Z_DIR_PIN 56
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 33
#define ORIG_Z_MAX_PIN 32
#define Z2_STEP_PIN 26
#define Z2_DIR_PIN 25
#define Z2_ENABLE_PIN 27
#define ORIG_E0_STEP_PIN 23
#define ORIG_E0_DIR_PIN 22
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 26
#define ORIG_E1_DIR_PIN 25
#define ORIG_E1_ENABLE_PIN 27
#define ORIG_E2_STEP_PIN 29
#define ORIG_E2_DIR_PIN 28
#define ORIG_E2_ENABLE_PIN 39
#define LED_PIN 13
#define ORIG_FAN_PIN 7
//additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
#define ORIG_PS_ON_PIN 45
#define KILL_PIN 46
#if (TEMP_SENSOR_0==0)
#define ORIG_TEMP_0_PIN -1
#define ORIG_HEATER_0_PIN -1
#else
#define ORIG_HEATER_0_PIN 2 // EXTRUDER 1
#if (TEMP_SENSOR_0==-1)
#define ORIG_TEMP_0_PIN 6 // ANALOG NUMBERING - connector *K1* on RUMBA thermocouple ADD ON is used
#else
#define ORIG_TEMP_0_PIN 15 // ANALOG NUMBERING - default connector for thermistor *T0* on rumba board is used
#endif
#endif
#if (TEMP_SENSOR_1==0)
#define ORIG_TEMP_1_PIN -1
#define ORIG_HEATER_1_PIN -1
#else
#define ORIG_HEATER_1_PIN 3 // EXTRUDER 2
#if (TEMP_SENSOR_1==-1)
#define ORIG_TEMP_1_PIN 5 // ANALOG NUMBERING - connector *K2* on RUMBA thermocouple ADD ON is used
#else
#define ORIG_TEMP_1_PIN 14 // ANALOG NUMBERING - default connector for thermistor *T1* on rumba board is used
#endif
#endif
#if (TEMP_SENSOR_2==0)
#define ORIG_TEMP_2_PIN -1
#define ORIG_HEATER_2_PIN -1
#else
#define ORIG_HEATER_2_PIN 6 // EXTRUDER 3
#if (TEMP_SENSOR_2==-1)
#define ORIG_TEMP_2_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_BED is defined as thermocouple
#else
#define ORIG_TEMP_2_PIN 13 // ANALOG NUMBERING - default connector for thermistor *T2* on rumba board is used
#endif
#endif
//optional for extruder 4 or chamber: #define TEMP_X_PIN 12 // ANALOG NUMBERING - default connector for thermistor *T3* on rumba board is used
//optional FAN1 can be used as 4th heater output: #define ORIG_HEATER_3_PIN 8 // EXTRUDER 4
#if (TEMP_SENSOR_BED==0)
#define ORIG_TEMP_BED_PIN -1
#define ORIG_HEATER_BED_PIN -1
#else
#define ORIG_HEATER_BED_PIN 9 // BED
#if (TEMP_SENSOR_BED==-1)
#define ORIG_TEMP_BED_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_2 is defined as thermocouple
#else
#define ORIG_TEMP_BED_PIN 11 // ANALOG NUMBERING - default connector for thermistor *THB* on rumba board is used
#endif
#endif
#define SDPOWER -1
#define SDSS 53
#define SD_DETECT_PIN 49
#define ORIG_BEEPER_PIN 44
#define LCD_PINS_RS 19
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 18
#define LCD_PINS_D5 38
#define LCD_PINS_D6 41
#define LCD_PINS_D7 40
#define BTN_EN1 11
#define BTN_EN2 12
#define BTN_ENC 43
/****************************************************************************************
* 6 - 62 - 63 - 64 - 65
* 6 - Sanguinololu <1.2
* 62 - Sanguinololu 1.2 and above
* 63 - Melzi
* 64 - STB 1.1
* 65 - Azteeg X1
* 66 - MELZI 1284
****************************************************************************************/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
#define KNOWN_BOARD 1
#if !MB(SANGUINOLOLU_11)
#define SANGUINOLOLU_V_1_2
#endif
#if defined(__AVR_ATmega1284P__)
#define LARGE_FLASH true
#endif
#define ORIG_X_STEP_PIN 15
#define ORIG_X_DIR_PIN 21
#define X_STOP_PIN 18
#define ORIG_Y_STEP_PIN 22
#define ORIG_Y_DIR_PIN 23
#define Y_STOP_PIN 19
#define ORIG_Z_STEP_PIN 3
#define ORIG_Z_DIR_PIN 2
#define Z_STOP_PIN 20
#define ORIG_E0_STEP_PIN 1
#define ORIG_E0_DIR_PIN 0
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#if ORIG_FAN_PIN == 12 || ORIG_FAN_PIN ==13
#define FAN_SOFT_PWM
#endif
#if MB(AZTEEG_X1) || MB(STB_11) || MB(MELZI)
#define ORIG_FAN_PIN 4 // Works for Panelolu2 too
#if MB(MELZI)
#define LED_PIN 27
#elif MB(STB_11)
#define LCD_PIN_BL 17 // LCD backlight LED
#endif
#endif
#if NUM_SERVOS > 0
#define SERVO0_PIN -1
#if NUM_SERVOS > 1
#define SERVO1_PIN -1
#if NUM_SERVOS > 2
#define SERVO2_PIN -1
#if NUM_SERVOS > 3
#define SERVO3_PIN -1
#endif
#endif
#endif
#endif
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 13 // (extruder)
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#if ENABLED(SANGUINOLOLU_V_1_2)
#define ORIG_HEATER_BED_PIN 12 // (bed)
#define ORIG_X_ENABLE_PIN 14
#define ORIG_Y_ENABLE_PIN 14
#define ORIG_Z_ENABLE_PIN 26
#define ORIG_E0_ENABLE_PIN 14
#if ENABLED(LCD_I2C_PANELOLU2)
#define ORIG_FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan
#endif
#else
#define ORIG_HEATER_BED_PIN 14 // (bed)
#define ORIG_X_ENABLE_PIN -1
#define ORIG_Y_ENABLE_PIN -1
#define ORIG_Z_ENABLE_PIN -1
#define ORIG_E0_ENABLE_PIN -1
#endif
#define ORIG_TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
#define SDPOWER -1
#define SDSS 31
/**
* On some broken versions of the Sanguino libraries the pin definitions are wrong,
* which then needs SDSS as pin 24. But you should upgrade your Sanguino libraries! See #368.
*/
//#define SDSS 24
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
// No buzzer installed
#define ORIG_BEEPER_PIN -1
//LCD Pins
#if ENABLED(DOGLCD)
#if ENABLED(U8GLIB_ST7920) //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
#if MB(MELZI) // Melzi board
#define LCD_PINS_RS 30 //CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 29 //SID (MOSI)
#define LCD_PINS_D4 17 //SCK (CLK) clock
#define ORIG_BEEPER_PIN 27 // Pin 27 is taken by LED_PIN, but Melzi LED does nothing with Marlin so this can be used for ORIG_BEEPER_PIN. You can use this pin with M42 instead of ORIG_BEEPER_PIN.
#else // Sanguinololu 1.3
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif
#else // DOGM SPI LCD Support
#define DOGLCD_A0 30
#define DOGLCD_CS 29
#define LCD_CONTRAST 1
#endif
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#else // !DOGLCD - Standard Hitachi LCD controller
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif // !DOGLCD
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#if ENABLED(LCD_I2C_PANELOLU2)
#if MB(MELZI)
#define BTN_ENC 29
#define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi
#else
#define BTN_ENC 30
#endif
#else
#define BTN_ENC 16
#define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi
#endif //Panelolu2
#define SD_DETECT_PIN -1
#elif ENABLED(MAKRPANEL)
#define ORIG_BEEPER_PIN 29
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 30
#define DOGLCD_CS 17
#define LCD_PIN_BL 28 // backlight LED on PA3
// GLCD features
#define LCD_CONTRAST 1
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#define BTN_ENC 16
#define SD_DETECT_PIN -1
#endif // MAKRPANEL
/****************************************************************************************
* 83
* SAV MkI pin assignments (AT90USB1286)
* Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
* http://www.pjrc.com/teensy/teensyduino.html
* RepRap Clone Wars project board.
****************************************************************************************/
#define KNOWN_BOARD 1
#define AT90USB 1286 // Disable MarlinSerial etc.
#ifndef __AVR_AT90USB1286__
#error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 0
#define ORIG_X_DIR_PIN 1
#define ORIG_X_ENABLE_PIN 39
#define ORIG_Y_STEP_PIN 2
#define ORIG_Y_DIR_PIN 3
#define ORIG_Y_ENABLE_PIN 38
#define ORIG_Z_STEP_PIN 4
#define ORIG_Z_DIR_PIN 5
#define ORIG_Z_ENABLE_PIN 23
#define ORIG_E0_STEP_PIN 6
#define ORIG_E0_DIR_PIN 7
#define ORIG_E0_ENABLE_PIN 19
#define ORIG_HEATER_0_PIN 21 // Extruder
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 20 // Bed
#define ORIG_FAN_PIN 16 // Fan -- from Teensyduino environment.
// For the fan and Teensyduino uses a different pin mapping.
#define X_STOP_PIN 13
#define Y_STOP_PIN 14
#define Z_STOP_PIN 15
//#define Z_STOP_PIN 36 // For inductive sensor.
#define ORIG_TEMP_0_PIN 7 // Extruder / Analog pin numbering
#define ORIG_TEMP_BED_PIN 6 // Bed / Analog pin numbering
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define SDPOWER -1
#define SDSS 20 // PB0 - 8 in marlin env.
#define LED_PIN -1
#define ORIG_PS_ON_PIN -1
#define ALARM_PIN -1
#define SD_DETECT_PIN -1
#define ORIG_BEEPER_PIN -1
#define LCD_PINS_RS -1
#define LCD_PINS_ENABLE -1
#define LCD_PINS_D4 -1
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
#if ENABLED(SAV_3DLCD)
// For LCD SHIFT register LCD
#define SR_DATA_PIN 1
#define SR_CLK_PIN 0
#define BTN_EN1 41
#define BTN_EN2 40
#define BTN_ENC 12
#define KILL_PIN 42 // A2 = 42 - teensy = 40
#define HOME_PIN -1 // A4 = marlin 44 - teensy = 42
#if NUM_SERVOS > 0
#define SERVO0_PIN 41 // In teensy's pin definition for pinMode (in Servo.cpp)
#endif
#endif
/****************************************************************************************
* 20
* Sethi 3D_1 pin assignment - www.sethi3d.com.br
****************************************************************************************/
#define KNOWN_BOARD
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
#error Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu.
#endif
#if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 12 // v1.x
#endif
// X axis pins
#define ORIG_X_STEP_PIN 19
#define ORIG_X_DIR_PIN 18
#define ORIG_X_ENABLE_PIN 24
#define X_STOP_PIN 2
// Y axis pins
#define ORIG_Y_STEP_PIN 23
#define ORIG_Y_DIR_PIN 22
#define ORIG_Y_ENABLE_PIN 24
#define Y_STOP_PIN 0
// Z axis pins
#define ORIG_Z_STEP_PIN 26
#define ORIG_Z_DIR_PIN 25
#define ORIG_Z_ENABLE_PIN 24
#define ORIG_Z_MIN_PIN 1
#define ORIG_Z_MAX_PIN 0
// Extruder pins
#define ORIG_E0_STEP_PIN 28
#define ORIG_E0_DIR_PIN 27
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_TEMP_0_PIN 1
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 2
#define ORIG_HEATER_0_PIN 4
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 3
#define KILL_PIN -1
#define SDPOWER -1
#define SDSS -1 // SCL pin of I2C header
#define LED_PIN -1
#if (GEN7_VERSION >= 13)
// Gen7 v1.3 removed the fan pin
#define ORIG_FAN_PIN -1
#else
#define ORIG_FAN_PIN 31
#endif
#define ORIG_PS_ON_PIN 15
//All these generations of Gen7 supply thermistor power
//via PS_ON, so ignore bad thermistor readings
#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
//our pin for debugging.
#define DEBUG_PIN 0
//our RS485 pins
#define TORIG_X_ENABLE_PIN 12
#define RORIG_X_ENABLE_PIN 13
/****************************************************************************************
* 408
* Arduino pin assignment
* for SMART_RAMPS
****************************************************************************************/
#define KNOWN_BOARD
#ifndef __SAM3X8E__
#error Oops! Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
#endif
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19
#define ORIG_HEATER_0_PIN 10
#define ORIG_HEATER_1_PIN 9
#define ORIG_HEATER_BED_PIN 8
#define ORIG_TEMP_0_PIN 9 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 10 // ANALOG NUMBERING
#define ORIG_TEMP_BED_PIN 11 // ANALOG NUMBERING
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 53 // 10 if using HW SPI. 53 if using SW SPI
#define LED_PIN 13
#define ORIG_FAN_PIN 9
#define ORIG_PS_ON_PIN 12
#define KILL_PIN -1
#define SUICIDE_PIN -1 // PIN that has to be turned on right after start, to keep power flowing
/****************************************************************************************
* 84
* Teensy++ 2.0 Breadboard pin assignments (AT90USB1286)
* Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
* http://www.pjrc.com/teensy/teensyduino.html
* See http://reprap.org/wiki/Printrboard for more info
* CLI build: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make
****************************************************************************************/
#define KNOWN_BOARD 1
#define AT90USB 1286 // Disable MarlinSerial etc.
#ifndef __AVR_AT90USB1286__
#error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
#endif
#define LARGE_FLASH true
/*
DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a TeensyBreadboard:
USB
GND GND |-----#####-----| +5V ATX +5SB
ATX PS_ON PWM 27 |b7 ##### b6| 26 PWM* Stepper Enable
PWM 0 |d0 b5| 25 PWM*
PWM 1 |d1 b4| 24 PWM
X_MIN 2 |d2 b3| 23 MISO_PIN
Y_MIN 3 |d3 b2| 22 MOSI_PIN
Z_MIN 4 |d4 * * b1| 21 SCK_PIN
5 |d5 e e b0| 20 SDSS
LED 6 |d6 5 4 e7| 19
7 |d7 e6| 18
LCD RS 8 |e0 | GND
LCD EN 9 |e1 a4 a0 R| AREF
LCD D4 10 |c0 a5 a1 f0| 38 A0 ENC_1
LCD D5 11 |c1 a6 a2 f1| 39 A1 ENC_2
LCD D6 12 |c2 a7 a3 f2| 40 A2 ENC_CLK
LCD D6 13 |c3 f3| 41 A3
Bed Heat PWM 14 |c4 V G R f4| 42 A4
Extruder Heat PWM 15 |c5 c n S f5| 43 A5
Fan PWM 16 |c6 c d T f6| 44 A6 Bed TC
17 |c7 * * * f7| 45 A7 Extruder TC * 4.7k * +5
-----------------
Interior E4: 36, INT4
Interior E5: 37, INT5
Interior PA0-7: 28-35 -- Printrboard and Teensylu use these pins for step & direction:
T++ PA Signal Marlin
Z STEP 32 a4 a0 28 X STEP
Z DIR 33 a5 a1 29 X DIR
E STEP 34 a6 a2 30 Y STEP
E DIR 35 a7 a3 31 Y DIR
*/
#ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical.
#error Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config
// or build from command line with: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make
#endif
#define ORIG_X_STEP_PIN 28 // 0 Marlin
#define ORIG_X_DIR_PIN 29 // 1 Marlin
#define ORIG_X_ENABLE_PIN 26
#define ORIG_Y_STEP_PIN 30 // 2 Marlin
#define ORIG_Y_DIR_PIN 31 // 3
#define ORIG_Y_ENABLE_PIN 26 // Shared w/x
#define ORIG_Z_STEP_PIN 32 // 4
#define ORIG_Z_DIR_PIN 33 // 5
#define ORIG_Z_ENABLE_PIN 26 // Shared w/x
#define ORIG_E0_STEP_PIN 34 // 6
#define ORIG_E0_DIR_PIN 35 // 7
#define ORIG_E0_ENABLE_PIN 26 // Shared w/x
#define ORIG_HEATER_0_PIN 15 // 21 // Extruder
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 14 // 20 // Bed
#define ORIG_FAN_PIN 16 // 22 // Fan
#define X_STOP_PIN 2
#define Y_STOP_PIN 3
#define Z_STOP_PIN 4
#define ORIG_TEMP_0_PIN 7 // Extruder / Analog pin numbering
#define ORIG_TEMP_BED_PIN 6 // Bed / Analog pin numbering
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define SDPOWER -1
#define SD_DETECT_PIN -1
#define SDSS 20 // 8
#define LED_PIN 6
#define ORIG_PS_ON_PIN 27
#define KILL_PIN -1
#define ALARM_PIN -1
#if ENABLED(ULTIPANEL)
#define LCD_PINS_RS 8
#define LCD_PINS_ENABLE 9
#define LCD_PINS_D4 10
#define LCD_PINS_D5 11
#define LCD_PINS_D6 12
#define LCD_PINS_D7 13
#define BTN_EN1 38
#define BTN_EN2 39
#define BTN_ENC 40
#endif
/****************************************************************************************
* 8 - 81
* Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
* Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
http://www.pjrc.com/teensy/teensyduino.html
* See http://reprap.org/wiki/Printrboard for more info
****************************************************************************************/
#define KNOWN_BOARD 1
#define AT90USB 1286 // Disable MarlinSerial etc.
#ifndef __AVR_AT90USB1286__
#error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
#endif
#ifdef AT90USBxx_TEENSYPP_ASSIGNMENTS // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional.
#error These Teensylu/Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 0
#define ORIG_X_DIR_PIN 1
#define ORIG_X_ENABLE_PIN 39
#define ORIG_Y_STEP_PIN 2
#define ORIG_Y_DIR_PIN 3
#define ORIG_Y_ENABLE_PIN 38
#define ORIG_Z_STEP_PIN 4
#define ORIG_Z_DIR_PIN 5
#define ORIG_Z_ENABLE_PIN 23
#define ORIG_E0_STEP_PIN 6
#define ORIG_E0_DIR_PIN 7
#define ORIG_E0_ENABLE_PIN 19
#define ORIG_HEATER_0_PIN 21 // Extruder
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 20 // Bed
#define ORIG_FAN_PIN 22 // Fan
// You may need to change ORIG_FAN_PIN to 16 because Marlin isn't using fastio.h
// for the fan and Teensyduino uses a different pin mapping.
#if MB(TEENSYLU) // Teensylu
#define X_STOP_PIN 13
#define Y_STOP_PIN 14
#define Z_STOP_PIN 15
#define ORIG_TEMP_0_PIN 7 // Extruder / Analog pin numbering
#define ORIG_TEMP_BED_PIN 6 // Bed / Analog pin numbering
#else // Printrboard
#define X_STOP_PIN 35
#define Y_STOP_PIN 8
#define Z_STOP_PIN 36
#define ORIG_TEMP_0_PIN 1 // Extruder / Analog pin numbering
#define ORIG_TEMP_BED_PIN 0 // Bed / Analog pin numbering
#endif
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define SDPOWER -1
#define SDSS 8
#define LED_PIN -1
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ALARM_PIN -1
/****************************************************************************************
* 72
* Ultiboard v2.0 pin assignment
****************************************************************************************/
#define KNOWN_BOARD
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
#endif
#define ORIG_X_STEP_PIN 25
#define ORIG_X_DIR_PIN 23
#define X_STOP_PIN 22
#define ORIG_X_ENABLE_PIN 27
#define ORIG_Y_STEP_PIN 32
#define ORIG_Y_DIR_PIN 33
#define Y_STOP_PIN 26
#define ORIG_Y_ENABLE_PIN 31
#define ORIG_Z_STEP_PIN 35
#define ORIG_Z_DIR_PIN 36
#define Z_STOP_PIN 29
#define ORIG_Z_ENABLE_PIN 34
#define ORIG_HEATER_BED_PIN 4
#define ORIG_TEMP_BED_PIN 10
#define ORIG_HEATER_0_PIN 2
#define ORIG_TEMP_0_PIN 8
#define ORIG_HEATER_1_PIN 3
#define ORIG_TEMP_1_PIN 9
#define ORIG_HEATER_2_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_E0_STEP_PIN 42
#define ORIG_E0_DIR_PIN 43
#define ORIG_E0_ENABLE_PIN 37
#define ORIG_E1_STEP_PIN 49
#define ORIG_E1_DIR_PIN 47
#define ORIG_E1_ENABLE_PIN 48
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 8
#define ORIG_FAN_PIN 7
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
#define SAFETY_TRIGGERED_PIN 28 //PIN to detect the safety circuit has triggered
#define MAIN_VOLTAGE_MEASURE_PIN 14 //Analogue PIN to measure the main voltage, with a 100k - 4k7 resitor divider.
#define MOTOR_CURRENT_PWM_XY_PIN 44
#define MOTOR_CURRENT_PWM_Z_PIN 45
#define MOTOR_CURRENT_PWM_E_PIN 46
//Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range
#define MOTOR_CURRENT_PWM_RANGE 2000
#define DEFAULT_PWM_MOTOR_CURRENT {1300, 1300, 1250}
//arduino pin witch triggers an piezzo beeper
#define ORIG_BEEPER_PIN 18
#define LCD_PINS_RS 20
#define LCD_PINS_ENABLE 15
#define LCD_PINS_D4 14
#define LCD_PINS_D5 21
#define LCD_PINS_D6 5
#define LCD_PINS_D7 6
//buttons are directly attached
#define BTN_EN1 40
#define BTN_EN2 41
#define BTN_ENC 19 //the click
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define SD_DETECT_PIN 39
/****************************************************************************************
* 7
* Ultimaker pin assignment
****************************************************************************************/
#define KNOWN_BOARD
#ifndef __AVR_ATmega1280__
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 25
#define ORIG_X_DIR_PIN 23
#define ORIG_X_MIN_PIN 22
#define ORIG_X_MAX_PIN 24
#define ORIG_X_ENABLE_PIN 27
#define ORIG_Y_STEP_PIN 31
#define ORIG_Y_DIR_PIN 33
#define ORIG_Y_MIN_PIN 26
#define ORIG_Y_MAX_PIN 28
#define ORIG_Y_ENABLE_PIN 29
#define ORIG_Z_STEP_PIN 37
#define ORIG_Z_DIR_PIN 39
#define ORIG_Z_MIN_PIN 30
#define ORIG_Z_MAX_PIN 32
#define ORIG_Z_ENABLE_PIN 35
#define ORIG_HEATER_BED_PIN 4
#define ORIG_TEMP_BED_PIN 10
#define ORIG_HEATER_0_PIN 2
#define ORIG_TEMP_0_PIN 8
#define ORIG_HEATER_1_PIN 3
#define ORIG_TEMP_1_PIN 9
#define ORIG_HEATER_2_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_E0_STEP_PIN 43
#define ORIG_E0_DIR_PIN 45
#define ORIG_E0_ENABLE_PIN 41
#define ORIG_E1_STEP_PIN 49
#define ORIG_E1_DIR_PIN 47
#define ORIG_E1_ENABLE_PIN 48
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 7
#define ORIG_PS_ON_PIN 12
#define KILL_PIN -1
#define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
//arduino pin witch triggers an piezzo beeper
#define ORIG_BEEPER_PIN 18
#define LCD_PINS_RS 20
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 16
#define LCD_PINS_D5 21
#define LCD_PINS_D6 5
#define LCD_PINS_D7 6
//buttons are directly attached
#define BTN_EN1 40
#define BTN_EN2 42
#define BTN_ENC 19 //the click
#define SD_DETECT_PIN 38
#else //old style panel with shift register
//arduino pin witch triggers an piezzo beeper
#define ORIG_BEEPER_PIN 18
//buttons are attached to a shift register
#define SHIFT_CLK 38
#define SHIFT_LD 42
#define SHIFT_OUT 40
#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 5
#define LCD_PINS_D4 6
#define LCD_PINS_D5 21
#define LCD_PINS_D6 20
#define LCD_PINS_D7 19
#define SD_DETECT_PIN -1
#endif
#endif //ULTRA_LCD
/****************************************************************************************
* 71
* Ultimaker pin assignment (Old electronics)
****************************************************************************************/
#define KNOWN_BOARD
#ifndef __AVR_ATmega1280__
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
#endif
#endif
#define LARGE_FLASH true
#define ORIG_X_STEP_PIN 25
#define ORIG_X_DIR_PIN 23
#define ORIG_X_MIN_PIN 15
#define ORIG_X_MAX_PIN 14
#define ORIG_X_ENABLE_PIN 27
#define ORIG_Y_STEP_PIN 31
#define ORIG_Y_DIR_PIN 33
#define ORIG_Y_MIN_PIN 17
#define ORIG_Y_MAX_PIN 16
#define ORIG_Y_ENABLE_PIN 29
#define ORIG_Z_STEP_PIN 37
#define ORIG_Z_DIR_PIN 39
#define ORIG_Z_MIN_PIN 19
#define ORIG_Z_MAX_PIN 18
#define ORIG_Z_ENABLE_PIN 35
#define ORIG_HEATER_BED_PIN -1
#define ORIG_TEMP_BED_PIN -1
#define ORIG_HEATER_0_PIN 2
#define ORIG_TEMP_0_PIN 8
#define ORIG_HEATER_1_PIN 1
#define ORIG_TEMP_1_PIN 1
#define ORIG_HEATER_2_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_E0_STEP_PIN 43
#define ORIG_E0_DIR_PIN 45
#define ORIG_E0_ENABLE_PIN 41
#define ORIG_E1_STEP_PIN -1
#define ORIG_E1_DIR_PIN -1
#define ORIG_E1_ENABLE_PIN -1
#define SDPOWER -1
#define SDSS -1
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
#define LCD_PINS_RS 24
#define LCD_PINS_ENABLE 22
#define LCD_PINS_D4 36
#define LCD_PINS_D5 34
#define LCD_PINS_D6 32
#define LCD_PINS_D7 30
/****************************************************************************************
* 705
* ULTRATRONICS
*****************************************************************************************/
#define KNOWN_BOARD
#ifndef __SAM3X8E__
#error Oops! Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
#endif
// X AXIS
#define ORIG_X_STEP_PIN 35
#define ORIG_X_DIR_PIN 34
#define ORIG_X_ENABLE_PIN 37
#define ORIG_X_MIN_PIN 31
#define ORIG_X_MAX_PIN 30
// Y AXIS
#define ORIG_Y_STEP_PIN 22
#define ORIG_Y_DIR_PIN 23
#define ORIG_Y_ENABLE_PIN 33
#define ORIG_Y_MIN_PIN 12
#define ORIG_Y_MAX_PIN 11
// Z AXIS
#define ORIG_Z_STEP_PIN 25
#define ORIG_Z_DIR_PIN 26
#define ORIG_Z_ENABLE_PIN 24
#define ORIG_Z_MIN_PIN 29
#define ORIG_Z_MAX_PIN 28
// E0 AXIS
#define ORIG_E0_STEP_PIN 47
#define ORIG_E0_DIR_PIN 46
#define ORIG_E0_ENABLE_PIN 48
// E1 AXIS
#define ORIG_E1_STEP_PIN 44
#define ORIG_E1_DIR_PIN 36
#define ORIG_E1_ENABLE_PIN 45
// E2 AXIS
#define ORIG_E2_STEP_PIN 42
#define ORIG_E2_DIR_PIN 41
#define ORIG_E2_ENABLE_PIN 43
// E3 AXIS
#define ORIG_E3_STEP_PIN 39
#define ORIG_E3_DIR_PIN 38
#define ORIG_E3_ENABLE_PIN 40
#define SDPOWER -1
#define SDSS 59
#define SD_DETECT_PIN 60
#define LED_PIN -1
#define ORIG_FAN_PIN 6
#define ORIG_FAN2_PIN 5
#define ORIG_PS_ON_PIN 32
#define KILL_PIN -1
#define SUICIDE_PIN -1
#define ORIG_HEATER_BED_PIN 2
#define ORIG_HEATER_0_PIN 3
#define ORIG_HEATER_1_PIN 7
#define ORIG_HEATER_2_PIN 8
#define ORIG_HEATER_3_PIN 9
#define ORIG_TEMP_BED_PIN 0 // ANALOG NUMBERING
#define ORIG_TEMP_0_PIN 1 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 2 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN 3 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN 4 // ANALOG NUMBERING
#define ORIG_BEEPER_PIN 27
......@@ -227,7 +227,7 @@
#endif
#endif
#include "../Pins.h"
#include "pins.h"
/**
* SAM3X8E
......
......@@ -15,20 +15,20 @@
int i = duration * freq / 1000;
while (i--) {
WRITE(BEEPER_PIN, HIGH);
delayMicroseconds(delay);
HAL::delayMicroseconds(delay);
WRITE(BEEPER_PIN, LOW);
delayMicroseconds(delay);
HAL::delayMicroseconds(delay);
}
#else // buzzer has its own resonator - needs a DC
tone(BEEPER_PIN, freq, duration);
delay(1 + duration);
HAL::delayMilliseconds(1 + duration);
#endif
#else
delay(duration);
HAL::delayMilliseconds(duration);
#endif
}
else {
delay(duration);
HAL::delayMilliseconds(duration);
}
}
#endif
......@@ -24,9 +24,9 @@
#define BLEN_A 0
#define BLEN_B 1
#define BLEN_C 2
#define EN_A BIT(BLEN_A)
#define EN_B BIT(BLEN_B)
#define EN_C BIT(BLEN_C)
#define EN_A (_BV(BLEN_A))
#define EN_B (_BV(BLEN_B))
#define EN_C (_BV(BLEN_C))
#if ENABLED(INVERT_CLICK_BUTTON)
#define LCD_CLICKED !(buttons&EN_C)
#else
......@@ -254,7 +254,7 @@ static void lcd_implementation_init() {
} while (u8g.nextPage());
if (show_bootscreen) {
delay(SPLASH_SCREEN_DURATION);
HAL::delayMilliseconds(SPLASH_SCREEN_DURATION);
show_bootscreen = false;
}
#endif
......
......@@ -838,7 +838,7 @@ static void lcd_prepare_menu() {
// Level Bed
//
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
if (axis_known_position & (BIT(X_AXIS)|BIT(Y_AXIS)) == (BIT(X_AXIS)|BIT(Y_AXIS)))
if (axis_known_position & (_BV(X_AXIS)|_BV(Y_AXIS)) == (_BV(X_AXIS)|_BV(Y_AXIS)))
MENU_ITEM(gcode, MSG_LEVEL_BED, PSTR("G29"));
#elif !MECH(DELTA) && DISABLED(Z_SAFE_HOMING) && Z_HOME_DIR < 0
MENU_ITEM(submenu, MSG_MBL_SETTING, config_lcd_level_bed);
......@@ -1695,7 +1695,7 @@ void lcd_quick_feedback() {
#if DISABLED(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
#endif
delay(LCD_FEEDBACK_FREQUENCY_DURATION_MS);
HAL::delayMilliseconds(LCD_FEEDBACK_FREQUENCY_DURATION_MS);
#endif
}
......@@ -2481,7 +2481,7 @@ char* ftostr52(const float& x) {
{
LCD_Printpos(0, 0); lcd_printPGM(PSTR(MSG_MBL_6));
LCD_Printpos(0, 1); lcd_printPGM(PSTR(" "));
delay(5000);
HAL::delayMilliseconds(5000);
enqueuecommands_P(PSTR("G28"));
lcd_goto_menu(lcd_prepare_menu);
}
......
......@@ -71,16 +71,16 @@
void lcd_ignore_click(bool b=true);
#if ENABLED(NEWPANEL)
#define EN_C BIT(BLEN_C)
#define EN_B BIT(BLEN_B)
#define EN_A BIT(BLEN_A)
#define EN_C (_BV(BLEN_C))
#define EN_B (_BV(BLEN_B))
#define EN_A (_BV(BLEN_A))
#if ENABLED(INVERT_CLICK_BUTTON)
#define LCD_CLICKED !(buttons&EN_C)
#else
#define LCD_CLICKED (buttons&EN_C)
#endif
#if ENABLED(BTN_BACK) && BTN_BACK > 0
#define EN_D BIT(BLEN_D)
#define EN_D (_BV(BLEN_D))
#if ENABLED(INVERT_BACK_BUTTON)
#define LCD_BACK_CLICKED !(buttons&EN_D)
#else
......@@ -88,37 +88,37 @@
#endif
#endif
#if ENABLED(REPRAPWORLD_KEYPAD)
#define EN_REPRAPWORLD_KEYPAD_F3 (BIT(BLEN_REPRAPWORLD_KEYPAD_F3))
#define EN_REPRAPWORLD_KEYPAD_F2 (BIT(BLEN_REPRAPWORLD_KEYPAD_F2))
#define EN_REPRAPWORLD_KEYPAD_F1 (BIT(BLEN_REPRAPWORLD_KEYPAD_F1))
#define EN_REPRAPWORLD_KEYPAD_UP (BIT(BLEN_REPRAPWORLD_KEYPAD_UP))
#define EN_REPRAPWORLD_KEYPAD_RIGHT (BIT(BLEN_REPRAPWORLD_KEYPAD_RIGHT))
#define EN_REPRAPWORLD_KEYPAD_MIDDLE (BIT(BLEN_REPRAPWORLD_KEYPAD_MIDDLE))
#define EN_REPRAPWORLD_KEYPAD_DOWN (BIT(BLEN_REPRAPWORLD_KEYPAD_DOWN))
#define EN_REPRAPWORLD_KEYPAD_LEFT (BIT(BLEN_REPRAPWORLD_KEYPAD_LEFT))
#define EN_REPRAPWORLD_KEYPAD_F3 (_BV(BLEN_REPRAPWORLD_KEYPAD_F3))
#define EN_REPRAPWORLD_KEYPAD_F2 (_BV(BLEN_REPRAPWORLD_KEYPAD_F2))
#define EN_REPRAPWORLD_KEYPAD_F1 (_BV(BLEN_REPRAPWORLD_KEYPAD_F1))
#define EN_REPRAPWORLD_KEYPAD_UP (_BV(BLEN_REPRAPWORLD_KEYPAD_UP))
#define EN_REPRAPWORLD_KEYPAD_RIGHT (_BV(BLEN_REPRAPWORLD_KEYPAD_RIGHT))
#define EN_REPRAPWORLD_KEYPAD_MIDDLE (_BV(BLEN_REPRAPWORLD_KEYPAD_MIDDLE))
#define EN_REPRAPWORLD_KEYPAD_DOWN (_BV(BLEN_REPRAPWORLD_KEYPAD_DOWN))
#define EN_REPRAPWORLD_KEYPAD_LEFT (_BV(BLEN_REPRAPWORLD_KEYPAD_LEFT))
#if ENABLED(INVERT_CLICK_BUTTON)
#define LCD_CLICKED !((buttons&EN_C) || (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F1))
#else
#define LCD_CLICKED ((buttons&EN_C) || (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F1))
#endif
#define REPRAPWORLD_KEYPAD_MOVE_Z_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F2)
#define REPRAPWORLD_KEYPAD_MOVE_Z_DOWN (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F3)
#define REPRAPWORLD_KEYPAD_MOVE_X_LEFT (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_LEFT)
#define REPRAPWORLD_KEYPAD_MOVE_Z_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F2)
#define REPRAPWORLD_KEYPAD_MOVE_Z_DOWN (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F3)
#define REPRAPWORLD_KEYPAD_MOVE_X_LEFT (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_LEFT)
#define REPRAPWORLD_KEYPAD_MOVE_X_RIGHT (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_RIGHT)
#define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_DOWN)
#define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_UP)
#define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_MIDDLE)
#define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_DOWN)
#define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_UP)
#define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_MIDDLE)
#endif //REPRAPWORLD_KEYPAD
#else
//atomic, do not change
#define B_LE BIT(BL_LE)
#define B_UP BIT(BL_UP)
#define B_MI BIT(BL_MI)
#define B_DW BIT(BL_DW)
#define B_RI BIT(BL_RI)
#define B_ST BIT(BL_ST)
#define EN_B BIT(BLEN_B)
#define EN_A BIT(BLEN_A)
#define B_LE (_BV(BL_LE))
#define B_UP (_BV(BL_UP))
#define B_MI (_BV(BL_MI))
#define B_DW (_BV(BL_DW))
#define B_RI (_BV(BL_RI))
#define B_ST (_BV(BL_ST))
#define EN_B (_BV(BLEN_B))
#define EN_A (_BV(BLEN_A))
#define LCD_CLICKED (buttons&(B_MI|B_ST))
......
......@@ -19,24 +19,42 @@
#include <U8glib.h>
static void ST7920_SWSPI_SND_8BIT(uint8_t val) {
uint8_t i;
for (i = 0; i < 8; i++) {
WRITE(ST7920_CLK_PIN,0);
#if F_CPU == 20000000
__asm__("nop\n\t");
#endif
WRITE(ST7920_DAT_PIN,val&0x80);
val<<=1;
WRITE(ST7920_CLK_PIN,1);
#if F_CPU == 20000000
__asm__("nop\n\t""nop\n\t");
#endif
#ifdef __SAM3X8E__
static void ST7920_SWSPI_SND_8BIT(uint8_t val) {
uint8_t i;
for (i = 0; i < 8; i++) {
digitalWrite(ST7920_CLK_PIN, 0);
digitalWrite(ST7920_DAT_PIN, val&0x80);
val<<=1;
digitalWrite(ST7920_CLK_PIN,1);
}
}
}
#define ST7920_CS() {WRITE(ST7920_CS_PIN, 1); u8g_10MicroDelay();}
#define ST7920_NCS() {WRITE(ST7920_CS_PIN, 0);}
#define ST7920_CS() {digitalWrite(ST7920_CS_PIN, 1);u8g_10MicroDelay();}
#define ST7920_NCS() {digitalWrite(ST7920_CS_PIN, 0);}
#else
static void ST7920_SWSPI_SND_8BIT(uint8_t val) {
uint8_t i;
for (i = 0; i < 8; i++) {
WRITE(ST7920_CLK_PIN,0);
#if F_CPU == 20000000
__asm__("nop\n\t");
#endif
WRITE(ST7920_DAT_PIN,val&0x80);
val<<=1;
WRITE(ST7920_CLK_PIN,1);
#if F_CPU == 20000000
__asm__("nop\n\t""nop\n\t");
#endif
}
}
#define ST7920_CS() {WRITE(ST7920_CS_PIN, 1);u8g_10MicroDelay();}
#define ST7920_NCS() {WRITE(ST7920_CS_PIN, 0);}
#endif
#define ST7920_SET_CMD() {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();}
#define ST7920_SET_DAT() {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();}
#define ST7920_WRITE_BYTE(a) {ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xf0u));ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u));u8g_10MicroDelay();}
......
......@@ -5,11 +5,13 @@
#define UNUSED(x) (void) (x)
// Macros for bit masks
#define BIT(b) (1<<(b))
#define TEST(n,b) (((n)&BIT(b))!=0)
#define BITSET(n,b) n |= BIT(b)
#define BITCLR(n,b) n &= ~BIT(b)
#define SET_BIT(n,b,value) (n) ^= ((-value)^(n)) & (BIT(b))
#ifndef _BV
#define _BV(b) (1<<(b))
#endif
#define TEST(n,b) (((n)&_BV(b))!=0)
#define SBI(n,b) (n |= _BV(b))
#define CBI(n,b) (n &= ~_BV(b))
#define SET_BIT(n,b,value) (n) ^= ((-value)^(n)) & (_BV(b))
// Macros for maths shortcuts
#ifndef M_PI
......
......@@ -625,23 +625,23 @@ float junction_deviation = 0.1;
// Compute direction bits for this block
uint8_t dirb = 0;
#if MECH(COREXY)
if (dx < 0) BITSET(dirb, X_HEAD); // Save the real Extruder (head) direction in X Axis
if (dy < 0) BITSET(dirb, Y_HEAD); // ...and Y
if (dz < 0) BITSET(dirb, Z_AXIS);
if (da < 0) BITSET(dirb, A_AXIS); // Motor A direction
if (db < 0) BITSET(dirb, B_AXIS); // Motor B direction
if (dx < 0) SBI(dirb, X_HEAD); // Save the real Extruder (head) direction in X Axis
if (dy < 0) SBI(dirb, Y_HEAD); // ...and Y
if (dz < 0) SBI(dirb, Z_AXIS);
if (da < 0) SBI(dirb, A_AXIS); // Motor A direction
if (db < 0) SBI(dirb, B_AXIS); // Motor B direction
#elif MECH(COREXZ)
if (dx < 0) BITSET(dirb, X_HEAD); // Save the real Extruder (head) direction in X Axis
if (dy < 0) BITSET(dirb, Y_AXIS);
if (dz < 0) BITSET(dirb, Z_HEAD); // ...and Z
if (da < 0) BITSET(dirb, A_AXIS); // Motor A direction
if (dc < 0) BITSET(dirb, C_AXIS); // Motor B direction
if (dx < 0) SBI(dirb, X_HEAD); // Save the real Extruder (head) direction in X Axis
if (dy < 0) SBI(dirb, Y_AXIS);
if (dz < 0) SBI(dirb, Z_HEAD); // ...and Z
if (da < 0) SBI(dirb, A_AXIS); // Motor A direction
if (dc < 0) SBI(dirb, C_AXIS); // Motor B direction
#else
if (dx < 0) BITSET(dirb, X_AXIS);
if (dy < 0) BITSET(dirb, Y_AXIS);
if (dz < 0) BITSET(dirb, Z_AXIS);
if (dx < 0) SBI(dirb, X_AXIS);
if (dy < 0) SBI(dirb, Y_AXIS);
if (dz < 0) SBI(dirb, Z_AXIS);
#endif
if (de < 0) BITSET(dirb, E_AXIS);
if (de < 0) SBI(dirb, E_AXIS);
block->direction_bits = dirb;
block->active_driver = driver;
......
......@@ -246,8 +246,8 @@ volatile signed char count_direction[NUM_AXIS] = { 1 };
// Some useful constants
#define ENABLE_STEPPER_DRIVER_INTERRUPT() TIMSK1 |= BIT(OCIE1A)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() TIMSK1 &= ~BIT(OCIE1A)
#define ENABLE_STEPPER_DRIVER_INTERRUPT() SBI(TIMSK1, OCIE1A)
#define DISABLE_STEPPER_DRIVER_INTERRUPT() CBI(TIMSK1, OCIE1A)
void endstops_hit_on_purpose() {
endstop_hit_bits = 0;
......@@ -292,12 +292,12 @@ void checkHitEndstops() {
ECHO_E;
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
if (abort_on_endstop_hit && !(endstop_hit_bits & BIT(Z_PROBE)) && !(endstop_hit_bits & BIT(E_MIN))) {
if (abort_on_endstop_hit && !(endstop_hit_bits & _BV(Z_PROBE)) && !(endstop_hit_bits & _BV(E_MIN))) {
#if ENABLED(SDSUPPORT)
card.sdprinting = false;
card.closeFile();
#endif
for (int i = 0; i < 3; i++) BITCLR(axis_known_position, i); // not homed anymore
for (int i = 0; i < 3; i++) CBI(axis_known_position, i); // not homed anymore
quickStop(); // kill the planner buffer
Stop(); // restart by M999
}
......@@ -307,17 +307,15 @@ void checkHitEndstops() {
}
}
#if MECH(COREXY) || MECH(COREXZ)
#if MECH(COREXY)
#define CORE_AXIS_2 B_AXIS
#else
#define CORE_AXIS_2 C_AXIS
#endif
#if MECH(COREXY)
#define CORE_AXIS_2 B_AXIS
#elif MECH(COREXZ)
#define CORE_AXIS_2 C_AXIS
#endif
void enable_endstops(bool check) { check_endstops = check; }
// Check endstops
// Check endstops - Called from ISR!
inline void update_endstops() {
#if ENABLED(Z_DUAL_ENDSTOPS) || ENABLED(NPR2)
......@@ -330,7 +328,7 @@ inline void update_endstops() {
#define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
#define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
#define _AXIS(AXIS) AXIS ##_AXIS
#define _ENDSTOP_HIT(AXIS) BITSET(endstop_hit_bits, _ENDSTOP(AXIS, MIN))
#define _ENDSTOP_HIT(AXIS) SBI(endstop_hit_bits, _ENDSTOP(AXIS, MIN))
#define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
// SET_ENDSTOP_BIT: set the current endstop bits for an endstop to its status
......@@ -343,13 +341,11 @@ inline void update_endstops() {
#if MECH(COREXY) || MECH(COREXZ)
#define _SET_TRIGSTEPS(AXIS) do { \
CRITICAL_SECTION_START; \
float axis_pos = count_position[_AXIS(AXIS)]; \
if (_AXIS(AXIS) == A_AXIS) \
axis_pos = (axis_pos + count_position[CORE_AXIS_2]) / 2; \
else if (_AXIS(AXIS) == CORE_AXIS_2) \
axis_pos = (count_position[A_AXIS] - axis_pos) / 2; \
CRITICAL_SECTION_END; \
endstops_trigsteps[_AXIS(AXIS)] = axis_pos; \
} while(0)
......@@ -447,7 +443,7 @@ inline void update_endstops() {
if (z_test && current_block->steps[Z_AXIS] > 0) { // z_test = Z_MIN || Z2_MIN
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
BITSET(endstop_hit_bits, Z_MIN);
SBI(endstop_hit_bits, Z_MIN);
if (!performing_homing || (z_test == 0x3)) //if not performing home or if both endstops were trigged during homing...
step_events_completed = current_block->step_event_count;
}
......@@ -463,7 +459,7 @@ inline void update_endstops() {
if (TEST_ENDSTOP(Z_PROBE)) {
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
BITSET(endstop_hit_bits, Z_PROBE);
SBI(endstop_hit_bits, Z_PROBE);
}
#endif
}
......@@ -483,7 +479,7 @@ inline void update_endstops() {
if (z_test && current_block->steps[Z_AXIS] > 0) { // t_test = Z_MAX || Z2_MAX
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
BITSET(endstop_hit_bits, Z_MIN);
SBI(endstop_hit_bits, Z_MIN);
if (!performing_homing || (z_test == 0x3)) //if not performing home or if both endstops were trigged during homing...
step_events_completed = current_block->step_event_count;
}
......@@ -576,11 +572,11 @@ void set_stepper_direction(bool onlye) {
#define SET_STEP_DIR(AXIS) \
if (TEST(out_bits, AXIS ##_AXIS)) { \
AXIS ##_APPLY_DIR(INVERT_## AXIS ##_DIR, false); \
AXIS ##_APPLY_DIR(INVERT_## AXIS ##_DIR, 0); \
count_direction[AXIS ##_AXIS] = -1; \
} \
else { \
AXIS ##_APPLY_DIR(!INVERT_## AXIS ##_DIR, false); \
AXIS ##_APPLY_DIR(!INVERT_## AXIS ##_DIR, 0); \
count_direction[AXIS ##_AXIS] = 1; \
}
......@@ -1133,10 +1129,10 @@ void st_init() {
#endif
// waveform generation = 0100 = CTC
TCCR1B &= ~BIT(WGM13);
TCCR1B |= BIT(WGM12);
TCCR1A &= ~BIT(WGM11);
TCCR1A &= ~BIT(WGM10);
CBI(TCCR1B, WGM13);
SBI(TCCR1B, WGM12);
CBI(TCCR1A, WGM11);
CBI(TCCR1A, WGM10);
// output mode = 00 (disconnected)
TCCR1A &= ~(3 << COM1A0);
......@@ -1154,11 +1150,11 @@ void st_init() {
#if ENABLED(ADVANCE)
#if defined(TCCR0A) && defined(WGM01)
TCCR0A &= ~BIT(WGM01);
TCCR0A &= ~BIT(WGM00);
CBI(TCCR0A, WGM01);
CBI(TCCR0A, WGM00);
#endif
e_steps[0] = e_steps[1] = e_steps[2] = e_steps[3] = e_steps[4] = e_steps[5] = 0;
TIMSK0 |= BIT(OCIE0A);
SBI(TIMSK0, OCIE0A);
#endif //ADVANCE
enable_endstops(true); // Start with endstops active. After homing they can be disabled
......@@ -1280,7 +1276,7 @@ void quickStop() {
uint8_t old_pin = _READ_DIR(AXIS); \
_APPLY_DIR(AXIS, _INVERT_DIR(AXIS)^direction^INVERT); \
_APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS), true); \
delayMicroseconds(2); \
HAL::delayMicroseconds(2); \
_APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS), true); \
_APPLY_DIR(AXIS, old_pin); \
}
......
......@@ -31,71 +31,8 @@
* X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship between X_AXIS and X Head movement, like CoreXY bots.
*/
enum AxisEnum {X_AXIS=0, A_AXIS=0, Y_AXIS=1, B_AXIS=1, Z_AXIS=2, C_AXIS=2, E_AXIS=3, X_HEAD=4, Y_HEAD=5, Z_HEAD=5};
enum EndstopEnum {X_MIN=0, Y_MIN=1, Z_MIN=2, Z_PROBE=3, X_MAX=4, Y_MAX=5, Z_MAX=6, Z2_MIN=7, Z2_MAX=8, E_MIN=9};
#if ENABLED(COLOR_MIXING_EXTRUDER)
#define E_STEP_WRITE(v) ; /* not used for mixing extruders! */
#if DRIVER_EXTRUDERS > 5
#define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); break; case 5: E5_STEP_WRITE(v); } }
#define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); E3_DIR_WRITE(!INVERT_E3_DIR); E4_DIR_WRITE(!INVERT_E4_DIR); E5_DIR_WRITE(!INVERT_E5_DIR); }
#define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); E3_DIR_WRITE( INVERT_E3_DIR); E4_DIR_WRITE( INVERT_E4_DIR); E5_DIR_WRITE( INVERT_E5_DIR); }
#elif DRIVER_EXTRUDERS > 4
#define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); } }
#define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); E3_DIR_WRITE(!INVERT_E3_DIR); E4_DIR_WRITE(!INVERT_E4_DIR); }
#define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); E3_DIR_WRITE( INVERT_E3_DIR); E4_DIR_WRITE( INVERT_E4_DIR); }
#elif DRIVER_EXTRUDERS > 3
#define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); } }
#define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); E3_DIR_WRITE(!INVERT_E3_DIR); }
#define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); E3_DIR_WRITE( INVERT_E3_DIR); }
#elif DRIVER_EXTRUDERS > 2
#define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); } }
#define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); }
#define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); }
#else
#define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); } }
#define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); }
#define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); }
#endif
#elif DRIVER_EXTRUDERS > 5
#define E_STEP_WRITE(v) { switch(current_block->active_driver) { case 5: E5_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 0: E0_STEP_WRITE(v); break; } }
#define NORM_E_DIR() { switch(current_block->active_driver) { case 5: E5_DIR_WRITE(!INVERT_E5_DIR); break; case 4: E4_DIR_WRITE(!INVERT_E4_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; } }
#define REV_E_DIR() { switch(current_block->active_driver) { case 5: E5_DIR_WRITE( INVERT_E5_DIR); break; case 4: E4_DIR_WRITE( INVERT_E4_DIR); break; case 3: E3_DIR_WRITE( INVERT_E3_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; } }
#elif DRIVER_EXTRUDERS > 4
#define E_STEP_WRITE(v) { switch(current_block->active_driver) { case 4: E4_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 0: E0_STEP_WRITE(v); break; } }
#define NORM_E_DIR() { switch(current_block->active_driver) { case 4: E4_DIR_WRITE(!INVERT_E4_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; } }
#define REV_E_DIR() { switch(current_block->active_driver) { case 4: E4_DIR_WRITE( INVERT_E4_DIR); break; case 3: E3_DIR_WRITE( INVERT_E3_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; } }
#elif DRIVER_EXTRUDERS > 3
#define E_STEP_WRITE(v) { switch(current_block->active_driver) { case 3: E3_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 0: E0_STEP_WRITE(v); break; } }
#define NORM_E_DIR() { switch(current_block->active_driver) { case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; } }
#define REV_E_DIR() { switch(current_block->active_driver) { case 3: E3_DIR_WRITE( INVERT_E3_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; } }
#elif DRIVER_EXTRUDERS > 2
#define E_STEP_WRITE(v) { switch(current_block->active_driver) { case 2: E2_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 0: E0_STEP_WRITE(v); break; } }
#define NORM_E_DIR() { switch(current_block->active_driver) { case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; } }
#define REV_E_DIR() { switch(current_block->active_driver) { case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; } }
#elif DRIVER_EXTRUDERS > 1
#if DISABLED(DUAL_X_CARRIAGE)
#define E_STEP_WRITE(v) { switch(current_block->active_driver) { case 1: E1_STEP_WRITE(v); break; case 0: E0_STEP_WRITE(v); break; }}
#define NORM_E_DIR() { switch(current_block->active_driver) { case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; }}
#define REV_E_DIR() { switch(current_block->active_driver) { case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; }}
#else
extern bool extruder_duplication_enabled;
#define E_STEP_WRITE(v) { if(extruder_duplication_enabled) { E0_STEP_WRITE(v); E1_STEP_WRITE(v); } else if(current_block->active_driver == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}
#define NORM_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}
#define REV_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE( INVERT_E1_DIR); } else { E0_DIR_WRITE( INVERT_E0_DIR); }}
#endif
#else
#if ENABLED(DONDOLO)
#define E_STEP_WRITE(v) E0_STEP_WRITE(v)
#define NORM_E_DIR() { switch(active_extruder) { case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; }}
#define REV_E_DIR() { switch(active_extruder) { case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; }}
#else
#define E_STEP_WRITE(v) E0_STEP_WRITE(v)
#define NORM_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR)
#define REV_E_DIR() E0_DIR_WRITE( INVERT_E0_DIR)
#endif
#endif //DRIVER_EXTRUDERS
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
extern bool abort_on_endstop_hit;
#endif
......
......@@ -178,12 +178,74 @@
#define E5_ENABLE_WRITE(STATE) WRITE(E5_ENABLE_PIN,STATE)
#define E5_ENABLE_READ READ(E5_ENABLE_PIN)
#if ENABLED(COLOR_MIXING_EXTRUDER)
#define E_STEP_WRITE(v) ; /* not used for mixing extruders! */
#if DRIVER_EXTRUDERS > 5
#define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); break; case 5: E5_STEP_WRITE(v); } }
#define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); E3_DIR_WRITE(!INVERT_E3_DIR); E4_DIR_WRITE(!INVERT_E4_DIR); E5_DIR_WRITE(!INVERT_E5_DIR); }
#define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); E3_DIR_WRITE( INVERT_E3_DIR); E4_DIR_WRITE( INVERT_E4_DIR); E5_DIR_WRITE( INVERT_E5_DIR); }
#elif DRIVER_EXTRUDERS > 4
#define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); } }
#define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); E3_DIR_WRITE(!INVERT_E3_DIR); E4_DIR_WRITE(!INVERT_E4_DIR); }
#define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); E3_DIR_WRITE( INVERT_E3_DIR); E4_DIR_WRITE( INVERT_E4_DIR); }
#elif DRIVER_EXTRUDERS > 3
#define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); } }
#define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); E3_DIR_WRITE(!INVERT_E3_DIR); }
#define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); E3_DIR_WRITE( INVERT_E3_DIR); }
#elif DRIVER_EXTRUDERS > 2
#define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); } }
#define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); E2_DIR_WRITE(!INVERT_E2_DIR); }
#define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); E2_DIR_WRITE( INVERT_E2_DIR); }
#else
#define En_STEP_WRITE(n,v) { switch (n) { case 0: E0_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); } }
#define NORM_E_DIR() { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); }
#define REV_E_DIR() { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); }
#endif
#elif DRIVER_EXTRUDERS > 5
#define E_STEP_WRITE(v) { switch(current_block->active_driver) { case 5: E5_STEP_WRITE(v); break; case 4: E4_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 0: E0_STEP_WRITE(v); break; } }
#define NORM_E_DIR() { switch(current_block->active_driver) { case 5: E5_DIR_WRITE(!INVERT_E5_DIR); break; case 4: E4_DIR_WRITE(!INVERT_E4_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; } }
#define REV_E_DIR() { switch(current_block->active_driver) { case 5: E5_DIR_WRITE( INVERT_E5_DIR); break; case 4: E4_DIR_WRITE( INVERT_E4_DIR); break; case 3: E3_DIR_WRITE( INVERT_E3_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; } }
#elif DRIVER_EXTRUDERS > 4
#define E_STEP_WRITE(v) { switch(current_block->active_driver) { case 4: E4_STEP_WRITE(v); break; case 3: E3_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 0: E0_STEP_WRITE(v); break; } }
#define NORM_E_DIR() { switch(current_block->active_driver) { case 4: E4_DIR_WRITE(!INVERT_E4_DIR); break; case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; } }
#define REV_E_DIR() { switch(current_block->active_driver) { case 4: E4_DIR_WRITE( INVERT_E4_DIR); break; case 3: E3_DIR_WRITE( INVERT_E3_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; } }
#elif DRIVER_EXTRUDERS > 3
#define E_STEP_WRITE(v) { switch(current_block->active_driver) { case 3: E3_STEP_WRITE(v); break; case 2: E2_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 0: E0_STEP_WRITE(v); break; } }
#define NORM_E_DIR() { switch(current_block->active_driver) { case 3: E3_DIR_WRITE(!INVERT_E3_DIR); break; case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; } }
#define REV_E_DIR() { switch(current_block->active_driver) { case 3: E3_DIR_WRITE( INVERT_E3_DIR); break; case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; } }
#elif DRIVER_EXTRUDERS > 2
#define E_STEP_WRITE(v) { switch(current_block->active_driver) { case 2: E2_STEP_WRITE(v); break; case 1: E1_STEP_WRITE(v); break; case 0: E0_STEP_WRITE(v); break; } }
#define NORM_E_DIR() { switch(current_block->active_driver) { case 2: E2_DIR_WRITE(!INVERT_E2_DIR); break; case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; } }
#define REV_E_DIR() { switch(current_block->active_driver) { case 2: E2_DIR_WRITE( INVERT_E2_DIR); break; case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; } }
#elif DRIVER_EXTRUDERS > 1
#if DISABLED(DUAL_X_CARRIAGE)
#define E_STEP_WRITE(v) { switch(current_block->active_driver) { case 1: E1_STEP_WRITE(v); break; case 0: E0_STEP_WRITE(v); break; }}
#define NORM_E_DIR() { switch(current_block->active_driver) { case 1: E1_DIR_WRITE(!INVERT_E1_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; }}
#define REV_E_DIR() { switch(current_block->active_driver) { case 1: E1_DIR_WRITE( INVERT_E1_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; }}
#else
extern bool extruder_duplication_enabled;
#define E_STEP_WRITE(v) { if(extruder_duplication_enabled) { E0_STEP_WRITE(v); E1_STEP_WRITE(v); } else if(current_block->active_driver == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}
#define NORM_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}
#define REV_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE( INVERT_E1_DIR); } else { E0_DIR_WRITE( INVERT_E0_DIR); }}
#endif
#else
#if ENABLED(DONDOLO)
#define E_STEP_WRITE(v) E0_STEP_WRITE(v)
#define NORM_E_DIR() { switch(active_extruder) { case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; }}
#define REV_E_DIR() { switch(active_extruder) { case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; }}
#else
#define E_STEP_WRITE(v) E0_STEP_WRITE(v)
#define NORM_E_DIR() E0_DIR_WRITE(!INVERT_E0_DIR)
#define REV_E_DIR() E0_DIR_WRITE( INVERT_E0_DIR)
#endif
#endif // DRIVER_EXTRUDERS
#if ENABLED(DUAL_X_CARRIAGE) && HAS(X_ENABLE) && HAS(X2_ENABLE)
#define enable_x() do { X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); } while (0)
#define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); BITCLR(axis_known_position, X_AXIS); } while (0)
#define disable_x() do { X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); CBI(axis_known_position, X_AXIS); } while (0)
#elif HAS(X_ENABLE)
#define enable_x() X_ENABLE_WRITE( X_ENABLE_ON)
#define disable_x() { X_ENABLE_WRITE(!X_ENABLE_ON); BITCLR(axis_known_position, X_AXIS); }
#define disable_x() { X_ENABLE_WRITE(!X_ENABLE_ON); CBI(axis_known_position, X_AXIS); }
#else
#define enable_x() ;
#define disable_x() ;
......@@ -192,10 +254,10 @@
#if HAS(Y_ENABLE)
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
#define enable_y() { Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }
#define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); BITCLR(axis_known_position, Y_AXIS); }
#define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); CBI(axis_known_position, Y_AXIS); }
#else
#define enable_y() Y_ENABLE_WRITE( Y_ENABLE_ON)
#define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); BITCLR(axis_known_position, Y_AXIS); }
#define disable_y() { Y_ENABLE_WRITE(!Y_ENABLE_ON); CBI(axis_known_position, Y_AXIS); }
#endif
#else
#define enable_y() ;
......@@ -205,10 +267,10 @@
#if HAS(Z_ENABLE)
#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
#define enable_z() { Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }
#define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); BITCLR(axis_known_position, Z_AXIS); }
#define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); CBI(axis_known_position, Z_AXIS); }
#else
#define enable_z() Z_ENABLE_WRITE( Z_ENABLE_ON)
#define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); BITCLR(axis_known_position, Z_AXIS); }
#define disable_z() { Z_ENABLE_WRITE(!Z_ENABLE_ON); CBI(axis_known_position, Z_AXIS); }
#endif
#else
#define enable_z() ;
......
/**
* pins.h
*/
#ifndef PINS_H
#define PINS_H
// BOARDS 8-BIT
#if MB(GEN7_CUSTOM)
#include "boards/BOARD_GEN7_CUSTOM.h"
#elif MB(GEN7_12)
#include "boards/BOARD_GEN7_12.h"
#elif MB(GEN7_13)
#include "boards/BOARD_GEN7_13.h"
#elif MB(GEN7_14)
#include "boards/BOARD_GEN7_14.h"
#elif MB(CHEAPTRONIC)
#include "boards/BOARD_CHEAPTRONIC.h"
#elif MB(SETHI)
#include "boards/BOARD_SETHI.h"
#elif MB(ELEFU_3)
#include "boards/BOARD_ELEFU_3.h"
#elif MB(GEN3_MONOLITHIC)
#include "boards/BOARD_GEN3_MONOLITHIC.h"
#elif MB(RAMPS_OLD)
#include "boards/BOARD_RAMPS_OLD.h"
#elif MB(RAMPS_13_HFB)
#include "boards/BOARD_RAMPS_13_HFB.h"
#elif MB(RAMPS_13_HHB)
#include "boards/BOARD_RAMPS_13_HHB.h"
#elif MB(RAMPS_13_HFF)
#include "boards/BOARD_RAMPS_13_HFF.h"
#elif MB(RAMPS_13_HHF)
#include "boards/BOARD_RAMPS_13_HHF.h"
#elif MB(RAMPS_13_HHH)
#include "boards/BOARD_RAMPS_13_HHH.h"
#elif MB(RAMBO)
#include "boards/BOARD_RAMBO.h"
#elif MB(DUEMILANOVE_328P)
#include "boards/BOARD_DUEMILANOVE_328P.h"
#elif MB(MKS_BASE)
#include "boards/BOARD_MKS_BASE.h"
#elif MB(MKS_MINI)
#include "boards/BOARD_MKS_MINI.h"
#elif MB(GEN6)
#include "boards/BOARD_GEN6.h"
#elif MB(GEN6_DELUXE)
#include "boards/BOARD_GEN6.h"
#elif MB(SANGUINOLOLU_11)
#include "boards/BOARD_SANGUINO.h"
#elif MB(SANGUINOLOLU_12)
#include "boards/BOARD_SANGUINO.h"
#elif MB(MELZI)
#include "boards/BOARD_SANGUINO.h"
#elif MB(STB_11)
#include "boards/BOARD_SANGUINO.h"
#elif MB(AZTEEG_X1)
#include "boards/BOARD_SANGUINO.h"
#elif MB(MELZI_1284)
#include "boards/BOARD_SANGUINO.h"
#elif MB(AZTEEG_X3)
#include "boards/BOARD_AZTEEG_X3.h"
#elif MB(AZTEEG_X3_PRO)
#include "boards/BOARD_AZTEEG_X3_PRO.h"
#elif MB(ULTIMAKER)
#include "boards/BOARD_ULTIMAKER.h"
#elif MB(MEGATRONICS)
#include "boards/BOARD_MEGATRONICS.h"
#elif MB(MEGATRONICS_2)
#include "boards/BOARD_MEGATRONICS_2.h"
#elif MB(MINITRONICS)
#include "boards/BOARD_MINITRONICS.h"
#elif MB(MEGATRONICS_3)
#include "boards/BOARD_MEGATRONICS_3.h"
#elif MB(ULTRATRONICS)
#include "boards/BOARD_ULTRATRONICS.h"
#elif MB(ULTIMAKER_OLD)
#include "boards/BOARD_ULTIMAKER_OLD.h"
#elif MB(ULTIMAIN_2)
#include "boards/BOARD_ULTIMAIN_2.h"
#elif MB(3DRAG)
#include "boards/BOARD_3DRAG.h"
#elif MB(K8200)
#include "boards/BOARD_K8200.h"
#elif MB(TEENSYLU)
#include "boards/BOARD_TEENSYLU.h"
#elif MB(PRINTRBOARD)
#include "boards/BOARD_TEENSYLU.h"
#elif MB(RUMBA)
#include "boards/BOARD_RUMBA.h"
#elif MB(BRAINWAVE)
#include "boards/BOARD_BRAINWAVE.h"
#elif MB(SAV_MKI)
#include "boards/BOARD_SAV_MKI.h"
#elif MB(TEENSY2)
#include "boards/BOARD_TEENSY2.h"
#elif MB(5DPRINT)
#include "boards/BOARD_5DPRINT.h"
#elif MB(GEN3_PLUS)
#include "boards/BOARD_GEN3_PLUS.h"
#elif MB(OMCA_A)
#include "boards/BOARD_OMCA_A.h"
#elif MB(OMCA)
#include "boards/BOARD_OMCA.h"
#elif MB(LEAPFROG)
#include "boards/BOARD_LEAPFROG.h"
#elif MB(99)
#include "boards/BOARD_99.h"
#elif MB(PIBOT)
#include "boards/BOARD_PIBOT.h"
// BOARDS 32-BIT
#elif MB(ALLIGATOR)
#include "boards/BOARD_ALLIGATOR.h"
#elif MB(RADDS)
#include "boards/BOARD_RADDS.h"
#elif MB(RAMPS_FD_V1)
#include "boards/BOARD_RAMPS_FD.h"
#elif MB(RAMPS_FD_V2)
#include "boards/BOARD_RAMPS_FD.h"
#elif MB(SMART_RAMPS)
#include "boards/BOARD_SMART_RAMPS.h"
#elif MB(RAMPS4DUE)
#include "boards/BOARD_RAMPS4DUE.h"
// NO BOARD
#else
#error Unknown MOTHERBOARD value set in Configuration.h
#endif
/****************************************************************************************/
/****************************************************************************************
******************** Available chip select pins for HW SPI ******************************
*****************************************************************************************/
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#define MOSI_PIN 51
#define MISO_PIN 50
#define SCK_PIN 52
#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega1284P__)
#define MOSI_PIN 5
#define MISO_PIN 6
#define SCK_PIN 7
#elif defined(__AVR_ATmega32U4__)
#define MOSI_PIN 2
#define MISO_PIN 3
#define SCK_PIN 1
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
#define MOSI_PIN 22
#define MISO_PIN 23
#define SCK_PIN 21
#elif defined(__AVR_ATmega168__) ||defined(__AVR_ATmega168P__) ||defined(__AVR_ATmega328P__)
#define MOSI_PIN 11
#define MISO_PIN 12
#define SCK_PIN 13
#elif defined(__AVR_ATmega1281__)
#define MOSI_PIN 11
#define MISO_PIN 12
#define SCK_PIN 10
#elif defined (__SAM3X8E__)
#if (SDSS == 4) || (SDSS == 10) || (SDSS == 52)|| (SDSS == 59) || (SDSS == 77)
#if (SDSS == 4)
#define SPI_PIN 87
#define SPI_CHAN 1
#elif (SDSS == 10)
#define SPI_PIN 77
#define SPI_CHAN 0
#elif (SDSS == 52)
#define SPI_PIN 86
#define SPI_CHAN 2
#elif (SDSS == 59)
#define SPI_PIN 59
#define SPI_CHAN 1
#else
#define SPI_PIN 77
#define SPI_CHAN 0
#endif
#define MOSI_PIN 75
#define MISO_PIN 74
#define SCK_PIN 76
#else
#define DUE_SOFTWARE_SPI
#define MOSI_PIN 51
#define MISO_PIN 50
#define SCK_PIN 52
#endif
#endif
/****************************************************************************************/
/****************************************************************************************
********************************* END MOTHERBOARD ***************************************
****************************************************************************************/
#ifndef ORIG_E0_DIR_PIN
#define ORIG_E0_DIR_PIN -1
#define ORIG_E0_ENABLE_PIN -1
#define ORIG_E0_STEP_PIN -1
#endif
#ifndef ORIG_E1_DIR_PIN
#define ORIG_E1_DIR_PIN -1
#define ORIG_E1_ENABLE_PIN -1
#define ORIG_E1_STEP_PIN -1
#endif
#ifndef ORIG_E2_DIR_PIN
#define ORIG_E2_DIR_PIN -1
#define ORIG_E2_ENABLE_PIN -1
#define ORIG_E2_STEP_PIN -1
#endif
#ifndef ORIG_E3_DIR_PIN
#define ORIG_E3_DIR_PIN -1
#define ORIG_E3_ENABLE_PIN -1
#define ORIG_E3_STEP_PIN -1
#endif
#ifndef ORIG_E4_DIR_PIN
#define ORIG_E4_DIR_PIN -1
#define ORIG_E4_ENABLE_PIN -1
#define ORIG_E4_STEP_PIN -1
#endif
#ifndef ORIG_E5_DIR_PIN
#define ORIG_E5_DIR_PIN -1
#define ORIG_E5_ENABLE_PIN -1
#define ORIG_E5_STEP_PIN -1
#endif
#ifndef ORIG_HEATER_1_PIN
#define ORIG_HEATER_1_PIN -1
#endif
#ifndef ORIG_TEMP_1_PIN
#define ORIG_TEMP_1_PIN -1
#endif
#ifndef ORIG_HEATER_2_PIN
#define ORIG_HEATER_2_PIN -1
#endif
#ifndef ORIG_TEMP_2_PIN
#define ORIG_TEMP_2_PIN -1
#endif
#ifndef ORIG_HEATER_3_PIN
#define ORIG_HEATER_3_PIN -1
#endif
#ifndef ORIG_TEMP_3_PIN
#define ORIG_TEMP_3_PIN -1
#endif
#if ENABLED(X_STOP_PIN)
#if X_HOME_DIR < 0
#define ORIG_X_MIN_PIN X_STOP_PIN
#define ORIG_X_MAX_PIN -1
#else
#define ORIG_X_MIN_PIN -1
#define ORIG_X_MAX_PIN X_STOP_PIN
#endif
#endif
#if ENABLED(Y_STOP_PIN)
#if Y_HOME_DIR < 0
#define ORIG_Y_MIN_PIN Y_STOP_PIN
#define ORIG_Y_MAX_PIN -1
#else
#define ORIG_Y_MIN_PIN -1
#define ORIG_Y_MAX_PIN Y_STOP_PIN
#endif
#endif
#if ENABLED(Z_STOP_PIN)
#if Z_HOME_DIR < 0
#define ORIG_Z_MIN_PIN Z_STOP_PIN
#define ORIG_Z_MAX_PIN -1
#else
#define ORIG_Z_MIN_PIN -1
#define ORIG_Z_MAX_PIN Z_STOP_PIN
#endif
#endif
#ifndef X_MS1_PIN
#define X_MS1_PIN -1
#endif
#ifndef X_MS2_PIN
#define X_MS2_PIN -1
#endif
#ifndef Y_MS1_PIN
#define Y_MS1_PIN -1
#endif
#ifndef Y_MS2_PIN
#define Y_MS2_PIN -1
#endif
#ifndef Z_MS1_PIN
#define Z_MS1_PIN -1
#endif
#ifndef Z_MS2_PIN
#define Z_MS2_PIN -1
#endif
#ifndef E0_MS1_PIN
#define E0_MS1_PIN -1
#endif
#ifndef E0_MS2_PIN
#define E0_MS2_PIN -1
#endif
#ifndef E1_MS1_PIN
#define E1_MS1_PIN -1
#endif
#ifndef E1_MS2_PIN
#define E1_MS2_PIN -1
#endif
#ifndef DIGIPOTSS_PIN
#define DIGIPOTSS_PIN -1
#endif
#ifndef LCD_CONTRAST
#define LCD_CONTRAST -1
#endif
#ifndef Z2_MIN_PIN
#define Z2_MIN_PIN -1
#endif
#ifndef Z2_MAX_PIN
#define Z2_MAX_PIN -1
#endif
#ifndef ORIG_FAN_PIN
#define ORIG_FAN_PIN -1
#endif
#ifndef ORIG_FAN2_PIN
#define ORIG_FAN2_PIN -1
#endif
#ifndef ORIG_BEEPER_PIN
#define ORIG_BEEPER_PIN -1
#endif
/****************************************************************************************/
#include "../Configuration_Pins.h"
/****************************************************************************************/
#if X_HOME_DIR > 0 // Home X to MAX
#undef X_MIN_PIN
#define X_MIN_PIN -1
#elif X_HOME_DIR < 0 // Home X to MIN
#undef X_MAX_PIN
#define X_MAX_PIN -1
#endif //X_HOME_DIR > 0
#if Y_HOME_DIR > 0 // Home Y to MAX
#undef Y_MIN_PIN
#define Y_MIN_PIN -1
#elif Y_HOME_DIR < 0 // Home Y to MIN
#undef Y_MAX_PIN
#define Y_MAX_PIN -1
#endif //Y_HOME_DIR > 0
#if Z_HOME_DIR > 0 // Home Z to MAX
#undef Z_MIN_PIN
#define Z_MIN_PIN -1
#elif Z_HOME_DIR < 0 // Home Z to MIN
#undef Z_MAX_PIN
#define Z_MAX_PIN -1
#endif //Z_HOME_DIR > 0
#if DISABLED(Z_PROBE_ENDSTOP) // Allow code to compile regardless of Z_PROBE_ENDSTOP setting.
#define Z_PROBE_PIN -1
#endif
/****************************************************************************************/
#if ENABLED(DISABLE_XMAX_ENDSTOP)
#undef X_MAX_PIN
#define X_MAX_PIN -1
#endif
#if ENABLED(DISABLE_XMIN_ENDSTOP)
#undef X_MIN_PIN
#define X_MIN_PIN -1
#endif
#if ENABLED(DISABLE_YMAX_ENDSTOP)
#undef Y_MAX_PIN
#define Y_MAX_PIN -1
#endif
#if ENABLED(DISABLE_YMIN_ENDSTOP)
#undef Y_MIN_PIN
#define Y_MIN_PIN -1
#endif
#if ENABLED(DISABLE_ZMAX_ENDSTOP)
#undef Z_MAX_PIN
#define Z_MAX_PIN -1
#endif
#if ENABLED(DISABLE_ZMIN_ENDSTOP)
#undef Z_MIN_PIN
#define Z_MIN_PIN -1
#endif
/****************************************************************************************/
// List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
#define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN, analogInputToDigitalPin(TEMP_0_PIN),
#if DRIVER_EXTRUDERS > 1
#define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN, analogInputToDigitalPin(TEMP_1_PIN),
#else
#define _E1_PINS
#endif
#if DRIVER_EXTRUDERS > 2
#define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN, analogInputToDigitalPin(TEMP_2_PIN),
#else
#define _E2_PINS
#endif
#if DRIVER_EXTRUDERS > 3
#define _E3_PINS E3_STEP_PIN, E3_DIR_PIN, E3_ENABLE_PIN, HEATER_3_PIN, analogInputToDigitalPin(TEMP_3_PIN),
#else
#define _E3_PINS
#endif
#define SENSITIVE_PINS { 0, 1, \
X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \
Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \
Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_PROBE_PIN, \
PS_ON_PIN, HEATER_BED_PIN, FAN_PIN, \
_E0_PINS _E1_PINS _E2_PINS _E3_PINS \
analogInputToDigitalPin(TEMP_BED_PIN) \
}
#endif //__PINS_H
......@@ -6,7 +6,15 @@
#ifndef SANITYCHECK_H
#define SANITYCHECK_H
// Version & processor
#if defined(__SAM3X8E__) && (FIRMWARE_BIT_BOARDS == 8)
#error FIRMWARE ERROR: This firmware is only for 8-bit board
#elif !defined(__SAM3X8E__) && (FIRMWARE_BIT_BOARDS == 32)
#error FIRMWARE ERROR: This firmware is only for 32-bit board
#endif
// Start check
#if DISABLED(SERIAL_PORT)
#error DEPENDENCY ERROR: Missing setting SERIAL_PORT
#endif
......
......@@ -943,8 +943,8 @@ static void updateTemperaturesFromRawValues() {
void tp_init() {
#if MB(RUMBA) && ((TEMP_SENSOR_0==-1)||(TEMP_SENSOR_1==-1)||(TEMP_SENSOR_2==-1)||(TEMP_SENSOR_BED==-1))
// disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector
MCUCR = BIT(JTD);
MCUCR = BIT(JTD);
MCUCR = _BV(JTD);
MCUCR = _BV(JTD);
#endif
// Finish init of mult hotends arrays
......@@ -1003,13 +1003,13 @@ void tp_init() {
#endif // HEATER_0_USES_MAX6675
#ifdef DIDR2
#define ANALOG_SELECT(pin) do{ if (pin < 8) BITSET(DIDR0, pin); else BITSET(DIDR2, pin - 8); }while(0)
#define ANALOG_SELECT(pin) do{ if (pin < 8) SBI(DIDR0, pin); else SBI(DIDR2, pin - 8); }while(0)
#else
#define ANALOG_SELECT(pin) do{ BITSET(DIDR0, pin); }while(0)
#define ANALOG_SELECT(pin) do{ SBI(DIDR0, pin); }while(0)
#endif
// Set analog inputs
ADCSRA = BIT(ADEN) | BIT(ADSC) | BIT(ADIF) | 0x07;
ADCSRA = _BV(ADEN) | _BV(ADSC) | _BV(ADIF) | 0x07;
DIDR0 = 0;
#ifdef DIDR2
DIDR2 = 0;
......@@ -1081,7 +1081,7 @@ void tp_init() {
// Use timer0 for temperature measurement
// Interleave temperature interrupt with millies interrupt
OCR0B = 128;
BITSET(TIMSK0, OCIE0B);
SBI(TIMSK0, OCIE0B);
// Wait for temperature measurement to settle
HAL::delayMilliseconds(250);
......@@ -1276,12 +1276,12 @@ void disable_all_heaters() {
max6675_temp = 0;
#ifdef PRR
BITCLR(PRR, PRSPI);
CBI(PRR, PRSPI);
#elif defined(PRR0)
BITCLR(PRR0, PRSPI);
CBI(PRR0, PRSPI);
#endif
SPCR = BIT(MSTR) | BIT(SPE) | BIT(SPR0);
SPCR = _BV(MSTR) | _BV(SPE) | _BV(SPR0);
// enable TT_MAX6675
WRITE(MAX6675_SS, 0);
......@@ -1377,7 +1377,7 @@ ISR(TIMER0_COMPB_vect) {
static unsigned char temp_count = 0;
static TempState temp_state = StartupDelay;
static unsigned char pwm_count = BIT(SOFT_PWM_SCALE);
static unsigned char pwm_count = _BV(SOFT_PWM_SCALE);
// Static members for each heater
#if ENABLED(SLOW_PWM_HEATERS)
......@@ -1500,7 +1500,7 @@ ISR(TIMER0_COMPB_vect) {
#endif
#endif
pwm_count += BIT(SOFT_PWM_SCALE);
pwm_count += _BV(SOFT_PWM_SCALE);
pwm_count &= 0x7f;
#else // SLOW_PWM_HEATERS
......@@ -1620,7 +1620,7 @@ ISR(TIMER0_COMPB_vect) {
#endif
#endif // FAN_SOFT_PWM
pwm_count += BIT(SOFT_PWM_SCALE);
pwm_count += _BV(SOFT_PWM_SCALE);
pwm_count &= 0x7f;
// increment slow_pwm_count only every 64 pwm_count circa 65.5ms
......@@ -1646,9 +1646,9 @@ ISR(TIMER0_COMPB_vect) {
#endif // SLOW_PWM_HEATERS
#define SET_ADMUX_ADCSRA(pin) ADMUX = BIT(REFS0) | (pin & 0x07); BITSET(ADCSRA, ADSC)
#define SET_ADMUX_ADCSRA(pin) ADMUX = _BV(REFS0) | (pin & 0x07); SBI(ADCSRA, ADSC)
#ifdef MUX5
#define START_ADC(pin) if (pin > 7) ADCSRB = BIT(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
#define START_ADC(pin) if (pin > 7) ADCSRB = _BV(MUX5); else ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
#else
#define START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
#endif
......
<img align="right" src="Documentation/Logo/MarlinKimbra%20Logo%20GitHub.png" />
# MK 3D Printer Firmware for Arduino
## Version 4.2.6 dev
# MarlinKimbra 3D Printer Firmware for Arduino
## Version 4.2.8 dev
### Special thanks
* all Marlin8bit-developers.
---
# MK 3D Printer Firmware
# MarlinKimbra 3D Printer Firmware
* [Configuration & Compilation](/Documentation/Compilation.md)
* Supported
* [Features](/Documentation/Features.md)
......@@ -38,12 +38,13 @@ System Management MKr4 for 6 extruders with just two drivers or only driver.
Management Multyextruder NPr2, 4/6 extruders with only two engines.
Management Dual Extruder DONDOLO.
Adding commands to facilitate purging of hotend.
Step per unit varied for each extruder as well as the feedrate.
The addition of a different feedrate for retraction.
Step per unit varied for each extruder as well as the feedrate and the acceleration.
Adding Debug Dryrun used by repetier.
Added total Power on time writed in SD CARD.
Added total Power consumption writed in SD CARD.
Added total filament printed writed in SD CARD.
Added anti extruder idle oozing system.
Added Hysteresis and Z-Wobble correction (only cartesian printers).
## Credits
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment