code
stringlengths 1
1.05M
| repo_name
stringlengths 6
83
| path
stringlengths 3
242
| language
stringclasses 222
values | license
stringclasses 20
values | size
int64 1
1.05M
|
|---|---|---|---|---|---|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 200 kOhm, beta25 = 4338 K, 1 kOhm pull-up,
// 200k ATC Semitec 204GT-2 (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
// Verified by linagee. Source: https://www.mouser.com/datasheet/2/362/semitec%20usa%20corporation_gtthermistor-1202937.pdf
// Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
// Advantage: More resolution and better linearity from 150C to 200C
constexpr temp_entry_t temptable_52[] PROGMEM = {
{ OV( 1), 500 },
{ OV( 125), 300 }, // top rating 300C
{ OV( 142), 290 },
{ OV( 162), 280 },
{ OV( 185), 270 },
{ OV( 211), 260 },
{ OV( 240), 250 },
{ OV( 274), 240 },
{ OV( 312), 230 },
{ OV( 355), 220 },
{ OV( 401), 210 },
{ OV( 452), 200 },
{ OV( 506), 190 },
{ OV( 563), 180 },
{ OV( 620), 170 },
{ OV( 677), 160 },
{ OV( 732), 150 },
{ OV( 783), 140 },
{ OV( 830), 130 },
{ OV( 871), 120 },
{ OV( 906), 110 },
{ OV( 935), 100 },
{ OV( 958), 90 },
{ OV( 976), 80 },
{ OV( 990), 70 },
{ OV(1000), 60 },
{ OV(1008), 50 },
{ OV(1013), 40 },
{ OV(1017), 30 },
{ OV(1019), 20 },
{ OV(1021), 10 },
{ OV(1022), 0 }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_52.h
|
C++
|
agpl-3.0
| 2,088
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 100 kOhm, beta25 = 4267 K, 1 kOhm pull-up,
// 100k ATC Semitec 104GT-2 (Used on ParCan) (WITH 1kohm RESISTOR FOR PULLUP, R9 ON SANGUINOLOLU! NOT FOR 4.7kohm PULLUP! THIS IS NOT NORMAL!)
// Verified by linagee. Source: https://www.mouser.com/datasheet/2/362/semitec%20usa%20corporation_gtthermistor-1202937.pdf
// Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance
// Advantage: More resolution and better linearity from 150C to 200C
constexpr temp_entry_t temptable_55[] PROGMEM = {
{ OV( 1), 500 },
{ OV( 76), 300 },
{ OV( 87), 290 },
{ OV( 100), 280 },
{ OV( 114), 270 },
{ OV( 131), 260 },
{ OV( 152), 250 },
{ OV( 175), 240 },
{ OV( 202), 230 },
{ OV( 234), 220 },
{ OV( 271), 210 },
{ OV( 312), 200 },
{ OV( 359), 190 },
{ OV( 411), 180 },
{ OV( 467), 170 },
{ OV( 527), 160 },
{ OV( 590), 150 },
{ OV( 652), 140 },
{ OV( 713), 130 },
{ OV( 770), 120 },
{ OV( 822), 110 },
{ OV( 867), 100 },
{ OV( 905), 90 },
{ OV( 936), 80 },
{ OV( 961), 70 },
{ OV( 979), 60 },
{ OV( 993), 50 },
{ OV(1003), 40 },
{ OV(1010), 30 },
{ OV(1015), 20 },
{ OV(1018), 10 },
{ OV(1020), 0 }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_55.h
|
C++
|
agpl-3.0
| 2,086
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 100 kOhm, beta25 = 4092 K, 8.2 kOhm pull-up, 100k Epcos (?) thermistor
constexpr temp_entry_t temptable_6[] PROGMEM = {
{ OV( 1), 350 },
{ OV( 28), 250 }, // top rating 250C
{ OV( 31), 245 },
{ OV( 35), 240 },
{ OV( 39), 235 },
{ OV( 42), 230 },
{ OV( 44), 225 },
{ OV( 49), 220 },
{ OV( 53), 215 },
{ OV( 62), 210 },
{ OV( 71), 205 }, // fitted graphically
{ OV( 78), 200 }, // fitted graphically
{ OV( 94), 190 },
{ OV( 102), 185 },
{ OV( 116), 170 },
{ OV( 143), 160 },
{ OV( 183), 150 },
{ OV( 223), 140 },
{ OV( 270), 130 },
{ OV( 318), 120 },
{ OV( 383), 110 },
{ OV( 413), 105 },
{ OV( 439), 100 },
{ OV( 484), 95 },
{ OV( 513), 90 },
{ OV( 607), 80 },
{ OV( 664), 70 },
{ OV( 781), 60 },
{ OV( 810), 55 },
{ OV( 849), 50 },
{ OV( 914), 45 },
{ OV( 914), 40 },
{ OV( 935), 35 },
{ OV( 954), 30 },
{ OV( 970), 25 },
{ OV( 978), 22 },
{ OV(1008), 3 },
{ OV(1023), 0 } // to allow internal 0 degrees C
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_6.h
|
C++
|
agpl-3.0
| 1,901
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 100 kOhm, beta25 = 3950 K, 4.7 kOhm pull-up,
// Maker's Tool Works Kapton Bed Thermistor
// ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=3950
// r0: 100000
// t0: 25
// r1: 0 (parallel with rTherm)
// r2: 4700 (series with rTherm)
// beta: 3950
// min adc: 1 at 0.0048828125 V
// max adc: 1023 at 4.9951171875 V
constexpr temp_entry_t temptable_60[] PROGMEM = {
{ OV( 51), 272 },
{ OV( 61), 258 },
{ OV( 71), 247 },
{ OV( 81), 237 },
{ OV( 91), 229 },
{ OV( 101), 221 },
{ OV( 131), 204 },
{ OV( 161), 190 },
{ OV( 191), 179 },
{ OV( 231), 167 },
{ OV( 271), 157 },
{ OV( 311), 148 },
{ OV( 351), 140 },
{ OV( 381), 135 },
{ OV( 411), 130 },
{ OV( 441), 125 },
{ OV( 451), 123 },
{ OV( 461), 122 },
{ OV( 471), 120 },
{ OV( 481), 119 },
{ OV( 491), 117 },
{ OV( 501), 116 },
{ OV( 511), 114 },
{ OV( 521), 113 },
{ OV( 531), 111 },
{ OV( 541), 110 },
{ OV( 551), 108 },
{ OV( 561), 107 },
{ OV( 571), 105 },
{ OV( 581), 104 },
{ OV( 591), 102 },
{ OV( 601), 101 },
{ OV( 611), 100 },
{ OV( 621), 98 },
{ OV( 631), 97 },
{ OV( 641), 95 },
{ OV( 651), 94 },
{ OV( 661), 92 },
{ OV( 671), 91 },
{ OV( 681), 90 },
{ OV( 691), 88 },
{ OV( 701), 87 },
{ OV( 711), 85 },
{ OV( 721), 84 },
{ OV( 731), 82 },
{ OV( 741), 81 },
{ OV( 751), 79 },
{ OV( 761), 77 },
{ OV( 771), 76 },
{ OV( 781), 74 },
{ OV( 791), 72 },
{ OV( 801), 71 },
{ OV( 811), 69 },
{ OV( 821), 67 },
{ OV( 831), 65 },
{ OV( 841), 63 },
{ OV( 851), 62 },
{ OV( 861), 60 },
{ OV( 871), 57 },
{ OV( 881), 55 },
{ OV( 891), 53 },
{ OV( 901), 51 },
{ OV( 911), 48 },
{ OV( 921), 45 },
{ OV( 931), 42 },
{ OV( 941), 39 },
{ OV( 951), 36 },
{ OV( 961), 32 },
{ OV( 981), 23 },
{ OV( 991), 17 },
{ OV(1001), 9 },
{ OV(1008), 0 }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_60.h
|
C++
|
agpl-3.0
| 2,789
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 100 kOhm, beta25 = 3950 K, 4.7 kOhm pull-up,
// Formbot / Vivedino high temp 100k thermistor
// 100KR13950181203
// Generated with modified version of https://www.thingiverse.com/thing:103668
// Using table 1 with datasheet values
// Resistance 100k Ohms at 25deg. C
// Resistance Tolerance + / -1%
// B Value 3950K at 25/50 deg. C
// B Value Tolerance + / - 1%
constexpr temp_entry_t temptable_61[] PROGMEM = {
{ OV( 2.00), 420 }, // Guestimate to ensure we don't lose a reading and drop temps to -50 when over
{ OV( 12.07), 350 },
{ OV( 12.79), 345 },
{ OV( 13.59), 340 },
{ OV( 14.44), 335 },
{ OV( 15.37), 330 },
{ OV( 16.38), 325 },
{ OV( 17.46), 320 },
{ OV( 18.63), 315 },
{ OV( 19.91), 310 },
{ OV( 21.29), 305 },
{ OV( 22.79), 300 },
{ OV( 24.43), 295 },
{ OV( 26.21), 290 },
{ OV( 28.15), 285 },
{ OV( 30.27), 280 },
{ OV( 32.58), 275 },
{ OV( 35.10), 270 },
{ OV( 38.44), 265 },
{ OV( 40.89), 260 },
{ OV( 44.19), 255 },
{ OV( 47.83), 250 },
{ OV( 51.80), 245 },
{ OV( 56.20), 240 },
{ OV( 61.00), 235 },
{ OV( 66.30), 230 },
{ OV( 72.11), 225 },
{ OV( 78.51), 220 },
{ OV( 85.57), 215 },
{ OV( 93.34), 210 },
{ OV( 101.91), 205 },
{ OV( 111.34), 200 },
{ OV( 121.73), 195 },
{ OV( 133.17), 190 },
{ OV( 145.74), 185 },
{ OV( 159.57), 180 },
{ OV( 174.73), 175 },
{ OV( 191.35), 170 },
{ OV( 209.53), 165 },
{ OV( 229.35), 160 },
{ OV( 250.90), 155 },
{ OV( 274.25), 150 },
{ OV( 299.46), 145 },
{ OV( 326.52), 140 },
{ OV( 355.44), 135 },
{ OV( 386.15), 130 },
{ OV( 418.53), 125 },
{ OV( 452.43), 120 },
{ OV( 487.62), 115 },
{ OV( 523.82), 110 },
{ OV( 560.70), 105 },
{ OV( 597.88), 100 },
{ OV( 634.97), 95 },
{ OV( 671.55), 90 },
{ OV( 707.21), 85 },
{ OV( 741.54), 80 },
{ OV( 779.65), 75 },
{ OV( 809.57), 70 },
{ OV( 833.40), 65 },
{ OV( 859.55), 60 },
{ OV( 883.27), 55 },
{ OV( 904.53), 50 },
{ OV( 923.38), 45 },
{ OV( 939.91), 40 },
{ OV( 954.26), 35 },
{ OV( 966.59), 30 },
{ OV( 977.08), 25 },
{ OV( 985.92), 20 },
{ OV( 993.39), 15 },
{ OV( 999.42), 10 },
{ OV(1004.43), 5 },
{ OV(1008.51), 0 },
{ OV(1011.79), -5 },
{ OV(1014.40), -10 },
{ OV(1016.48), -15 },
{ OV(1018.10), -20 },
{ OV(1019.35), -25 },
{ OV(1020.32), -30 },
{ OV(1021.05), -35 },
{ OV(1021.60), -40 },
{ OV(1022.01), -45 },
{ OV(1022.31), -50 }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_61.h
|
C++
|
agpl-3.0
| 3,379
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 2.5 MOhm, beta25 = 4500 K, 4.7 kOhm pull-up, DyzeDesign / Trianglelab T-D500 500 °C Thermistor
constexpr temp_entry_t temptable_66[] PROGMEM = {
{ OV( 17.5), 850 },
{ OV( 17.9), 500 },
{ OV( 21.7), 480 },
{ OV( 26.6), 460 },
{ OV( 34.0), 430 },
{ OV( 36.0), 426 },
{ OV( 37.0), 422 },
{ OV( 38.0), 418 },
{ OV( 40.4), 414 },
{ OV( 43.0), 410 },
{ OV( 45.6), 406 },
{ OV( 48.0), 402 },
{ OV( 50.6), 398 },
{ OV( 53.0), 394 },
{ OV( 56.0), 390 },
{ OV( 58.0), 386 },
{ OV( 61.0), 382 },
{ OV( 64.0), 378 },
{ OV( 68.0), 374 },
{ OV( 72.0), 370 },
{ OV( 75.0), 366 },
{ OV( 79.0), 362 },
{ OV( 83.0), 358 },
{ OV( 88.0), 354 },
{ OV( 93.0), 350 },
{ OV( 97.0), 346 },
{ OV( 103.0), 342 },
{ OV( 109.0), 338 },
{ OV( 115.0), 334 },
{ OV( 121.0), 330 },
{ OV( 128.0), 326 },
{ OV( 135.0), 322 },
{ OV( 143.0), 318 },
{ OV( 151.0), 314 },
{ OV( 160.0), 310 },
{ OV( 168.0), 306 },
{ OV( 177.0), 302 },
{ OV( 188.0), 298 },
{ OV( 198.0), 294 },
{ OV( 209.0), 290 },
{ OV( 222.0), 286 },
{ OV( 235.0), 282 },
{ OV( 248.0), 278 },
{ OV( 262.0), 274 },
{ OV( 276.0), 270 },
{ OV( 291.0), 266 },
{ OV( 306.0), 262 },
{ OV( 323.0), 258 },
{ OV( 340.0), 254 },
{ OV( 357.0), 250 },
{ OV( 378.0), 246 },
{ OV( 397.0), 242 },
{ OV( 417.0), 238 },
{ OV( 437.0), 234 },
{ OV( 458.0), 230 },
{ OV( 481.0), 226 },
{ OV( 502.0), 222 },
{ OV( 525.0), 218 },
{ OV( 547.0), 214 },
{ OV( 570.0), 210 },
{ OV( 594.0), 206 },
{ OV( 615.0), 202 },
{ OV( 637.0), 198 },
{ OV( 660.0), 194 },
{ OV( 683.0), 190 },
{ OV( 705.0), 186 },
{ OV( 727.0), 182 },
{ OV( 747.0), 178 },
{ OV( 767.0), 174 },
{ OV( 787.0), 170 },
{ OV( 805.0), 166 },
{ OV( 822.0), 162 },
{ OV( 839.0), 158 },
{ OV( 854.0), 154 },
{ OV( 870.0), 150 },
{ OV( 883.0), 146 },
{ OV( 898.0), 142 },
{ OV( 909.0), 138 },
{ OV( 919.0), 134 },
{ OV( 931.0), 130 },
{ OV( 940.0), 126 },
{ OV( 949.0), 122 },
{ OV( 957.0), 118 },
{ OV( 964.0), 114 },
{ OV( 971.0), 110 },
{ OV( 977.0), 106 },
{ OV( 982.0), 102 },
{ OV( 997.0), 93 },
{ OV(1002.2), 86 },
{ OV(1006.6), 80 },
{ OV(1015.8), 60 },
{ OV(1019.8), 36 },
{ OV(1020.9), 23 },
{ OV(1022.0), -1 }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_66.h
|
C++
|
agpl-3.0
| 3,195
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* This file was generated by tltgen on Thu Jul 5 15:46:43 2018.
* tltgen was created by Pieter Agten (pieter.agten@gmail.com).
*/
//#include "output_table.h"
/**
* Parameters:
* A: -0.000480634
* B: 0.00031362
* C: -2.03978e-07
*/
constexpr temp_entry_t temptable_666[] PROGMEM = {
{ OV( 1), 794 },
{ OV( 18), 288 },
{ OV( 35), 234 },
{ OV( 52), 207 },
{ OV( 69), 189 },
{ OV( 86), 176 },
{ OV(103), 166 },
{ OV(120), 157 },
{ OV(137) ,150 },
{ OV(154), 144 },
{ OV(172), 138 },
{ OV(189), 134 },
{ OV(206), 129 },
{ OV(223), 125 },
{ OV(240), 121 },
{ OV(257), 118 },
{ OV(274), 115 },
{ OV(291), 112 },
{ OV(308), 109 },
{ OV(325), 106 },
{ OV(342), 103 },
{ OV(359), 101 },
{ OV(376), 99 },
{ OV(393), 96 },
{ OV(410), 94 },
{ OV(427), 92 },
{ OV(444), 90 },
{ OV(461), 88 },
{ OV(478), 86 },
{ OV(495), 84 },
{ OV(512), 82 },
{ OV(530), 80 },
{ OV(547), 78 },
{ OV(564), 76 },
{ OV(581), 74 },
{ OV(598), 72 },
{ OV(615), 70 },
{ OV(632), 68 },
{ OV(649), 67 },
{ OV(666), 65 },
{ OV(683), 63 },
{ OV(700), 61 },
{ OV(717), 59 },
{ OV(734), 57 },
{ OV(751), 55 },
{ OV(768), 53 },
{ OV(785), 51 },
{ OV(802), 49 },
{ OV(819), 47 },
{ OV(836), 44 },
{ OV(853), 42 },
{ OV(871), 39 },
{ OV(888), 37 },
{ OV(905), 34 },
{ OV(922), 30 },
{ OV(939), 27 },
{ OV(956), 23 },
{ OV(973), 18 },
{ OV(990), 11 },
{ OV(1007), 2 },
{ OV(1023),-25 }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_666.h
|
C++
|
agpl-3.0
| 2,394
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 500 KOhm, beta25 = 3800 K, 4.7 kOhm pull-up, SliceEngineering 450 °C Thermistor
constexpr temp_entry_t temptable_67[] PROGMEM = {
{ OV( 22 ), 500 },
{ OV( 23 ), 490 },
{ OV( 25 ), 480 },
{ OV( 27 ), 470 },
{ OV( 29 ), 460 },
{ OV( 32 ), 450 },
{ OV( 35 ), 440 },
{ OV( 38 ), 430 },
{ OV( 41 ), 420 },
{ OV( 45 ), 410 },
{ OV( 50 ), 400 },
{ OV( 55 ), 390 },
{ OV( 60 ), 380 },
{ OV( 67 ), 370 },
{ OV( 74 ), 360 },
{ OV( 82 ), 350 },
{ OV( 91 ), 340 },
{ OV( 102 ), 330 },
{ OV( 114 ), 320 },
{ OV( 127 ), 310 },
{ OV( 143 ), 300 },
{ OV( 161 ), 290 },
{ OV( 181 ), 280 },
{ OV( 204 ), 270 },
{ OV( 229 ), 260 },
{ OV( 259 ), 250 },
{ OV( 290 ), 240 },
{ OV( 325 ), 230 },
{ OV( 364 ), 220 },
{ OV( 407 ), 210 },
{ OV( 453 ), 200 },
{ OV( 501 ), 190 },
{ OV( 551 ), 180 },
{ OV( 603 ), 170 },
{ OV( 655 ), 160 },
{ OV( 706 ), 150 },
{ OV( 755 ), 140 },
{ OV( 801 ), 130 },
{ OV( 842 ), 120 },
{ OV( 879 ), 110 },
{ OV( 910 ), 100 },
{ OV( 936 ), 90 },
{ OV( 948 ), 85 },
{ OV( 958 ), 80 },
{ OV( 975 ), 70 },
{ OV( 988 ), 60 },
{ OV( 998 ), 50 },
{ OV(1006 ), 40 },
{ OV(1011 ), 30 },
{ OV(1013 ), 25 },
{ OV(1015 ), 20 },
{ OV(1018 ), 10 },
{ OV(1020 ), 0 },
{ OV(1021 ), -10 },
{ OV(1022 ), -20 }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_67.h
|
C++
|
agpl-3.0
| 2,283
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#define REVERSE_TEMP_SENSOR_RANGE_68 1
// PT100 amplifier board from Dyze Design
constexpr temp_entry_t temptable_68[] PROGMEM = {
{ OV(273), 0 },
{ OV(294), 20 },
{ OV(315), 40 },
{ OV(336), 60 },
{ OV(356), 80 },
{ OV(376), 100 },
{ OV(396), 120 },
{ OV(416), 140 },
{ OV(436), 160 },
{ OV(455), 180 },
{ OV(474), 200 },
{ OV(494), 220 },
{ OV(513), 240 },
{ OV(531), 260 },
{ OV(550), 280 },
{ OV(568), 300 },
{ OV(587), 320 },
{ OV(605), 340 },
{ OV(623), 360 },
{ OV(641), 380 },
{ OV(658), 400 },
{ OV(676), 420 },
{ OV(693), 440 },
{ OV(710), 460 },
{ OV(727), 480 },
{ OV(744), 500 }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_68.h
|
C++
|
agpl-3.0
| 1,530
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 100 kOhm, beta25 = 3974 K, 4.7 kOhm pull-up, Honeywell 135-104LAG-J01
constexpr temp_entry_t temptable_7[] PROGMEM = {
{ OV( 1), 941 },
{ OV( 19), 362 },
{ OV( 37), 299 }, // top rating 300C
{ OV( 55), 266 },
{ OV( 73), 245 },
{ OV( 91), 229 },
{ OV( 109), 216 },
{ OV( 127), 206 },
{ OV( 145), 197 },
{ OV( 163), 190 },
{ OV( 181), 183 },
{ OV( 199), 177 },
{ OV( 217), 171 },
{ OV( 235), 166 },
{ OV( 253), 162 },
{ OV( 271), 157 },
{ OV( 289), 153 },
{ OV( 307), 149 },
{ OV( 325), 146 },
{ OV( 343), 142 },
{ OV( 361), 139 },
{ OV( 379), 135 },
{ OV( 397), 132 },
{ OV( 415), 129 },
{ OV( 433), 126 },
{ OV( 451), 123 },
{ OV( 469), 121 },
{ OV( 487), 118 },
{ OV( 505), 115 },
{ OV( 523), 112 },
{ OV( 541), 110 },
{ OV( 559), 107 },
{ OV( 577), 105 },
{ OV( 595), 102 },
{ OV( 613), 99 },
{ OV( 631), 97 },
{ OV( 649), 94 },
{ OV( 667), 92 },
{ OV( 685), 89 },
{ OV( 703), 86 },
{ OV( 721), 84 },
{ OV( 739), 81 },
{ OV( 757), 78 },
{ OV( 775), 75 },
{ OV( 793), 72 },
{ OV( 811), 69 },
{ OV( 829), 66 },
{ OV( 847), 62 },
{ OV( 865), 59 },
{ OV( 883), 55 },
{ OV( 901), 51 },
{ OV( 919), 46 },
{ OV( 937), 41 },
{ OV( 955), 35 },
{ OV( 973), 27 },
{ OV( 991), 17 },
{ OV(1009), 1 },
{ OV(1023), 0 } // to allow internal 0 degrees C
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_7.h
|
C++
|
agpl-3.0
| 2,276
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// Stock BQ Hephestos 2 100k thermistor.
// Created on 29/12/2017 with an ambient temperature of 20C.
// ANENG AN8009 DMM with a K-type probe used for measurements.
// R25 = 100 kOhm, beta25 = 4100 K, 4.7 kOhm pull-up, bqh2 stock thermistor
constexpr temp_entry_t temptable_70[] PROGMEM = {
{ OV( 18), 270 },
{ OV( 27), 248 },
{ OV( 34), 234 },
{ OV( 45), 220 },
{ OV( 61), 205 },
{ OV( 86), 188 },
{ OV( 123), 172 },
{ OV( 420), 110 },
{ OV( 590), 90 },
{ OV( 845), 56 },
{ OV( 970), 25 },
{ OV( 986), 20 },
{ OV( 994), 15 },
{ OV(1000), 10 },
{ OV(1005), 5 },
{ OV(1009), 0 } // safety
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_70.h
|
C++
|
agpl-3.0
| 1,516
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 100 kOhm, beta25 = 3974 K, 4.7 kOhm pull-up, Honeywell 135-104LAF-J01
// R0 = 100000 Ohm
// T0 = 25 °C
// Beta = 3974
// R1 = 0 Ohm
// R2 = 4700 Ohm
constexpr temp_entry_t temptable_71[] PROGMEM = {
{ OV( 35), 300 },
{ OV( 51), 269 },
{ OV( 59), 258 },
{ OV( 64), 252 },
{ OV( 71), 244 },
{ OV( 81), 235 },
{ OV( 87), 230 },
{ OV( 92), 226 },
{ OV( 102), 219 },
{ OV( 110), 214 },
{ OV( 115), 211 },
{ OV( 126), 205 },
{ OV( 128), 204 },
{ OV( 130), 203 },
{ OV( 132), 202 },
{ OV( 134), 201 },
{ OV( 136), 200 },
{ OV( 147), 195 },
{ OV( 154), 192 },
{ OV( 159), 190 },
{ OV( 164), 188 },
{ OV( 172), 185 },
{ OV( 175), 184 },
{ OV( 178), 183 },
{ OV( 181), 182 },
{ OV( 184), 181 },
{ OV( 187), 180 },
{ OV( 190), 179 },
{ OV( 193), 178 },
{ OV( 196), 177 },
{ OV( 199), 176 },
{ OV( 202), 175 },
{ OV( 205), 174 },
{ OV( 208), 173 },
{ OV( 215), 171 },
{ OV( 237), 165 },
{ OV( 256), 160 },
{ OV( 300), 150 },
{ OV( 351), 140 },
{ OV( 470), 120 },
{ OV( 504), 115 },
{ OV( 538), 110 },
{ OV( 745), 80 },
{ OV( 770), 76 },
{ OV( 806), 70 },
{ OV( 829), 66 },
{ OV( 860), 60 },
{ OV( 879), 56 },
{ OV( 888), 54 },
{ OV( 905), 50 },
{ OV( 924), 45 },
{ OV( 940), 40 },
{ OV( 955), 35 },
{ OV( 972), 28 },
{ OV( 974), 27 },
{ OV( 976), 26 },
{ OV( 978), 25 },
{ OV( 980), 24 },
{ OV( 987), 20 },
{ OV( 995), 15 },
{ OV(1001), 10 },
{ OV(1006), 5 },
{ OV(1010), 0 }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_71.h
|
C++
|
agpl-3.0
| 2,410
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* R25 = 100 kOhm, beta25 = 4100 K, 4.7 kOhm pull-up,
* Generic Silicon Heat Pad with NTC 100K thermistor
*
* Many generic silicone heat pads use the MGB18-104F39050L32 thermistor, applicable to various
* wattages and voltages. This table is correct if this part is used. It's been optimized
* to provide good granularity in the 60-110C range, good for PLA and ABS. For higher temperature
* filament (e.g., nylon) uncomment HIGH_TEMP_RANGE_75 for increased accuracy. If higher
* temperatures aren't used it can improve performance slightly to leave it commented out.
*/
//#define HIGH_TEMP_RANGE_75
constexpr temp_entry_t temptable_75[] PROGMEM = { // Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
{ OV(111.06), 200 }, // v=0.542 r=571.747 res=0.501 degC/count
#ifdef HIGH_TEMP_RANGE_75
{ OV(174.87), 175 }, // v=0.854 r=967.950 res=0.311 degC/count These values are valid. But they serve no
{ OV(191.64), 170 }, // v=0.936 r=1082.139 res=0.284 degC/count purpose. It is better to delete them so
{ OV(209.99), 165 }, // v=1.025 r=1212.472 res=0.260 degC/count the search is quicker and get to the meaningful
{ OV(230.02), 160 }, // v=1.123 r=1361.590 res=0.239 degC/count part of the table sooner.
{ OV(251.80), 155 }, // v=1.230 r=1532.621 res=0.220 degC/count
#endif
{ OV(275.43), 150 }, // v=1.345 r=1729.283 res=0.203 degC/count
#ifdef HIGH_TEMP_RANGE_75
{ OV(300.92), 145 }, // v=1.469 r=1956.004 res=0.189 degC/coun
#endif
{ OV( 328.32), 140 }, // v=1.603 r=2218.081 res=0.176 degC/count
{ OV( 388.65), 130 }, // v=1.898 r=2874.980 res=0.156 degC/count
{ OV( 421.39), 125 }, // v=2.058 r=3286.644 res=0.149 degC/count
{ OV( 455.65), 120 }, // v=2.225 r=3768.002 res=0.143 degC/count
{ OV( 491.17), 115 }, // v=2.398 r=4332.590 res=0.139 degC/count
{ OV( 527.68), 110 }, // v=2.577 r=4996.905 res=0.136 degC/count
{ OV( 564.81), 105 }, // v=2.758 r=5781.120 res=0.134 degC/count
{ OV( 602.19), 100 }, // v=2.940 r=6710.000 res=0.134 degC/count
{ OV( 676.03), 90 }, // v=3.301 r=9131.018 res=0.138 degC/count
{ OV( 745.85), 80 }, // v=3.642 r=12602.693 res=0.150 degC/count
{ OV( 778.31), 75 }, // v=3.800 r=14889.001 res=0.159 degC/count
{ OV( 808.75), 70 }, // v=3.949 r=17658.700 res=0.171 degC/count
{ OV( 836.94), 65 }, // v=4.087 r=21028.040 res=0.185 degC/count
{ OV( 862.74), 60 }, // v=4.213 r=25144.568 res=0.204 degC/count
{ OV( 886.08), 55 }, // v=4.327 r=30196.449 res=0.227 degC/count
{ OV( 906.97), 50 }, // v=4.429 r=36424.838 res=0.255 degC/count
{ OV( 941.65), 40 }, // v=4.598 r=53745.337 res=0.333 degC/count
{ OV( 967.76), 30 }, // v=4.725 r=80880.630 res=0.452 degC/count
{ OV( 978.03), 25 }, // v=4.776 r=100000.000 res=0.535 degC/count
{ OV( 981.68), 23 }, // v=4.793 r=109024.395 res=0.573 degC/count
{ OV( 983.41), 22 }, // v=4.802 r=113875.430 res=0.594 degC/count
{ OV( 985.08), 21 }, // v=4.810 r=118968.955 res=0.616 degC/count
{ OV( 986.70), 20 }, // v=4.818 r=124318.354 res=0.638 degC/count
{ OV( 993.94), 15 }, // v=4.853 r=155431.302 res=0.768 degC/count
{ OV( 999.96), 10 }, // v=4.883 r=195480.023 res=0.934 degC/count
{ OV(1008.95), 0 } // v=4.926 r=314997.575 res=1.418 degC/count
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_75.h
|
C++
|
agpl-3.0
| 4,158
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 100 kOhm, beta25 = 3950 K, 10 kOhm pull-up, NTCS0603E3104FHT
constexpr temp_entry_t temptable_8[] PROGMEM = {
{ OV( 1), 704 },
{ OV( 54), 216 },
{ OV( 107), 175 },
{ OV( 160), 152 },
{ OV( 213), 137 },
{ OV( 266), 125 },
{ OV( 319), 115 },
{ OV( 372), 106 },
{ OV( 425), 99 },
{ OV( 478), 91 },
{ OV( 531), 85 },
{ OV( 584), 78 },
{ OV( 637), 71 },
{ OV( 690), 65 },
{ OV( 743), 58 },
{ OV( 796), 50 },
{ OV( 849), 42 },
{ OV( 902), 31 },
{ OV( 955), 17 },
{ OV(1008), 0 }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_8.h
|
C++
|
agpl-3.0
| 1,417
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// R25 = 100 kOhm, beta25 = 3960 K, 4.7 kOhm pull-up, GE Sensing AL03006-58.2K-97-G1
constexpr temp_entry_t temptable_9[] PROGMEM = {
{ OV( 1), 936 },
{ OV( 36), 300 },
{ OV( 71), 246 },
{ OV( 106), 218 },
{ OV( 141), 199 },
{ OV( 176), 185 },
{ OV( 211), 173 },
{ OV( 246), 163 },
{ OV( 281), 155 },
{ OV( 316), 147 },
{ OV( 351), 140 },
{ OV( 386), 134 },
{ OV( 421), 128 },
{ OV( 456), 122 },
{ OV( 491), 117 },
{ OV( 526), 112 },
{ OV( 561), 107 },
{ OV( 596), 102 },
{ OV( 631), 97 },
{ OV( 666), 92 },
{ OV( 701), 87 },
{ OV( 736), 81 },
{ OV( 771), 76 },
{ OV( 806), 70 },
{ OV( 841), 63 },
{ OV( 876), 56 },
{ OV( 911), 48 },
{ OV( 946), 38 },
{ OV( 981), 23 },
{ OV(1005), 5 },
{ OV(1016), 0 }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_9.h
|
C++
|
agpl-3.0
| 1,663
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// 100k bed thermistor with a 10K pull-up resistor - made by $ buildroot/share/scripts/createTemperatureLookupMarlin.py --rp=10000
constexpr temp_entry_t temptable_99[] PROGMEM = {
{ OV( 5.81), 350 }, // v=0.028 r= 57.081 res=13.433 degC/count
{ OV( 6.54), 340 }, // v=0.032 r= 64.248 res=11.711 degC/count
{ OV( 7.38), 330 }, // v=0.036 r= 72.588 res=10.161 degC/count
{ OV( 8.36), 320 }, // v=0.041 r= 82.336 res= 8.772 degC/count
{ OV( 9.51), 310 }, // v=0.046 r= 93.780 res= 7.535 degC/count
{ OV( 10.87), 300 }, // v=0.053 r= 107.281 res= 6.439 degC/count
{ OV( 12.47), 290 }, // v=0.061 r= 123.286 res= 5.473 degC/count
{ OV( 14.37), 280 }, // v=0.070 r= 142.360 res= 4.627 degC/count
{ OV( 16.64), 270 }, // v=0.081 r= 165.215 res= 3.891 degC/count
{ OV( 19.37), 260 }, // v=0.095 r= 192.758 res= 3.253 degC/count
{ OV( 22.65), 250 }, // v=0.111 r= 226.150 res= 2.705 degC/count
{ OV( 26.62), 240 }, // v=0.130 r= 266.891 res= 2.236 degC/count
{ OV( 31.46), 230 }, // v=0.154 r= 316.931 res= 1.839 degC/count
{ OV( 37.38), 220 }, // v=0.182 r= 378.822 res= 1.504 degC/count
{ OV( 44.65), 210 }, // v=0.218 r= 455.939 res= 1.224 degC/count
{ OV( 53.64), 200 }, // v=0.262 r= 552.778 res= 0.991 degC/count
{ OV( 64.78), 190 }, // v=0.316 r= 675.386 res= 0.799 degC/count
{ OV( 78.65), 180 }, // v=0.384 r= 831.973 res= 0.643 degC/count
{ OV( 95.94), 170 }, // v=0.468 r= 1033.801 res= 0.516 degC/count
{ OV(117.52), 160 }, // v=0.574 r= 1296.481 res= 0.414 degC/count
{ OV(144.42), 150 }, // v=0.705 r= 1641.900 res= 0.333 degC/count
{ OV(177.80), 140 }, // v=0.868 r= 2101.110 res= 0.269 degC/count
{ OV(218.89), 130 }, // v=1.069 r= 2718.725 res= 0.220 degC/count
{ OV(268.82), 120 }, // v=1.313 r= 3559.702 res= 0.183 degC/count
{ OV(328.35), 110 }, // v=1.603 r= 4719.968 res= 0.155 degC/count
{ OV(397.44), 100 }, // v=1.941 r= 6343.323 res= 0.136 degC/count
{ OV(474.90), 90 }, // v=2.319 r= 8648.807 res= 0.124 degC/count
{ OV(558.03), 80 }, // v=2.725 r= 11975.779 res= 0.118 degC/count
{ OV(642.76), 70 }, // v=3.138 r= 16859.622 res= 0.119 degC/count
{ OV(724.25), 60 }, // v=3.536 r= 24161.472 res= 0.128 degC/count
{ OV(797.93), 50 }, // v=3.896 r= 35295.361 res= 0.146 degC/count
{ OV(860.51), 40 }, // v=4.202 r= 52635.209 res= 0.178 degC/count
{ OV(910.55), 30 }, // v=4.446 r= 80262.251 res= 0.229 degC/count
{ OV(948.36), 20 }, // v=4.631 r=125374.433 res= 0.313 degC/count
{ OV(975.47), 10 }, // v=4.763 r=201020.458 res= 0.449 degC/count
{ OV(994.02), 0 } // v=4.854 r=331567.870 res= 0.676 degC/count
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_99.h
|
C++
|
agpl-3.0
| 3,653
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// User-defined table 1
// Dummy Thermistor table.. It will ALWAYS read a fixed value.
#ifndef DUMMY_THERMISTOR_998_VALUE
#define DUMMY_THERMISTOR_998_VALUE 25
#endif
constexpr temp_entry_t temptable_998[] PROGMEM = {
{ OV( 1), DUMMY_THERMISTOR_998_VALUE },
{ OV(1023), DUMMY_THERMISTOR_998_VALUE }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_998.h
|
C++
|
agpl-3.0
| 1,187
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// User-defined table 2
// Dummy Thermistor table.. It will ALWAYS read a fixed value.
#ifndef DUMMY_THERMISTOR_999_VALUE
#define DUMMY_THERMISTOR_999_VALUE 25
#endif
constexpr temp_entry_t temptable_999[] PROGMEM = {
{ OV( 1), DUMMY_THERMISTOR_999_VALUE },
{ OV(1023), DUMMY_THERMISTOR_999_VALUE }
};
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistor_999.h
|
C++
|
agpl-3.0
| 1,187
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "../../inc/MarlinConfig.h"
#define THERMISTOR_TABLE_ADC_RESOLUTION 10
#define THERMISTOR_TABLE_SCALE (HAL_ADC_RANGE / _BV(THERMISTOR_TABLE_ADC_RESOLUTION))
#if ENABLED(HAL_ADC_FILTERED)
#define OVERSAMPLENR 1
#else
#define OVERSAMPLENR 16
#endif
// Currently Marlin stores all oversampled ADC values as uint16_t, make sure the HAL settings do not overflow 16 bit
#if (HAL_ADC_RANGE) * (OVERSAMPLENR) > 1 << 16
#error "MAX_RAW_THERMISTOR_VALUE is too large for uint16_t. Reduce OVERSAMPLENR or HAL_ADC_RESOLUTION."
#endif
#define MAX_RAW_THERMISTOR_VALUE (uint16_t(HAL_ADC_RANGE) * (OVERSAMPLENR) - 1)
#define OV_SCALE(N) float(N)
#define OV(N) raw_adc_t(OV_SCALE(N) * (OVERSAMPLENR) * (THERMISTOR_TABLE_SCALE))
typedef struct { raw_adc_t value; celsius_t celsius; } temp_entry_t;
// Pt1000 and Pt100 handling
//
// Rt=R0*(1+a*T+b*T*T) [for T>0]
// a=3.9083E-3, b=-5.775E-7
#define PtA 3.9083E-3
#define PtB -5.775E-7
#define PtRt(T,R0) ((R0) * (1.0 + (PtA) * (T) + (PtB) * (T) * (T)))
#define PtAdVal(T,R0,Rup) (short)(1024 / (Rup / PtRt(T, R0) + 1))
#define PtLine(T,R0,Rup) { OV(PtAdVal(T, R0, Rup)), T }
//
// Analog Thermistors - 4.7kΩ pullup - Normal
//
#if ANY_THERMISTOR_IS(1) // beta25 = 4092 K, R25 = 100kΩ, Pullup = 4.7kΩ, "EPCOS"
#include "thermistor_1.h"
#endif
#if ANY_THERMISTOR_IS(331) // Like table 1, but with 3V3 as input voltage for MEGA
#include "thermistor_331.h"
#endif
#if ANY_THERMISTOR_IS(332) // Like table 1, but with 3V3 as input voltage for DUE
#include "thermistor_332.h"
#endif
#if ANY_THERMISTOR_IS(2) // 4338 K, R25 = 200kΩ, Pullup = 4.7kΩ, "ATC Semitec 204GT-2"
#include "thermistor_2.h"
#endif
#if ANY_THERMISTOR_IS(202) // 200K thermistor in Copymaker3D hotend
#include "thermistor_202.h"
#endif
#if ANY_THERMISTOR_IS(3) // beta25 = 4120 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Mendel-parts"
#include "thermistor_3.h"
#endif
#if ANY_THERMISTOR_IS(4) // beta25 = 3950 K, R25 = 10kΩ, Pullup = 4.7kΩ, "Generic"
#include "thermistor_4.h"
#endif
#if ANY_THERMISTOR_IS(5) // beta25 = 4267 K, R25 = 100kΩ, Pullup = 4.7kΩ, "ParCan, ATC 104GT-2"
#include "thermistor_5.h"
#endif
#if ANY_THERMISTOR_IS(501) // 100K Zonestar thermistor
#include "thermistor_501.h"
#endif
#if ANY_THERMISTOR_IS(502) // Unknown thermistor used by the Zonestar Průša P802M hot bed
#include "thermistor_502.h"
#endif
#if ANY_THERMISTOR_IS(503) // Zonestar (Z8XM2) Heated Bed thermistor
#include "thermistor_503.h"
#endif
#if ANY_THERMISTOR_IS(504) // Zonestar (P802QR2 Hot End) thermistors
#include "thermistor_504.h"
#endif
#if ANY_THERMISTOR_IS(505) // Zonestar (P802QR2 Bed) thermistor
#include "thermistor_505.h"
#endif
#if ANY_THERMISTOR_IS(512) // 100k thermistor in RPW-Ultra hotend, Pullup = 4.7kΩ, "unknown model"
#include "thermistor_512.h"
#endif
#if ANY_THERMISTOR_IS(6) // beta25 = 4092 K, R25 = 100kΩ, Pullup = 8.2kΩ, "EPCOS ?"
#include "thermistor_6.h"
#endif
#if ANY_THERMISTOR_IS(7) // beta25 = 3974 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Honeywell 135-104LAG-J01"
#include "thermistor_7.h"
#endif
#if ANY_THERMISTOR_IS(71) // beta25 = 3974 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Honeywell 135-104LAF-J01"
#include "thermistor_71.h"
#endif
#if ANY_THERMISTOR_IS(8) // beta25 = 3950 K, R25 = 100kΩ, Pullup = 10kΩ, "Vishay E3104FHT"
#include "thermistor_8.h"
#endif
#if ANY_THERMISTOR_IS(9) // beta25 = 3960 K, R25 = 100kΩ, Pullup = 4.7kΩ, "GE Sensing AL03006-58.2K-97-G1"
#include "thermistor_9.h"
#endif
#if ANY_THERMISTOR_IS(10) // beta25 = 3960 K, R25 = 100kΩ, Pullup = 4.7kΩ, "RS 198-961"
#include "thermistor_10.h"
#endif
#if ANY_THERMISTOR_IS(11) // beta25 = 3950 K, R25 = 100kΩ, Pullup = 4.7kΩ, "QU-BD silicone bed, QWG-104F-3950"
#include "thermistor_11.h"
#endif
#if ANY_THERMISTOR_IS(12) // beta25 = 4700 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Personal calibration for Makibox hot bed"
#include "thermistor_12.h"
#endif
#if ANY_THERMISTOR_IS(13) // beta25 = 4100 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Hisens"
#include "thermistor_13.h"
#endif
#if ANY_THERMISTOR_IS(14) // beta25 = 4092 K, R25 = 100kΩ, Pullup = 4.7kΩ, "EPCOS" for hot bed
#include "thermistor_14.h"
#endif
#if ANY_THERMISTOR_IS(15) // JGAurora A5 thermistor calibration
#include "thermistor_15.h"
#endif
#if ANY_THERMISTOR_IS(17) // Dagoma NTC 100k white thermistor
#include "thermistor_17.h"
#endif
#if ANY_THERMISTOR_IS(18) // ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327
#include "thermistor_18.h"
#endif
#if ANY_THERMISTOR_IS(22) // Thermistor in a Rostock 301 hot end, calibrated with a multimeter
#include "thermistor_22.h"
#endif
#if ANY_THERMISTOR_IS(23) // By AluOne #12622. Formerly 22 above. May need calibration/checking.
#include "thermistor_23.h"
#endif
#if ANY_THERMISTOR_IS(30) // Kis3d Silicone mat 24V 200W/300W with 6mm Precision cast plate (EN AW 5083)
#include "thermistor_30.h"
#endif
#if ANY_THERMISTOR_IS(60) // beta25 = 3950 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Maker's Tool Works Kapton Bed"
#include "thermistor_60.h"
#endif
#if ANY_THERMISTOR_IS(61) // beta25 = 3950 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Formbot 350°C Thermistor"
#include "thermistor_61.h"
#endif
#if ANY_THERMISTOR_IS(66) // beta25 = 4500 K, R25 = 2.5MΩ, Pullup = 4.7kΩ, "DyzeDesign 500 °C Thermistor"
#include "thermistor_66.h"
#endif
#if ANY_THERMISTOR_IS(67) // R25 = 500kΩ, beta25 = 3800 K, 4.7kΩ pull-up, SliceEngineering 450 °C Thermistor
#include "thermistor_67.h"
#endif
#if ANY_THERMISTOR_IS(68) // PT-100 with Dyze amplifier board
#include "thermistor_68.h"
#endif
#if ANY_THERMISTOR_IS(70) // beta25 = 4100 K, R25 = 100kΩ, Pullup = 4.7kΩ, "Hephestos 2, bqh2 stock thermistor"
#include "thermistor_70.h"
#endif
#if ANY_THERMISTOR_IS(75) // beta25 = 4100 K, R25 = 100kΩ, Pullup = 4.7kΩ, "MGB18-104F39050L32 thermistor"
#include "thermistor_75.h"
#endif
#if ANY_THERMISTOR_IS(666) // beta25 = UNK, R25 = 200K, Pullup = 10kΩ, "Unidentified 200K NTC thermistor (Einstart S)"
#include "thermistor_666.h"
#endif
#if ANY_THERMISTOR_IS(2000) // "Ultimachine Rambo TDK NTCG104LH104KT1 NTC100K motherboard Thermistor" https://product.tdk.com/en/search/sensor/ntc/chip-ntc-thermistor/info?part_no=NTCG104LH104KT1
#include "thermistor_2000.h"
#endif
//
// Analog Thermistors - 1kΩ pullup
//
#if ANY_THERMISTOR_IS(51) // beta25 = 4092 K, R25 = 100kΩ, Pullup = 1kΩ, "EPCOS"
#include "thermistor_51.h"
#endif
#if ANY_THERMISTOR_IS(52) // beta25 = 4338 K, R25 = 200kΩ, Pullup = 1kΩ, "ATC Semitec 204GT-2"
#include "thermistor_52.h"
#endif
#if ANY_THERMISTOR_IS(55) // beta25 = 4267 K, R25 = 100kΩ, Pullup = 1kΩ, "ATC Semitec 104GT-2 (Used on ParCan)"
#include "thermistor_55.h"
#endif
//
// Analog Thermistors - 10kΩ pullup - Atypical
//
#if ANY_THERMISTOR_IS(99) // 100k bed thermistor with a 10K pull-up resistor (on some Wanhao i3 models)
#include "thermistor_99.h"
#endif
//
// Analog RTDs (Pt100/Pt1000)
//
#if ANY_THERMISTOR_IS(110) // Pt100 with 1k0 pullup
#include "thermistor_110.h"
#endif
#if ANY_THERMISTOR_IS(147) // Pt100 with 4k7 pullup
#include "thermistor_147.h"
#endif
#if ANY_THERMISTOR_IS(1010) // Pt1000 with 1k0 pullup
#include "thermistor_1010.h"
#endif
#if ANY_THERMISTOR_IS(1022) // Pt1000 with 2k2 pullup
#include "thermistor_1022.h"
#endif
#if ANY_THERMISTOR_IS(1047) // Pt1000 with 4k7 pullup
#include "thermistor_1047.h"
#endif
#if ANY_THERMISTOR_IS(20) // Pt100 with INA826 amp on Ultimaker v2.0 electronics
#include "thermistor_20.h"
#endif
#if ANY_THERMISTOR_IS(21) // Pt100 with INA826 amp with 3.3v excitation based on "Pt100 with INA826 amp on Ultimaker v2.0 electronics"
#include "thermistor_21.h"
#endif
#if ANY_THERMISTOR_IS(201) // Pt100 with LMV324 Overlord
#include "thermistor_201.h"
#endif
//
// Custom/Dummy/Other Thermal Sensors
//
#if ANY_THERMISTOR_IS(998) // User-defined table 1
#include "thermistor_998.h"
#endif
#if ANY_THERMISTOR_IS(999) // User-defined table 2
#include "thermistor_999.h"
#endif
#if ANY_THERMISTOR_IS(1000) // Custom
constexpr temp_entry_t temptable_1000[] PROGMEM = { { 0, 0 } };
#endif
#define _TT_NAME(_N) temptable_ ## _N
#define TT_NAME(_N) _TT_NAME(_N)
#if TEMP_SENSOR_0 > 0
#define TEMPTABLE_0 TT_NAME(TEMP_SENSOR_0)
#define TEMPTABLE_0_LEN COUNT(TEMPTABLE_0)
#else
#define TEMPTABLE_0 nullptr
#define TEMPTABLE_0_LEN 0
#endif
#if TEMP_SENSOR_1 > 0
#define TEMPTABLE_1 TT_NAME(TEMP_SENSOR_1)
#define TEMPTABLE_1_LEN COUNT(TEMPTABLE_1)
#else
#define TEMPTABLE_1 nullptr
#define TEMPTABLE_1_LEN 0
#endif
#if TEMP_SENSOR_2 > 0
#define TEMPTABLE_2 TT_NAME(TEMP_SENSOR_2)
#define TEMPTABLE_2_LEN COUNT(TEMPTABLE_2)
#else
#define TEMPTABLE_2 nullptr
#define TEMPTABLE_2_LEN 0
#endif
#if TEMP_SENSOR_3 > 0
#define TEMPTABLE_3 TT_NAME(TEMP_SENSOR_3)
#define TEMPTABLE_3_LEN COUNT(TEMPTABLE_3)
#else
#define TEMPTABLE_3 nullptr
#define TEMPTABLE_3_LEN 0
#endif
#if TEMP_SENSOR_4 > 0
#define TEMPTABLE_4 TT_NAME(TEMP_SENSOR_4)
#define TEMPTABLE_4_LEN COUNT(TEMPTABLE_4)
#else
#define TEMPTABLE_4 nullptr
#define TEMPTABLE_4_LEN 0
#endif
#if TEMP_SENSOR_5 > 0
#define TEMPTABLE_5 TT_NAME(TEMP_SENSOR_5)
#define TEMPTABLE_5_LEN COUNT(TEMPTABLE_5)
#else
#define TEMPTABLE_5 nullptr
#define TEMPTABLE_5_LEN 0
#endif
#if TEMP_SENSOR_6 > 0
#define TEMPTABLE_6 TT_NAME(TEMP_SENSOR_6)
#define TEMPTABLE_6_LEN COUNT(TEMPTABLE_6)
#else
#define TEMPTABLE_6 nullptr
#define TEMPTABLE_6_LEN 0
#endif
#if TEMP_SENSOR_7 > 0
#define TEMPTABLE_7 TT_NAME(TEMP_SENSOR_7)
#define TEMPTABLE_7_LEN COUNT(TEMPTABLE_7)
#else
#define TEMPTABLE_7 nullptr
#define TEMPTABLE_7_LEN 0
#endif
#if TEMP_SENSOR_BED > 0
#define TEMPTABLE_BED TT_NAME(TEMP_SENSOR_BED)
#define TEMPTABLE_BED_LEN COUNT(TEMPTABLE_BED)
#else
#define TEMPTABLE_BED_LEN 0
#endif
#if TEMP_SENSOR_CHAMBER > 0
#define TEMPTABLE_CHAMBER TT_NAME(TEMP_SENSOR_CHAMBER)
#define TEMPTABLE_CHAMBER_LEN COUNT(TEMPTABLE_CHAMBER)
#else
#define TEMPTABLE_CHAMBER_LEN 0
#endif
#if TEMP_SENSOR_PROBE > 0
#define TEMPTABLE_PROBE TT_NAME(TEMP_SENSOR_PROBE)
#define TEMPTABLE_PROBE_LEN COUNT(TEMPTABLE_PROBE)
#else
#define TEMPTABLE_PROBE_LEN 0
#endif
#if TEMP_SENSOR_COOLER > 0
#define TEMPTABLE_COOLER TT_NAME(TEMP_SENSOR_COOLER)
#define TEMPTABLE_COOLER_LEN COUNT(TEMPTABLE_COOLER)
#else
#define TEMPTABLE_COOLER_LEN 0
#endif
#if TEMP_SENSOR_BOARD > 0
#define TEMPTABLE_BOARD TT_NAME(TEMP_SENSOR_BOARD)
#define TEMPTABLE_BOARD_LEN COUNT(TEMPTABLE_BOARD)
#else
#define TEMPTABLE_BOARD_LEN 0
#endif
#if TEMP_SENSOR_REDUNDANT > 0
#define TEMPTABLE_REDUNDANT TT_NAME(TEMP_SENSOR_REDUNDANT)
#define TEMPTABLE_REDUNDANT_LEN COUNT(TEMPTABLE_REDUNDANT)
#else
#define TEMPTABLE_REDUNDANT_LEN 0
#endif
// The SCAN_THERMISTOR_TABLE macro needs alteration?
static_assert(255 > TEMPTABLE_0_LEN || 255 > TEMPTABLE_1_LEN || 255 > TEMPTABLE_2_LEN || 255 > TEMPTABLE_3_LEN
|| 255 > TEMPTABLE_4_LEN || 255 > TEMPTABLE_5_LEN || 255 > TEMPTABLE_6_LEN || 255 > TEMPTABLE_7_LEN
|| 255 > TEMPTABLE_BED_LEN
|| 255 > TEMPTABLE_CHAMBER_LEN
|| 255 > TEMPTABLE_PROBE_LEN
|| 255 > TEMPTABLE_COOLER_LEN
|| 255 > TEMPTABLE_BOARD_LEN
|| 255 > TEMPTABLE_REDUNDANT_LEN
, "Temperature conversion tables over 255 entries need special consideration."
);
// Set the high and low raw values for the heaters
// For thermistors the highest temperature results in the lowest ADC value
// For thermocouples the highest temperature results in the highest ADC value
#define _TT_REV(N) REVERSE_TEMP_SENSOR_RANGE_##N
#define TT_REV(N) TERN0(TEMP_SENSOR_##N##_IS_THERMISTOR, DEFER4(_TT_REV)(TEMP_SENSOR(N)))
#define _TT_REVRAW(N) !TEMP_SENSOR_##N##_IS_THERMISTOR
#define TT_REVRAW(N) (TT_REV(N) || _TT_REVRAW(N))
#ifdef TEMPTABLE_0
#if TT_REV(0)
#define TEMP_SENSOR_0_MINTEMP_IND 0
#define TEMP_SENSOR_0_MAXTEMP_IND TEMPTABLE_0_LEN - 1
#else
#define TEMP_SENSOR_0_MINTEMP_IND TEMPTABLE_0_LEN - 1
#define TEMP_SENSOR_0_MAXTEMP_IND 0
#endif
#endif
#ifdef TEMPTABLE_1
#if TT_REV(1)
#define TEMP_SENSOR_1_MINTEMP_IND 0
#define TEMP_SENSOR_1_MAXTEMP_IND TEMPTABLE_1_LEN - 1
#else
#define TEMP_SENSOR_1_MINTEMP_IND TEMPTABLE_1_LEN - 1
#define TEMP_SENSOR_1_MAXTEMP_IND 0
#endif
#endif
#ifdef TEMPTABLE_2
#if TT_REV(2)
#define TEMP_SENSOR_2_MINTEMP_IND 0
#define TEMP_SENSOR_2_MAXTEMP_IND TEMPTABLE_2_LEN - 1
#else
#define TEMP_SENSOR_2_MINTEMP_IND TEMPTABLE_2_LEN - 1
#define TEMP_SENSOR_2_MAXTEMP_IND 0
#endif
#endif
#ifdef TEMPTABLE_3
#if TT_REV(3)
#define TEMP_SENSOR_3_MINTEMP_IND 0
#define TEMP_SENSOR_3_MAXTEMP_IND TEMPTABLE_3_LEN - 1
#else
#define TEMP_SENSOR_3_MINTEMP_IND TEMPTABLE_3_LEN - 1
#define TEMP_SENSOR_3_MAXTEMP_IND 0
#endif
#endif
#ifdef TEMPTABLE_4
#if TT_REV(4)
#define TEMP_SENSOR_4_MINTEMP_IND 0
#define TEMP_SENSOR_4_MAXTEMP_IND TEMPTABLE_4_LEN - 1
#else
#define TEMP_SENSOR_4_MINTEMP_IND TEMPTABLE_4_LEN - 1
#define TEMP_SENSOR_4_MAXTEMP_IND 0
#endif
#endif
#ifdef TEMPTABLE_5
#if TT_REV(5)
#define TEMP_SENSOR_5_MINTEMP_IND 0
#define TEMP_SENSOR_5_MAXTEMP_IND TEMPTABLE_5_LEN - 1
#else
#define TEMP_SENSOR_5_MINTEMP_IND TEMPTABLE_5_LEN - 1
#define TEMP_SENSOR_5_MAXTEMP_IND 0
#endif
#endif
#ifdef TEMPTABLE_6
#if TT_REV(6)
#define TEMP_SENSOR_6_MINTEMP_IND 0
#define TEMP_SENSOR_6_MAXTEMP_IND TEMPTABLE_6_LEN - 1
#else
#define TEMP_SENSOR_6_MINTEMP_IND TEMPTABLE_6_LEN - 1
#define TEMP_SENSOR_6_MAXTEMP_IND 0
#endif
#endif
#ifdef TEMPTABLE_7
#if TT_REV(7)
#define TEMP_SENSOR_7_MINTEMP_IND 0
#define TEMP_SENSOR_7_MAXTEMP_IND TEMPTABLE_7_LEN - 1
#else
#define TEMP_SENSOR_7_MINTEMP_IND TEMPTABLE_7_LEN - 1
#define TEMP_SENSOR_7_MAXTEMP_IND 0
#endif
#endif
#ifndef TEMP_SENSOR_0_RAW_HI_TEMP
#if TT_REVRAW(0)
#define TEMP_SENSOR_0_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_0_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_0_RAW_HI_TEMP 0
#define TEMP_SENSOR_0_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_1_RAW_HI_TEMP
#if TT_REVRAW(1)
#define TEMP_SENSOR_1_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_1_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_1_RAW_HI_TEMP 0
#define TEMP_SENSOR_1_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_2_RAW_HI_TEMP
#if TT_REVRAW(2)
#define TEMP_SENSOR_2_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_2_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_2_RAW_HI_TEMP 0
#define TEMP_SENSOR_2_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_3_RAW_HI_TEMP
#if TT_REVRAW(3)
#define TEMP_SENSOR_3_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_3_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_3_RAW_HI_TEMP 0
#define TEMP_SENSOR_3_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_4_RAW_HI_TEMP
#if TT_REVRAW(4)
#define TEMP_SENSOR_4_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_4_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_4_RAW_HI_TEMP 0
#define TEMP_SENSOR_4_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_5_RAW_HI_TEMP
#if TT_REVRAW(5)
#define TEMP_SENSOR_5_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_5_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_5_RAW_HI_TEMP 0
#define TEMP_SENSOR_5_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_6_RAW_HI_TEMP
#if TT_REVRAW(6)
#define TEMP_SENSOR_6_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_6_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_6_RAW_HI_TEMP 0
#define TEMP_SENSOR_6_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_7_RAW_HI_TEMP
#if TT_REVRAW(7)
#define TEMP_SENSOR_7_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_7_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_7_RAW_HI_TEMP 0
#define TEMP_SENSOR_7_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_BED_RAW_HI_TEMP
#if TT_REVRAW(BED)
#define TEMP_SENSOR_BED_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_BED_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_BED_RAW_HI_TEMP 0
#define TEMP_SENSOR_BED_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_CHAMBER_RAW_HI_TEMP
#if TT_REVRAW(CHAMBER)
#define TEMP_SENSOR_CHAMBER_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_CHAMBER_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_CHAMBER_RAW_HI_TEMP 0
#define TEMP_SENSOR_CHAMBER_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_COOLER_RAW_HI_TEMP
#if TT_REVRAW(COOLER)
#define TEMP_SENSOR_COOLER_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_COOLER_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_COOLER_RAW_HI_TEMP 0
#define TEMP_SENSOR_COOLER_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_PROBE_RAW_HI_TEMP
#if TT_REVRAW(PROBE)
#define TEMP_SENSOR_PROBE_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_PROBE_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_PROBE_RAW_HI_TEMP 0
#define TEMP_SENSOR_PROBE_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_BOARD_RAW_HI_TEMP
#if TT_REVRAW(BOARD)
#define TEMP_SENSOR_BOARD_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_BOARD_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_BOARD_RAW_HI_TEMP 0
#define TEMP_SENSOR_BOARD_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#ifndef TEMP_SENSOR_SOC_RAW_HI_TEMP
#define TEMP_SENSOR_SOC_RAW_LO_TEMP 0
#define TEMP_SENSOR_SOC_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#ifndef TEMP_SENSOR_REDUNDANT_RAW_HI_TEMP
#if TT_REVRAW(REDUNDANT)
#define TEMP_SENSOR_REDUNDANT_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE
#define TEMP_SENSOR_REDUNDANT_RAW_LO_TEMP 0
#else
#define TEMP_SENSOR_REDUNDANT_RAW_HI_TEMP 0
#define TEMP_SENSOR_REDUNDANT_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE
#endif
#endif
#undef __TT_REV
#undef _TT_REV
#undef TT_REV
#undef _TT_REVRAW
#undef TT_REVRAW
|
2301_81045437/Marlin
|
Marlin/src/module/thermistor/thermistors.h
|
C++
|
agpl-3.0
| 19,307
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../inc/MarlinConfigPre.h"
#if HAS_TOOLCHANGE
#include "tool_change.h"
#include "motion.h"
#include "planner.h"
#include "temperature.h"
#include "../MarlinCore.h"
#include "../gcode/gcode.h"
//#define DEBUG_TOOL_CHANGE
//#define DEBUG_TOOLCHANGE_FILAMENT_SWAP
#if HAS_MULTI_EXTRUDER
toolchange_settings_t toolchange_settings; // Initialized by settings.load()
#endif
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
migration_settings_t migration = migration_defaults;
#endif
#if ENABLED(TOOLCHANGE_FS_INIT_BEFORE_SWAP)
Flags<EXTRUDERS> toolchange_extruder_ready;
#endif
#if ENABLED(TOOL_SENSOR)
#include "../lcd/marlinui.h"
#endif
#if ENABLED(DUAL_X_CARRIAGE)
#include "stepper.h"
#endif
#if ANY(SWITCHING_EXTRUDER, SWITCHING_NOZZLE, SWITCHING_TOOLHEAD)
#include "servo.h"
#endif
#if ENABLED(EXT_SOLENOID) && DISABLED(PARKING_EXTRUDER)
#include "../feature/solenoid.h"
#endif
#if ENABLED(MIXING_EXTRUDER)
#include "../feature/mixing.h"
#endif
#if HAS_LEVELING
#include "../feature/bedlevel/bedlevel.h"
#endif
#if HAS_FANMUX
#include "../feature/fanmux.h"
#endif
#if HAS_PRUSA_MMU1
#include "../feature/mmu/mmu.h"
#elif HAS_PRUSA_MMU2
#include "../feature/mmu/mmu2.h"
#endif
#if HAS_MARLINUI_MENU
#include "../lcd/marlinui.h"
#endif
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#include "../feature/pause.h"
#endif
#if HAS_BED_PROBE
#include "probe.h"
#endif
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#if TOOLCHANGE_FS_WIPE_RETRACT <= 0
#undef TOOLCHANGE_FS_WIPE_RETRACT
#define TOOLCHANGE_FS_WIPE_RETRACT 0
#endif
#endif
#if DO_SWITCH_EXTRUDER
#if EXTRUDERS > 3
#define _SERVO_NR(E) ((E) < 2 ? SWITCHING_EXTRUDER_SERVO_NR : SWITCHING_EXTRUDER_E23_SERVO_NR)
#else
#define _SERVO_NR(E) SWITCHING_EXTRUDER_SERVO_NR
#endif
void move_extruder_servo(const uint8_t e) {
planner.synchronize();
constexpr bool evenExtruders = !(EXTRUDERS & 1);
if (evenExtruders || e < EXTRUDERS - 1) {
servo[_SERVO_NR(e)].move(servo_angles[_SERVO_NR(e)][e & 1]);
safe_delay(500);
}
}
#endif // DO_SWITCH_EXTRUDER
#if ENABLED(SWITCHING_NOZZLE)
#if SWITCHING_NOZZLE_TWO_SERVOS
inline void _move_nozzle_servo(const uint8_t e, const uint8_t angle_index) {
constexpr int8_t sns_index[2] = { SWITCHING_NOZZLE_SERVO_NR, SWITCHING_NOZZLE_E1_SERVO_NR };
planner.synchronize();
servo[sns_index[e]].move(servo_angles[sns_index[e]][angle_index]);
safe_delay(SWITCHING_NOZZLE_SERVO_DWELL);
}
void lower_nozzle(const uint8_t e) { _move_nozzle_servo(e, 0); }
void raise_nozzle(const uint8_t e) { _move_nozzle_servo(e, 1); }
#else
void move_nozzle_servo(const uint8_t angle_index) {
planner.synchronize();
servo[SWITCHING_NOZZLE_SERVO_NR].move(servo_angles[SWITCHING_NOZZLE_SERVO_NR][angle_index]);
safe_delay(SWITCHING_NOZZLE_SERVO_DWELL);
}
#endif
#endif // SWITCHING_NOZZLE
// Move to position routines
void _line_to_current(const AxisEnum fr_axis, const float fscale=1) {
line_to_current_position(planner.settings.max_feedrate_mm_s[fr_axis] * fscale);
}
void slow_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.2f); }
void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.5f); }
#define DEBUG_OUT ENABLED(DEBUG_TOOL_CHANGE)
#include "../core/debug_out.h"
#if ENABLED(MAGNETIC_PARKING_EXTRUDER)
float parkingposx[2], // M951 R L
parkinggrabdistance, // M951 I
parkingslowspeed, // M951 J
parkinghighspeed, // M951 H
parkingtraveldistance, // M951 D
compensationmultiplier;
inline void magnetic_parking_extruder_tool_change(const uint8_t new_tool) {
const float oldx = current_position.x,
grabpos = mpe_settings.parking_xpos[new_tool] + (new_tool ? mpe_settings.grab_distance : -mpe_settings.grab_distance),
offsetcompensation = TERN0(HAS_HOTEND_OFFSET, hotend_offset[active_extruder].x * mpe_settings.compensation_factor);
if (homing_needed_error(_BV(X_AXIS))) return;
/**
* Z Lift and Nozzle Offset shift ar defined in caller method to work equal with any Multi Hotend realization
*
* Steps:
* 1. Move high speed to park position of new extruder
* 2. Move to couple position of new extruder (this also discouple the old extruder)
* 3. Move to park position of new extruder
* 4. Move high speed to approach park position of old extruder
* 5. Move to park position of old extruder
* 6. Move to starting position
*/
// STEP 1
current_position.x = mpe_settings.parking_xpos[new_tool] + offsetcompensation;
DEBUG_ECHOPGM("(1) Move extruder ", new_tool);
DEBUG_POS(" to new extruder ParkPos", current_position);
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
planner.synchronize();
// STEP 2
current_position.x = grabpos + offsetcompensation;
DEBUG_ECHOPGM("(2) Couple extruder ", new_tool);
DEBUG_POS(" to new extruder GrabPos", current_position);
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
planner.synchronize();
// Delay before moving tool, to allow magnetic coupling
gcode.dwell(150);
// STEP 3
current_position.x = mpe_settings.parking_xpos[new_tool] + offsetcompensation;
DEBUG_ECHOPGM("(3) Move extruder ", new_tool);
DEBUG_POS(" back to new extruder ParkPos", current_position);
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
planner.synchronize();
// STEP 4
current_position.x = mpe_settings.parking_xpos[active_extruder] + (active_extruder == 0 ? MPE_TRAVEL_DISTANCE : -MPE_TRAVEL_DISTANCE) + offsetcompensation;
DEBUG_ECHOPGM("(4) Move extruder ", new_tool);
DEBUG_POS(" close to old extruder ParkPos", current_position);
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
planner.synchronize();
// STEP 5
current_position.x = mpe_settings.parking_xpos[active_extruder] + offsetcompensation;
DEBUG_ECHOPGM("(5) Park extruder ", new_tool);
DEBUG_POS(" at old extruder ParkPos", current_position);
planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool);
planner.synchronize();
// STEP 6
current_position.x = oldx;
DEBUG_ECHOPGM("(6) Move extruder ", new_tool);
DEBUG_POS(" to starting position", current_position);
planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool);
planner.synchronize();
DEBUG_ECHOLNPGM("Autopark done.");
}
#elif ENABLED(PARKING_EXTRUDER)
void pe_solenoid_init() {
for (uint8_t n = 0; n <= 1; ++n) pe_solenoid_set_pin_state(n, !PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE);
}
void pe_solenoid_set_pin_state(const uint8_t extruder_num, const uint8_t state) {
switch (extruder_num) {
case 1: OUT_WRITE(SOL1_PIN, state); break;
default: OUT_WRITE(SOL0_PIN, state); break;
}
#if PARKING_EXTRUDER_SOLENOIDS_DELAY > 0
gcode.dwell(PARKING_EXTRUDER_SOLENOIDS_DELAY);
#endif
}
bool extruder_parked = true, do_solenoid_activation = true;
// Modifies tool_change() behavior based on homing side
bool parking_extruder_unpark_after_homing(const uint8_t final_tool, bool homed_towards_final_tool) {
do_solenoid_activation = false; // Tell parking_extruder_tool_change to skip solenoid activation
if (!extruder_parked) return false; // nothing to do
if (homed_towards_final_tool) {
pe_solenoid_magnet_off(1 - final_tool);
DEBUG_ECHOLNPGM("Disengage magnet", 1 - final_tool);
pe_solenoid_magnet_on(final_tool);
DEBUG_ECHOLNPGM("Engage magnet", final_tool);
parking_extruder_set_parked(false);
return false;
}
return true;
}
inline void parking_extruder_tool_change(const uint8_t new_tool, bool no_move) {
if (!no_move) {
constexpr float parkingposx[] = PARKING_EXTRUDER_PARKING_X;
#if HAS_HOTEND_OFFSET
const float x_offset = hotend_offset[active_extruder].x;
#else
constexpr float x_offset = 0;
#endif
const float midpos = (parkingposx[0] + parkingposx[1]) * 0.5f + x_offset,
grabpos = parkingposx[new_tool] + (new_tool ? PARKING_EXTRUDER_GRAB_DISTANCE : -(PARKING_EXTRUDER_GRAB_DISTANCE)) + x_offset;
/**
* 1. Move to park position of old extruder
* 2. Disengage magnetic field, wait for delay
* 3. Move near new extruder
* 4. Engage magnetic field for new extruder
* 5. Move to parking incl. offset of new extruder
* 6. Lower Z-Axis
*/
// STEP 1
DEBUG_POS("Start PE Tool-Change", current_position);
// Don't park the active_extruder unless unparked
if (!extruder_parked) {
current_position.x = parkingposx[active_extruder] + x_offset;
DEBUG_ECHOLNPGM("(1) Park extruder ", active_extruder);
DEBUG_POS("Moving ParkPos", current_position);
fast_line_to_current(X_AXIS);
// STEP 2
planner.synchronize();
DEBUG_ECHOLNPGM("(2) Disengage magnet");
pe_solenoid_magnet_off(active_extruder);
// STEP 3
current_position.x += active_extruder ? -10 : 10; // move 10mm away from parked extruder
DEBUG_ECHOLNPGM("(3) Move near new extruder");
DEBUG_POS("Move away from parked extruder", current_position);
fast_line_to_current(X_AXIS);
}
// STEP 4
planner.synchronize();
DEBUG_ECHOLNPGM("(4) Engage magnetic field");
// Just save power for inverted magnets
TERN_(PARKING_EXTRUDER_SOLENOIDS_INVERT, pe_solenoid_magnet_on(active_extruder));
pe_solenoid_magnet_on(new_tool);
// STEP 5
current_position.x = grabpos + (new_tool ? -10 : 10);
fast_line_to_current(X_AXIS);
current_position.x = grabpos;
DEBUG_SYNCHRONIZE();
DEBUG_POS("(5) Unpark extruder", current_position);
slow_line_to_current(X_AXIS);
// STEP 6
current_position.x = DIFF_TERN(HAS_HOTEND_OFFSET, midpos, hotend_offset[new_tool].x);
DEBUG_SYNCHRONIZE();
DEBUG_POS("(6) Move midway between hotends", current_position);
fast_line_to_current(X_AXIS);
planner.synchronize(); // Always sync the final move
DEBUG_POS("PE Tool-Change done.", current_position);
parking_extruder_set_parked(false);
}
else if (do_solenoid_activation) {
// Deactivate current extruder solenoid
pe_solenoid_set_pin_state(active_extruder, !PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE);
// Engage new extruder magnetic field
pe_solenoid_set_pin_state(new_tool, PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE);
}
do_solenoid_activation = true; // Activate solenoid for subsequent tool_change()
}
#endif // PARKING_EXTRUDER
#if ENABLED(TOOL_SENSOR)
bool tool_sensor_disabled; // = false
// Return a bitmask of tool sensor states
inline uint8_t poll_tool_sensor_pins() {
return (0
#if PIN_EXISTS(TOOL_SENSOR1)
| (READ(TOOL_SENSOR1_PIN) << 0)
#endif
#if PIN_EXISTS(TOOL_SENSOR2)
| (READ(TOOL_SENSOR2_PIN) << 1)
#endif
#if PIN_EXISTS(TOOL_SENSOR3)
| (READ(TOOL_SENSOR3_PIN) << 2)
#endif
#if PIN_EXISTS(TOOL_SENSOR4)
| (READ(TOOL_SENSOR4_PIN) << 3)
#endif
#if PIN_EXISTS(TOOL_SENSOR5)
| (READ(TOOL_SENSOR5_PIN) << 4)
#endif
#if PIN_EXISTS(TOOL_SENSOR6)
| (READ(TOOL_SENSOR6_PIN) << 5)
#endif
#if PIN_EXISTS(TOOL_SENSOR7)
| (READ(TOOL_SENSOR7_PIN) << 6)
#endif
#if PIN_EXISTS(TOOL_SENSOR8)
| (READ(TOOL_SENSOR8_PIN) << 7)
#endif
);
}
uint8_t check_tool_sensor_stats(const uint8_t tool_index, const bool kill_on_error/*=false*/, const bool disable/*=false*/) {
static uint8_t sensor_tries; // = 0
for (;;) {
if (poll_tool_sensor_pins() == _BV(tool_index)) {
sensor_tries = 0;
return tool_index;
}
else if (kill_on_error && (!tool_sensor_disabled || disable)) {
sensor_tries++;
if (sensor_tries > 10) kill(F("Tool Sensor error"));
safe_delay(5);
}
else {
sensor_tries++;
if (sensor_tries > 10) return -1;
safe_delay(5);
}
}
}
#endif // TOOL_SENSOR
#if ENABLED(SWITCHING_TOOLHEAD)
inline void switching_toolhead_lock(const bool locked) {
#ifdef SWITCHING_TOOLHEAD_SERVO_ANGLES
const uint16_t swt_angles[2] = SWITCHING_TOOLHEAD_SERVO_ANGLES;
servo[SWITCHING_TOOLHEAD_SERVO_NR].move(swt_angles[locked ? 0 : 1]);
#elif PIN_EXISTS(SWT_SOLENOID)
OUT_WRITE(SWT_SOLENOID_PIN, locked);
gcode.dwell(10);
#else
#error "No toolhead locking mechanism configured."
#endif
}
void swt_init() {
switching_toolhead_lock(true);
#if ENABLED(TOOL_SENSOR)
// Init tool sensors
#if PIN_EXISTS(TOOL_SENSOR1)
SET_INPUT_PULLUP(TOOL_SENSOR1_PIN);
#endif
#if PIN_EXISTS(TOOL_SENSOR2)
SET_INPUT_PULLUP(TOOL_SENSOR2_PIN);
#endif
#if PIN_EXISTS(TOOL_SENSOR3)
SET_INPUT_PULLUP(TOOL_SENSOR3_PIN);
#endif
#if PIN_EXISTS(TOOL_SENSOR4)
SET_INPUT_PULLUP(TOOL_SENSOR4_PIN);
#endif
#if PIN_EXISTS(TOOL_SENSOR5)
SET_INPUT_PULLUP(TOOL_SENSOR5_PIN);
#endif
#if PIN_EXISTS(TOOL_SENSOR6)
SET_INPUT_PULLUP(TOOL_SENSOR6_PIN);
#endif
#if PIN_EXISTS(TOOL_SENSOR7)
SET_INPUT_PULLUP(TOOL_SENSOR7_PIN);
#endif
#if PIN_EXISTS(TOOL_SENSOR8)
SET_INPUT_PULLUP(TOOL_SENSOR8_PIN);
#endif
if (check_tool_sensor_stats(0)) {
LCD_MESSAGE_F("TC error");
switching_toolhead_lock(false);
while (check_tool_sensor_stats(0)) { /* nada */ }
switching_toolhead_lock(true);
}
LCD_MESSAGE_F("TC Success");
#endif // TOOL_SENSOR
}
inline void switching_toolhead_tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
if (no_move) return;
constexpr float toolheadposx[] = SWITCHING_TOOLHEAD_X_POS;
const float placexpos = toolheadposx[active_extruder],
grabxpos = toolheadposx[new_tool];
(void)check_tool_sensor_stats(active_extruder, true);
/**
* 1. Move to switch position of current toolhead
* 2. Unlock tool and drop it in the dock
* 3. Move to the new toolhead
* 4. Grab and lock the new toolhead
*/
// 1. Move to switch position of current toolhead
DEBUG_POS("Start ST Tool-Change", current_position);
current_position.x = placexpos;
DEBUG_ECHOLNPGM("(1) Place old tool ", active_extruder);
DEBUG_POS("Move X SwitchPos", current_position);
fast_line_to_current(X_AXIS);
current_position.y = SWITCHING_TOOLHEAD_Y_POS - (SWITCHING_TOOLHEAD_Y_SECURITY);
DEBUG_SYNCHRONIZE();
DEBUG_POS("Move Y SwitchPos + Security", current_position);
slow_line_to_current(Y_AXIS);
// 2. Unlock tool and drop it in the dock
TERN_(TOOL_SENSOR, tool_sensor_disabled = true);
planner.synchronize();
DEBUG_ECHOLNPGM("(2) Unlock and Place Toolhead");
switching_toolhead_lock(false);
safe_delay(500);
current_position.y = SWITCHING_TOOLHEAD_Y_POS;
DEBUG_POS("Move Y SwitchPos", current_position);
slow_line_to_current(Y_AXIS);
// Wait for move to complete, then another 0.2s
planner.synchronize();
safe_delay(200);
current_position.y -= SWITCHING_TOOLHEAD_Y_CLEAR;
DEBUG_POS("Move back Y clear", current_position);
slow_line_to_current(Y_AXIS); // move away from docked toolhead
(void)check_tool_sensor_stats(active_extruder);
// 3. Move to the new toolhead
current_position.x = grabxpos;
DEBUG_SYNCHRONIZE();
DEBUG_ECHOLNPGM("(3) Move to new toolhead position");
DEBUG_POS("Move to new toolhead X", current_position);
fast_line_to_current(X_AXIS);
current_position.y = SWITCHING_TOOLHEAD_Y_POS - (SWITCHING_TOOLHEAD_Y_SECURITY);
DEBUG_SYNCHRONIZE();
DEBUG_POS("Move Y SwitchPos + Security", current_position);
slow_line_to_current(Y_AXIS);
// 4. Grab and lock the new toolhead
current_position.y = SWITCHING_TOOLHEAD_Y_POS;
DEBUG_SYNCHRONIZE();
DEBUG_ECHOLNPGM("(4) Grab and lock new toolhead");
DEBUG_POS("Move Y SwitchPos", current_position);
slow_line_to_current(Y_AXIS);
// Wait for move to finish, pause 0.2s, move servo, pause 0.5s
planner.synchronize();
safe_delay(200);
(void)check_tool_sensor_stats(new_tool, true, true);
switching_toolhead_lock(true);
safe_delay(500);
current_position.y -= SWITCHING_TOOLHEAD_Y_CLEAR;
DEBUG_POS("Move back Y clear", current_position);
slow_line_to_current(Y_AXIS); // Move away from docked toolhead
planner.synchronize(); // Always sync the final move
(void)check_tool_sensor_stats(new_tool, true, true);
DEBUG_POS("ST Tool-Change done.", current_position);
}
#elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD)
inline void magnetic_switching_toolhead_tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
if (no_move) return;
constexpr float toolheadposx[] = SWITCHING_TOOLHEAD_X_POS,
toolheadclearx[] = SWITCHING_TOOLHEAD_X_SECURITY;
const float placexpos = toolheadposx[active_extruder],
placexclear = toolheadclearx[active_extruder],
grabxpos = toolheadposx[new_tool],
grabxclear = toolheadclearx[new_tool];
/**
* 1. Move to switch position of current toolhead
* 2. Release and place toolhead in the dock
* 3. Move to the new toolhead
* 4. Grab the new toolhead and move to security position
*/
DEBUG_POS("Start MST Tool-Change", current_position);
// 1. Move to switch position current toolhead
current_position.y = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR;
SERIAL_ECHOLNPGM("(1) Place old tool ", active_extruder);
DEBUG_POS("Move Y SwitchPos + Security", current_position);
fast_line_to_current(Y_AXIS);
current_position.x = placexclear;
DEBUG_SYNCHRONIZE();
DEBUG_POS("Move X SwitchPos + Security", current_position);
fast_line_to_current(X_AXIS);
current_position.y = SWITCHING_TOOLHEAD_Y_POS;
DEBUG_SYNCHRONIZE();
DEBUG_POS("Move Y SwitchPos", current_position);
fast_line_to_current(Y_AXIS);
current_position.x = placexpos;
DEBUG_SYNCHRONIZE();
DEBUG_POS("Move X SwitchPos", current_position);
line_to_current_position(planner.settings.max_feedrate_mm_s[X_AXIS] * 0.25f);
// 2. Release and place toolhead in the dock
DEBUG_SYNCHRONIZE();
DEBUG_ECHOLNPGM("(2) Release and Place Toolhead");
current_position.y = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_RELEASE;
DEBUG_POS("Move Y SwitchPos + Release", current_position);
line_to_current_position(planner.settings.max_feedrate_mm_s[Y_AXIS] * 0.1f);
current_position.y = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_SECURITY;
DEBUG_SYNCHRONIZE();
DEBUG_POS("Move Y SwitchPos + Security", current_position);
line_to_current_position(planner.settings.max_feedrate_mm_s[Y_AXIS]);
// 3. Move to new toolhead position
DEBUG_SYNCHRONIZE();
DEBUG_ECHOLNPGM("(3) Move to new toolhead position");
current_position.x = grabxpos;
DEBUG_POS("Move to new toolhead X", current_position);
fast_line_to_current(X_AXIS);
// 4. Grab the new toolhead and move to security position
DEBUG_SYNCHRONIZE();
DEBUG_ECHOLNPGM("(4) Grab new toolhead, move to security position");
current_position.y = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_RELEASE;
DEBUG_POS("Move Y SwitchPos + Release", current_position);
line_to_current_position(planner.settings.max_feedrate_mm_s[Y_AXIS]);
current_position.y = SWITCHING_TOOLHEAD_Y_POS;
DEBUG_SYNCHRONIZE();
DEBUG_POS("Move Y SwitchPos", current_position);
_line_to_current(Y_AXIS, 0.2f);
#if ENABLED(PRIME_BEFORE_REMOVE) && (SWITCHING_TOOLHEAD_PRIME_MM || SWITCHING_TOOLHEAD_RETRACT_MM)
#if SWITCHING_TOOLHEAD_PRIME_MM
current_position.e += SWITCHING_TOOLHEAD_PRIME_MM;
planner.buffer_line(current_position, MMM_TO_MMS(SWITCHING_TOOLHEAD_PRIME_FEEDRATE), new_tool);
#endif
#if SWITCHING_TOOLHEAD_RETRACT_MM
current_position.e -= SWITCHING_TOOLHEAD_RETRACT_MM;
planner.buffer_line(current_position, MMM_TO_MMS(SWITCHING_TOOLHEAD_RETRACT_FEEDRATE), new_tool);
#endif
#else
planner.synchronize();
safe_delay(100); // Give switch time to settle
#endif
current_position.x = grabxclear;
DEBUG_POS("Move to new toolhead X + Security", current_position);
_line_to_current(X_AXIS, 0.1f);
planner.synchronize();
safe_delay(100); // Give switch time to settle
current_position.y += SWITCHING_TOOLHEAD_Y_CLEAR;
DEBUG_POS("Move back Y clear", current_position);
fast_line_to_current(Y_AXIS); // move away from docked toolhead
planner.synchronize(); // Always sync last tool-change move
DEBUG_POS("MST Tool-Change done.", current_position);
}
#elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
inline void est_activate_solenoid() { OUT_WRITE(SOL0_PIN, HIGH); }
inline void est_deactivate_solenoid() { OUT_WRITE(SOL0_PIN, LOW); }
void est_init() { est_activate_solenoid(); }
inline void em_switching_toolhead_tool_change(const uint8_t new_tool, bool no_move) {
if (no_move) return;
constexpr float toolheadposx[] = SWITCHING_TOOLHEAD_X_POS;
const float placexpos = toolheadposx[active_extruder],
grabxpos = toolheadposx[new_tool];
const xyz_pos_t &hoffs = hotend_offset[active_extruder];
/**
* 1. Raise Z-Axis to give enough clearance
* 2. Move to position near active extruder parking
* 3. Move gently to park position of active extruder
* 4. Disengage magnetic field, wait for delay
* 5. Leave extruder and move to position near new extruder parking
* 6. Move gently to park position of new extruder
* 7. Engage magnetic field for new extruder parking
* 8. Unpark extruder
* 9. Apply Z hotend offset to current position
*/
DEBUG_POS("Start EMST Tool-Change", current_position);
// 1. Raise Z-Axis to give enough clearance
current_position.z += SWITCHING_TOOLHEAD_Z_HOP;
DEBUG_POS("(1) Raise Z-Axis ", current_position);
fast_line_to_current(Z_AXIS);
// 2. Move to position near active extruder parking
DEBUG_SYNCHRONIZE();
DEBUG_ECHOLNPGM("(2) Move near active extruder parking", active_extruder);
DEBUG_POS("Moving ParkPos", current_position);
current_position.set(hoffs.x + placexpos,
hoffs.y + SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR);
fast_line_to_current(X_AXIS);
// 3. Move gently to park position of active extruder
DEBUG_SYNCHRONIZE();
SERIAL_ECHOLNPGM("(3) Move gently to park position of active extruder", active_extruder);
DEBUG_POS("Moving ParkPos", current_position);
current_position.y -= SWITCHING_TOOLHEAD_Y_CLEAR;
slow_line_to_current(Y_AXIS);
// 4. Disengage magnetic field, wait for delay
planner.synchronize();
DEBUG_ECHOLNPGM("(4) Disengage magnet");
est_deactivate_solenoid();
// 5. Leave extruder and move to position near new extruder parking
DEBUG_ECHOLNPGM("(5) Move near new extruder parking");
DEBUG_POS("Moving ParkPos", current_position);
current_position.y += SWITCHING_TOOLHEAD_Y_CLEAR;
slow_line_to_current(Y_AXIS);
current_position.set(hoffs.x + grabxpos,
hoffs.y + SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR);
fast_line_to_current(X_AXIS);
// 6. Move gently to park position of new extruder
current_position.y -= SWITCHING_TOOLHEAD_Y_CLEAR;
if (DEBUGGING(LEVELING)) {
planner.synchronize();
DEBUG_ECHOLNPGM("(6) Move near new extruder");
}
slow_line_to_current(Y_AXIS);
// 7. Engage magnetic field for new extruder parking
DEBUG_SYNCHRONIZE();
DEBUG_ECHOLNPGM("(7) Engage magnetic field");
est_activate_solenoid();
// 8. Unpark extruder
current_position.y += SWITCHING_TOOLHEAD_Y_CLEAR;
DEBUG_ECHOLNPGM("(8) Unpark extruder");
slow_line_to_current(X_AXIS);
planner.synchronize(); // Always sync the final move
// 9. Apply Z hotend offset to current position
DEBUG_POS("(9) Applying Z-offset", current_position);
current_position.z += hoffs.z - hotend_offset[new_tool].z;
DEBUG_POS("EMST Tool-Change done.", current_position);
}
#endif // ELECTROMAGNETIC_SWITCHING_TOOLHEAD
#if HAS_EXTRUDERS
inline void invalid_extruder_error(const uint8_t e) {
SERIAL_ECHO_START();
SERIAL_CHAR('T'); SERIAL_ECHO(e);
SERIAL_CHAR(' '); SERIAL_ECHOLNPGM(STR_INVALID_EXTRUDER);
}
#endif
#if ENABLED(DUAL_X_CARRIAGE)
/**
* @brief Dual X Tool Change
* @details Change tools, with extra behavior based on current mode
*
* @param new_tool Tool index to activate
* @param no_move Flag indicating no moves should take place
*/
inline void dualx_tool_change(const uint8_t new_tool, bool &no_move) {
DEBUG_ECHOPGM("Dual X Carriage Mode ");
switch (dual_x_carriage_mode) {
case DXC_FULL_CONTROL_MODE: DEBUG_ECHOLNPGM("FULL_CONTROL"); break;
case DXC_AUTO_PARK_MODE: DEBUG_ECHOLNPGM("AUTO_PARK"); break;
case DXC_DUPLICATION_MODE: DEBUG_ECHOLNPGM("DUPLICATION"); break;
case DXC_MIRRORED_MODE: DEBUG_ECHOLNPGM("MIRRORED"); break;
}
// Get the home position of the currently-active tool
const float xhome = x_home_pos(active_extruder);
if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE // If Auto-Park mode is enabled
&& IsRunning() && !no_move // ...and movement is permitted
&& (delayed_move_time || current_position.x != xhome) // ...and delayed_move_time is set OR not "already parked"...
) {
DEBUG_ECHOLNPGM("MoveX to ", xhome);
current_position.x = xhome;
line_to_current_position(planner.settings.max_feedrate_mm_s[X_AXIS]); // Park the current head
planner.synchronize();
}
// Activate the new extruder ahead of calling set_axis_is_at_home!
active_extruder = new_tool;
// This function resets the max/min values - the current position may be overwritten below.
set_axis_is_at_home(X_AXIS);
DEBUG_POS("New Extruder", current_position);
switch (dual_x_carriage_mode) {
case DXC_FULL_CONTROL_MODE:
// New current position is the position of the activated extruder
current_position.x = inactive_extruder_x;
// Save the inactive extruder's position (from the old current_position)
inactive_extruder_x = destination.x;
DEBUG_ECHOLNPGM("DXC Full Control curr.x=", current_position.x, " dest.x=", destination.x);
break;
case DXC_AUTO_PARK_MODE:
idex_set_parked();
break;
default:
break;
}
// Ensure X axis DIR pertains to the correct carriage
stepper.apply_directions();
DEBUG_ECHOLNPGM("Active extruder parked: ", active_extruder_parked ? "yes" : "no");
DEBUG_POS("New extruder (parked)", current_position);
}
#endif // DUAL_X_CARRIAGE
/**
* Prime active tool using TOOLCHANGE_FILAMENT_SWAP settings
*/
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define DEBUG_OUT ENABLED(DEBUG_TOOLCHANGE_FILAMENT_SWAP)
#include "../core/debug_out.h"
// Define any variables required
static Flags<EXTRUDERS> extruder_was_primed; // Extruders primed status
#if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED)
bool enable_first_prime; // As set by M217 V
#endif
// Cool down with fan
inline void filament_swap_cooling() {
#if HAS_FAN && TOOLCHANGE_FS_FAN >= 0
thermalManager.fan_speed[TOOLCHANGE_FS_FAN] = toolchange_settings.fan_speed;
gcode.dwell(SEC_TO_MS(toolchange_settings.fan_time));
thermalManager.fan_speed[TOOLCHANGE_FS_FAN] = FAN_OFF_PWM;
#endif
}
/**
* Check if too cold to move the specified tool
*
* Returns TRUE if too cold to move (also echos message: STR_ERR_HOTEND_TOO_COLD)
* Returns FALSE if able to move.
*/
bool too_cold(uint8_t toolID){
if (!DEBUGGING(DRYRUN) && thermalManager.targetTooColdToExtrude(toolID)) {
SERIAL_ECHO_MSG(STR_ERR_HOTEND_TOO_COLD);
return true;
}
return false;
}
/**
* Cutting recovery -- Recover from cutting retraction that occurs at the end of nozzle priming
*
* If the active_extruder is up to temp (!too_cold):
* Extrude filament distance = toolchange_settings.extra_resume + toolchange_settings.wipe_retract
* current_position.e = e;
* sync_plan_position_e();
*/
void extruder_cutting_recover(const_float_t e) {
if (too_cold(active_extruder)) return;
const float dist = toolchange_settings.extra_resume + toolchange_settings.wipe_retract;
DEBUG_ECHOLNPGM("Performing Cutting Recover | Distance: ", dist, " | Speed: ", MMM_TO_MMS(toolchange_settings.unretract_speed), "mm/s");
unscaled_e_move(dist, MMM_TO_MMS(toolchange_settings.unretract_speed));
DEBUG_ECHOLNPGM("Set E position: ", e);
current_position.e = e;
sync_plan_position_e(); // Resume new E Position
}
/**
* Prime the currently selected extruder (Filament loading only)
* Leave the E position unchanged so subsequent extrusion works properly.
*
* If too_cold(toolID) returns TRUE -> returns without moving extruder.
* Extruders filament = swap_length + extra prime, then performs cutting retraction if enabled.
* If cooling fan is enabled, calls filament_swap_cooling();
*/
void extruder_prime() {
if (too_cold(active_extruder)) {
DEBUG_ECHOLNPGM("Priming Aborted - Nozzle Too Cold!");
return; // Extruder too cold to prime
}
feedRate_t fr_mm_s = MMM_TO_MMS(toolchange_settings.unretract_speed); // Set default speed for unretract
const float resume_current_e = current_position.e;
#if ENABLED(TOOLCHANGE_FS_SLOW_FIRST_PRIME)
/**
* Perform first unretract movement at the slower Prime_Speed to avoid breakage on first prime
*/
static Flags<EXTRUDERS> extruder_did_first_prime; // Extruders first priming status
if (!extruder_did_first_prime[active_extruder]) {
extruder_did_first_prime.set(active_extruder); // Log first prime complete
// new nozzle - prime at user-specified speed.
const feedRate_t prime_mm_s = MMM_TO_MMS(toolchange_settings.prime_speed);
DEBUG_ECHOLNPGM("First time priming T", active_extruder, ", reducing speed from ", fr_mm_s, " to ", prime_mm_s, "mm/s");
fr_mm_s = prime_mm_s;
unscaled_e_move(0, fr_mm_s); // Init planner with 0 length move
}
#endif
// Calculate and perform the priming distance
if (toolchange_settings.extra_prime >= 0) {
// Positive extra_prime value
// - Return filament at speed (fr_mm_s) then extra_prime at prime speed
DEBUG_ECHOLNPGM("Loading Filament for T", active_extruder, " | Distance: ", toolchange_settings.swap_length, " | Speed: ", fr_mm_s, "mm/s");
unscaled_e_move(toolchange_settings.swap_length, fr_mm_s); // Prime (Unretract) filament by extruding equal to Swap Length (Unretract)
if (toolchange_settings.extra_prime > 0) {
DEBUG_ECHOLNPGM("Performing Extra Priming for T", active_extruder, " | Distance: ", toolchange_settings.extra_prime, " | Speed: ", MMM_TO_MMS(toolchange_settings.prime_speed), "mm/s");
unscaled_e_move(toolchange_settings.extra_prime, MMM_TO_MMS(toolchange_settings.prime_speed)); // Extra Prime Distance
}
}
else {
// Negative extra_prime value
// - Unretract distance (swap length) is reduced by the value of extra_prime
const float eswap = toolchange_settings.swap_length + toolchange_settings.extra_prime;
DEBUG_ECHOLNPGM("Negative ExtraPrime value - Swap Return Length has been reduced from ", toolchange_settings.swap_length, " to ", eswap);
DEBUG_ECHOLNPGM("Loading Filament for T", active_extruder, " | Distance: ", eswap, " | Speed: ", fr_mm_s, "mm/s");
unscaled_e_move(eswap, fr_mm_s);
}
extruder_was_primed.set(active_extruder); // Log that this extruder has been primed
// Cutting retraction
#if TOOLCHANGE_FS_WIPE_RETRACT
DEBUG_ECHOLNPGM("Performing Cutting Retraction | Distance: ", -toolchange_settings.wipe_retract, " | Speed: ", MMM_TO_MMS(toolchange_settings.retract_speed), "mm/s");
unscaled_e_move(-toolchange_settings.wipe_retract, MMM_TO_MMS(toolchange_settings.retract_speed));
#endif
// Leave E unchanged when priming
current_position.e = resume_current_e;
sync_plan_position_e();
// Cool down with fan
filament_swap_cooling();
}
/**
* Sequence to Prime the currently selected extruder
* Raise Z, move the ToolChange_Park if enabled, prime the extruder, move back.
*/
void tool_change_prime() {
DEBUG_SECTION(tcp, "tool_change_prime", true);
if (!too_cold(active_extruder)) {
destination = current_position; // Remember the old position
const bool ok = TERN0(TOOLCHANGE_PARK, all_axes_homed() && toolchange_settings.enable_park);
#if HAS_FAN && TOOLCHANGE_FS_FAN >= 0
// Store and stop fan. Restored on any exit.
REMEMBER(fan, thermalManager.fan_speed[TOOLCHANGE_FS_FAN], 0);
#endif
// Z raise
if (ok) {
// Do a small lift to avoid the workpiece in the move back (below)
current_position.z += toolchange_settings.z_raise;
TERN_(HAS_SOFTWARE_ENDSTOPS, NOMORE(current_position.z, soft_endstop.max.z));
fast_line_to_current(Z_AXIS);
planner.synchronize();
}
// Park
#if ENABLED(TOOLCHANGE_PARK)
if (ok) {
IF_DISABLED(TOOLCHANGE_PARK_Y_ONLY, current_position.x = toolchange_settings.change_point.x);
IF_DISABLED(TOOLCHANGE_PARK_X_ONLY, current_position.y = toolchange_settings.change_point.y);
#if NONE(TOOLCHANGE_PARK_X_ONLY, TOOLCHANGE_PARK_Y_ONLY)
SECONDARY_AXIS_CODE(
current_position.i = toolchange_settings.change_point.i,
current_position.j = toolchange_settings.change_point.j,
current_position.k = toolchange_settings.change_point.k,
current_position.u = toolchange_settings.change_point.u,
current_position.v = toolchange_settings.change_point.v,
current_position.w = toolchange_settings.change_point.w
);
#endif
planner.buffer_line(current_position, MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE), active_extruder);
planner.synchronize();
}
#endif
// Prime without changing E
extruder_prime();
// Move back
#if ENABLED(TOOLCHANGE_PARK)
if (ok) {
#if ENABLED(TOOLCHANGE_NO_RETURN)
destination.x = current_position.x;
destination.y = current_position.y;
#endif
do_blocking_move_to_xy(destination, MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE));
do_blocking_move_to_z(destination.z, planner.settings.max_feedrate_mm_s[Z_AXIS]);
planner.synchronize();
}
#endif
// Clone previous position
extruder_cutting_recover(destination.e); // Cutting recover
// Retract if previously retracted
#if ENABLED(FWRETRACT)
if (fwretract.retracted[active_extruder])
unscaled_e_move(-fwretract.settings.retract_length, fwretract.settings.retract_feedrate_mm_s);
#endif
// If resume_position is negative
if (current_position.e < 0) unscaled_e_move(current_position.e, MMM_TO_MMS(toolchange_settings.retract_speed));
planner.synchronize();
planner.set_e_position_mm(current_position.e); // Extruder primed and ready
}
}
#endif // TOOLCHANGE_FILAMENT_SWAP
/**
* Perform a tool-change, which may result in moving the
* previous tool out of the way and the new tool into place.
*/
void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
if (TERN0(MAGNETIC_SWITCHING_TOOLHEAD, new_tool == active_extruder))
return;
#if ENABLED(MIXING_EXTRUDER)
UNUSED(no_move);
if (new_tool >= MIXING_VIRTUAL_TOOLS)
return invalid_extruder_error(new_tool);
#if MIXING_VIRTUAL_TOOLS > 1
// T0-Tnnn: Switch virtual tool by changing the index to the mix
mixer.T(new_tool);
#endif
#elif HAS_PRUSA_MMU2
UNUSED(no_move);
mmu2.tool_change(new_tool);
#elif EXTRUDERS == 0
// Nothing to do
UNUSED(new_tool); UNUSED(no_move);
#elif EXTRUDERS < 2
UNUSED(no_move);
if (new_tool) invalid_extruder_error(new_tool);
return;
#elif HAS_MULTI_EXTRUDER
planner.synchronize();
#if ENABLED(DUAL_X_CARRIAGE) // Only T0 allowed if the Printer is in DXC_DUPLICATION_MODE or DXC_MIRRORED_MODE
if (new_tool != 0 && idex_is_duplicating())
return invalid_extruder_error(new_tool);
#endif
if (new_tool >= EXTRUDERS)
return invalid_extruder_error(new_tool);
if (!no_move && homing_needed()) {
no_move = true;
DEBUG_ECHOLNPGM("No move (not homed)");
}
TERN_(HAS_MARLINUI_MENU, if (!no_move) ui.update());
#if ENABLED(DUAL_X_CARRIAGE)
const bool idex_full_control = dual_x_carriage_mode == DXC_FULL_CONTROL_MODE;
#else
constexpr bool idex_full_control = false;
#endif
const uint8_t old_tool = active_extruder;
const bool can_move_away = !no_move && !idex_full_control;
#if ENABLED(AUTO_BED_LEVELING_UBL)
// Workaround for UBL mesh boundary, possibly?
TEMPORARY_BED_LEVELING_STATE(false);
#endif
// First tool priming. To prime again, reboot the machine. -- Should only occur for first T0 after powerup!
#if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED)
if (enable_first_prime && old_tool == 0 && new_tool == 0 && !extruder_was_primed[0]) {
tool_change_prime();
TERN_(TOOLCHANGE_FS_INIT_BEFORE_SWAP, toolchange_extruder_ready.set(old_tool)); // Primed and initialized
}
#endif
if (new_tool != old_tool || TERN0(PARKING_EXTRUDER, extruder_parked)) { // PARKING_EXTRUDER may need to attach old_tool when homing
destination = current_position;
#if ALL(TOOLCHANGE_FILAMENT_SWAP, HAS_FAN) && TOOLCHANGE_FS_FAN >= 0
// Store and stop fan. Restored on any exit.
REMEMBER(fan, thermalManager.fan_speed[TOOLCHANGE_FS_FAN], 0);
#endif
// Z raise before retraction
#if ENABLED(TOOLCHANGE_ZRAISE_BEFORE_RETRACT) && !HAS_SWITCHING_NOZZLE
if (can_move_away && TERN1(TOOLCHANGE_PARK, toolchange_settings.enable_park)) {
// Do a small lift to avoid the workpiece in the move back (below)
current_position.z += toolchange_settings.z_raise;
TERN_(HAS_SOFTWARE_ENDSTOPS, NOMORE(current_position.z, soft_endstop.max.z));
fast_line_to_current(Z_AXIS);
planner.synchronize();
}
#endif
// Unload / Retract
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
const bool should_swap = can_move_away && toolchange_settings.swap_length;
if (should_swap) {
if (too_cold(old_tool)) {
// If SingleNozzle setup is too cold, unable to perform tool_change.
if (ENABLED(SINGLENOZZLE)) { active_extruder = new_tool; return; }
}
else if (extruder_was_primed[old_tool]) {
// Retract the old extruder if it was previously primed
// To-Do: Should SingleNozzle always retract?
DEBUG_ECHOLNPGM("Retracting Filament for T", old_tool, ". | Distance: ", toolchange_settings.swap_length, " | Speed: ", MMM_TO_MMS(toolchange_settings.retract_speed), "mm/s");
unscaled_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed));
}
}
#endif
TERN_(SWITCHING_NOZZLE_TWO_SERVOS, raise_nozzle(old_tool));
REMEMBER(fr, feedrate_mm_s, XY_PROBE_FEEDRATE_MM_S);
#if HAS_SOFTWARE_ENDSTOPS
#if HAS_HOTEND_OFFSET
#define _EXT_ARGS , old_tool, new_tool
#else
#define _EXT_ARGS
#endif
update_software_endstops(X_AXIS _EXT_ARGS);
#if DISABLED(DUAL_X_CARRIAGE)
update_software_endstops(Y_AXIS _EXT_ARGS);
update_software_endstops(Z_AXIS _EXT_ARGS);
#endif
#endif
#if NONE(TOOLCHANGE_ZRAISE_BEFORE_RETRACT, HAS_SWITCHING_NOZZLE)
if (can_move_away && TERN1(TOOLCHANGE_PARK, toolchange_settings.enable_park)) {
// Do a small lift to avoid the workpiece in the move back (below)
current_position.z += toolchange_settings.z_raise;
TERN_(HAS_SOFTWARE_ENDSTOPS, NOMORE(current_position.z, soft_endstop.max.z));
fast_line_to_current(Z_AXIS);
}
#endif
// Toolchange park
#if ENABLED(TOOLCHANGE_PARK) && !HAS_SWITCHING_NOZZLE
if (can_move_away && toolchange_settings.enable_park) {
IF_DISABLED(TOOLCHANGE_PARK_Y_ONLY, current_position.x = toolchange_settings.change_point.x);
IF_DISABLED(TOOLCHANGE_PARK_X_ONLY, current_position.y = toolchange_settings.change_point.y);
#if NONE(TOOLCHANGE_PARK_X_ONLY, TOOLCHANGE_PARK_Y_ONLY)
SECONDARY_AXIS_CODE(
current_position.i = toolchange_settings.change_point.i,
current_position.j = toolchange_settings.change_point.j,
current_position.k = toolchange_settings.change_point.k,
current_position.u = toolchange_settings.change_point.u,
current_position.v = toolchange_settings.change_point.v,
current_position.w = toolchange_settings.change_point.w
);
#endif
planner.buffer_line(current_position, MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE), old_tool);
planner.synchronize();
}
#endif
#if HAS_HOTEND_OFFSET
xyz_pos_t diff = hotend_offset[new_tool] - hotend_offset[old_tool];
TERN_(DUAL_X_CARRIAGE, diff.x = 0);
#else
constexpr xyz_pos_t diff{0};
#endif
#if ENABLED(DUAL_X_CARRIAGE)
dualx_tool_change(new_tool, no_move);
#elif ENABLED(PARKING_EXTRUDER) // Dual Parking extruder
parking_extruder_tool_change(new_tool, no_move);
#elif ENABLED(MAGNETIC_PARKING_EXTRUDER) // Magnetic Parking extruder
magnetic_parking_extruder_tool_change(new_tool);
#elif ENABLED(SWITCHING_TOOLHEAD) // Switching Toolhead
switching_toolhead_tool_change(new_tool, no_move);
#elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) // Magnetic Switching Toolhead
magnetic_switching_toolhead_tool_change(new_tool, no_move);
#elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) // Magnetic Switching ToolChanger
em_switching_toolhead_tool_change(new_tool, no_move);
#elif ENABLED(SWITCHING_NOZZLE) && !SWITCHING_NOZZLE_TWO_SERVOS // Switching Nozzle (single servo)
// Raise by a configured distance to avoid workpiece, except with
// SWITCHING_NOZZLE_TWO_SERVOS, as both nozzles will lift instead.
if (!no_move) {
const float newz = current_position.z + _MAX(-diff.z, 0.0);
// Check if Z has space to compensate at least z_offset, and if not, just abort now
const float maxz = _MIN(TERN(HAS_SOFTWARE_ENDSTOPS, soft_endstop.max.z, Z_MAX_POS), Z_MAX_POS);
if (newz > maxz) return;
current_position.z = _MIN(newz + toolchange_settings.z_raise, maxz);
fast_line_to_current(Z_AXIS);
}
move_nozzle_servo(new_tool);
#elif ANY(MECHANICAL_SWITCHING_EXTRUDER, MECHANICAL_SWITCHING_NOZZLE)
if (!no_move) {
current_position.z = _MIN(current_position.z + toolchange_settings.z_raise, _MIN(TERN(HAS_SOFTWARE_ENDSTOPS, soft_endstop.max.z, Z_MAX_POS), Z_MAX_POS));
fast_line_to_current(Z_AXIS);
}
#endif
IF_DISABLED(DUAL_X_CARRIAGE, active_extruder = new_tool); // Set the new active extruder
TERN_(TOOL_SENSOR, tool_sensor_disabled = false);
(void)check_tool_sensor_stats(active_extruder, true);
// The newly-selected extruder XYZ is actually at...
DEBUG_ECHOLNPGM("Offset Tool XYZ by { ", diff.x, ", ", diff.y, ", ", diff.z, " }");
current_position += diff;
// Tell the planner the new "current position"
sync_plan_position();
#if ENABLED(DELTA)
//LOOP_NUM_AXES(i) update_software_endstops(i); // or modify the constrain function
const bool safe_to_move = current_position.z < delta_clip_start_height - 1;
#else
constexpr bool safe_to_move = true;
#endif
// Return to position and lower again
const bool should_move = safe_to_move && !no_move && IsRunning();
if (should_move) {
#if ANY(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN)
thermalManager.singlenozzle_change(old_tool, new_tool);
#endif
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
if (should_swap && !too_cold(active_extruder))
extruder_prime(); // Prime selected Extruder
#endif
// Prevent a move outside physical bounds
#if ENABLED(MAGNETIC_SWITCHING_TOOLHEAD)
// If the original position is within tool store area, go to X origin at once
if (destination.y < SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR) {
current_position.x = X_MIN_POS;
planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], new_tool);
planner.synchronize();
}
#else
apply_motion_limits(destination);
#endif
// Should the nozzle move back to the old position?
if (can_move_away) {
#if ENABLED(TOOLCHANGE_NO_RETURN)
// Just move back down
DEBUG_ECHOLNPGM("Move back Z only");
if (TERN1(TOOLCHANGE_PARK, toolchange_settings.enable_park))
do_blocking_move_to_z(destination.z, planner.settings.max_feedrate_mm_s[Z_AXIS]);
#else
// Move back to the original (or adjusted) position
DEBUG_POS("Move back", destination);
#if ENABLED(TOOLCHANGE_PARK)
if (toolchange_settings.enable_park) do_blocking_move_to_xy_z(destination, destination.z, MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE));
#else
do_blocking_move_to_xy(destination, planner.settings.max_feedrate_mm_s[X_AXIS]);
// If using MECHANICAL_SWITCHING extruder/nozzle, set HOTEND_OFFSET in Z axis after running EVENT_GCODE_TOOLCHANGE below.
#if NONE(MECHANICAL_SWITCHING_EXTRUDER, MECHANICAL_SWITCHING_NOZZLE)
do_blocking_move_to_z(destination.z, planner.settings.max_feedrate_mm_s[Z_AXIS]);
SECONDARY_AXIS_CODE(
do_blocking_move_to_i(destination.i, planner.settings.max_feedrate_mm_s[I_AXIS]),
do_blocking_move_to_j(destination.j, planner.settings.max_feedrate_mm_s[J_AXIS]),
do_blocking_move_to_k(destination.k, planner.settings.max_feedrate_mm_s[K_AXIS]),
do_blocking_move_to_u(destination.u, planner.settings.max_feedrate_mm_s[U_AXIS]),
do_blocking_move_to_v(destination.v, planner.settings.max_feedrate_mm_s[V_AXIS]),
do_blocking_move_to_w(destination.w, planner.settings.max_feedrate_mm_s[W_AXIS])
);
#endif
#endif
#endif
}
else DEBUG_ECHOLNPGM("Move back skipped");
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
if (should_swap && !too_cold(active_extruder)) {
extruder_cutting_recover(0); // New extruder primed and set to 0
// Restart Fan
#if HAS_FAN && TOOLCHANGE_FS_FAN >= 0
RESTORE(fan);
#endif
}
#endif
TERN_(DUAL_X_CARRIAGE, idex_set_parked(false));
}
#if HAS_SWITCHING_NOZZLE
// Move back down. (Including when the new tool is higher.)
if (!should_move)
do_blocking_move_to_z(destination.z, planner.settings.max_feedrate_mm_s[Z_AXIS]);
#endif
TERN_(SWITCHING_NOZZLE_TWO_SERVOS, lower_nozzle(new_tool));
} // (new_tool != old_tool)
planner.synchronize();
#if ENABLED(EXT_SOLENOID) && DISABLED(PARKING_EXTRUDER)
disable_all_solenoids();
enable_solenoid(active_extruder);
#endif
#if HAS_PRUSA_MMU1
if (new_tool >= E_STEPPERS) return invalid_extruder_error(new_tool);
select_multiplexed_stepper(new_tool);
#endif
#if DO_SWITCH_EXTRUDER
planner.synchronize();
move_extruder_servo(active_extruder);
#endif
TERN_(HAS_FANMUX, fanmux_switch(active_extruder));
if (ENABLED(EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN) || !no_move) {
#if ANY(TC_GCODE_USE_GLOBAL_X, TC_GCODE_USE_GLOBAL_Y, TC_GCODE_USE_GLOBAL_Z)
// G0/G1/G2/G3/G5 moves are relative to the active tool.
// Shift the workspace to make custom moves relative to T0.
xyz_pos_t old_workspace_offset;
if (new_tool > 0) {
old_workspace_offset = workspace_offset;
const xyz_pos_t &he = hotend_offset[new_tool];
TERN_(TC_GCODE_USE_GLOBAL_X, workspace_offset.x -= he.x);
TERN_(TC_GCODE_USE_GLOBAL_Y, workspace_offset.y -= he.y);
TERN_(TC_GCODE_USE_GLOBAL_Z, workspace_offset.z -= he.z);
}
#endif
switch (new_tool) {
default: break;
#ifdef EVENT_GCODE_TOOLCHANGE_T0
case 0: gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T0)); break;
#endif
#ifdef EVENT_GCODE_TOOLCHANGE_T1
case 1: gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T1)); break;
#endif
#ifdef EVENT_GCODE_TOOLCHANGE_T2
case 2: gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T2)); break;
#endif
#ifdef EVENT_GCODE_TOOLCHANGE_T3
case 3: gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T3)); break;
#endif
#ifdef EVENT_GCODE_TOOLCHANGE_T4
case 4: gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T4)); break;
#endif
#ifdef EVENT_GCODE_TOOLCHANGE_T5
case 5: gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T5)); break;
#endif
#ifdef EVENT_GCODE_TOOLCHANGE_T6
case 6: gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T6)); break;
#endif
#ifdef EVENT_GCODE_TOOLCHANGE_T7
case 7: gcode.process_subcommands_now(F(EVENT_GCODE_TOOLCHANGE_T7)); break;
#endif
}
#if ANY(TC_GCODE_USE_GLOBAL_X, TC_GCODE_USE_GLOBAL_Y, TC_GCODE_USE_GLOBAL_Z)
if (new_tool > 0) workspace_offset = old_workspace_offset;
#endif
// If using MECHANICAL_SWITCHING extruder/nozzle, set HOTEND_OFFSET in Z axis after running EVENT_GCODE_TOOLCHANGE
// so that nozzle does not lower below print surface if new hotend Z offset is higher than old hotend Z offset.
#if ANY(MECHANICAL_SWITCHING_EXTRUDER, MECHANICAL_SWITCHING_NOZZLE)
#if HAS_HOTEND_OFFSET
xyz_pos_t diff = hotend_offset[new_tool] - hotend_offset[old_tool];
TERN_(DUAL_X_CARRIAGE, diff.x = 0);
#else
constexpr xyz_pos_t diff{0};
#endif
if (!no_move) {
// Move to new hotend Z offset and reverse Z_RAISE
do_blocking_move_to_z(
_MIN(
_MAX((destination.z - diff.z) - toolchange_settings.z_raise,
_MAX(TERN(HAS_SOFTWARE_ENDSTOPS, soft_endstop.min.z, Z_MIN_POS), Z_MIN_POS)
),
_MIN(TERN(HAS_SOFTWARE_ENDSTOPS, soft_endstop.max.z, Z_MAX_POS), Z_MAX_POS)),
planner.settings.max_feedrate_mm_s[Z_AXIS]
);
}
#endif
#ifdef EVENT_GCODE_AFTER_TOOLCHANGE
if (TERN1(DUAL_X_CARRIAGE, dual_x_carriage_mode == DXC_AUTO_PARK_MODE))
gcode.process_subcommands_now(F(EVENT_GCODE_AFTER_TOOLCHANGE));
#endif
}
SERIAL_ECHOLNPGM(STR_ACTIVE_EXTRUDER, active_extruder);
#endif // HAS_MULTI_EXTRUDER
}
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
#define DEBUG_OUT ENABLED(DEBUG_TOOLCHANGE_MIGRATION_FEATURE)
#include "../core/debug_out.h"
bool extruder_migration() {
if (thermalManager.targetTooColdToExtrude(active_extruder)) {
DEBUG_ECHOLNPGM("Migration Source Too Cold");
return false;
}
// No auto-migration or specified target?
if (!migration.target && active_extruder >= migration.last) {
DEBUG_ECHO_MSG("No Migration Target");
DEBUG_ECHO_MSG("Target: ", migration.target, " Last: ", migration.last, " Active: ", active_extruder);
migration.automode = false;
return false;
}
// Migrate to a target or the next extruder
uint8_t migration_extruder = active_extruder;
if (migration.target) {
DEBUG_ECHOLNPGM("Migration using fixed target");
// Specified target ok?
const int16_t t = migration.target - 1;
if (t != active_extruder) migration_extruder = t;
}
else if (migration.automode && migration_extruder < migration.last && migration_extruder < EXTRUDERS - 1)
migration_extruder++;
if (migration_extruder == active_extruder) {
DEBUG_ECHOLNPGM("Migration source matches active");
return false;
}
// Migration begins
DEBUG_ECHOLNPGM("Beginning migration");
migration.in_progress = true; // Prevent runout script
planner.synchronize();
// Remember position before migration
const float resume_current_e = current_position.e;
// Migrate the flow
planner.set_flow(migration_extruder, planner.flow_percentage[active_extruder]);
// Migrate the retracted state
#if ENABLED(FWRETRACT)
fwretract.retracted.set(migration_extruder, fwretract.retracted[active_extruder]);
#endif
// Migrate the temperature to the new hotend
#if HAS_MULTI_HOTEND
thermalManager.setTargetHotend(thermalManager.degTargetHotend(active_extruder), migration_extruder);
TERN_(AUTOTEMP, planner.autotemp_update());
thermalManager.set_heating_message(0);
thermalManager.wait_for_hotend(active_extruder);
#endif
// Migrate Linear Advance K factor to the new extruder
TERN_(LIN_ADVANCE, planner.extruder_advance_K[active_extruder] = planner.extruder_advance_K[migration_extruder]);
// Temporary migration toolchange_settings restored on exit. i.e., before next tool_change().
#if defined(MIGRATION_FS_EXTRA_PRIME) \
|| defined(MIGRATION_FS_WIPE_RETRACT) \
|| defined(MIGRATION_FS_FAN_SPEED) \
|| defined(MIGRATION_FS_FAN_TIME) \
|| defined(MIGRATION_ZRAISE) \
|| defined(TOOLCHANGE_MIGRATION_DO_PARK)
REMEMBER(tmp_mig_settings, toolchange_settings);
#ifdef MIGRATION_FS_EXTRA_PRIME
toolchange_settings.extra_prime = MIGRATION_FS_EXTRA_PRIME;
#endif
#ifdef MIGRATION_FS_WIPE_RETRACT
toolchange_settings.wipe_retract = MIGRATION_FS_WIPE_RETRACT;
#endif
#ifdef MIGRATION_FS_FAN_SPEED
toolchange_settings.fan_speed = MIGRATION_FS_FAN_SPEED;
#endif
#ifdef MIGRATION_FS_FAN_TIME
toolchange_settings.fan_time = MIGRATION_FS_FAN_TIME;
#endif
#ifdef MIGRATION_ZRAISE
toolchange_settings.z_raise = MIGRATION_ZRAISE;
#endif
#ifdef TOOLCHANGE_MIGRATION_DO_PARK
toolchange_settings.enable_park = ENABLED(TOOLCHANGE_MIGRATION_DO_PARK);
#endif
#endif
// Perform the tool change
tool_change(migration_extruder);
// Retract if previously retracted
#if ENABLED(FWRETRACT)
if (fwretract.retracted[active_extruder])
unscaled_e_move(-fwretract.settings.retract_length, fwretract.settings.retract_feedrate_mm_s);
#endif
// If resume_position is negative
if (resume_current_e < 0) unscaled_e_move(resume_current_e, MMM_TO_MMS(toolchange_settings.retract_speed));
// If no available extruder
if (EXTRUDERS < 2 || active_extruder >= EXTRUDERS - 2 || active_extruder == migration.last)
migration.automode = false;
migration.in_progress = false;
current_position.e = resume_current_e;
planner.synchronize();
planner.set_e_position_mm(current_position.e); // New extruder primed and ready
DEBUG_ECHOLNPGM("Migration Complete");
return true;
}
#endif // TOOLCHANGE_MIGRATION_FEATURE
#endif // HAS_TOOLCHANGE
|
2301_81045437/Marlin
|
Marlin/src/module/tool_change.cpp
|
C++
|
agpl-3.0
| 58,059
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "../inc/MarlinConfig.h"
//#define DEBUG_TOOLCHANGE_MIGRATION_FEATURE
#if HAS_MULTI_EXTRUDER
typedef struct {
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
float swap_length; // M217 S
float extra_prime; // M217 E
float extra_resume; // M217 B
int16_t prime_speed; // M217 P
int16_t wipe_retract; // M217 G
int16_t retract_speed; // M217 R (mm/min)
int16_t unretract_speed; // M217 U (mm/min)
uint8_t fan_speed; // M217 F
uint8_t fan_time; // M217 D
#endif
#if ENABLED(TOOLCHANGE_PARK)
bool enable_park; // M217 W
xyz_pos_t change_point; // M217 X Y I J K C H O
#endif
float z_raise; // M217 Z
} toolchange_settings_t;
extern toolchange_settings_t toolchange_settings;
#if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED)
extern bool enable_first_prime; // M217 V
#endif
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
void tool_change_prime(); // Prime the currently selected extruder
#endif
#if ENABLED(TOOLCHANGE_FS_INIT_BEFORE_SWAP)
extern Flags<EXTRUDERS> toolchange_extruder_ready;
#endif
#if ENABLED(TOOLCHANGE_MIGRATION_FEATURE)
typedef struct {
uint8_t target, last;
bool automode, in_progress;
} migration_settings_t;
constexpr migration_settings_t migration_defaults = { 0, 0, false, false };
extern migration_settings_t migration;
bool extruder_migration();
#endif
#endif
#if DO_SWITCH_EXTRUDER
void move_extruder_servo(const uint8_t e);
#endif
#if ENABLED(SWITCHING_NOZZLE)
#if SWITCHING_NOZZLE_TWO_SERVOS
void lower_nozzle(const uint8_t e);
void raise_nozzle(const uint8_t e);
#else
void move_nozzle_servo(const uint8_t angle_index);
#endif
#endif
#if ENABLED(PARKING_EXTRUDER)
void pe_solenoid_set_pin_state(const uint8_t extruder_num, const uint8_t state);
#define PE_MAGNET_ON_STATE TERN_(PARKING_EXTRUDER_SOLENOIDS_INVERT, !)PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE
inline void pe_solenoid_magnet_on(const uint8_t extruder_num) { pe_solenoid_set_pin_state(extruder_num, PE_MAGNET_ON_STATE); }
inline void pe_solenoid_magnet_off(const uint8_t extruder_num) { pe_solenoid_set_pin_state(extruder_num, !PE_MAGNET_ON_STATE); }
void pe_solenoid_init();
extern bool extruder_parked;
inline void parking_extruder_set_parked(const bool parked) { extruder_parked = parked; }
bool parking_extruder_unpark_after_homing(const uint8_t final_tool, bool homed_towards_final_tool);
#elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
typedef struct MPESettings {
float parking_xpos[2], // M951 L R
grab_distance; // M951 I
feedRate_t slow_feedrate, // M951 J
fast_feedrate; // M951 H
float travel_distance, // M951 D
compensation_factor; // M951 C
} mpe_settings_t;
extern mpe_settings_t mpe_settings;
void mpe_settings_init();
#endif
#if ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
void est_init();
#elif ENABLED(SWITCHING_TOOLHEAD)
void swt_init();
#endif
#if ENABLED(TOOL_SENSOR)
uint8_t check_tool_sensor_stats(const uint8_t active_tool, const bool kill_on_error=false, const bool disable=false);
#else
inline uint8_t check_tool_sensor_stats(const uint8_t, const bool=false, const bool=false) { return 0; }
#endif
/**
* Perform a tool-change, which may result in moving the
* previous tool out of the way and the new tool into place.
*/
void tool_change(const uint8_t tmp_extruder, bool no_move=false);
|
2301_81045437/Marlin
|
Marlin/src/module/tool_change.h
|
C++
|
agpl-3.0
| 4,484
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifndef ENV_VALIDATE_H
#define ENV_VALIDATE_H
#if NOT_TARGET(ARDUINO_ARCH_ESP32)
#error "Oops! Select an ESP32 board in 'Tools > Board.'"
#endif
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/env_validate.h
|
C
|
agpl-3.0
| 1,018
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* E4d@box pin assignments
*
* Small factor 3D printer control board based on the ESP32 microcontroller for Laser, CNC and 3D printers.
* More info at https://atbox.tech/ and the E4d@box Facebook page.
*/
#include "env_validate.h"
#if HAS_MULTI_HOTEND || E_STEPPERS > 1
#error "E4d@box only supports 1 hotend / E stepper."
#endif
#define BOARD_INFO_NAME "E4d@box"
#define BOARD_WEBSITE_URL "github.com/Exilaus/E4d@box"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
//
// Redefine I2S for ESP32
//
#undef I2S_WS
#undef I2S_BCK
#undef I2S_DATA
#define I2S_WS 23
#define I2S_BCK 22
#define I2S_DATA 21
//
// Limit Switches
//
#define X_STOP_PIN 34
#define Y_STOP_PIN 35
#define Z_STOP_PIN 16
//
// Steppers
//
#define X_STEP_PIN 12
#define X_DIR_PIN 13
#define X_ENABLE_PIN 17
//#define X_CS_PIN 0
#define Y_STEP_PIN 32
#define Y_DIR_PIN 33
#define Y_ENABLE_PIN X_ENABLE_PIN
//#define Y_CS_PIN 13
#define Z_STEP_PIN 25
#define Z_DIR_PIN 26
#define Z_ENABLE_PIN X_ENABLE_PIN
//#define Z_CS_PIN 5 // SS_PIN
#define E0_STEP_PIN 27
#define E0_DIR_PIN 14
#define E0_ENABLE_PIN X_ENABLE_PIN
//#define E0_CS_PIN 21
//
// Temperature Sensors
//
#define TEMP_0_PIN 36 // Analog Input
#define TEMP_BED_PIN 39 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 2
#define FAN0_PIN 0
#define HEATER_BED_PIN 15
//
// MicroSD card on SPI
//
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
#define SD_SCK_PIN 18
#define SDSS 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_E4D.h
|
C
|
agpl-3.0
| 3,237
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Espressif ESP32 (Tensilica Xtensa LX6) on ESPNP by enwi
* Website https://github.com/enwi/ESPNP
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "ESPNP"
#define DEFAULT_MACHINE_NAME "ESP Pick and Place"
//
// I2S (steppers & other output-only pins)
//
#ifndef I2S_STEPPER_STREAM
#define I2S_STEPPER_STREAM
#endif
#if ENABLED(I2S_STEPPER_STREAM)
#define I2S_WS 17
#define I2S_BCK 22
#define I2S_DATA 21
#endif
//
// Servos
//
#define SERVO0_PIN 26
#define SERVO1_PIN 25
//
// Limit Switches
//
#define X_STOP_PIN 36
#define Y_STOP_PIN 39
#define Z_STOP_PIN 34
#define I_STOP_PIN 35
#define J_STOP_PIN 05
#define K_STOP_PIN 16
//
// Steppers
//
#define X_ENABLE_PIN 136
#define X_DIR_PIN 137
#define X_STEP_PIN 138
#define X_CS_PIN 139
#define Y_ENABLE_PIN 140
#define Y_DIR_PIN 141
#define Y_STEP_PIN 142
#define Y_CS_PIN 143
#define Z_ENABLE_PIN 144
#define Z_DIR_PIN 145
#define Z_STEP_PIN 146
#define Z_CS_PIN 147
#define I_ENABLE_PIN 148
#define I_DIR_PIN 149
#define I_STEP_PIN 150
#define I_CS_PIN 151
#define J_ENABLE_PIN 152
#define J_DIR_PIN 153
#define J_STEP_PIN 154
#define J_CS_PIN 155
#define K_ENABLE_PIN 156
#define K_DIR_PIN 157
#define K_STEP_PIN 158
#define K_CS_PIN 159
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
//
// Temperature Sensors
//
//#define TEMP_0_PIN 36 // Analog Input
//#define TEMP_BED_PIN 39 // Analog Input
// General use mosfets, useful for things like pumps and solenoids
// Shift register pins 128, 129, 130 and 131 are broken out and can be used
#define FAN0_PIN 132
#define FAN1_PIN 134
#define FAN2_PIN 135
#define FAN3_PIN 136
// #define FAN_SOFT_PWM_REQUIRED // check if needed
// NeoPixel Rings
#define BOARD_NEOPIXEL_PIN 14
#define NEOPIXEL2_PIN 27
// SPI
#define MISO_PIN 19
#define MOSI_PIN 23
#define SCK_PIN 18
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_ENWI_ESPNP.h
|
C
|
agpl-3.0
| 3,997
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Espressif ESP32 (Tensilica Xtensa LX6) pin assignments
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Espressif ESP32"
//
// I2S (steppers & other output-only pins)
//
#ifndef I2S_STEPPER_STREAM
#define I2S_STEPPER_STREAM
#endif
#if ENABLED(I2S_STEPPER_STREAM)
#define I2S_WS 25
#define I2S_BCK 26
#define I2S_DATA 27
#endif
//
// Limit Switches
//
#define X_MIN_PIN 34
#define Y_MIN_PIN 35
#define Z_MIN_PIN 15
//
// Steppers
//
#define X_STEP_PIN 128
#define X_DIR_PIN 129
#define X_ENABLE_PIN 130
//#define X_CS_PIN 0
#define Y_STEP_PIN 131
#define Y_DIR_PIN 132
#define Y_ENABLE_PIN 133
//#define Y_CS_PIN 13
#define Z_STEP_PIN 134
#define Z_DIR_PIN 135
#define Z_ENABLE_PIN 136
//#define Z_CS_PIN 5 // SS_PIN
#define E0_STEP_PIN 137
#define E0_DIR_PIN 138
#define E0_ENABLE_PIN 139
//#define E0_CS_PIN 21
//
// Temperature Sensors
//
#define TEMP_0_PIN 36 // Analog Input
#define TEMP_BED_PIN 39 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 2
#define FAN0_PIN 13
#define HEATER_BED_PIN 4
// SPI
#define SDSS 5
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_ESP32.h
|
C
|
agpl-3.0
| 2,691
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* ESPA-like pin assignments
* Supports 4 stepper drivers, heated bed, single hotend.
*/
#include "env_validate.h"
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
#endif
//
// Limit Switches
//
#define X_STOP_PIN 34
#define Y_STOP_PIN 35
#define Z_STOP_PIN 15
//
// Steppers
//
#define X_STEP_PIN 27
#define X_DIR_PIN 26
#define X_ENABLE_PIN 25
#define Y_STEP_PIN 33
#define Y_DIR_PIN 32
#define Y_ENABLE_PIN X_ENABLE_PIN
#define Z_STEP_PIN 14
#define Z_DIR_PIN 12
#define Z_ENABLE_PIN X_ENABLE_PIN
#define E0_STEP_PIN 16
#define E0_DIR_PIN 17
#define E0_ENABLE_PIN X_ENABLE_PIN
//
// Temperature Sensors
//
#define TEMP_0_PIN 36 // Analog Input
#define TEMP_BED_PIN 39 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 2
#define FAN0_PIN 13
#define HEATER_BED_PIN 4
//
// MicroSD card
//
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
#define SD_SCK_PIN 18
#define SDSS 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_ESPA_common.h
|
C
|
agpl-3.0
| 2,517
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* FYSETC E4 pin assignments
*
* 3D printer control board based on the ESP32 microcontroller.
* Supports 4 stepper drivers, heated bed, single hotend.
*/
#include "env_validate.h"
#if HAS_MULTI_HOTEND || E_STEPPERS > 1
#error "FYSETC E4 only supports 1 hotend / E stepper."
#endif
#define BOARD_INFO_NAME "FYSETC_E4"
#include "pins_ESPA_common.h"
#if HAS_TMC_UART
//
// TMC2209 stepper drivers
//
//
// Hardware serial 1
//
#define X_HARDWARE_SERIAL Serial1
#define Y_HARDWARE_SERIAL Serial1
#define Z_HARDWARE_SERIAL Serial1
#define E0_HARDWARE_SERIAL Serial1
#define TMC_BAUD_RATE 115200
#endif
/**
* Hardware serial pins
*
* Override these pins in Configuration.h or Configuration_adv.h if needed.
*
* Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX
* but MRR ESPA does not have enough spare pins for such reassignment.
*/
#ifndef HARDWARE_SERIAL1_RX
#define HARDWARE_SERIAL1_RX 21
#endif
#ifndef HARDWARE_SERIAL1_TX
#define HARDWARE_SERIAL1_TX 22
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_FYSETC_E4.h
|
C
|
agpl-3.0
| 2,011
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Godi Controller 32-Bit V1.0 pin assignments
*
* 3D printer control board based on the ESP32 microcontroller.
* Supports 4 stepper drivers, heated bed, single hotend.
*/
#include "env_validate.h"
#if EXTRUDERS > 1 || E_STEPPERS > 1
#error "Godi Controller only supports 1 E stepper."
#elif HAS_MULTI_HOTEND
#error "Godi Controller only supports 1 hotend."
#endif
#define BOARD_INFO_NAME "Godi Controller 32-Bit V1.0"
//
// Disable I2S stepper stream, by default
//
#undef I2S_STEPPER_STREAM
#undef I2S_WS
#undef I2S_BCK
#undef I2S_DATA
//
// Limit Switches
//
#define X_STOP_PIN 34
#define Y_STOP_PIN 35
#define Z_STOP_PIN 15
//
// Steppers
//
#define X_STEP_PIN 27
#define X_DIR_PIN 26
#define X_ENABLE_PIN 25
#define Y_STEP_PIN 33
#define Y_DIR_PIN 32
#define Y_ENABLE_PIN X_ENABLE_PIN
#define Z_STEP_PIN 14
#define Z_DIR_PIN 12
#define Z_ENABLE_PIN X_ENABLE_PIN
#define E0_STEP_PIN 16
#define E0_DIR_PIN 17
#define E0_ENABLE_PIN X_ENABLE_PIN
//
// Temperature Sensors
//
#define TEMP_0_PIN 36 // Analog Input
#define TEMP_BED_PIN 39 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 4
#define FAN0_PIN 13
#define HEATER_BED_PIN 2
//
// MicroSD card
//
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
#define SD_SCK_PIN 18
#define SDSS 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
#if HAS_TMC_UART
//
// TMC2209 stepper drivers
//
//
// Hardware serial 1
//
#define X_HARDWARE_SERIAL Serial1
#define Y_HARDWARE_SERIAL Serial1
#define Z_HARDWARE_SERIAL Serial1
#define E0_HARDWARE_SERIAL Serial1
#define TMC_BAUD_RATE 115200
#endif
/**
* Hardware serial pins
*
* Override these pins in Configuration.h or Configuration_adv.h if needed.
*
* Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX
* but Godi Controller 32-Bit does not have enough spare pins for such reassignment.
*/
#ifndef HARDWARE_SERIAL1_RX
#define HARDWARE_SERIAL1_RX 21
#endif
#ifndef HARDWARE_SERIAL1_TX
#define HARDWARE_SERIAL1_TX 22
#endif
//
// Heaters / Fans
//
#if ANY(EDUTRONICS_12864OLED_SH1106, EDUTRONICS_12864OLED_SSD1306)
#define LCDSCREEN_NAME "EDUTRONICS 12864 OLED"
#define BTN_EN2 1
#define BTN_EN1 3
#define BTN_ENC 0
#define BEEPER_PIN -1
#define KILL_PIN -1
#define DOGLCD_SDA 21 // SDA
#define DOGLCD_SCL 22 // SCL
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_GODI_CONTROLLER_V1_0.h
|
C
|
agpl-3.0
| 4,160
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MKS TinyBee pin assignments
* https://github.com/makerbase-mks/MKS-TinyBee
*/
#include "env_validate.h"
#if EXTRUDERS > 2 || E_STEPPERS > 2
#error "MKS TinyBee supports up to 2 E steppers."
#elif HOTENDS > 2
#error "MKS TinyBee supports up to 2 hotends / E steppers."
#endif
#define BOARD_INFO_NAME "MKS TinyBee"
#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-TinyBee"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
// MAX_EXPANDER_BITS is defined for MKS TinyBee in HAL/ESP32/inc/Conditionals_adv.h
//
// Servos
//
#define SERVO0_PIN 2 // 3D TOUCH
//
// Limit Switches
//
#define X_STOP_PIN 33 // X
#define Y_STOP_PIN 32 // Y
#define Z_STOP_PIN 22 // Z
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 35 // MT_DET
#endif
//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN // 3D TOUCH
#endif
//
// Enable I2S stepper stream
//
#ifndef I2S_STEPPER_STREAM
#define I2S_STEPPER_STREAM
#endif
#if ENABLED(I2S_STEPPER_STREAM)
#define I2S_WS 26
#define I2S_BCK 25
#define I2S_DATA 27
#endif
//
// Steppers
//
#define X_STEP_PIN 129 // X
#define X_DIR_PIN 130
#define X_ENABLE_PIN 128
#define Y_STEP_PIN 132 // Y
#define Y_DIR_PIN 133
#define Y_ENABLE_PIN 131
#define Z_STEP_PIN 135 // Z1
#define Z_DIR_PIN 136
#define Z_ENABLE_PIN 134
#define E0_STEP_PIN 138 // E0
#define E0_DIR_PIN 139
#define E0_ENABLE_PIN 137
#define E1_STEP_PIN 141 // E1
#define E1_DIR_PIN 142
#define E1_ENABLE_PIN 140
//
// Temperature Sensors
//
#define TEMP_0_PIN 36 // TH1 / Analog Input
#define TEMP_1_PIN 34 // TH2 / Analog Input, you need set R6=0Ω and R7=NC
#define TEMP_BED_PIN 39 // TB / Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 145 // HE0
#define HEATER_1_PIN 146 // HE1
#define FAN0_PIN 147 // FAN1
#define FAN1_PIN 148 // FAN2
#define HEATER_BED_PIN 144 // H-BED
//#define CONTROLLER_FAN_PIN 148 // FAN2
//#define E0_AUTO_FAN_PIN 148 // FAN2
//
// ADC Reference Voltage
//
#define ADC_REFERENCE_VOLTAGE 2.565 // 2.5V reference VDDA
/**
* ------ ------
* (BEEPER) 149 | 1 2 | 13 (BTN_ENC) (SPI MISO) 19 | 1 2 | 18 (SPI SCK)
* (LCD_EN) 21 | 3 4 | 4 (LCD_RS) (BTN_EN1) 14 | 3 4 | 5 (SPI CS)
* (LCD_D4) 0 | 5 6 16 (LCD_D5) (BTN_EN2) 12 | 5 6 23 (SPI MOSI)
* (LCD_D6) 15 | 7 8 | 17 (LCD_D7) (SPI_DET) 34 | 7 8 | RESET
* GND | 9 10 | 5V GND | 9 10 | 3.3V
* ------ ------
* EXP1 EXP2
*/
#define EXP1_01_PIN 149
#define EXP1_02_PIN 13
#define EXP1_03_PIN 21
#define EXP1_04_PIN 4
#define EXP1_05_PIN 0
#define EXP1_06_PIN 16
#define EXP1_07_PIN 15
#define EXP1_08_PIN 17
#define EXP2_01_PIN 19
#define EXP2_02_PIN 18
#define EXP2_03_PIN 14
#define EXP2_04_PIN 5
#define EXP2_05_PIN 12
#define EXP2_06_PIN 23
#define EXP2_07_PIN 34
#define EXP2_08_PIN -1 // RESET
//
// MicroSD card
//
//#define SD_MOSI_PIN EXP2_06_PIN // uses esp32 default 23
//#define SD_MISO_PIN EXP2_01_PIN // uses esp32 default 19
//#define SD_SCK_PIN EXP2_02_PIN // uses esp32 default 18
// TODO: Migrate external SD Card to pins/lcd
#define SDSS EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN // IO34 default is SD_DET signal (Jump to SDDET)
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
#if HAS_WIRED_LCD
#define BEEPER_PIN EXP1_01_PIN
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define LCD_BACKLIGHT_PIN -1
#if ENABLED(MKS_MINI_12864)
// MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
#define DOGLCD_CS EXP1_06_PIN
#define DOGLCD_A0 EXP1_07_PIN
#define LCD_RESET_PIN -1
#elif ENABLED(FYSETC_MINI_12864_2_1)
// MKS_MINI_12864_V3, BTT_MINI_12864, FYSETC_MINI_12864_2_1, BEEZ_MINI_12864
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_04_PIN
#define LCD_RESET_PIN EXP1_05_PIN
#define NEOPIXEL_PIN EXP1_06_PIN
#if SD_CONNECTION_IS(ONBOARD)
#define FORCE_SOFT_SPI
#endif
#if ALL(MKS_MINI_12864_V3, HAS_MEDIA)
#define PAUSE_LCD_FOR_BUSY_SD
#endif
#else
#define LCD_PINS_D4 EXP1_05_PIN
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
#endif
#define BOARD_ST7920_DELAY_1 96
#define BOARD_ST7920_DELAY_2 48
#define BOARD_ST7920_DELAY_3 600
#endif
#endif // HAS_WIRED_LCD
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_MKS_TINYBEE.h
|
C
|
agpl-3.0
| 7,286
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* JOKER pin assignments
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "JOKER"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
//
// Expansion Boards for more axes, sensors, heaters
// Only enable one of these options.
//
//#define JOKER_PLUS_2
//#define JOKER_PLUS_5
#if ENABLED(JOKER_PLUS_2)
#define MAX_EXTRUDERS 2
#if E_STEPPERS > 2
#error "JOKER with +2 expansion supports up to 2 E steppers."
#elif HOTENDS > 2
#error "JOKER with +2 expansion supports up to 2 hotends."
#endif
#elif ENABLED(JOKER_PLUS_5)
#define MAX_EXTRUDERS 3
#if E_STEPPERS > 3
#error "JOKER with +5 expansion supports up to 3 E steppers."
#elif HOTENDS > 3
#error "JOKER with +5 expansion supports up to 3 hotends."
#endif
#else
#if E_STEPPERS > 1
#error "JOKER without expansion only supports 1 E stepper."
#elif HAS_MULTI_HOTEND
#error "JOKER without expansion only supports 1 hotend."
#endif
#endif
//
// Servos
//
#define SERVO0_PIN 14
//
// Limit Switches
//
#define X_STOP_PIN 15
#define Y_STOP_PIN 16
#define Z_STOP_PIN 17
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 13
#endif
#ifndef Z_MIN_PROBE_PIN
//#define Z_MIN_PROBE_PIN 35 // Pin 35 is the RAMPS default
#endif
//
// Enable I2S stepper stream
//
#ifndef I2S_STEPPER_STREAM
#define I2S_STEPPER_STREAM
#endif
#if ENABLED(I2S_STEPPER_STREAM)
#define I2S_WS 26
#define I2S_BCK 25
#define I2S_DATA 27
#if ENABLED(LIN_ADVANCE)
#error "I2S stream is currently incompatible with LIN_ADVANCE."
#endif
#endif
//
// Steppers
//
#define X_STEP_PIN 128
#define X_DIR_PIN 129
#define X_ENABLE_PIN 136
#define Y_STEP_PIN 130
#define Y_DIR_PIN 131
#define Y_ENABLE_PIN X_ENABLE_PIN
#define Z_STEP_PIN 132
#define Z_DIR_PIN 133
#define Z_ENABLE_PIN 137
#define E0_STEP_PIN 134
#define E0_DIR_PIN 135
#define E0_ENABLE_PIN 138
#if ENABLED(JOKER_PLUS_2)
#define E1_STEP_PIN 144
#define E1_DIR_PIN 145
#define E1_ENABLE_PIN 146
#define E2_STEP_PIN 147
#define E2_DIR_PIN 148
#define E2_ENABLE_PIN 149
#elif ENABLED(JOKER_PLUS_5)
#define E1_STEP_PIN 144
#define E1_DIR_PIN 145
#define E1_ENABLE_PIN 146
#define E2_STEP_PIN 153
#define E2_DIR_PIN 154
#define E2_ENABLE_PIN 155
#define E3_STEP_PIN 156
#define E3_DIR_PIN 157
#define E3_ENABLE_PIN 158
// Are these preferred for X2, Y2, Z2, Z3 ?
#define E4_STEP_PIN 147
#define E4_DIR_PIN 148
#define E4_ENABLE_PIN 149
#define E5_STEP_PIN 150
#define E5_DIR_PIN 151
#define E5_ENABLE_PIN 152
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN 36 // Analog Input
#define TEMP_BED_PIN 39 // Analog Input
#if ENABLED(JOKER_PLUS_2)
#define TEMP_1_PIN 34 // Analog Input
#elif ENABLED(JOKER_PLUS_5)
#define TEMP_1_PIN 32 // Analog Input
#define TEMP_2_PIN 33 // Analog Input
#define TEMP_3_PIN 34 // Analog Input
#endif
//
// Heaters / Fans
//
#define HEATER_0_PIN 141
#define HEATER_BED_PIN 140
#define FAN0_PIN 143
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 142 // Enabled in Configuration_adv.h
#endif
#ifndef CONTROLLER_FAN_PIN
//#define CONTROLLER_FAN_PIN -1
#endif
#if ENABLED(JOKER_PLUS_2)
#define HEATER_1_PIN 150
#define FAN1_PIN 151
#elif ENABLED(JOKER_PLUS_5)
#define HEATER_1_PIN 159
#define HEATER_2_PIN 160
#define HEATER_3_PIN 161
#define FAN1_PIN 162
#define FAN2_PIN 163
#define FAN3_PIN 164
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN 165
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN 166
#endif
#ifndef E3_AUTO_FAN_PIN
#define E3_AUTO_FAN_PIN 167
#endif
#endif
//
// SD Card
//
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
#define SD_SCK_PIN 18
#define SDSS 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
//
// LCD / Controller
//
#if HAS_WIRED_LCD
//#define LCD_PINS_RS 13
//#define LCD_PINS_EN 17
//#define LCD_PINS_D4 16
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN 151
#elif IS_RRD_FG_SC
#define BEEPER_PIN 151
//#define LCD_PINS_D5 -1
//#define LCD_PINS_D6 -1
//#define LCD_PINS_D7 -1
#endif
#define BTN_EN1 2
#define BTN_EN2 4
#define BTN_ENC 12
#define BEEPER_PIN 139
#endif // HAS_WIRED_LCD
/**
* Hardware Serial
* Add the following to Configuration.h or Configuration_adv.h to assign
* specific pins to hardware Serial1 and Serial2.
* Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
* JOKER does not have enough spare pins for such reassignment.
*/
//#define HARDWARE_SERIAL1_RX 21
//#define HARDWARE_SERIAL1_TX 22
//#define HARDWARE_SERIAL2_RX 2
//#define HARDWARE_SERIAL2_TX 4
//
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER
#define SPINDLE_LASER_ENA_PIN -1 // FET 1
#define SPINDLE_LASER_PWM_PIN 33 // Bed FET
//#define SPINDLE_DIR_PIN -1 // FET 3
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_MM_JOKER.h
|
C
|
agpl-3.0
| 7,783
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MRR ESPA pin assignments
*
* 3D printer control board based on the ESP32 microcontroller.
* Supports 4 stepper drivers, heated bed, single hotend.
*/
#include "env_validate.h"
#if HAS_MULTI_HOTEND || E_STEPPERS > 1
#error "MRR ESPA only supports 1 hotend / E stepper."
#endif
#define BOARD_INFO_NAME "MRR ESPA"
#define BOARD_WEBSITE_URL "github.com/maplerainresearch/MRR_ESPA"
#include "pins_ESPA_common.h"
//
// Steppers
//
//#define X_CS_PIN 21
//#define Y_CS_PIN 22
//#define Z_CS_PIN 5 // SS_PIN
//#define E0_CS_PIN 21
// Hardware serial pins
// Add the following to Configuration.h or Configuration_adv.h to assign
// specific pins to hardware Serial1.
// Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
// MRR ESPA does not have enough spare pins for such reassignment.
//#define HARDWARE_SERIAL1_RX 21
//#define HARDWARE_SERIAL1_TX 22
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_MRR_ESPA.h
|
C
|
agpl-3.0
| 1,923
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MRR ESPE pin assignments
*
* 3D printer control board based on the ESP32 microcontroller.
* Supports 5 stepper drivers (using I2S stepper stream), heated bed,
* single hotend, and LCD controller.
*/
#include "env_validate.h"
#if EXTRUDERS > 2 || E_STEPPERS > 2
#error "MRR ESPE supports up to 2 E steppers."
#elif HAS_MULTI_HOTEND
#error "MRR ESPE only supports 1 hotend / E stepper."
#endif
#define BOARD_INFO_NAME "MRR ESPE"
#define BOARD_WEBSITE_URL "github.com/maplerainresearch/MRR_ESPE"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
//
// Limit Switches
//
#define X_STOP_PIN 35
#define Y_STOP_PIN 32
#define Z_STOP_PIN 33
//
// Enable I2S stepper stream
//
#ifndef I2S_STEPPER_STREAM
#define I2S_STEPPER_STREAM
#endif
#if ENABLED(I2S_STEPPER_STREAM)
#define I2S_WS 26
#define I2S_BCK 25
#define I2S_DATA 27
#endif
//
// Steppers
//
#define X_STEP_PIN 129
#define X_DIR_PIN 130
#define X_ENABLE_PIN 128
//#define X_CS_PIN 21
#define Y_STEP_PIN 132
#define Y_DIR_PIN 133
#define Y_ENABLE_PIN 131
//#define Y_CS_PIN 22
#define Z_STEP_PIN 135
#define Z_DIR_PIN 136
#define Z_ENABLE_PIN 134
//#define Z_CS_PIN 5 // SS_PIN
#define E0_STEP_PIN 138
#define E0_DIR_PIN 139
#define E0_ENABLE_PIN 137
//#define E0_CS_PIN 21
#define E1_STEP_PIN 141
#define E1_DIR_PIN 142
#define E1_ENABLE_PIN 140
//#define E1_CS_PIN 22
#define Z2_STEP_PIN 141
#define Z2_DIR_PIN 142
#define Z2_ENABLE_PIN 140
//#define Z2_CS_PIN 5
//
// Temperature Sensors
//
#define TEMP_0_PIN 36 // Analog Input
#define TEMP_1_PIN 34 // Analog Input
#define TEMP_BED_PIN 39 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 145 // 2
#define FAN0_PIN 146 // 15
#define HEATER_BED_PIN 144 // 4
#define CONTROLLER_FAN_PIN 147
//#define E0_AUTO_FAN_PIN 148 // need to update Configuration_adv.h @section extruder
//#define E1_AUTO_FAN_PIN 149 // need to update Configuration_adv.h @section extruder
#define FAN1_PIN 149
//
// MicroSD card
//
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
#define SD_SCK_PIN 18
#define SDSS 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
//
// LCD / Controller
//
#if HAS_WIRED_LCD
#define LCD_PINS_RS 13
#define LCD_PINS_EN 17
#define LCD_PINS_D4 16
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN 151
#elif IS_RRD_FG_SC
#define BEEPER_PIN 151
//#define LCD_PINS_D5 150
//#define LCD_PINS_D6 152
//#define LCD_PINS_D7 153
#else
#error "Only CR10_STOCKDISPLAY and REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER are currently supported. Comment out this line to continue."
#endif
#define BTN_EN1 0
#define BTN_EN2 12
#define BTN_ENC 14
#endif // HAS_MARLINUI_U8GLIB
// Hardware serial pins
// Add the following to Configuration.h or Configuration_adv.h to assign
// specific pins to hardware Serial1 and Serial2.
// Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
// MRR ESPA does not have enough spare pins for such reassignment.
//#define HARDWARE_SERIAL1_RX 21
//#define HARDWARE_SERIAL1_TX 22
//#define HARDWARE_SERIAL2_RX 2
//#define HARDWARE_SERIAL2_TX 4
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_MRR_ESPE.h
|
C
|
agpl-3.0
| 5,497
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Panda M4 pin assignments
*/
#define BOARD_INFO_NAME "Panda_M4"
#if HAS_MULTI_HOTEND || E_STEPPERS > 1
#error "PANDA M4 only supports 1 hotend / E stepper."
#endif
#include "pins_PANDA_common.h"
//
// Steppers
//
#define X_ENABLE_PIN 115
#define Y_ENABLE_PIN 114
#define Z_ENABLE_PIN 113
#define E0_ENABLE_PIN 112
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_PANDA_M4.h
|
C
|
agpl-3.0
| 1,298
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Panda ZHU pin assignments
*/
#define BOARD_INFO_NAME "Panda_ZHU"
#if E_STEPPERS > 5
#error "PANDA ZHU supports up to 5 E steppers."
#endif
#if HAS_MULTI_HOTEND
#error "PANDA ZHU only supports 1 hotend."
#endif
#include "pins_PANDA_common.h"
//
// Steppers
//
#define X_ENABLE_PIN 128 // Shared with all steppers
#define Y_ENABLE_PIN X_ENABLE_PIN
#define Z_ENABLE_PIN X_ENABLE_PIN
#define E0_ENABLE_PIN X_ENABLE_PIN
//#define X_CS_PIN 0
//#define Y_CS_PIN 13
//#define Z_CS_PIN 5 // SS_PIN
//#define E0_CS_PIN 21
#define E1_STEP_PIN 115
#define E1_DIR_PIN 114
#define E1_ENABLE_PIN X_ENABLE_PIN
#define E2_STEP_PIN 112
#define E2_DIR_PIN 113
#define E2_ENABLE_PIN X_ENABLE_PIN
#define E3_STEP_PIN 110
#define E3_DIR_PIN 111
#define E3_ENABLE_PIN X_ENABLE_PIN
#define E4_STEP_PIN 121
#define E4_DIR_PIN 122
#define E4_ENABLE_PIN X_ENABLE_PIN
#define HEATER_1_PIN 123
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_PANDA_ZHU.h
|
C
|
agpl-3.0
| 2,226
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Panda common pin assignments
*/
#include "env_validate.h"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
//
// Servos
//
#define SERVO0_PIN 0
//
// Limit Switches
//
#define X_STOP_PIN 4
#define Y_STOP_PIN 35
#define Z_STOP_PIN 21
//
// Steppers
//
#define X_STEP_PIN 101
#define X_DIR_PIN 100
#define Y_STEP_PIN 103
#define Y_DIR_PIN 102
#define Z_STEP_PIN 105
#define Z_DIR_PIN 104
#define E0_STEP_PIN 107
#define E0_DIR_PIN 106
//
// Temperature Sensors
//
#define TEMP_0_PIN 39 // Analog Input
#define TEMP_BED_PIN 36 // Analog Input
#if ENABLED(MAX31856_PANDAPI)
#define TEMP_0_CLK_PIN 29
#define TEMP_0_MISO_PIN 24
#define TEMP_0_MOSI_PIN 28
#define TEMP_0_CS_PIN 27
#endif
//
// Heaters / Fans
//
#define HEATER_0_PIN 108
#define HEATER_BED_PIN 109
#define FAN0_PIN 118 // FAN0
#define FAN1_PIN 119 // FAN1
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN 120 // FAN2
#endif
/** ------ ------
* (MISO 19?) | 1 2 | (18 SCK?) (BEEPER) 129 | 1 2 | 12 (^ENC)
* (EN1) 33 | 3 4 | (5 SDSS?) (EN) 26 | 3 4 | 27 (RS)
* (EN2) 32 5 6 | (23 MOSI?) (D4) 14 | 5 6 --
* (SDDET 2?) | 7 8 | (RESET) -- | 7 8 | --
* -- | 9 10 | -- GND | 9 10 | 5V
* ------ ------
* EXP2 EXP1
*/
#define EXP1_01_PIN 129
#define EXP1_02_PIN 12
#define EXP1_03_PIN 26
#define EXP1_04_PIN 27
#define EXP1_05_PIN 14
#define EXP2_01_PIN 19 // ?
#define EXP2_02_PIN 18 // ?
#define EXP2_03_PIN 33
#define EXP2_04_PIN 5 // ?
#define EXP2_05_PIN 32
#define EXP2_06_PIN 23 // ?
#define EXP2_07_PIN 2 // ?
//
// SD Card
//
#if HAS_MEDIA
#define SD_MOSI_PIN EXP2_06_PIN
#define SD_MISO_PIN EXP2_01_PIN
#define SD_SCK_PIN EXP2_02_PIN
#define SDSS EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#endif
#if HAS_WIRED_LCD
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_PANDA_common.h
|
C
|
agpl-3.0
| 4,140
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Rutilea ESP32 (Tensilica Xtensa LX6) pin assignments
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Rutilea ESP32"
#include "pins_ESPA_common.h"
//
// I2S (steppers & other output-only pins)
//
#ifndef I2S_STEPPER_STREAM
#define I2S_STEPPER_STREAM
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/esp32/pins_RESP32_CUSTOM.h
|
C
|
agpl-3.0
| 1,152
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifndef ENV_VALIDATE_H
#define ENV_VALIDATE_H
#if NOT_TARGET(__STM32F1__, STM32F1)
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/gd32f1/env_validate.h
|
C
|
agpl-3.0
| 1,022
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Sovol 1.3.1 (GD32F103RET6) board pin assignments
*/
#include "env_validate.h"
#if HAS_MULTI_HOTEND || E_STEPPERS > 1
#error "SOVOL V131 only supports 1 hotend / E-stepper."
#define E_ERROR 1
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Sovol V131"
#endif
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "Sovol SV06"
#endif
#include "../stm32f1/pins_CREALITY_V4.h"
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
#define X_SERIAL_TX_PIN PC1
#define X_SERIAL_RX_PIN PC1
#define Y_SERIAL_TX_PIN PC0
#define Y_SERIAL_RX_PIN PC0
#define Z_SERIAL_TX_PIN PA15
#define Z_SERIAL_RX_PIN PA15
#define E0_SERIAL_TX_PIN PC14
#define E0_SERIAL_RX_PIN PC14
// Default TMC slave addresses
#ifndef X_SLAVE_ADDRESS
#define X_SLAVE_ADDRESS 3
#endif
#ifndef Y_SLAVE_ADDRESS
#define Y_SLAVE_ADDRESS 3
#endif
#ifndef Z_SLAVE_ADDRESS
#define Z_SLAVE_ADDRESS 3
#endif
#ifndef E0_SLAVE_ADDRESS
#define E0_SLAVE_ADDRESS 3
#endif
static_assert(X_SLAVE_ADDRESS == 3, "X_SLAVE_ADDRESS must be 3 for BOARD_SOVOL_V131.");
static_assert(Y_SLAVE_ADDRESS == 3, "Y_SLAVE_ADDRESS must be 3 for BOARD_SOVOL_V131.");
static_assert(Z_SLAVE_ADDRESS == 3, "Z_SLAVE_ADDRESS must be 3 for BOARD_SOVOL_V131.");
static_assert(E0_SLAVE_ADDRESS == 3, "E0_SLAVE_ADDRESS must be 3 for BOARD_SOVOL_V131.");
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// SD Card
//
#define ONBOARD_SPI_DEVICE 1
#define ONBOARD_SD_CS_PIN PA4 // SDSS
|
2301_81045437/Marlin
|
Marlin/src/pins/gd32f1/pins_SOVOL_V131.h
|
C
|
agpl-3.0
| 2,889
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "env_validate.h"
#define BOARD_INFO_NAME "TRIGORILLA_V006"
#define DEFAULT_MACHINE_NAME "GD32F103"
#define BOARD_NO_NATIVE_USB
// Release PA13 from SWD for CASE_LIGHT_PIN
#define DISABLE_DEBUG
#define DISABLE_JTAG
//
// EEPROM
//
#define FLASH_EEPROM_EMULATION
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
//
// Limit Switches
//
#define X_MIN_PIN PA7
#define X_MAX_PIN PC6
#define Y_MIN_PIN PC5
#define Y_MAX_PIN -1
#define Z_MIN_PIN PB2
#define Z_MAX_PIN -1
//
// Steppers
//
#define X_ENABLE_PIN PC3
#define X_STEP_PIN PC2
#define X_DIR_PIN PB9
#define Y_ENABLE_PIN PC13
#define Y_STEP_PIN PB8
#define Y_DIR_PIN PB7
#define Z_ENABLE_PIN PC14
#define Z_STEP_PIN PB6
#define Z_DIR_PIN PB5
#define E0_ENABLE_PIN PA15
#define E0_STEP_PIN PB4
#define E0_DIR_PIN PB3
#define E1_ENABLE_PIN PC15
#define E1_STEP_PIN PC0
#define E1_DIR_PIN PC1
//
// Temperature Sensors
//
#define TEMP_0_PIN PC4 // T0
#define TEMP_1_PIN -1 // T1 PA6 used for power loss
#define TEMP_BED_PIN PB0 // TB
//
// Heaters
//
#define HEATER_0_PIN PA1 // H0
#define HEATER_1_PIN PA8 // H1
#define HEATER_BED_PIN PA4 // HB
//
// Fans
//
#define FAN0_PIN PA0 // FAN
#define FAN1_PIN PA14 // Connected to +24V
#define FAN2_PIN -1 // PB1, auto fan for E0
#define CONTROLLER_FAN_PIN FAN1_PIN
//
// Misc
//
#define BEEPER_PIN PB15
#define LED_PIN -1
#define POWER_LOSS_PIN PA6
#define FIL_RUNOUT_PIN PA5
#define CASE_LIGHT_PIN PA13
#define POWER_MONITOR_VOLTAGE_PIN PA6
#define AUTO_LEVEL_TX_PIN PB13
#define AUTO_LEVEL_RX_PIN PB12
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN AUTO_LEVEL_RX_PIN
#endif
//
// SD Card
//
#define SD_DETECT_PIN PC7
#ifndef ONBOARD_SDIO
#define ONBOARD_SDIO
#endif
#if ENABLED(ONBOARD_SDIO)
//
// SPI
//
#define SPI_DEVICE -1 // Maple
#define SCK_PIN -1
#define MISO_PIN -1
#define MOSI_PIN -1
#define SS_PIN -1
//
// SDIO
//
#define SDIO_READ_RETRIES 16
#define SDIO_D0_PIN PC8
#define SDIO_D1_PIN PC9
#define SDIO_D2_PIN PC10
#define SDIO_D3_PIN PC11
#define SDIO_CK_PIN PC12
#define SDIO_CMD_PIN PD2
#else
#undef SDSS
#define SDSS PC11 // SDIO_D3_PIN
#define SS_PIN SDSS
#define SCK_PIN PC12 // SDIO_CK_PIN
#define MISO_PIN PC8 // SDIO_D0_PIN
#define MOSI_PIN PD2 // SDIO_CMD_PIN
#define SOFTWARE_SPI
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/gd32f1/pins_TRIGORILLA_V006.h
|
C
|
agpl-3.0
| 4,544
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* FFP0173_Aquila_Main_Board_V1.0.1 (GD32F103RC / N32G455RE)
*
* Uses CREALITY V4 (STM32F103RE / STM32F103RC) board pin assignments
*/
#define BOARD_INFO_NAME "Aquila v1.0.1"
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "Aquila"
#endif
#define NO_MAPLE_WARNING // Disable warning when compiling with Maple env
#include "../stm32f1/pins_CREALITY_V4.h"
|
2301_81045437/Marlin
|
Marlin/src/pins/gd32f1/pins_VOXELAB_AQUILA.h
|
C
|
agpl-3.0
| 1,263
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifndef ENV_VALIDATE_H
#define ENV_VALIDATE_H
#if NOT_TARGET(ARDUINO_ARCH_HC32)
#error "Oops! Select an HC32F460 board in 'Tools > Board.'"
#endif
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/hc32f4/env_validate.h
|
C
|
agpl-3.0
| 1,020
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//
// Voxelab Aquila V1.0.0/V1.0.1/V1.0.2/V1.0.3 (HC32F460) as found in the Voxelab Aquila X2 and C2
//
#include "env_validate.h"
#if HAS_MULTI_HOTEND || E_STEPPERS > 1
#error "Aquila V1.0.1 only supports one hotend and E-stepper"
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Aquila V1.0.1"
#endif
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "Aquila"
#endif
//
// Onboard crystal oscillator
//
#ifndef BOARD_XTAL_FREQUENCY
#define BOARD_XTAL_FREQUENCY 8000000 // 8 MHz XTAL
#endif
//
// Release JTAG pins but keep SWD enabled
// - PA15 (JTDI / USART2 RX)
// - PB3 (JTDO / E0_DIR)
// - PB4 (NJTRST / E0_STEP)
//
//#define DISABLE_DEBUG
#define DISABLE_JTAG
//
// EEPROM
//
#if NO_EEPROM_SELECTED
#define IIC_BL24CXX_EEPROM
//#define SDCARD_EEPROM_EMULATION
#undef NO_EEPROM_SELECTED
#endif
#if ENABLED(IIC_BL24CXX_EEPROM)
#define IIC_EEPROM_SDA PA11
#define IIC_EEPROM_SCL PA12
#define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16)
#elif ENABLED(SDCARD_EEPROM_EMULATION)
#define MARLIN_EEPROM_SIZE 0x800 // 2K
#endif
//
// Servos
//
#ifndef SERVO0_PIN
#define SERVO0_PIN PB0 // BLTouch OUT
#endif
//
// Limit Switches
//
#define X_STOP_PIN PA5
#define Y_STOP_PIN PA6
#define Z_STOP_PIN PA7
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PB1 // BLTouch IN
#endif
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PA4
#endif
//
// Steppers
//
#define X_STEP_PIN PC2
#define X_DIR_PIN PB9
#define X_ENABLE_PIN PC3 // All steppers share enable pins
#define Y_STEP_PIN PB8
#define Y_DIR_PIN PB7
#define Y_ENABLE_PIN X_ENABLE_PIN
#define Z_STEP_PIN PB6
#define Z_DIR_PIN PB5
#define Z_ENABLE_PIN X_ENABLE_PIN
#define E0_STEP_PIN PB4
#define E0_DIR_PIN PB3
#define E0_ENABLE_PIN X_ENABLE_PIN
//
// Temperature Sensors
//
#define TEMP_0_PIN PC5 // HEATER1 ADC1_IN15
#define TEMP_BED_PIN PC4 // HOT BED ADC1_IN14
//
// Heaters / Fans
//
#define HEATER_0_PIN PA1 // HEATER1
#define HEATER_BED_PIN PA2 // HOT BED
#define FAN0_PIN PA0 // FAN0
//
// SD Card
//
#define SD_DETECT_PIN PA10
#define SDCARD_CONNECTION ONBOARD
#define ONBOARD_SDIO
#define NO_SD_HOST_DRIVE // This board's SD card is only seen by the printer
/**
* ------
* PC6 | 1 2 | PB2
* PC0 | 3 4 | PC1
* PB14 5 6 | PB13
* PB12 | 7 8 | PB15
* GND | 9 10 | +5V
* ------
* EXP1
*/
#define EXP1_01_PIN PC6
#define EXP1_02_PIN PB2
#define EXP1_03_PIN PC0
#define EXP1_04_PIN PC1
#define EXP1_05_PIN PB14 // ENC
#define EXP1_06_PIN PB13 // BEEPER
#define EXP1_07_PIN PB12 // EN2
#define EXP1_08_PIN PB15 // EN1
#if ENABLED(CR10_STOCKDISPLAY) // LCD used for C2
#ifndef HAS_PIN_27_BOARD
#define BEEPER_PIN EXP1_01_PIN
#endif
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_EN EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#elif ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) // LCD used for X2
/**
* Display pinout (display side, so RX/TX are swapped)
*
* ------
* NC | 1 2 | NC
* RX | 3 4 | TX
* EN 5 6 | BEEP
* B | 7 8 | A
* GND | 9 10 | +5V
* ------
*/
#ifndef BEEPER_PIN
#define BEEPER_PIN EXP1_06_PIN // BEEP
#endif
#define BTN_ENC EXP1_05_PIN // EN
#define BTN_EN1 EXP1_08_PIN // A
#define BTN_EN2 EXP1_07_PIN // B
#ifndef LCD_SERIAL_PORT
#define LCD_SERIAL_PORT 1
#endif
#endif
//
// SDIO Pins
//
#define BOARD_SDIO_D0 PC8
#define BOARD_SDIO_D1 PC9
#define BOARD_SDIO_D2 PC10
#define BOARD_SDIO_D3 PC11
#define BOARD_SDIO_CLK PC12
#define BOARD_SDIO_CMD PD2
#define BOARD_SDIO_DET PA10
//
// USART Pins
//
// Display
#define BOARD_USART1_TX_PIN PC0
#define BOARD_USART1_RX_PIN PC1
// Host
#define BOARD_USART2_TX_PIN PA9
#define BOARD_USART2_RX_PIN PA15
// Unused / Debug
#define BOARD_USART3_TX_PIN PE5
#define BOARD_USART3_RX_PIN PE4
// Onboard LED (HIGH = off, LOW = on)
#ifndef LED_BUILTIN
#define LED_BUILTIN PA3
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/hc32f4/pins_AQUILA_101.h
|
C
|
agpl-3.0
| 6,232
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//
// Creality Ender 2 Pro v2.4.S4_170 (HC32f460kcta)
// Derived from https://github.com/Klipper3d/klipper/blob/master/config/printer-creality-ender2pro-hc32-2022.cfg
//
#include "env_validate.h"
#if HAS_MULTI_HOTEND || E_STEPPERS > 1
#error "Creality v2.4.S4 only supports one hotend and E-stepper"
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Creality v2.4.S4"
#endif
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "Ender 2 Pro"
#endif
//
// Onboard crystal oscillator
//
#ifndef BOARD_XTAL_FREQUENCY
#define BOARD_XTAL_FREQUENCY 8000000 // 8 MHz XTAL
#endif
//
// Release JTAG pins but keep SWD enabled
// - PA15 (JTDI / E0_DIR_PIN)
// - PB3 (JTDO / E0_STEP_PIN)
// - PB4 (NJTRST / E0_ENABLE_PIN)
//
//#define DISABLE_DEBUG
#define DISABLE_JTAG
//
// EEPROM
//
#if NO_EEPROM_SELECTED
#define IIC_BL24CXX_EEPROM
//#define SDCARD_EEPROM_EMULATION
#undef NO_EEPROM_SELECTED
#endif
#if ENABLED(IIC_BL24CXX_EEPROM)
#define IIC_EEPROM_SDA PA12
#define IIC_EEPROM_SCL PA11
#define MARLIN_EEPROM_SIZE 0x800 // 2K (24C16)
#elif ENABLED(SDCARD_EEPROM_EMULATION)
#define MARLIN_EEPROM_SIZE 0x800 // 2K
#endif
//
// Servos
//
#ifndef SERVO0_PIN
#define SERVO0_PIN PB0 // BLTouch OUT *
#endif
//
// Limit Switches
//
#define X_STOP_PIN PA5
#define Y_STOP_PIN PA6
#define Z_STOP_PIN PB0 // BLTOUCH *
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PB1 // BLTouch IN *
#endif
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PC15 // "Pulled-high" *
#endif
//
// Steppers
//
#define X_ENABLE_PIN PC2
#define X_STEP_PIN PC1
#define X_DIR_PIN PC0
#define Y_ENABLE_PIN PH2
#define Y_STEP_PIN PB9
#define Y_DIR_PIN PB8
#define Z_ENABLE_PIN PB7
#define Z_STEP_PIN PB6
#define Z_DIR_PIN PB5
#define E0_ENABLE_PIN PB4
#define E0_STEP_PIN PB3
#define E0_DIR_PIN PA15
//
// Temperature Sensors
//
#define TEMP_0_PIN PC5 // HEATER1 ADC1_IN15
#define TEMP_BED_PIN PC4 // HOT BED ADC1_IN14
//
// Heaters / Fans
//
#define HEATER_0_PIN PA1 // HEATER1
#define HEATER_BED_PIN PB10 // HOT BED
#define FAN0_PIN PA0 // FAN0
//
// SD Card
//
#define SD_DETECT_PIN PA10
#define ONBOARD_SPI_DEVICE 1
#define ONBOARD_SD_CS_PIN PC3 // SDSS
#define ONBOARD_SDIO
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer
#ifndef LCD_SERIAL_PORT
#define LCD_SERIAL_PORT 1
#endif
//
// SDIO Pins
//
#define BOARD_SDIO_D0 PC8
#define BOARD_SDIO_D1 PC9
#define BOARD_SDIO_D2 PC10
#define BOARD_SDIO_D3 PC11
#define BOARD_SDIO_CLK PC12
#define BOARD_SDIO_CMD PD2
#define BOARD_SDIO_DET PA10
//
// USART Pins
//
// Display
#define BOARD_USART1_TX_PIN PA2 // LCD
#define BOARD_USART1_RX_PIN PA3
// Host
#define BOARD_USART2_TX_PIN PA8 // USB
#define BOARD_USART2_RX_PIN PA7
// Onboard LED (HIGH = off, LOW = on)
#ifndef LED_BUILTIN
#define LED_BUILTIN PC3
#endif
#define BOARD_NO_NATIVE_USB
//
// SPI3 Pins (LCD)
//
#define SPI_NSS PB15 // SPI3_NSS
#define SPI_SCK PB14 // SPI3_CLK
#define SPI_MISO PB13 // SPI3_MISO
#define SPI_MOSI PB12 // SPI3_MOSI
//
// LCD / Controller
//
/** ------
* PC6 | 1 2 | PC7
* PA2 | 3 4 | PA3
* PB13 5 6 | PB14
* N/C | 7 8 | PB12
* GND | 9 10 | 5V
* ------
* EXP1
*/
#define EXP1_01_PIN PC6
#define EXP1_02_PIN PC7
#define EXP1_03_PIN PA2
#define EXP1_04_PIN PA3
#define EXP1_05_PIN PB13
#define EXP1_06_PIN PB14
#define EXP1_07_PIN -1
#define EXP1_08_PIN PB12
#if ENABLED(CR10_STOCKDISPLAY) // LCD used for C2
/** ------
* BEEPER | 1 2 | ENC
* EN1 | 3 4 | KILL
* EN2 5 6 | LCD_D4
* LCD_RS | 7 8 | LCD_EN
* GND | 9 10 | 5V
* ------
*/
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_EN EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#define KILL_PIN EXP1_04_PIN
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/hc32f4/pins_CREALITY_ENDER2P_V24S4.h
|
C
|
agpl-3.0
| 6,259
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Arduino Mega with RAMPS v1.4 (or v1.3) pin assignments
*
* Applies to the following boards:
*
* RAMPS_14_EFB (Hotend, Fan, Bed)
* RAMPS_14_EEB (Hotend0, Hotend1, Bed)
* RAMPS_14_EFF (Hotend, Fan0, Fan1)
* RAMPS_14_EEF (Hotend0, Hotend1, Fan)
* RAMPS_14_SF (Spindle, Controller Fan)
*
* RAMPS_13_EFB (Hotend, Fan, Bed)
* RAMPS_13_EEB (Hotend0, Hotend1, Bed)
* RAMPS_13_EFF (Hotend, Fan0, Fan1)
* RAMPS_13_EEF (Hotend0, Hotend1, Fan)
* RAMPS_13_SF (Spindle, Controller Fan)
*
* Other pins_MYBOARD.h files may override these defaults
*
* Differences between
* RAMPS_13 | RAMPS_14
* 7 | 11
*/
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "RAMPS 1.4"
#endif
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "SimRap 1.4"
#endif
#ifndef MARLIN_EEPROM_SIZE
#define MARLIN_EEPROM_SIZE 0x1000 // 4K
#endif
//
// Servos
//
#ifdef IS_RAMPS_13
#define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
#else
#define SERVO0_PIN 11
#endif
#define SERVO1_PIN 6
#define SERVO2_PIN 5
#ifndef SERVO3_PIN
#define SERVO3_PIN 4
#endif
//
// Limit Switches
//
#define X_MIN_PIN 3
#ifndef X_MAX_PIN
#define X_MAX_PIN 2
#endif
#define Y_MIN_PIN 14
#define Y_MAX_PIN 15
#define Z_MIN_PIN 18
#define Z_MAX_PIN 19
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 32
#endif
//
// Steppers
//
#define X_STEP_PIN 54
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38
#ifndef X_CS_PIN
#define X_CS_PIN 53
#endif
#define Y_STEP_PIN 60
#define Y_DIR_PIN 61
#define Y_ENABLE_PIN 56
#ifndef Y_CS_PIN
#define Y_CS_PIN 49
#endif
#define Z_STEP_PIN 46
#define Z_DIR_PIN 48
#define Z_ENABLE_PIN 62
#ifndef Z_CS_PIN
#define Z_CS_PIN 40
#endif
#define E0_STEP_PIN 26
#define E0_DIR_PIN 28
#define E0_ENABLE_PIN 24
#ifndef E0_CS_PIN
#define E0_CS_PIN 42
#endif
#define E1_STEP_PIN 36
#define E1_DIR_PIN 34
#define E1_ENABLE_PIN 30
#ifndef E1_CS_PIN
#define E1_CS_PIN 44
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN 0 // Analog Input
#define TEMP_1_PIN 1 // Analog Input
#define TEMP_BED_PIN 2 // Analog Input
// SPI for MAX Thermocouple
#if !HAS_MEDIA
#define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card
#else
#define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN)
#endif
//
// Heaters / Fans
//
#ifndef MOSFET_A_PIN
#define MOSFET_A_PIN 10
#endif
#ifndef MOSFET_B_PIN
#define MOSFET_B_PIN 9
#endif
#ifndef MOSFET_C_PIN
#define MOSFET_C_PIN 8
#endif
#ifndef MOSFET_D_PIN
#define MOSFET_D_PIN -1
#endif
#define HEATER_0_PIN MOSFET_A_PIN
#if FET_ORDER_EFB // Hotend, Fan, Bed
#define FAN0_PIN MOSFET_B_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#elif FET_ORDER_EEF // Hotend, Hotend, Fan
#define HEATER_1_PIN MOSFET_B_PIN
#define FAN0_PIN MOSFET_C_PIN
#elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define HEATER_1_PIN MOSFET_B_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#elif FET_ORDER_EFF // Hotend, Fan, Fan
#define FAN0_PIN MOSFET_B_PIN
#define FAN1_PIN MOSFET_C_PIN
#elif FET_ORDER_SF // Spindle, Fan
#define FAN0_PIN MOSFET_C_PIN
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
#define FAN0_PIN MOSFET_B_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
#define FAN1_PIN MOSFET_D_PIN
#else
#define HEATER_1_PIN MOSFET_D_PIN
#endif
#endif
#ifndef FAN0_PIN
#define FAN0_PIN 4 // IO pin. Buffer needed
#endif
//
// Misc. Functions
//
#define SDSS 53
#define LED_PIN 13
#define BOARD_NEOPIXEL_PIN 71
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 5 // Analog Input on AUX2
#endif
// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 21
#endif
#ifndef PS_ON_PIN
#define PS_ON_PIN 12
#endif
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
#if NUM_SERVOS <= 1 // Prefer the servo connector
#define CASE_LIGHT_PIN 6 // Hardware PWM
#elif HAS_FREE_AUX2_PINS // try to use AUX 2
#define CASE_LIGHT_PIN 44 // Hardware PWM
#endif
#endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
#if !defined(NUM_SERVOS) || NUM_SERVOS == 0 // Prefer the servo connector
#define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown!
#define SPINDLE_DIR_PIN 5
#elif HAS_FREE_AUX2_PINS // try to use AUX 2
#define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown!
#define SPINDLE_DIR_PIN 65
#endif
#endif
//
// Průša i3 MK2 Multiplexer Support
//
#if HAS_PRUSA_MMU1
#ifndef E_MUX0_PIN
#define E_MUX0_PIN 40 // Z_CS_PIN
#endif
#ifndef E_MUX1_PIN
#define E_MUX1_PIN 42 // E0_CS_PIN
#endif
#ifndef E_MUX2_PIN
#define E_MUX2_PIN 44 // E1_CS_PIN
#endif
#endif
/**
* Default pins for TMC SPI
*/
#ifndef TMC_SPI_MOSI
#define TMC_SPI_MOSI 66
#endif
#ifndef TMC_SPI_MISO
#define TMC_SPI_MISO 44
#endif
#ifndef TMC_SPI_SCK
#define TMC_SPI_SCK 64
#endif
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial1
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
/**
* Software serial
*/
#ifndef X_SERIAL_TX_PIN
#define X_SERIAL_TX_PIN 40
#endif
#ifndef X_SERIAL_RX_PIN
#define X_SERIAL_RX_PIN 63
#endif
#ifndef X2_SERIAL_TX_PIN
#define X2_SERIAL_TX_PIN -1
#endif
#ifndef X2_SERIAL_RX_PIN
#define X2_SERIAL_RX_PIN -1
#endif
#ifndef Y_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN 59
#endif
#ifndef Y_SERIAL_RX_PIN
#define Y_SERIAL_RX_PIN 64
#endif
#ifndef Y2_SERIAL_TX_PIN
#define Y2_SERIAL_TX_PIN -1
#endif
#ifndef Y2_SERIAL_RX_PIN
#define Y2_SERIAL_RX_PIN -1
#endif
#ifndef Z_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN 42
#endif
#ifndef Z_SERIAL_RX_PIN
#define Z_SERIAL_RX_PIN 65
#endif
#ifndef Z2_SERIAL_TX_PIN
#define Z2_SERIAL_TX_PIN -1
#endif
#ifndef Z2_SERIAL_RX_PIN
#define Z2_SERIAL_RX_PIN -1
#endif
#ifndef E0_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN 44
#endif
#ifndef E0_SERIAL_RX_PIN
#define E0_SERIAL_RX_PIN 66
#endif
#ifndef E1_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN -1
#endif
#ifndef E1_SERIAL_RX_PIN
#define E1_SERIAL_RX_PIN -1
#endif
#ifndef E2_SERIAL_TX_PIN
#define E2_SERIAL_TX_PIN -1
#endif
#ifndef E2_SERIAL_RX_PIN
#define E2_SERIAL_RX_PIN -1
#endif
#ifndef E3_SERIAL_TX_PIN
#define E3_SERIAL_TX_PIN -1
#endif
#ifndef E3_SERIAL_RX_PIN
#define E3_SERIAL_RX_PIN -1
#endif
#ifndef E4_SERIAL_TX_PIN
#define E4_SERIAL_TX_PIN -1
#endif
#ifndef E4_SERIAL_RX_PIN
#define E4_SERIAL_RX_PIN -1
#endif
#ifndef E5_SERIAL_TX_PIN
#define E5_SERIAL_TX_PIN -1
#endif
#ifndef E5_SERIAL_RX_PIN
#define E5_SERIAL_RX_PIN -1
#endif
#ifndef E6_SERIAL_TX_PIN
#define E6_SERIAL_TX_PIN -1
#endif
#ifndef E6_SERIAL_RX_PIN
#define E6_SERIAL_RX_PIN -1
#endif
#ifndef E7_SERIAL_TX_PIN
#define E7_SERIAL_TX_PIN -1
#endif
#ifndef E7_SERIAL_RX_PIN
#define E7_SERIAL_RX_PIN -1
#endif
#endif
/** Faux Expansion Headers
* ------ ------
* (BEEP) 37 | 1 2 | 35 (ENC) (MISO) 50 | 1 2 | 52 (SCK)
* (LCD_EN) 17 | 3 4 | 16 (LCD_RS) (EN1) 31 | 3 4 | 53 (SDSS)
* (LCD_D4) 23 5 6 | 25 (LCD_D5) (EN2) 33 5 6 | 51 (MOSI)
* (LCD_D6) 27 | 7 8 | 29 (LCD_D7) (SD_DET) 49 | 7 8 | 41 (KILL)
* -- | 9 10 | -- -- | 9 10 | --
* ------ ------
* EXP1 EXP2
*/
#define EXP1_01_PIN 37 // BEEPER
#define EXP1_02_PIN 35 // ENC
#define EXP1_03_PIN 17 // LCD_EN
#define EXP1_04_PIN 16 // LCD_RS
#define EXP1_05_PIN 23 // LCD_D4
#define EXP1_06_PIN 25 // LCD_D5
#define EXP1_07_PIN 27 // LCD_D6
#define EXP1_08_PIN 29 // LCD_D7
#define EXP2_01_PIN 50 // MISO
#define EXP2_02_PIN 52 // SCK
#define EXP2_03_PIN 31 // EN1
#define EXP2_04_PIN 53 // SDSS
#define EXP2_05_PIN 33 // EN2
#define EXP2_06_PIN 51 // MOSI
#define EXP2_07_PIN 49 // SD_DET
#define EXP2_08_PIN 41 // KILL
//
// LCD / Controller
//
#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI)
#define TFT_CS_PIN 49
#define TFT_DC_PIN 43
#define TFT_A0_PIN TFT_DC_PIN
#define TFT_SCK_PIN SD_SCK_PIN
#define TFT_MISO_PIN SD_MISO_PIN
#define TFT_MOSI_PIN SD_MOSI_PIN
#define LCD_USE_DMA_SPI
#define BEEPER_PIN 42
#define BTN_ENC 59
#define BTN_EN1 40
#define BTN_EN2 63
#define TOUCH_CS_PIN 33
#define SD_DETECT_PIN 41
#define SPI_FLASH
#if ENABLED(SPI_FLASH)
#define SPI_DEVICE 1 // Maple
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#define SPI_FLASH_CS_PIN 31
#define SPI_FLASH_SCK_PIN SD_SCK_PIN
#define SPI_FLASH_MISO_PIN SD_MISO_PIN
#define SPI_FLASH_MOSI_PIN SD_MOSI_PIN
#endif
#define TFT_BUFFER_WORDS 0xFFFF
#ifndef TFT_DRIVER
#define TFT_DRIVER ST7796
#endif
#if DISABLED(TOUCH_SCREEN_CALIBRATION)
#if ENABLED(TFT_RES_320x240)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X 20525
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 15335
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X -1
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y 0
#endif
#elif ENABLED(TFT_RES_480x272)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X 30715
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 17415
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 0
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y -1
#endif
#elif ENABLED(TFT_RES_480x320)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X 30595
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 20415
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 2
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y 1
#endif
#elif ENABLED(TFT_RES_1024x600)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X 65533
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 38399
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 2
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y 1
#endif
#endif
#endif
#define BTN_BACK 70
#elif HAS_WIRED_LCD
//
// LCD Display output pins
//
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS EXP2_07_PIN // CS chip select /SS chip slave select
#define LCD_PINS_EN EXP2_06_PIN // SID (MOSI)
#define LCD_PINS_D4 EXP2_02_PIN // SCK (CLK) clock
#elif ALL(IS_NEWPANEL, PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_EN 42
#define LCD_PINS_D4 65
#define LCD_PINS_D5 66
#define LCD_PINS_D6 44
#define LCD_PINS_D7 64
#else
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_EN EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#if !IS_NEWPANEL
#define BEEPER_PIN EXP1_01_PIN
#endif
#elif ENABLED(ZONESTAR_LCD)
#define LCD_PINS_RS 64
#define LCD_PINS_EN 44
#define LCD_PINS_D4 63
#define LCD_PINS_D5 40
#define LCD_PINS_D6 42
#define LCD_PINS_D7 65
#else
#if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306)
#define LCD_PINS_DC EXP1_06_PIN // Set as output on init
#define LCD_PINS_RS EXP1_07_PIN // Pull low for 1s to init
// DOGM SPI LCD Support
#define DOGLCD_CS EXP1_04_PIN
#define DOGLCD_MOSI EXP1_03_PIN
#define DOGLCD_SCK EXP1_05_PIN
#define DOGLCD_A0 LCD_PINS_DC
#else
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#endif
#define LCD_PINS_D7 EXP1_08_PIN
#if !IS_NEWPANEL
#define BEEPER_PIN EXP2_05_PIN
#endif
#endif
#endif
//
// LCD Display input pins
//
#if IS_NEWPANEL
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN EXP1_01_PIN
#if ENABLED(CR10_STOCKDISPLAY)
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#else
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#endif
#define BTN_ENC EXP1_02_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#define KILL_PIN EXP2_08_PIN
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
#define LCD_BACKLIGHT_PIN 39
#endif
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SD_DETECT_PIN 42
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS SDSS
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // https://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
#define BTN_EN2 7 // 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 SDSS
#define SD_DETECT_PIN 49
#elif ANY(VIKI2, miniVIKI)
#define DOGLCD_CS 45
#define DOGLCD_A0 44
#define BEEPER_PIN 33
#define STAT_LED_RED_PIN 32
#define STAT_LED_BLUE_PIN 35
#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 39
#define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
#define KILL_PIN 31
#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define DOGLCD_CS EXP1_08_PIN
#define DOGLCD_A0 EXP1_07_PIN
#define BEEPER_PIN EXP1_05_PIN
#define LCD_BACKLIGHT_PIN EXP2_05_PIN
#define BTN_EN1 EXP1_02_PIN
#define BTN_EN2 EXP1_01_PIN
#define BTN_ENC EXP2_03_PIN
#define LCD_SDSS SDSS
#define SD_DETECT_PIN EXP2_07_PIN
#define KILL_PIN EXP2_08_PIN
#elif ENABLED(MKS_MINI_12864)
#define DOGLCD_A0 EXP1_07_PIN
#define DOGLCD_CS EXP1_06_PIN
#define BEEPER_PIN EXP1_01_PIN
// not connected to a pin
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define BTN_ENC EXP1_02_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#define KILL_PIN 64
//#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
#elif ENABLED(MINIPANEL)
#define BEEPER_PIN 42
// not connected to a pin
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define DOGLCD_A0 44
#define DOGLCD_CS 66
#define BTN_EN1 40
#define BTN_EN2 63
#define BTN_ENC 59
#define SD_DETECT_PIN 49
#define KILL_PIN 64
//#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
#elif ENABLED(ZONESTAR_LCD)
#define ADC_KEYPAD_PIN 12
#elif ENABLED(AZSMZ_12864)
// Pins only defined for RAMPS_SMART currently
#else
#define BEEPER_PIN 33
// Buttons are directly attached to AUX-2
#if IS_RRW_KEYPAD
#define SHIFT_OUT_PIN 40
#define SHIFT_CLK_PIN 44
#define SHIFT_LD_PIN 42
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#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 EXP1_01_PIN
#define BTN_EN2 EXP1_02_PIN
#define BTN_ENC EXP2_03_PIN
#define SD_DETECT_PIN EXP2_08_PIN
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN EXP2_07_PIN
#define KILL_PIN EXP2_08_PIN
#endif
#endif
// CUSTOM SIMULATOR INPUTS
#define BTN_BACK 70
#endif // IS_NEWPANEL
#endif // HAS_WIRED_LCD
|
2301_81045437/Marlin
|
Marlin/src/pins/linux/pins_RAMPS_LINUX.h
|
C
|
agpl-3.0
| 23,019
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifndef ENV_VALIDATE_H
#define ENV_VALIDATE_H
#if ENABLED(REQUIRE_LPC1769) && NOT_TARGET(MCU_LPC1769)
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#elif DISABLED(REQUIRE_LPC1769) && NOT_TARGET(MCU_LPC1768)
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#undef REQUIRE_LPC1769
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/env_validate.h
|
C
|
agpl-3.0
| 1,227
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* AZSMZ MINI pin assignments
* Source: https://raw.githubusercontent.com/Rose-Fish/AZSMZ-mini/master/AZSMZ.sch
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "AZSMZ Mini"
//
// Servos
//
#define SERVO0_PIN P1_23
//
// Limit Switches
//
#define X_STOP_PIN P1_24
#define Y_STOP_PIN P1_26
#define Z_MIN_PIN P1_28
#define Z_MAX_PIN P1_29
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
#define E1_STEP_PIN P2_08
#define E1_DIR_PIN P2_13
#define E1_ENABLE_PIN P4_29
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_23_A0 // A0 (TH1)
#define TEMP_BED_PIN P0_24_A1 // A1 (TH2)
#define TEMP_1_PIN P0_25_A2 // A2 (TH3)
//
// Heaters / Fans
//
// EFB
#define HEATER_0_PIN P2_04
#define HEATER_BED_PIN P2_05
#ifndef FAN0_PIN
#define FAN0_PIN P2_07
#endif
#define FAN1_PIN P0_26
#define LCD_SDSS P0_16 // LCD SD chip select
#if ENABLED(AZSMZ_12864)
#define BEEPER_PIN P1_30
#define DOGLCD_A0 P2_06
#define DOGLCD_CS P1_22
#define BTN_EN1 P4_28
#define BTN_EN2 P1_27
#define BTN_ENC P3_26
#if !defined(SDCARD_CONNECTION) && DISABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION LCD
#endif
#endif
#if SD_CONNECTION_IS(LCD)
#define SD_SCK_PIN P0_15
#define SD_MISO_PIN P0_17
#define SD_MOSI_PIN P0_18
#define SD_SS_PIN LCD_SDSS
#define SD_DETECT_PIN P3_25
#elif SD_CONNECTION_IS(ONBOARD)
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
//
// Ethernet pins
//
#define REF_CLK P1_15
#define ENET_MDIO P1_17
#define ENET_MOC P1_16
#define ENET_CRS P1_08
#define ENET_RX_ER P1_14
#define ENET_TX_EN P1_04
#define ENET_RXD0 P1_09
#define ENET_RXD1 P1_10
#define ENET_TXD0 P1_00
#define ENET_TXD1 P1_01
/**
* PWMs
*
* There are 6 PWMs. Each PWM can be assigned to one of two pins.
*
* SERVO2 does NOT have a PWM assigned to it.
*
* PWM1.1 DIO4 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM
* PWM1.1 DIO26 E0_STEP_PIN
* PWM1.2 DIO11 SERVO0_PIN
* PWM1.2 DIO54 X_STEP_PIN
* PWM1.3 DIO6 SERVO1_PIN J5-1
* PWM1.3 DIO60 Y_STEP_PIN
* PWM1.4 DIO53 SDSS(SSEL0) J3-5 AUX-3
* PWM1.4 DIO46 Z_STEP_PIN
* PWM1.5 DIO3 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
* PWM1.5 DIO9 MOSFET_B_PIN
* PWM1.6 DIO14 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
* PWM1.6 DIO10 MOSFET_A_PIN
*/
/**
* Special pins
* D37 - not 5V tolerant
* D49 - not 5V tolerant
* D57 - open collector
* D58 - open collector
*/
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h
|
C
|
agpl-3.0
| 5,152
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* BIQU Thunder B300 V1.0
*/
#include "env_validate.h"
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "BIQU Thunder B300 V1.0"
#endif
//
// Limit Switches
//
#define X_MIN_PIN P1_24 // 10k pullup to 3.3V, 1K series
#define X_MAX_PIN P1_25 // 10k pullup to 3.3V, 1K series
#define Y_MIN_PIN P1_26 // 10k pullup to 3.3V, 1K series
#define Y_MAX_PIN P1_27 // 10k pullup to 3.3V, 1K series
#define Z_MIN_PIN P1_28 // 10k pullup to 3.3V, 1K series
#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V, 1K series
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#ifndef X_CS_PIN
#define X_CS_PIN P1_15 // ETH
#endif
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_14 // ETH
#endif
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_16 // ETH
#endif
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
#ifndef E0_CS_PIN
#define E0_CS_PIN P1_17 // ETH
#endif
//
// Default pins for TMC software SPI
//
#ifndef TMC_SPI_MOSI
#define TMC_SPI_MOSI P0_18 // ETH
#endif
#ifndef TMC_SPI_MISO
#define TMC_SPI_MISO P0_17 // ETH
#endif
#ifndef TMC_SPI_SCK
#define TMC_SPI_SCK P0_15 // ETH
#endif
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_24_A1 // A0 (T0)
#define TEMP_BED_PIN P0_23_A0 // A1 (T1)
//
// Heaters / Fans
//
#define HEATER_0_PIN P2_07
#define HEATER_BED_PIN P2_05
#ifndef FAN0_PIN
#define FAN0_PIN P2_04
#endif
//
// Unused
//
//#define PIN_P2_10 P2_10 // IBOOT-1
//#define PIN_P0_27 P0_27 // Onboard SD Detect
/**
* LCD / Controller
*
* REPRAP_DISCOUNT_SMART_CONTROLLER is not supported due to the lack of LCD_PINS_D5,
* LCD_PINS_D6 or LCD_PINS_D7 in the EXP1 connector.
*
* A remote SD card is not supported as the pins routed to EXP2 are the same as used
* for the onboard SD card, and a chip select signal is not provided for the remote
* SD card.
*/
#if HAS_WIRED_LCD
#define BEEPER_PIN P1_31 // EXP1-1
#define BTN_EN1 P3_26 // EXP2-3
#define BTN_EN2 P3_25 // EXP2-5
#define BTN_ENC P1_30 // EXP1-2
#define SD_DETECT_PIN P0_27 // EXP2-7
#define LCD_PINS_RS P0_16 // EXP1-4
#define LCD_PINS_EN P0_18 // (MOSI) EXP1-3
#define LCD_PINS_D4 P0_15 // (SCK) EXP1-5
#if ALL(HAS_MARLINUI_HD44780, IS_RRD_SC)
#error "REPRAP_DISCOUNT_SMART_CONTROLLER displays aren't supported by the BIQU B300 v1.0"
#endif
#if HAS_MEDIA
#error "SDSUPPORT is not supported by the BIQU B300 v1.0 when an LCD controller is used"
#endif
#endif // HAS_WIRED_LCD
/**
* SD Card Reader
*
* Software SPI is used to interface with a stand-alone SD card reader connected to EXP1.
* Hardware SPI can't be used because P0_17 (MISO) is not brought out on this board.
*/
#if HAS_MEDIA
#define SD_SCK_PIN P0_15 // EXP1-5
#define SD_MISO_PIN P0_16 // EXP1-4
#define SD_MOSI_PIN P0_18 // EXP1-3
#define SD_SS_PIN P1_30 // EXP1-2
#define SDSS SD_SS_PIN
#endif
/**
* PWMS
*
* There are 6 PWMS. Each PWM can be assigned to one of two pins.
*
* PWM1.1 P0_18 LCD_PINS_EN
* PWM1.1 P2_0 X_STEP_PIN
* PWM1.2 P1_20 <none>
* PWM1.2 P2_1 Y_STEP_PIN
* PWM1.3 P1_21 <none>
* PWM1.3 P2_2 Z_STEP_PIN
* PWM1.4 P1_23 <none>
* PWM1.4 P2_3 E0_STEP_PIN
* PWM1.5 P1_24 X_MIN_PIN
* PWM1.5 P2_4 FAN0_PIN
* PWM1.6 P1_26 Y_MIN_PIN
* PWM1.6 P2_5 HEATER_BED_PIN
*/
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h
|
C
|
agpl-3.0
| 5,459
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* BIQU BQ111-A4 pin assignments
*
* Applies to the following boards:
*
* BOARD_BIQU_BQ111_A4 (Hotend, Fan, Bed)
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "BIQU BQ111-A4"
//
// Limit Switches
//
#define X_MIN_PIN P1_24 // 10k pullup to 3.3V, 1K series
#define X_MAX_PIN P1_25 // 10k pullup to 3.3V, 1K series
#define Y_MIN_PIN P1_26 // 10k pullup to 3.3V, 1K series
#define Y_MAX_PIN P1_27 // 10k pullup to 3.3V, 1K series
#define Z_MIN_PIN P1_28 // 10k pullup to 3.3V, 1K series
#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V, 1K series
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_23_A0 // A0 (T0)
#define TEMP_BED_PIN P0_24_A1 // A1 (T1)
//
// Heaters / Fans
//
#define HEATER_0_PIN P2_07
#define HEATER_BED_PIN P2_05
#ifndef FAN0_PIN
#define FAN0_PIN P2_04
#endif
//
// Unused
//
//#define PIN_P2_10 P2_10 // IBOOT-1
//#define PIN_P0_27 P0_27 // Onboard SD Detect
/**
* LCD / Controller
*
* REPRAP_DISCOUNT_SMART_CONTROLLER is not supported due to the lack of LCD_PINS_D5,
* LCD_PINS_D6 or LCD_PINS_D7 in the EXP1 connector.
*
* A remote SD card is not supported as the pins routed to EXP2 are the same as used
* for the onboard SD card, and a chip select signal is not provided for the remote
* SD card.
*/
#if HAS_WIRED_LCD
#define BEEPER_PIN P1_31 // EXP1-1
#define BTN_EN1 P3_26 // EXP2-3
#define BTN_EN2 P3_25 // EXP2-5
#define BTN_ENC P1_30 // EXP1-2
#define SD_DETECT_PIN P0_27 // EXP2-7
#define LCD_PINS_RS P0_16 // EXP1-4
#define LCD_PINS_EN P0_18 // (MOSI) EXP1-3
#define LCD_PINS_D4 P0_15 // (SCK) EXP1-5
#if ALL(HAS_MARLINUI_HD44780, IS_RRD_SC)
#error "REPRAP_DISCOUNT_SMART_CONTROLLER displays aren't supported by the BIQU BQ111-A4"
#endif
#if HAS_MEDIA
#error "SDSUPPORT is not supported by the BIQU BQ111-A4 when an LCD controller is used"
#endif
#endif // HAS_WIRED_LCD
/**
* SD Card Reader
*
* Software SPI is used to interface with a stand-alone SD card reader connected to EXP1.
* Hardware SPI can't be used because P0_17 (MISO) is not brought out on this board.
*/
#if HAS_MEDIA
#define SD_SCK_PIN P0_15 // EXP1-5
#define SD_MISO_PIN P0_16 // EXP1-4
#define SD_MOSI_PIN P0_18 // EXP1-3
#define SD_SS_PIN P1_30 // EXP1-2
#define SDSS SD_SS_PIN
#endif // HAS_MEDIA
/**
* PWMS
*
* There are 6 PWMS. Each PWM can be assigned to one of two pins.
*
* PWM1.1 P0_18 LCD_PINS_EN
* PWM1.1 P2_0 X_STEP_PIN
* PWM1.2 P1_20 <none>
* PWM1.2 P2_1 Y_STEP_PIN
* PWM1.3 P1_21 <none>
* PWM1.3 P2_2 Z_STEP_PIN
* PWM1.4 P1_23 <none>
* PWM1.4 P2_3 E0_STEP_PIN
* PWM1.5 P1_24 X_MIN_PIN
* PWM1.5 P2_4 FAN0_PIN
* PWM1.6 P1_26 Y_MIN_PIN
* PWM1.6 P2_5 HEATER_BED_PIN
*/
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h
|
C
|
agpl-3.0
| 4,899
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* BigTreeTech SKR 1.1 pin assignments
* Schematic: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.1/blob/master/hardware/SKR-V1.1SchDoc.pdf
*/
#define BOARD_INFO_NAME "BTT SKR V1.1"
//
// Limit Switches
//
#define X_MIN_PIN P1_29
#define X_MAX_PIN P1_28
#define Y_MIN_PIN P1_27
#define Y_MAX_PIN P1_26
#define Z_MIN_PIN P1_25
#define Z_MAX_PIN P1_24
//
// Steppers
//
#define X_STEP_PIN P0_04
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P4_28
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P2_02
#define Y_ENABLE_PIN P2_00
#define Z_STEP_PIN P0_20
#define Z_DIR_PIN P0_21
#define Z_ENABLE_PIN P0_19
#define E0_STEP_PIN P0_11
#define E0_DIR_PIN P2_13
#define E0_ENABLE_PIN P2_12
/** ------ ------
* 1.30 | 1 2 | 2.11 0.17 | 1 2 | 0.15
* 0.18 | 3 4 | 0.16 3.26 | 3 4 | 1.23
* 0.15 5 6 | -- 3.25 5 6 | 0.18
* -- | 7 8 | -- 1.31 | 7 8 | RESET
* GND | 9 10 | 5V GND | 9 10 | --
* ------ ------
* EXP1 EXP2
*/
#define EXP1_01_PIN P1_30
#define EXP1_02_PIN P2_11
#define EXP1_03_PIN P0_18
#define EXP1_04_PIN P0_16
#define EXP1_05_PIN P0_15
#define EXP1_06_PIN -1 // NC
#define EXP1_07_PIN -1 // NC
#define EXP1_08_PIN -1 // NC
#define EXP2_01_PIN P0_17
#define EXP2_02_PIN P0_15
#define EXP2_03_PIN P3_26
#define EXP2_04_PIN P1_23
#define EXP2_05_PIN P3_25
#define EXP2_06_PIN P0_18
#define EXP2_07_PIN P1_31
#define EXP2_08_PIN -1 // RESET
/**
* LCD / Controller
*
* As of 20 JAN 2019 only the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER display has
* been tested with these settings. It can be connected to the SKR using standard cables
* via the EXP1 and EXP2 ports. Other displays may need a custom cable and/or changes to
* the pins defined below.
*
* The SD card on the LCD controller uses the same SPI signals as the LCD, resulting in
* garbage/lines on the LCD display during SD card access. The LCD code mitigates this
* by redrawing the screen after SD card accesses.
*/
#if IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS EXP2_03_PIN
#endif
#elif HAS_WIRED_LCD
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define BTN_ENC EXP1_02_PIN
#define LCD_SDSS EXP2_04_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_EN EXP2_06_PIN
#define LCD_PINS_D4 EXP2_02_PIN
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS P2_06
#define DOGLCD_A0 EXP1_04_PIN
#endif
#endif // HAS_WIRED_LCD
//
// SD Support
//
// MKS_MINI_12864 strongly prefers the SD card on the display and
// requires jumpers on the SKR V1.1 board as documented here:
// https://www.facebook.com/groups/505736576548648/permalink/630639874058317/
#ifndef SDCARD_CONNECTION
#if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY, IS_TFTGLCD_PANEL)
#define SDCARD_CONNECTION LCD
#else
#define SDCARD_CONNECTION ONBOARD
#endif
#endif
// Trinamic driver support
#if HAS_TRINAMIC_CONFIG
// Using TMC devices in intelligent mode requires extra connections to each device. Unfortunately
// the SKR does not have many free pins (especially if a display is in use). The SPI-based devices
// will require 3 connections (clock, mosi, miso), plus a chip select line (CS) for each driver.
// The UART-based devices require 2 pis per driver (one of which must be interrupt capable).
// The same SPI pins can be shared with the display/SD card reader, meaning SPI-based devices are
// probably a good choice for this board.
//
// SOFTWARE_DRIVER_ENABLE is a good option. It uses SPI to control the driver enable and allows the
// hardware ENABLE pins for each driver to be repurposed as SPI chip select. To use this mode the
// driver modules will probably need to be modified, removing the pin used for the enable line from
// the module and wiring this connection directly to GND (as is the case for TMC2130).
// Using this option and sharing all of the SPI pins allows 5 TMC2130 drivers to be used along with
// a REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER without requiring the use of any extra pins.
//
// Other options will probably require the use of any free pins and the TFT serial port or a
// different type of display (like the TFT), using the pins normally used for the display and encoder.
// Unfortunately, tests show it's not possible to use endstop and thermistor pins for chip-select.
// Sample settings are provided below, but only some have been tested.
//
// Another option is to share the enable and chip-select pins when using SPI. Several users have
// reported that this works. However, it's unlikely that this configuration will allow SPI communi-
// cation with the device when the drivers are active, meaning that some of the more advanced TMC
// options may not be available.
// When using any TMC SPI-based drivers, software SPI is used
// because pins may be shared with the display or SD card.
#define TMC_USE_SW_SPI
#define TMC_SPI_MOSI EXP2_06_PIN
#define TMC_SPI_MISO EXP2_01_PIN
// To minimize pin usage use the same clock pin as the display/SD card reader. (May generate LCD noise.)
#define TMC_SPI_SCK EXP2_02_PIN
// If pin 2_06 is unused, it can be used for the clock to avoid the LCD noise.
//#define TMC_SPI_SCK P2_06
#if ENABLED(SOFTWARE_DRIVER_ENABLE)
// Software enable allows the enable pins to be repurposed as chip-select pins.
// Note: Requires the driver modules to be modified to always be enabled with the enable pin removed.
#if AXIS_DRIVER_TYPE_X(TMC2130)
#define X_CS_PIN P4_28
#undef X_ENABLE_PIN
#endif
#if AXIS_DRIVER_TYPE_Y(TMC2130)
#define Y_CS_PIN P2_00
#undef Y_ENABLE_PIN
#endif
#if AXIS_DRIVER_TYPE_Z(TMC2130)
#define Z_CS_PIN P0_19
#undef Z_ENABLE_PIN
#endif
#if AXIS_DRIVER_TYPE_E0(TMC2130)
#define E0_CS_PIN P2_12
#undef E0_ENABLE_PIN
#endif
#if AXIS_DRIVER_TYPE_E1(TMC2130)
#define E1_CS_PIN P0_10
#undef E1_ENABLE_PIN
#endif
#else // !SOFTWARE_DRIVER_ENABLE
// A chip-select pin is needed for each driver.
// EXAMPLES
// Example 1: No LCD attached or a TFT style display using the AUX header RX/TX pins.
// SDCARD_CONNECTION must not be 'LCD'. Nothing should be connected to EXP1/EXP2.
//#define SKR_USE_LCD_PINS_FOR_CS
#if ENABLED(SKR_USE_LCD_PINS_FOR_CS)
#define X_CS_PIN EXP2_04_PIN
#define Y_CS_PIN EXP2_03_PIN
#define Z_CS_PIN EXP1_02_PIN
#define E0_CS_PIN EXP2_05_PIN
#define E1_CS_PIN EXP2_07_PIN
#endif
// Example 2: A REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
// The SD card reader attached to the LCD (if present) can't be used because
// the pins will be in use. So SDCARD_CONNECTION must not be 'LCD'.
//#define SKR_USE_LCD_SD_CARD_PINS_FOR_CS
#if ENABLED(SKR_USE_LCD_SD_CARD_PINS_FOR_CS)
#define X_CS_PIN P0_02
#define Y_CS_PIN P0_03
#define Z_CS_PIN P2_06
// We use SD_DETECT_PIN for E0
#undef SD_DETECT_PIN
#define E0_CS_PIN EXP2_07_PIN
// We use LCD_SDSS pin for E1
#undef LCD_SDSS
#define LCD_SDSS -1
#define E1_CS_PIN EXP2_04_PIN
#endif
// Example 3: Use the driver enable pins for chip-select.
// Commands must not be sent to the drivers when enabled. So certain
// advanced features (like driver monitoring) will not be available.
//#define SKR_USE_ENABLE_CS
#if ENABLED(SKR_USE_ENABLE_FOR_CS)
#define X_CS_PIN X_ENABLE_PIN
#define Y_CS_PIN Y_ENABLE_PIN
#define Z_CS_PIN Z_ENABLE_PIN
#define E0_CS_PIN E0_ENABLE_PIN
#define E1_CS_PIN E1_ENABLE_PIN
#endif
#endif // SOFTWARE_DRIVER_ENABLE
#endif
// Include common SKR pins
#include "pins_BTT_SKR_common.h"
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
|
C
|
agpl-3.0
| 10,166
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* BigTreeTech SKR 1.3 pin assignments
* Schematic: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT%20SKR%20V1.3/hardware/SKR-V1.3-SCH.pdf
*/
#define BOARD_INFO_NAME "BTT SKR V1.3"
#define LPC1768_IS_SKRV1_3
#define USES_DIAG_JUMPERS
//
// Trinamic Stallguard pins
//
#define X_DIAG_PIN P1_29 // X-
#define Y_DIAG_PIN P1_27 // Y-
#define Z_DIAG_PIN P1_25 // Z-
#define E0_DIAG_PIN P1_28 // X+
#define E1_DIAG_PIN P1_26 // Y+
//
// Limit Switches
//
#ifdef X_STALL_SENSITIVITY
#define X_STOP_PIN X_DIAG_PIN
#if X_HOME_TO_MIN
#define X_MAX_PIN P1_28 // X+
#else
#define X_MIN_PIN P1_28 // X+
#endif
#else
#define X_MIN_PIN P1_29 // X-
#define X_MAX_PIN P1_28 // X+
#endif
#ifdef Y_STALL_SENSITIVITY
#define Y_STOP_PIN Y_DIAG_PIN
#if Y_HOME_TO_MIN
#define Y_MAX_PIN P1_26 // Y+
#else
#define Y_MIN_PIN P1_26 // Y+
#endif
#else
#define Y_MIN_PIN P1_27 // Y-
#define Y_MAX_PIN P1_26 // Y+
#endif
#ifdef Z_STALL_SENSITIVITY
#define Z_STOP_PIN Z_DIAG_PIN
#if Z_HOME_TO_MIN
#define Z_MAX_PIN P1_24 // Z+
#else
#define Z_MIN_PIN P1_24 // Z+
#endif
#else
#define Z_MIN_PIN P1_25 // Z-
#define Z_MAX_PIN P1_24 // Z+
#endif
#define ONBOARD_ENDSTOPPULLUPS // Board has built-in pullups
//
// Servos
//
#ifndef SERVO0_PIN
#define SERVO0_PIN P2_00
#endif
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P1_24
#endif
//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN P1_28
#endif
//
// Steppers
//
#define X_STEP_PIN P2_02
#define X_DIR_PIN P2_06
#define X_ENABLE_PIN P2_01
#ifndef X_CS_PIN
#define X_CS_PIN P1_17
#endif
#define Y_STEP_PIN P0_19
#define Y_DIR_PIN P0_20
#define Y_ENABLE_PIN P2_08
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_15
#endif
#define Z_STEP_PIN P0_22
#define Z_DIR_PIN P2_11
#define Z_ENABLE_PIN P0_21
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_10
#endif
#define E0_STEP_PIN P2_13
#define E0_DIR_PIN P0_11
#define E0_ENABLE_PIN P2_12
#ifndef E0_CS_PIN
#define E0_CS_PIN P1_08
#endif
#ifndef E1_CS_PIN
#define E1_CS_PIN P1_01
#endif
//
// Default pins for TMC software SPI
//
#ifndef TMC_SPI_MOSI
#define TMC_SPI_MOSI P4_28
#endif
#ifndef TMC_SPI_MISO
#define TMC_SPI_MISO P0_05
#endif
#ifndef TMC_SPI_SCK
#define TMC_SPI_SCK P0_04
#endif
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial1
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
#define X_SERIAL_TX_PIN P4_29
#define X_SERIAL_RX_PIN P1_17
#define Y_SERIAL_TX_PIN P1_16
#define Y_SERIAL_RX_PIN P1_15
#define Z_SERIAL_TX_PIN P1_14
#define Z_SERIAL_RX_PIN P1_10
#define E0_SERIAL_TX_PIN P1_09
#define E0_SERIAL_RX_PIN P1_08
#define E1_SERIAL_TX_PIN P1_04
#define E1_SERIAL_RX_PIN P1_01
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
/**
* ------ ------
* (BEEPER) 1.30 | 1 2 | 0.28 (BTN_ENC) (MISO) 0.17 | 1 2 | 0.15 (SCK)
* (LCD_EN) 1.18 | 3 4 | 1.19 (LCD_RS) (BTN_EN1) 3.26 | 3 4 | 0.16 (SD_SS)
* (LCD_D4) 1.20 5 6 | 1.21 (LCD_D5) (BTN_EN2) 3.25 5 6 | 0.18 (MOSI)
* (LCD_D6) 1.22 | 7 8 | 1.23 (LCD_D7) (SD_DETECT) 1.31 | 7 8 | RESET
* GND | 9 10 | 5V GND | 9 10 | --
* ------ ------
* EXP1 EXP2
*/
#define EXP1_01_PIN P1_30
#define EXP1_02_PIN P0_28
#define EXP1_03_PIN P1_18
#define EXP1_04_PIN P1_19
#define EXP1_05_PIN P1_20
#define EXP1_06_PIN P1_21
#define EXP1_07_PIN P1_22
#define EXP1_08_PIN P1_23
#define EXP2_01_PIN P0_17
#define EXP2_02_PIN P0_15
#define EXP2_03_PIN P3_26
#define EXP2_04_PIN P0_16
#define EXP2_05_PIN P3_25
#define EXP2_06_PIN P0_18
#define EXP2_07_PIN P1_31
#define EXP2_08_PIN -1
#if HAS_WIRED_LCD
#if ENABLED(CTC_A10S_A13)
#error "CTC_A10S_A13 only applies to the ANET 1.0 board."
#elif ENABLED(ANET_FULL_GRAPHICS_LCD)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_3.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
* 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.)
* 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
*
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
*
* The ANET_FULL_GRAPHICS_LCD connector plug:
*
* BEFORE AFTER
* ------ ------
* (CLK) | 1 2 | (BEEPER) (BEEPER) |10 9 | --
* -- | 3 4 | (BTN_ENC) (BTN_ENC) | 8 7 | (CLK)
* (SID) 5 6 | (BTN_EN1) (BTN_EN1) 6 5 | (SID)
* (CS) | 7 8 | (BTN_EN2) (BTN_EN2) | 4 3 | (CS)
* GND | 9 10 | 5V GND | 2 1 | 5V
* ------ ------
* LCD LCD
*/
#define LCD_PINS_RS EXP1_08_PIN
#define BTN_EN1 EXP1_05_PIN
#define BTN_EN2 EXP1_07_PIN
#define BTN_ENC EXP1_03_PIN
#define LCD_PINS_EN EXP1_06_PIN
#define LCD_PINS_D4 EXP1_04_PIN
#elif ENABLED(WYH_L12864)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! WYH_L12864 requires wiring modifications. See 'pins_BTT_SKR_V1_3.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
* 3. Swap the LCD's MOSI (Pin9) and empty (Pin10) wires because Pin9 is open drain.
*
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
*
* The WYH_L12864 connector plug:
*
* BEFORE AFTER
* ______ ______
* | 1 2 | (MOSI) (MOSI) |10 9 | --
* (BTN_ENC) | 3 4 | (SCK) (BTN_ENC) | 8 7 | (SCK)
* (BTN_EN1) 5 6 | (SID) (BTN_EN1) 6 5 | (SID)
* (BTN_EN2) | 7 8 | (CS) (BTN_EN2) | 4 3 | (CS)
* 5V | 9 10 | GND GND | 2 1 | 5V
* ------ ------
* LCD LCD
*/
#define BTN_ENC EXP1_03_PIN
#define BTN_EN1 EXP1_05_PIN
#define BTN_EN2 EXP1_07_PIN
#define DOGLCD_CS EXP1_08_PIN
#define DOGLCD_A0 EXP1_06_PIN
#define DOGLCD_SCK EXP1_04_PIN
#define DOGLCD_MOSI EXP1_01_PIN
#define LCD_BACKLIGHT_PIN -1
#elif ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS EXP1_07_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define BTN_ENC EXP1_02_PIN // (58) open-drain
#define LCD_PINS_EN EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#elif HAS_ADC_BUTTONS
#error "ADC BUTTONS do not work unmodified on SKR 1.3, The ADC ports cannot take more than 3.3v."
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
#define SDCARD_CONNECTION ONBOARD
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define TFT_A0_PIN TFT_DC_PIN
#ifndef TFT_WIDTH
#define TFT_WIDTH 480
#endif
#ifndef TFT_HEIGHT
#define TFT_HEIGHT 320
#endif
#if ENABLED(BTT_TFT35_SPI_V1_0)
/**
* ------ ------
* BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK
* T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS
* T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI
* PENIRQ | 7 8 | F_CS RS | 7 8 | RESET
* GND | 9 10 | VCC GND | 9 10 | NC
* ------ ------
* EXP1 EXP2
*
* 480x320, 3.5", SPI Display with Rotary Encoder.
* Stock Display for the BIQU B1 SE Series.
* Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf
*/
#define TFT_CS_PIN EXP2_04_PIN
#define TFT_DC_PIN EXP2_07_PIN
#define TFT_SCK_PIN EXP2_02_PIN
#define TFT_MISO_PIN EXP2_01_PIN
#define TFT_MOSI_PIN EXP2_06_PIN
#define TOUCH_CS_PIN EXP1_04_PIN
#define TOUCH_SCK_PIN EXP1_05_PIN
#define TOUCH_MISO_PIN EXP1_06_PIN
#define TOUCH_MOSI_PIN EXP1_03_PIN
#define TOUCH_INT_PIN EXP1_07_PIN
#elif ENABLED(MKS_TS35_V2_0)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! MKS_TS35_V2_0 requires wiring modifications. The SKR 1.3 EXP ports are rotated 180° from what the MKS_TS35_V2_0 expects. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this error.)"
#endif
/** ------ ------
* BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK
* TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS
* TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI
* SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET
* GND | 9 10 | VCC GND | 9 10 | VCC
* ------ ------
* EXP1 EXP2
*/
#define TFT_CS_PIN EXP1_07_PIN
#define TFT_DC_PIN EXP1_08_PIN
#define TFT_RESET_PIN EXP1_04_PIN
#define TFT_BACKLIGHT_PIN EXP1_03_PIN
//#define TFT_RST_PIN EXP2_07_PIN
#define TFT_SCK_PIN EXP2_02_PIN
#define TFT_MISO_PIN EXP2_01_PIN
#define TFT_MOSI_PIN EXP2_06_PIN
#define LCD_USE_DMA_SPI
#define TFT_BUFFER_WORDS 2400
#define TOUCH_CS_PIN EXP1_05_PIN
#define TOUCH_INT_PIN EXP1_06_PIN
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1
#endif
#if ENABLED(TFT_CLASSIC_UI)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X -16794
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 11000
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 1024
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y -352
#endif
#elif ENABLED(TFT_COLOR_UI)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X -16741
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 11258
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 1024
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y -367
#endif
#define TFT_BUFFER_WORDS 2400
#endif
#elif IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS EXP2_03_PIN
#endif
#define SD_DETECT_PIN EXP2_07_PIN
#else // !CR10_STOCKDISPLAY
#define LCD_PINS_RS EXP1_04_PIN
#define BTN_EN1 EXP2_03_PIN // (31) J3-2 & AUX-4
#define BTN_EN2 EXP2_05_PIN // (33) J3-4 & AUX-4
#define BTN_ENC EXP1_02_PIN // (58) open-drain
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_SDSS EXP2_04_PIN // (16) J3-7 & AUX-4
#define SD_DETECT_PIN EXP2_07_PIN // (49) (NOT 5V tolerant)
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_04_PIN
#define DOGLCD_SCK EXP2_02_PIN
#define DOGLCD_MOSI EXP2_06_PIN
#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
#define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN EXP1_06_PIN
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN EXP1_07_PIN
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN EXP1_08_PIN
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN EXP1_06_PIN
#endif
#else // !FYSETC_MINI_12864
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS EXP1_06_PIN
#define DOGLCD_A0 EXP1_07_PIN
#define DOGLCD_SCK EXP2_02_PIN
#define DOGLCD_MOSI EXP2_06_PIN
#define FORCE_SOFT_SPI
#elif ENABLED(ENDER2_STOCKDISPLAY)
/**
* Creality Ender-2 display pinout
* ------
* (SCK) P1_30 | 1 2 | P0_28 (BTN_ENC)
* (BTN_EN1) P1_18 | 3 4 | P1_19 (RESET)
* (BTN_EN2) P1_20 5 6 | P1_21 (LCD_A0)
* (LCD_CS) P1_22 | 7 8 | P1_23 (MOSI)
* GND | 9 10 | 5V
* ------
* EXP1
*/
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define BTN_ENC EXP1_02_PIN
#define DOGLCD_CS EXP1_07_PIN
#define DOGLCD_A0 EXP1_06_PIN
#define DOGLCD_SCK EXP1_01_PIN
#define DOGLCD_MOSI EXP1_08_PIN
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#endif
#if IS_ULTIPANEL
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#endif
#endif // !FYSETC_MINI_12864
#endif // !CR10_STOCKDISPLAY
#endif // HAS_WIRED_LCD
/**
* Special pins
* P1_30 (37) (NOT 5V tolerant)
* P1_31 (49) (NOT 5V tolerant)
* P0_27 (57) (Open collector)
* P0_28 (58) (Open collector)
*/
// Include common SKR pins
#include "pins_BTT_SKR_common.h"
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
|
C
|
agpl-3.0
| 18,944
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* BigTreeTech SKR 1.4 pin assignments
* Schematic: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT%20SKR%20V1.4/Hardware/BTT%20SKR%20V1.4-SCH.pdf
*/
#include "env_validate.h"
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "BTT SKR V1.4"
#endif
#ifndef BOARD_CUSTOM_BUILD_FLAGS
#define BOARD_CUSTOM_BUILD_FLAGS -DLPC_PINCFG_UART3_P4_28
#endif
#define USES_DIAG_PINS
//
// EEPROM
//
#if NO_EEPROM_SELECTED
//#define I2C_EEPROM // EEPROM on I2C-0
//#define SDCARD_EEPROM_EMULATION
//#undef NO_EEPROM_SELECTED
#endif
#if ENABLED(I2C_EEPROM)
#define MARLIN_EEPROM_SIZE 0x8000 // 32K
#elif ENABLED(SDCARD_EEPROM_EMULATION)
#define MARLIN_EEPROM_SIZE 0x800 // 2K
#endif
//
// Servos
//
#define SERVO0_PIN P2_00
//
// TMC StallGuard DIAG pins
//
#define X_DIAG_PIN P1_29 // X-STOP
#define Y_DIAG_PIN P1_28 // Y-STOP
#define Z_DIAG_PIN P1_27 // Z-STOP
#define E0_DIAG_PIN P1_26 // E0DET
#define E1_DIAG_PIN P1_25 // E1DET
//
// Limit Switches
//
#ifdef X_STALL_SENSITIVITY
#define X_STOP_PIN X_DIAG_PIN
#if X_HOME_TO_MIN
#define X_MAX_PIN P1_26 // E0DET
#else
#define X_MIN_PIN P1_26 // E0DET
#endif
#elif ENABLED(X_DUAL_ENDSTOPS)
#ifndef X_MIN_PIN
#define X_MIN_PIN P1_29 // X-STOP
#endif
#ifndef X_MAX_PIN
#define X_MAX_PIN P1_26 // E0DET
#endif
#else
#define X_STOP_PIN P1_29 // X-STOP
#endif
#ifdef Y_STALL_SENSITIVITY
#define Y_STOP_PIN Y_DIAG_PIN
#if Y_HOME_TO_MIN
#define Y_MAX_PIN P1_25 // E1DET
#else
#define Y_MIN_PIN P1_25 // E1DET
#endif
#elif ENABLED(Y_DUAL_ENDSTOPS)
#ifndef Y_MIN_PIN
#define Y_MIN_PIN P1_28 // Y-STOP
#endif
#ifndef Y_MAX_PIN
#define Y_MAX_PIN P1_25 // E1DET
#endif
#else
#define Y_STOP_PIN P1_28 // Y-STOP
#endif
#ifdef Z_STALL_SENSITIVITY
#define Z_STOP_PIN Z_DIAG_PIN
#if Z_HOME_TO_MIN
#define Z_MAX_PIN P1_00 // PWRDET
#else
#define Z_MIN_PIN P1_00 // PWRDET
#endif
#elif ENABLED(Z_MULTI_ENDSTOPS)
#ifndef Z_MIN_PIN
#define Z_MIN_PIN P1_27 // Z-STOP
#endif
#ifndef Z_MAX_PIN
#define Z_MAX_PIN P1_00 // PWRDET
#endif
#else
#ifndef Z_STOP_PIN
#define Z_STOP_PIN P1_27 // Z-STOP
#endif
#endif
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P0_10
#endif
//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif
//
// Filament Runout Sensor
//
#define FIL_RUNOUT_PIN P1_26 // E0DET
#define FIL_RUNOUT2_PIN P1_25 // E1DET
//
// Power Supply Control
//
#ifndef PS_ON_PIN
#define PS_ON_PIN P1_00 // PWRDET
#endif
//
// Power Loss Detection
//
#ifndef POWER_LOSS_PIN
#define POWER_LOSS_PIN P1_00 // PWRDET
#endif
//
// Steppers
//
#define X_STEP_PIN P2_02
#define X_DIR_PIN P2_06
#define X_ENABLE_PIN P2_01
#ifndef X_CS_PIN
#define X_CS_PIN P1_10
#endif
#define Y_STEP_PIN P0_19
#define Y_DIR_PIN P0_20
#define Y_ENABLE_PIN P2_08
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_09
#endif
#define Z_STEP_PIN P0_22
#define Z_DIR_PIN P2_11
#define Z_ENABLE_PIN P0_21
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_08
#endif
#define E0_STEP_PIN P2_13
#define E0_DIR_PIN P0_11
#define E0_ENABLE_PIN P2_12
#ifndef E0_CS_PIN
#define E0_CS_PIN P1_04
#endif
#define E1_STEP_PIN P1_15
#define E1_DIR_PIN P1_14
#define E1_ENABLE_PIN P1_16
#ifndef E1_CS_PIN
#define E1_CS_PIN P1_01
#endif
#define TEMP_1_PIN P0_23_A0 // A0 (T0) - (67) - TEMP_1_PIN
#define TEMP_BED_PIN P0_25_A2 // A2 (T2) - (69) - TEMP_BED_PIN
//
// Default pins for TMC software SPI
//
#ifndef TMC_SPI_MOSI
#define TMC_SPI_MOSI P1_17
#endif
#ifndef TMC_SPI_MISO
#define TMC_SPI_MISO P0_05
#endif
#ifndef TMC_SPI_SCK
#define TMC_SPI_SCK P0_04
#endif
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial1
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
#define X_SERIAL_TX_PIN P1_10
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN P1_09
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN P1_08
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN P1_04
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN P1_01
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
/** ------ ------
* 1.30 | 1 2 | 0.28 0.17 | 1 2 | 0.15
* 1.18 | 3 4 | 1.19 3.26 | 3 4 | 0.16
* 1.20 5 6 | 1.21 3.25 5 6 | 0.18
* 1.22 | 7 8 | 1.23 1.31 | 7 8 | RESET
* GND | 9 10 | 5V GND | 9 10 | --
* ------ ------
* EXP1 EXP2
*/
#define EXP1_01_PIN P1_30
#define EXP1_02_PIN P0_28
#define EXP1_03_PIN P1_18
#define EXP1_04_PIN P1_19
#define EXP1_05_PIN P1_20
#define EXP1_06_PIN P1_21
#define EXP1_07_PIN P1_22
#define EXP1_08_PIN P1_23
#define EXP2_01_PIN P0_17
#define EXP2_02_PIN P0_15
#define EXP2_03_PIN P3_26
#define EXP2_04_PIN P0_16
#define EXP2_05_PIN P3_25
#define EXP2_06_PIN P0_18
#define EXP2_07_PIN P1_31
#define EXP2_08_PIN -1 // RESET
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
// RET6 DWIN ENCODER LCD
#define BTN_ENC EXP1_05_PIN
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_07_PIN
#ifndef BEEPER_PIN
#define BEEPER_PIN EXP1_06_PIN
#endif
#elif HAS_WIRED_LCD
#if ENABLED(CTC_A10S_A13)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! CTC_A10S_A13 requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
*
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
*
* The CTC_A10S_A13 connector plug:
*
* BEFORE AFTER
* ------ ------
* (BEEPER) | 1 2 | (CLK) (BEEPER) |10 9 | (CLK)
* (BTN_ENC) | 3 4 | -- (BTN_ENC) | 8 7 | --
* (BTN_EN1) 5 6 | (SID) (BTN_EN1) 6 5 | (SID)
* (BTN_EN2) | 7 8 | (CS) (BTN_EN2) | 4 3 | (CS)
* 5V | 9 10 | GND GND | 2 1 | 5V
* ------ ------
* LCD LCD
*/
#define LCD_PINS_RS EXP1_04_PIN
#define BTN_EN1 EXP1_06_PIN
#define BTN_EN2 EXP1_07_PIN
#define BTN_ENC EXP1_01_PIN
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define BEEPER_PIN EXP1_08_PIN
#elif ENABLED(ANET_FULL_GRAPHICS_LCD)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
/**
* 1. Cut the tab off the LCD connector so it can be plugged into the "EXP1" connector the other way.
* 2. Swap the LCD's +5V (Pin2) and GND (Pin1) wires. (This is the critical part!)
* 3. Rewire the CLK Signal (LCD Pin9) to LCD Pin7. (LCD Pin9 remains open because it is open drain.)
* 4. A wire is needed to connect the Reset switch at J3 (LCD Pin7) to EXP2 (Pin3) on the board.
*
* !!! If you are unsure, ask for help! Your motherboard may be damaged in some circumstances !!!
*
* The ANET_FULL_GRAPHICS_LCD connector plug:
*
* BEFORE AFTER
* ------ ------
* (BEEPER) | 1 2 | (CLK) (BEEPER) |10 9 | --
* (BTN_ENC) | 3 4 | -- (BTN_ENC) | 8 7 | (CLK)
* (BTN_EN1) 5 6 | (SID) (BTN_EN1) 6 5 | (SID)
* (BTN_EN2) | 7 8 | (CS) (BTN_EN2) | 4 3 | (CS)
* 5V | 9 10 | GND GND | 2 1 | 5V
* ------ ------
* LCD LCD
*/
#define LCD_PINS_RS EXP1_08_PIN
#define BTN_EN1 EXP1_05_PIN
#define BTN_EN2 EXP1_07_PIN
#define BTN_ENC EXP1_03_PIN
#define LCD_PINS_EN EXP1_06_PIN
#define LCD_PINS_D4 EXP1_04_PIN
#define BEEPER_PIN EXP1_01_PIN
#elif ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS EXP1_07_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define BTN_ENC EXP1_02_PIN
#define LCD_PINS_EN EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#elif ENABLED(ENDER2_STOCKDISPLAY)
/** Creality Ender-2 display pinout
* ------
* (SCK) 1.30 | 1 2 | 0.28 (BTN_ENC)
* (BTN_EN1) 1.18 | 3 4 | 1.19 (RESET)
* (BTN_EN2) 1.20 5 6 | 1.21 (LCD_A0)
* (LCD_RS) 1.22 | 7 8 | 1.23 (MOSI)
* GND | 9 10 | 5V
* ------
* EXP1
*/
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define BTN_ENC EXP1_02_PIN
#define DOGLCD_CS EXP1_07_PIN
#define DOGLCD_A0 EXP1_06_PIN
#define DOGLCD_SCK EXP1_01_PIN
#define DOGLCD_MOSI EXP1_08_PIN
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
#define SDCARD_CONNECTION ONBOARD
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define TFT_A0_PIN TFT_DC_PIN
#ifndef TFT_WIDTH
#define TFT_WIDTH 480
#endif
#ifndef TFT_HEIGHT
#define TFT_HEIGHT 320
#endif
#if ENABLED(BTT_TFT35_SPI_V1_0)
/**
* ------ ------
* BEEPER | 1 2 | LCD-BTN MISO | 1 2 | CLK
* T_MOSI | 3 4 | T_CS LCD-ENCA | 3 4 | TFTCS
* T_CLK | 5 6 T_MISO LCD-ENCB | 5 6 MOSI
* PENIRQ | 7 8 | F_CS RS | 7 8 | RESET
* GND | 9 10 | VCC GND | 9 10 | NC
* ------ ------
* EXP1 EXP2
*
* 480x320, 3.5", SPI Display with Rotary Encoder.
* Stock Display for the BIQU B1 SE Series.
* Schematic: https://github.com/bigtreetech/TFT35-SPI/blob/master/v1/Hardware/BTT%20TFT35-SPI%20V1-SCH.pdf
*/
#define TFT_CS_PIN EXP2_04_PIN
#define TFT_DC_PIN EXP2_07_PIN
#define TFT_SCK_PIN EXP2_02_PIN
#define TFT_MISO_PIN EXP2_01_PIN
#define TFT_MOSI_PIN EXP2_06_PIN
#define TOUCH_CS_PIN EXP1_04_PIN
#define TOUCH_SCK_PIN EXP1_05_PIN
#define TOUCH_MISO_PIN EXP1_06_PIN
#define TOUCH_MOSI_PIN EXP1_03_PIN
#define TOUCH_INT_PIN EXP1_07_PIN
#elif ENABLED(MKS_TS35_V2_0)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! MKS_TS35_V2_0 requires wiring modifications. The SKR 1.4 EXP ports are rotated 180° from what the MKS_TS35_V2_0 expects. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this error.)"
#endif
/** ------ ------
* BEEPER | 1 2 | BTN_ENC SPI1_MISO | 1 2 | SPI1_SCK
* TFT_BKL / LCD_EN | 3 4 | TFT_RESET / LCD_RS BTN_EN1 | 3 4 | SPI1_CS
* TOUCH_CS / LCD_D4 | 5 6 TOUCH_INT / LCD_D5 BTN_EN2 | 5 6 SPI1_MOSI
* SPI1_CS / LCD_D6 | 7 8 | SPI1_RS / LCD_D7 SPI1_RS | 7 8 | RESET
* GND | 9 10 | VCC GND | 9 10 | VCC
* ------ ------
* EXP1 EXP2
*/
#define TFT_CS_PIN EXP1_07_PIN
#define TFT_DC_PIN EXP1_08_PIN
#define TFT_RESET_PIN EXP1_04_PIN
#define TFT_BACKLIGHT_PIN EXP1_03_PIN
//#define TFT_RST_PIN EXP2_07_PIN
#define TFT_SCK_PIN EXP2_02_PIN
#define TFT_MISO_PIN EXP2_01_PIN
#define TFT_MOSI_PIN EXP2_06_PIN
#define LCD_USE_DMA_SPI
#define TFT_BUFFER_WORDS 2400
#define TOUCH_CS_PIN EXP1_05_PIN
#define TOUCH_INT_PIN EXP1_06_PIN
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1
#endif
#if ENABLED(TFT_CLASSIC_UI)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X -16794
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 11000
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 1024
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y -352
#endif
#elif ENABLED(TFT_COLOR_UI)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X -16741
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 11258
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 1024
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y -367
#endif
#define TFT_BUFFER_WORDS 2400
#endif
#elif IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS EXP2_03_PIN
#endif
#define SD_DETECT_PIN EXP2_07_PIN
#else
#define BTN_ENC EXP1_02_PIN // (58) open-drain
#define LCD_PINS_RS EXP1_04_PIN
#define BTN_EN1 EXP2_03_PIN // (31) J3-2 & AUX-4
#define BTN_EN2 EXP2_05_PIN // (33) J3-4 & AUX-4
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_SDSS EXP2_04_PIN // (16) J3-7 & AUX-4
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_04_PIN
#define DOGLCD_SCK EXP2_02_PIN
#define DOGLCD_MOSI EXP2_06_PIN
#define LCD_BACKLIGHT_PIN -1
#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
#define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN EXP1_06_PIN
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN EXP1_07_PIN
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN EXP1_08_PIN
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN EXP1_06_PIN
#endif
#else // !FYSETC_MINI_12864
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS EXP1_06_PIN
#define DOGLCD_A0 EXP1_07_PIN
#define DOGLCD_SCK EXP2_02_PIN
#define DOGLCD_MOSI EXP2_06_PIN
#define FORCE_SOFT_SPI
#endif
#if IS_ULTIPANEL
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN EXP1_08_PIN // Detect the presence of the encoder
#endif
#endif
#endif // !FYSETC_MINI_12864
#endif // HAS_MARLINUI_U8GLIB
#endif // HAS_WIRED_LCD
#if HAS_ADC_BUTTONS
#error "ADC BUTTONS do not work unmodified on SKR 1.4, The ADC ports cannot take more than 3.3v."
#endif
//
// NeoPixel LED
//
#ifndef BOARD_NEOPIXEL_PIN
#define BOARD_NEOPIXEL_PIN P1_24
#endif
/**
* Special pins
* P1_30 (37) (NOT 5V tolerant)
* P1_31 (49) (NOT 5V tolerant)
* P0_27 (57) (Open collector)
* P0_28 (58) (Open collector)
*/
//
// Include common SKR pins
//
#include "pins_BTT_SKR_common.h"
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
|
C
|
agpl-3.0
| 20,203
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "env_validate.h"
// If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION
// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT
//#define BTT_MOTOR_EXPANSION
#if ALL(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION)
#if ANY(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY)
#define EXP_MOT_USE_EXP2_ONLY 1
#else
#error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time."
#endif
#endif
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
//
// Steppers
//
#ifndef E1_STEP_PIN
#define E1_STEP_PIN P0_01
#endif
#ifndef E1_DIR_PIN
#define E1_DIR_PIN P0_00
#endif
#ifndef E1_ENABLE_PIN
#define E1_ENABLE_PIN P0_10
#endif
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#ifndef TEMP_0_PIN
#define TEMP_0_PIN P0_24_A1 // A1 (T1) - (68) - TEMP_0_PIN
#endif
#ifndef TEMP_1_PIN
#define TEMP_1_PIN P0_25_A2 // A2 (T2) - (69) - TEMP_1_PIN
#endif
#ifndef TEMP_BED_PIN
#define TEMP_BED_PIN P0_23_A0 // A0 (T0) - (67) - TEMP_BED_PIN
#endif
#if HOTENDS == 1 && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
#if TEMP_SENSOR_PROBE
#define TEMP_PROBE_PIN TEMP_1_PIN
#elif TEMP_SENSOR_CHAMBER
#define TEMP_CHAMBER_PIN TEMP_1_PIN
#endif
#endif
// CS, MISO, MOSI, and SCK for MAX Thermocouple SPI
#if HAS_MAX_TC
//#define TEMP_0_CS_PIN P...
//#define TEMP_0_MISO_PIN P...
//#define TEMP_0_MOSI_PIN P...
//#define TEMP_0_SCK_PIN P...
//#define TEMP_1_CS_PIN P...
//#define TEMP_1_MISO_PIN P...
//#define TEMP_1_MOSI_PIN P...
//#define TEMP_1_SCK_PIN P...
#endif
//
// Heaters / Fans
//
#ifndef HEATER_0_PIN
#define HEATER_0_PIN P2_07
#endif
#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
#ifndef FAN1_PIN
#define FAN1_PIN P2_04
#endif
#else
#ifndef HEATER_1_PIN
#define HEATER_1_PIN P2_04
#endif
#endif
#ifndef FAN0_PIN
#define FAN0_PIN P2_03
#endif
#ifndef HEATER_BED_PIN
#define HEATER_BED_PIN P2_05
#endif
//
// LCD / Controller
//
#if !defined(BEEPER_PIN) && HAS_WIRED_LCD && DISABLED(LCD_USE_I2C_BUZZER)
#define BEEPER_PIN P1_30 // (EXP1-1) Not 5V-tolerant
#endif
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#if HAS_WIRED_LCD && DISABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION LCD
#else
#define SDCARD_CONNECTION ONBOARD
#endif
#endif
#if SD_CONNECTION_IS(LCD) && ENABLED(SKR_USE_LCD_SD_CARD_PINS_FOR_CS)
#error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_SD_CARD_PINS_FOR_CS."
#endif
#if SD_CONNECTION_IS(LCD)
#define SD_SCK_PIN P0_15
#define SD_MISO_PIN P0_17
#define SD_MOSI_PIN P0_18
#define SD_SS_PIN EXP2_04_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#elif SD_CONNECTION_IS(ONBOARD)
#undef SD_DETECT_PIN
#define SD_DETECT_PIN P0_27
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
#if ENABLED(BTT_MOTOR_EXPANSION)
/**
* ------ ------
* (M3STP) | 1 2 | (M3DIR) (M3DIAG) | 1 2 | (M3RX)
* (M2STP) | 3 4 | (M2DIR) (M2DIAG) | 3 4 | (M2RX)
* (M1DIR) 5 6 | (M1STP) (M1DIAG) 5 6 | (M1RX)
* (M1EN) | 7 8 | -- (M3EN) | 7 8 | (M2EN)
* GND | 9 10 | -- GND | 9 10 | --
* ------ ------
* EXP2 EXP1
*
* NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN
*/
// M1 on Driver Expansion Module
#define E2_STEP_PIN EXP2_06_PIN
#define E2_DIR_PIN EXP2_05_PIN
#define E2_ENABLE_PIN EXP2_07_PIN
#if !EXP_MOT_USE_EXP2_ONLY
#define E2_DIAG_PIN EXP1_05_PIN
#define E2_CS_PIN EXP1_06_PIN
#if HAS_TMC_UART
#define E2_SERIAL_TX_PIN EXP1_06_PIN
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
#endif
#endif
// M2 on Driver Expansion Module
#define E3_STEP_PIN EXP2_03_PIN
#define E3_DIR_PIN EXP2_04_PIN
#if !EXP_MOT_USE_EXP2_ONLY
#define E3_ENABLE_PIN EXP1_08_PIN
#define E3_DIAG_PIN EXP1_03_PIN
#define E3_CS_PIN EXP1_04_PIN
#if HAS_TMC_UART
#define E3_SERIAL_TX_PIN EXP1_04_PIN
#define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
#endif
#else
#define E3_ENABLE_PIN EXP2_07_PIN
#endif
// M3 on Driver Expansion Module
#define E4_STEP_PIN EXP2_01_PIN
#define E4_DIR_PIN EXP2_02_PIN
#if !EXP_MOT_USE_EXP2_ONLY
#define E4_ENABLE_PIN EXP1_07_PIN
#define E4_DIAG_PIN EXP1_01_PIN
#define E4_CS_PIN EXP1_02_PIN
#if HAS_TMC_UART
#define E4_SERIAL_TX_PIN EXP1_02_PIN
#define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN
#endif
#else
#define E4_ENABLE_PIN EXP2_07_PIN
#endif
#endif // BTT_MOTOR_EXPANSION
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h
|
C
|
agpl-3.0
| 6,534
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* eMotion-Tech eMotronic pin assignments
* Schematic: https://data.emotion-tech.com/ftp/Datasheets_et_sources/Sources/eMotronic_brd_sources_1.0.4.zip
*
* Board pins<->features assignments are based on the
* Micro-Delta Rework printer default connections.
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "eMotronic"
#define BOARD_WEBSITE_URL "www.reprap-france.com/article/lemotronic-quesaco"
//
// Limit Switches
//
#define X_STOP_PIN P1_22 // S0
#define Y_STOP_PIN P1_23 // S1
#define Z_STOP_PIN P1_24 // S2
#define I_STOP_PIN P1_25 // S3
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P0_26 // S4 (opto)
#endif
//
// Steppers
//
#define X_STEP_PIN P2_02 // M3
#define X_DIR_PIN P4_28
#define X_ENABLE_PIN P4_29
#define Y_STEP_PIN P2_01 // M2
#define Y_DIR_PIN P0_22
#define Y_ENABLE_PIN P0_21
#define Z_STEP_PIN P2_00 // M1
#define Z_DIR_PIN P3_26
#define Z_ENABLE_PIN P3_25
#define E0_STEP_PIN P2_03 // M4
#define E0_DIR_PIN P0_04
#define E0_ENABLE_PIN P0_05 // Correct!
#define E1_STEP_PIN P2_08 // M5
#define E1_DIR_PIN P0_20
#define E1_ENABLE_PIN P0_19
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_24_A1 // A1 (TH1)
#define TEMP_1_PIN P0_23_A0 // A0 (TH0)
#define TEMP_BED_PIN P0_25_A2 // A2 (TH2)
//
// Heaters / Fans
//
#define _H0_PIN P2_04 // (H0: 15A)
#define HEATER_BED_PIN P2_05 // (H1: 10A shared)
#define HEATER_0_PIN P2_06 // (H2: 10A shared)
#define HEATER_1_PIN P2_07 // (H3: 10A shared)
#define FAN0_PIN P2_11 // (FAN0: 1A)
#define FAN1_PIN P2_13 // (FAN1: 1A)
//
// Extension ports
//
#define EXP1_01_PIN P0_03 // RX0
#define EXP1_02_PIN P0_02 // TX0
#define EXP1_03_PIN P1_30
#define EXP1_04_PIN P1_31
#define EXP1_05_PIN P0_17 // MISO0
#define EXP1_06_PIN P0_18 // MOSI0
#define EXP1_07_PIN P0_15 // SCK0
#define EXP1_08_PIN P0_16 // SSEL0
#define EXP1_09_PIN P0_27 // SDA0
#define EXP1_10_PIN P0_28 // SCL0
#define EXP2_01_PIN P0_10
#define EXP2_02_PIN P0_11
#define EXP2_03_PIN P0_00 // SDA1
#define EXP2_04_PIN P0_01 // SCL1
#define EXP2_05_PIN P1_28
#define EXP2_06_PIN P1_29
#define EXP2_07_PIN P1_26
#define EXP2_08_PIN P1_27
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(ONBOARD)
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define SD_SS_PIN P0_06
#elif SD_CONNECTION_IS(LCD)
#define SD_SCK_PIN EXP1_07_PIN
#define SD_MISO_PIN EXP1_05_PIN
#define SD_MOSI_PIN EXP1_06_PIN
#define SD_SS_PIN EXP1_08_PIN
#define SD_DETECT_PIN EXP1_04_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
//
// LCD / Controller
//
#if ENABLED(EMOTION_TECH_LCD)
#define BEEPER_PIN EXP2_01_PIN
#define DOGLCD_A0 EXP2_06_PIN
#define DOGLCD_CS EXP2_04_PIN
#define DOGLCD_SCK EXP1_07_PIN
#define DOGLCD_MOSI EXP1_06_PIN
#define BTN_EN1 EXP2_07_PIN
#define BTN_EN2 EXP2_05_PIN
#define BTN_ENC EXP2_02_PIN
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_EMOTRONIC.h
|
C
|
agpl-3.0
| 5,290
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* GMARSH X6 Rev.1 pin assignments
* Schematic: https://github.com/gmarsh/gmarsh_x6/blob/master/armprinter_2208_1heater.pdf
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "GMARSH X6 REV1"
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
//
// Enable 12MHz clock output on P1.27 pin to sync TMC2208 chip clocks
//
#define LPC1768_ENABLE_CLKOUT_12M
//
// Servos
//
#define SERVO0_PIN P1_26 // PWM1[6]
#define SERVO1_PIN P1_18 // PWM1[1]
//
// Limit Switches
//
#define X_MIN_PIN P0_00
#define X_MAX_PIN P0_01
#define Y_MIN_PIN P0_10
#define Y_MAX_PIN P0_21
#define Z_MIN_PIN P2_13
#define Z_MAX_PIN P2_22
//
// Steppers
//
#define X_STEP_PIN P1_01
#define X_DIR_PIN P1_04
#define X_ENABLE_PIN P0_26
#define Y_STEP_PIN P1_10
#define Y_DIR_PIN P1_14
#define Y_ENABLE_PIN P1_08
#define Z_STEP_PIN P1_17
#define Z_DIR_PIN P4_29
#define Z_ENABLE_PIN P1_15
#define E0_STEP_PIN P0_05
#define E0_DIR_PIN P2_00
#define E0_ENABLE_PIN P4_28
#define E1_STEP_PIN P2_03
#define E1_DIR_PIN P2_04
#define E1_ENABLE_PIN P2_01
#define E2_STEP_PIN P2_07
#define E2_DIR_PIN P2_08
#define E2_ENABLE_PIN P2_05
//
// TMC2208 UART pins
//
#if HAS_TMC_UART
#define X_SERIAL_TX_PIN P1_00
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN P1_09
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN P1_16
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN P0_04
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN P2_02
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
#define E2_SERIAL_TX_PIN P2_06
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#else
#error "TMC2208 UART configuration is required for GMarsh X6."
#endif
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_24_A1 // AD0[0] on P0_23
#define TEMP_BED_PIN P0_23_A0 // AD0[1] on P0_24
//
// Heaters / Fans
//
#define HEATER_BED_PIN P1_19 // Not a PWM pin, software PWM required
#define HEATER_0_PIN P3_26 // PWM1[3]
#define FAN0_PIN P3_25 // Part cooling fan - connected to PWM1[2]
#define E0_AUTO_FAN_PIN P0_27 // Extruder cooling fan
//
// Misc. Functions
//
#define LED_PIN P1_31
#define POWER_MONITOR_VOLTAGE_PIN P0_25_A2
//
// LCD
//
#if IS_RRD_SC
#define BEEPER_PIN P0_19
#define BTN_EN1 P1_23
#define BTN_EN2 P1_24
#define BTN_ENC P1_25
#define LCD_PINS_RS P0_20
#define LCD_PINS_EN P0_21
#define LCD_PINS_D4 P2_11
#define LCD_PINS_D5 P0_22
#define LCD_PINS_D6 P1_29
#define LCD_PINS_D7 P1_28
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#endif
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#if ENABLED(NO_LCD_SDCARD)
#define SDCARD_CONNECTION ONBOARD
#else
#define SDCARD_CONNECTION LCD
#endif
#endif
#if SD_CONNECTION_IS(LCD)
#define SD_SCK_PIN P0_15
#define SD_MISO_PIN P0_17
#define SD_MOSI_PIN P0_18
#define SD_SS_PIN P0_16
#define SD_DETECT_PIN P1_22
#elif SD_CONNECTION_IS(ONBOARD)
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h
|
C
|
agpl-3.0
| 5,665
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Makerbase MKS SBASE pin assignments
*/
#include "env_validate.h"
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "MKS SBASE"
#endif
#ifndef BOARD_WEBSITE_URL
#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SBASE"
#endif
#define LED_PIN P1_18 // Used as a status indicator
#define LED2_PIN P1_19
#define LED3_PIN P1_20
#define LED4_PIN P1_21
//
// Servos
//
#define SERVO0_PIN P1_23 // J8-3 (low jitter)
#define SERVO1_PIN P2_12 // J8-4
#define SERVO2_PIN P2_11 // J8-5
#define SERVO3_PIN P4_28 // J8-6
//
// Limit Switches - Not Interrupt Capable
//
#define X_MIN_PIN P1_24 // 10k pullup to 3.3V, 1K series
#define X_MAX_PIN P1_25 // 10k pullup to 3.3V, 1K series
#define Y_MIN_PIN P1_26 // 10k pullup to 3.3V, 1K series
#define Y_MAX_PIN P1_27 // 10k pullup to 3.3V, 1K series
#define Z_MIN_PIN P1_28 // The original Mks Sbase DIO19 has a 10k pullup to 3.3V or 5V, 1K series, so when using a Zprobe we must use DIO41 (J8 P1.22)
#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V, 1K series
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P4_28 // Connector J8
#endif
//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
#define E1_STEP_PIN P2_08
#define E1_DIR_PIN P2_13
#define E1_ENABLE_PIN P4_29
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_BED_PIN P0_23_A0 // A0 (TH1)
#define TEMP_0_PIN P0_24_A1 // A1 (TH2)
#define TEMP_1_PIN P0_25_A2 // A2 (TH3)
#define TEMP_2_PIN P0_26_A3 // A3 (TH4)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_0_PIN P2_07
#define HEATER_1_PIN P2_06
#ifndef FAN0_PIN
#define FAN0_PIN P2_04
#endif
//
// Connector J7
// Note: These pins are all digitally shared with the EXP1/EXP2 Connector.
// Using them with an LCD connected or configured will lead to hangs & crashes.
//
//#define PIN_P0_17 P0_17 // 5V
//#define PIN_P0_16 P0_16 // NC
//#define PIN_P0_15 P0_15 // GND
//
// Connector J8
//
#define PIN_P1_22 P1_22 // GND
#define PIN_P1_23 P1_23 // PWM-capable
#define PIN_P2_12 P2_12 // Interrupt-capable
#define PIN_P2_11 P2_11 // Interrupt-capable
//
// Průša i3 MMU1 (Multi Material Multiplexer) Support
//
#if HAS_PRUSA_MMU1
#define E_MUX0_PIN PIN_P1_23 // J8-3
#define E_MUX1_PIN PIN_P2_12 // J8-4
#define E_MUX2_PIN PIN_P2_11 // J8-5
#endif
//
// Power Supply Control
//
#if ENABLED(MKS_PWC)
#define PS_ON_PIN P0_25 // SERVO
#define KILL_PIN P1_29 // Z+
#define KILL_PIN_STATE HIGH
#endif
//
// Ethernet pins
//
#if !IS_ULTIPANEL
#define ENET_MDIO P1_17 // J12-4
#define ENET_RX_ER P1_14 // J12-6
#define ENET_RXD1 P1_10 // J12-8
#endif
#define ENET_MOC P1_16 // J12-3
#define REF_CLK P1_15 // J12-5
#define ENET_RXD0 P1_09 // J12-7
#define ENET_CRS P1_08 // J12-9
#define ENET_TX_EN P1_04 // J12-10
#define ENET_TXD0 P1_00 // J12-11
#define ENET_TXD1 P1_01 // J12-12
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(CUSTOM_CABLE)
/**
* A custom cable is needed.
* See https://github.com/MarlinFirmware/Configurations/blob/release-2.1/config/examples/Mks/Sbase/README.md
* P0.27 is on EXP2 and the on-board SD card socket so it can't be used as SD_DETECT for the LCD SD card.
*
* The best solution is to use the custom cable to connect the LCD SD_DETECT to a pin NOT on EXP2.
*
* If you can't find a pin to use for the LCD SD_DETECT then comment out SD_DETECT_PIN and remove that wire
* from the the custom cable.
*/
#define SD_DETECT_PIN PIN_P2_11 // J8-5 (moved from EXP2 P0.27)
#define SD_SCK_PIN PIN_P1_22 // J8-2 (moved from EXP2 P0.7)
#define SD_MISO_PIN PIN_P1_23 // J8-3 (moved from EXP2 P0.8)
#define SD_MOSI_PIN PIN_P2_12 // J8-4 (moved from EXP2 P0.9)
#define SD_SS_PIN P0_28
#define SOFTWARE_SPI // With a custom cable we need software SPI because the
// selected pins are not on a hardware SPI controller
#elif SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD)
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#if SD_CONNECTION_IS(LCD)
// Use standard cable and header, SPI and SD detect are shared with onboard SD card.
// Hardware SPI is used for both SD cards. The detect pin is shared between the
// LCD and onboard SD readers so we disable it.
#define SD_SS_PIN P0_28
#else
#define SD_DETECT_PIN P0_27
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#endif
#endif
/**
* ------ ------
* 1.31 | 1 2 | 1.30 0.08 | 1 2 | 0.07
* 0.18 | 3 4 | 0.16 3.25 | 3 4 | 0.28
* 0.15 | 5 6 -- 3.26 | 5 6 0.09
* -- | 7 8 | -- 0.27 | 7 8 | RESET
* GND | 9 10 | 5V GND | 9 10 | --
* ------ ------
* EXP1 EXP2
*/
#define EXP1_01_PIN P1_31
#define EXP1_02_PIN P1_30
#define EXP1_03_PIN P0_18
#define EXP1_04_PIN P0_16
#define EXP1_05_PIN P0_15
#define EXP2_01_PIN P0_08
#define EXP2_02_PIN P0_07
#define EXP2_03_PIN P3_25
#define EXP2_04_PIN P0_28
#define EXP2_05_PIN P3_26
#define EXP2_06_PIN P0_09
#define EXP2_07_PIN P0_27
//
// LCD / Controller
//
#if IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS EXP2_03_PIN
#endif
#if SD_CONNECTION_IS(LCD)
#define SD_DETECT_PIN EXP2_04_PIN
#endif
#elif HAS_WIRED_LCD
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_05_PIN
#define BTN_EN2 EXP2_03_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_SDSS EXP2_04_PIN
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#if ANY(VIKI2, miniVIKI)
#define DOGLCD_SCK SD_SCK_PIN
#define DOGLCD_MOSI SD_MOSI_PIN
#endif
#if ENABLED(FYSETC_MINI_12864)
/**
* The FYSETC display can NOT use the SCK and MOSI pins on EXP2, so a
* special cable is needed to go between EXP2 on the FYSETC and the
* controller board's EXP2 and J8. It also means that a software SPI
* is needed to drive those pins.
*
* The FYSETC requires mode 3 SPI interface.
*
* Pins 6, 7 & 8 on EXP2 are no connects. That means a second special
* cable will be needed if the RGB LEDs are to be active.
*/
#define DOGLCD_CS EXP1_03_PIN // LCD_EN
#define DOGLCD_A0 EXP1_04_PIN // LCD_A0
#define DOGLCD_SCK PIN_P2_11 // J8-5 (SCK on FYSETC schematic)
#define DOGLCD_MOSI P4_28 // J8-6 (MOSI on FYSETC schematic)
//#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PIN_P2_12 // J8-4 (LCD_D6 on FYSETC schematic)
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PIN_P1_23 // J8-3 (LCD_D5 on FYSETC schematic)
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PIN_P1_22 // J8-2 (LCD_D7 on FYSETC schematic)
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN PIN_P2_12
#endif
#elif ENABLED(MINIPANEL)
//#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
#endif
#endif // HAS_WIRED_LCD
/**
* Example for trinamic drivers using the J8 connector on MKs Sbase.
* 2130s need 1 pin for each driver. 2208/2209s need 2 pins for serial control.
* This board does not have enough pins to use hardware serial.
*/
#if HAS_DRIVER(TMC2130)
// J8
#define X_CS_PIN PIN_P1_22
#define Y_CS_PIN PIN_P1_23
#define Z_CS_PIN PIN_P2_12
#define E0_CS_PIN PIN_P2_11
#define E1_CS_PIN P4_28
// Hardware SPI is on EXP2. See if you can make it work:
// https://github.com/makerbase-mks/MKS-SBASE/issues/25
#define TMC_USE_SW_SPI
#ifndef TMC_SPI_MOSI
#define TMC_SPI_MOSI P0_03 // AUX1
#endif
#ifndef TMC_SPI_MISO
#define TMC_SPI_MISO P0_02 // AUX1
#endif
#ifndef TMC_SPI_SCK
#define TMC_SPI_SCK P0_26 // TH4
#endif
#endif
#if MB(MKS_SBASE) && HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* The shortage of pins becomes apparent.
* Worst case you may have to give up the LCD
* RX pins need to be interrupt capable
*/
#define X_SERIAL_TX_PIN PIN_P1_22 // J8-2
#define X_SERIAL_RX_PIN PIN_P2_12 // J8-4 Interrupt Capable
#define Y_SERIAL_TX_PIN PIN_P1_23 // J8-3
#define Y_SERIAL_RX_PIN PIN_P2_11 // J8-5 Interrupt Capable
#define Z_SERIAL_TX_PIN PIN_P2_12 // J8-4
#define Z_SERIAL_RX_PIN P0_25 // TH3
#define E0_SERIAL_TX_PIN P4_28 // J8-6
#define E0_SERIAL_RX_PIN P0_26 // TH4
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
// UNUSED
//#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
//#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
/**
* PWMs
*
* There are 6 PWMs. Each PWM can be assigned to one of two pins.
*
* SERVO2 does NOT have a PWM assigned to it.
*
* PWM1.1 P1_18 SERVO3_PIN FIL_RUNOUT_PIN 5V output, PWM
* PWM1.1 P2_00 E0_STEP_PIN
* PWM1.2 P1_20 SERVO0_PIN
* PWM1.2 P2_01 X_STEP_PIN
* PWM1.3 P1_21 SERVO1_PIN J5-1
* PWM1.3 P2_02 Y_STEP_PIN
* PWM1.4 P1_23 SDSS(SSEL0) J3-5 AUX-3
* PWM1.4 P2_03 Z_STEP_PIN
* PWM1.5 P1_24 X_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
* PWM1.5 P2_04 MOSFET_B_PIN
* PWM1.6 P1_26 Y_MIN_PIN 10K PULLUP TO 3.3v, 1K SERIES
* PWM1.6 P2_05 MOSFET_A_PIN
*/
/**
* Special pins
* P1_30 - not 5V tolerant - EXP1
* P1_31 - not 5V tolerant - EXP1
* P0_27 - open collector - EXP2
* P0_28 - open collector - EXP2
*/
/**
* Serial Ports
* P0_00 - Port 3
* P0_01 - SD Card (Onboard)
* P0_10 - Port 2
* P0_11 - Y_EN/Y_DIR
* P0_15 - Port 1
* P0_16 - EXP1
* P0_02 - Port 0
* P0_03 - AUX1
* P0_29 - Port -1
* P0_30 - USB
*/
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
|
C
|
agpl-3.0
| 14,029
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Makerbase MKS SGEN-L pin assignments
* Schematic: https://github.com/makerbase-mks/SGEN_L/blob/master/Hardware/MKS%20SGEN_L%20V1.0_001/MKS%20SGEN_L%20V1.0_001%20SCH.pdf
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "MKS SGen-L"
#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN_L"
#define USES_DIAG_JUMPERS
//
// Servos
//
#define SERVO0_PIN P1_23 // SERVO P1.23
#define SERVO1_PIN P2_00 // SERVO P2.0
//
// Trinamic Stallguard pins
//
#define X_DIAG_PIN P1_29 // X-
#define Y_DIAG_PIN P1_27 // Y-
#define Z_DIAG_PIN P1_25 // Z-
#define E0_DIAG_PIN P1_28 // X+
#define E1_DIAG_PIN P1_26 // Y+
//
// Limit Switches
//
#ifdef X_STALL_SENSITIVITY
#define X_STOP_PIN X_DIAG_PIN
#if X_HOME_TO_MIN
#define X_MAX_PIN P1_28 // X+
#else
#define X_MIN_PIN P1_28 // X+
#endif
#else
#define X_MIN_PIN P1_29 // X-
#define X_MAX_PIN P1_28 // X+
#endif
#ifdef Y_STALL_SENSITIVITY
#define Y_STOP_PIN Y_DIAG_PIN
#if Y_HOME_TO_MIN
#define Y_MAX_PIN P1_26 // Y+
#else
#define Y_MIN_PIN P1_26 // Y+
#endif
#else
#define Y_MIN_PIN P1_27 // Y-
#define Y_MAX_PIN P1_26 // Y+
#endif
#ifdef Z_STALL_SENSITIVITY
#define Z_STOP_PIN Z_DIAG_PIN
#if Z_HOME_TO_MIN
#define Z_MAX_PIN P1_24 // Z+
#else
#define Z_MIN_PIN P1_24 // Z+
#endif
#else
#define Z_MIN_PIN P1_25 // Z-
#define Z_MAX_PIN P1_24 // Z+
#endif
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P1_24
#endif
//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif
//
// Steppers
//
#define X_STEP_PIN P2_02
#define X_DIR_PIN P2_03
#define X_ENABLE_PIN P2_01
#ifndef X_CS_PIN
#define X_CS_PIN P1_01
#endif
#define Y_STEP_PIN P0_19
#define Y_DIR_PIN P0_20
#define Y_ENABLE_PIN P2_08
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_08
#endif
#define Z_STEP_PIN P0_22
#define Z_DIR_PIN P2_11
#define Z_ENABLE_PIN P0_21
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_10
#endif
#define E0_STEP_PIN P2_13
#define E0_DIR_PIN P0_11
#define E0_ENABLE_PIN P2_12
#ifndef E0_CS_PIN
#define E0_CS_PIN P1_15
#endif
#define E1_STEP_PIN P0_01
#define E1_DIR_PIN P0_00
#define E1_ENABLE_PIN P0_10
#ifndef E1_CS_PIN
#define E1_CS_PIN P1_17
#endif
//
// Default pins for TMC software SPI
//
#ifndef TMC_SPI_MOSI
#define TMC_SPI_MOSI P4_28
#endif
#ifndef TMC_SPI_MISO
#define TMC_SPI_MISO P0_05
#endif
#ifndef TMC_SPI_SCK
#define TMC_SPI_SCK P0_04
#endif
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial1
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
#define X_SERIAL_TX_PIN P1_04
#define X_SERIAL_RX_PIN P1_01
#define Y_SERIAL_TX_PIN P1_09
#define Y_SERIAL_RX_PIN P1_08
#define Z_SERIAL_TX_PIN P1_14
#define Z_SERIAL_RX_PIN P1_10
#define E0_SERIAL_TX_PIN P1_16
#define E0_SERIAL_RX_PIN P1_15
#define E1_SERIAL_TX_PIN P4_29
#define E1_SERIAL_RX_PIN P1_17
#define Z2_SERIAL_TX_PIN P4_29
#define Z2_SERIAL_RX_PIN P1_17
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_23_A0 // Analog Input A0 (TH1)
#define TEMP_BED_PIN P0_24_A1 // Analog Input A1 (TB)
#define TEMP_1_PIN P0_25_A2 // Analog Input A2 (TH2)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_0_PIN P2_07
#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
#ifndef FAN1_PIN
#define FAN1_PIN P2_06
#endif
#else
#ifndef HEATER_1_PIN
#define HEATER_1_PIN P2_06
#endif
#endif
#ifndef FAN0_PIN
#define FAN0_PIN P2_04
#endif
//
// Power Supply Control
//
#if ENABLED(MKS_PWC)
#define PS_ON_PIN P2_00 // SERVO1
#define KILL_PIN P1_24 // Z+
#define KILL_PIN_STATE HIGH
#endif
//
// Misc. Functions
//
#define LED_PIN P1_18 // Used as a status indicator
#define LED2_PIN P1_19
#define LED3_PIN P1_20
#define LED4_PIN P1_21
/** ------ ------
* (BEEPER) 1.31 | 1 2 | 1.30 (BTN_ENC) (MISO) 0.8 | 1 2 | 0.7 (SD_SCK)
* (LCD_EN) 0.18 | 3 4 | 0.16 (LCD_RS) (BTN_EN1) 3.25 | 3 4 | 0.28 (SD_CS2)
* (LCD_D4) 0.15 5 6 | 0.17 (LCD_D5) (BTN_EN2) 3.26 5 6 | 0.9 (SD_MOSI)
* (LCD_D6) 1.0 | 7 8 | 1.22 (LCD_D7) (SD_DETECT) 0.27 | 7 8 | RESET
* GND | 9 10 | 5V GND | 9 10 | --
* ------ ------
* EXP1 EXP2
*/
#define EXP1_01_PIN P1_31
#define EXP1_02_PIN P1_30
#define EXP1_03_PIN P0_18
#define EXP1_04_PIN P0_16
#define EXP1_05_PIN P0_15
#define EXP1_06_PIN P0_17
#define EXP1_07_PIN P1_00
#define EXP1_08_PIN P1_22
#define EXP2_01_PIN P0_08
#define EXP2_02_PIN P0_07
#define EXP2_03_PIN P3_25
#define EXP2_04_PIN P0_28
#define EXP2_05_PIN P3_26
#define EXP2_06_PIN P0_09
#define EXP2_07_PIN P0_27
#define EXP2_08_PIN -1 // RESET
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN EXP2_07_PIN
#define SD_SCK_PIN EXP2_02_PIN
#define SD_MISO_PIN EXP2_01_PIN
#define SD_MOSI_PIN EXP2_06_PIN
#if SD_CONNECTION_IS(ONBOARD)
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#else
#define SD_SS_PIN EXP2_04_PIN
#endif
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
#if HAS_WIRED_LCD
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS EXP1_07_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define LCD_PINS_EN EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
#define TFT_CS_PIN EXP1_07_PIN
#define TFT_DC_PIN EXP1_08_PIN
#define TFT_A0_PIN TFT_DC_PIN
#define TFT_MISO_PIN EXP2_01_PIN
#define TFT_BACKLIGHT_PIN EXP1_03_PIN
#define TFT_RESET_PIN EXP1_04_PIN
#define LCD_USE_DMA_SPI
#define TOUCH_INT_PIN EXP1_06_PIN
#define TOUCH_CS_PIN EXP1_05_PIN
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
// Disable any LCD related PINs config
#define LCD_PINS_EN -1
#define LCD_PINS_RS -1
#ifndef TFT_BUFFER_WORDS
#define TFT_BUFFER_WORDS 1200
#endif
#ifndef TFT_QUEUE_SIZE
#define TFT_QUEUE_SIZE 6144
#endif
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#elif IS_TFTGLCD_PANEL
#undef BEEPER_PIN
#undef BTN_ENC
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS EXP2_03_PIN
#endif
#else
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define LCD_SDSS EXP2_04_PIN
#if ENABLED(MKS_12864OLED_SSD1306)
#define LCD_PINS_DC EXP1_06_PIN
#define DOGLCD_CS EXP1_04_PIN
#define DOGLCD_A0 LCD_PINS_DC
#define DOGLCD_SCK EXP1_05_PIN
#define DOGLCD_MOSI EXP1_03_PIN
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
#define KILL_PIN -1 // NC
#else // !MKS_12864OLED_SSD1306
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_04_PIN
#define DOGLCD_SCK EXP2_02_PIN
#define DOGLCD_MOSI EXP2_06_PIN
#define LCD_BACKLIGHT_PIN -1
#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
#define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN EXP1_06_PIN
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN EXP1_07_PIN
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN EXP1_08_PIN
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN EXP1_06_PIN
#endif
#else // !FYSETC_MINI_12864
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS EXP1_06_PIN
#define DOGLCD_A0 EXP1_07_PIN
#endif
#if IS_ULTIPANEL
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#endif
#endif // !FYSETC_MINI_12864
#endif // !MKS_12864OLED_SSD1306
#endif // !CR10_STOCKDISPLAY
#endif // HAS_WIRED_LCD
//
// Other Pins
//
//#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
//#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
//#define PS_ON_PIN P1_23 // SERVO0 P1.23
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h
|
C
|
agpl-3.0
| 13,474
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Re-ARM with RAMPS v1.4 pin assignments
* Schematic: https://reprap.org/mediawiki/images/f/fa/Re_ARM_Schematic.pdf
*
* Applies to the following boards:
*
* RAMPS_14_EFB (Hotend, Fan, Bed)
* RAMPS_14_EEB (Hotend0, Hotend1, Bed)
* RAMPS_14_EFF (Hotend, Fan0, Fan1)
* RAMPS_14_EEF (Hotend0, Hotend1, Fan)
* RAMPS_14_SF (Spindle, Controller Fan)
*/
// Numbers in parentheses () are the corresponding mega2560 pin numbers
#include "env_validate.h"
#define BOARD_INFO_NAME "Re-ARM RAMPS 1.4"
//
// Servos
//
#define SERVO0_PIN P1_20 // (11)
#define SERVO1_PIN P1_21 // ( 6) also on J5-1
#define SERVO2_PIN P1_19 // ( 5)
#define SERVO3_PIN P1_18 // ( 4) 5V output
//
// Limit Switches
//
#define X_MIN_PIN P1_24 // ( 3) 10k pullup to 3.3V, 1K series
#define X_MAX_PIN P1_25 // ( 2) 10k pullup to 3.3V, 1K series
#define Y_MIN_PIN P1_26 // (14) 10k pullup to 3.3V, 1K series
#define Y_MAX_PIN P1_27 // (15) 10k pullup to 3.3V, 1K series
#define Z_MIN_PIN P1_29 // (18) 10k pullup to 3.3V, 1K series
#define Z_MAX_PIN P1_28 // (19) 10k pullup to 3.3V, 1K series
#define ONBOARD_ENDSTOPPULLUPS // Board has built-in pullups
//
// Steppers
//
#define X_STEP_PIN P2_01 // (54)
#define X_DIR_PIN P0_11 // (55)
#define X_ENABLE_PIN P0_10 // (38)
#ifndef X_CS_PIN
#define X_CS_PIN P1_01 // ETH
#endif
#define Y_STEP_PIN P2_02 // (60)
#define Y_DIR_PIN P0_20 // (61)
#define Y_ENABLE_PIN P0_19 // (56)
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_04 // ETH
#endif
#define Z_STEP_PIN P2_03 // (46)
#define Z_DIR_PIN P0_22 // (48)
#define Z_ENABLE_PIN P0_21 // (62)
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_10 // ETH
#endif
#define E0_STEP_PIN P2_00 // (26)
#define E0_DIR_PIN P0_05 // (28)
#define E0_ENABLE_PIN P0_04 // (24)
#ifndef E0_CS_PIN
#define E0_CS_PIN P1_14 // ETH
#endif
#define E1_STEP_PIN P2_08 // (36)
#define E1_DIR_PIN P2_13 // (34)
#define E1_ENABLE_PIN P4_29 // (30)
#ifndef E1_CS_PIN
#define E1_CS_PIN -1
#endif
//
// Default pins for TMC software SPI
//
#ifndef TMC_SPI_MOSI
#define TMC_SPI_MOSI P1_00 // ETH
#endif
#ifndef TMC_SPI_MISO
#define TMC_SPI_MISO P1_08 // ETH
#endif
#ifndef TMC_SPI_SCK
#define TMC_SPI_SCK P1_09 // ETH
#endif
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
// P2_08 E1-Step
// P2_13 E1-Dir
#ifndef X_SERIAL_TX_PIN
#define X_SERIAL_TX_PIN P0_01
#endif
#ifndef X_SERIAL_RX_PIN
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#endif
#ifndef Y_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN P0_00
#endif
#ifndef Y_SERIAL_RX_PIN
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#endif
#ifndef Z_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN P2_13
#endif
#ifndef Z_SERIAL_RX_PIN
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#endif
#ifndef E0_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN P2_08
#endif
#ifndef E0_SERIAL_RX_PIN
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#endif
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_23_A0 // A0 (T0) - (67) - TEMP_0_PIN
#define TEMP_BED_PIN P0_24_A1 // A1 (T1) - (68) - TEMP_BED_PIN
#define TEMP_1_PIN P0_25_A2 // A2 (T2) - (69) - TEMP_1_PIN
#define TEMP_2_PIN P0_26_A3 // A3 - (63) - J5-3 & AUX-2
#define TEMP_3_PIN P1_30_A4 // A4 - (37) - BUZZER_PIN
//#define TEMP_4_PIN P1_31_A5 // A5 - (49) - SD_DETECT_PIN
//#define PIN_P0_03 P0_03_A6 // A6 - ( 0) - RXD0 - J4-4 & AUX-1
#define FILWIDTH_PIN P0_02_A7 // A7 - ( 1) - TXD0 - J4-5 & AUX-1
//
// Heaters / Fans
//
#ifndef MOSFET_A_PIN
#define MOSFET_A_PIN P2_05
#endif
#ifndef MOSFET_B_PIN
#define MOSFET_B_PIN P2_04
#endif
#ifndef MOSFET_C_PIN
#define MOSFET_C_PIN P2_07
#endif
#ifndef MOSFET_D_PIN
#define MOSFET_D_PIN -1
#endif
#define HEATER_0_PIN MOSFET_A_PIN
#if FET_ORDER_EFB // Hotend, Fan, Bed
#define HEATER_BED_PIN MOSFET_C_PIN
#elif FET_ORDER_EEF // Hotend, Hotend, Fan
#define HEATER_1_PIN MOSFET_B_PIN
#elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define HEATER_1_PIN MOSFET_B_PIN
#define HEATER_BED_PIN MOSFET_C_PIN
#elif FET_ORDER_EFF // Hotend, Fan, Fan
#define FAN1_PIN MOSFET_C_PIN
#elif DISABLED(FET_ORDER_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE")
#define HEATER_BED_PIN MOSFET_C_PIN
#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
#define FAN1_PIN MOSFET_D_PIN
#else
#define HEATER_1_PIN MOSFET_D_PIN
#endif
#endif
#ifndef FAN0_PIN
#if ANY(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan
#define FAN0_PIN MOSFET_B_PIN
#elif ANY(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan
#define FAN0_PIN MOSFET_C_PIN
#elif FET_ORDER_EEB // Hotend, Hotend, Bed
#define FAN0_PIN P1_18 // (4) IO pin. Buffer needed
#else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE")
#define FAN0_PIN MOSFET_B_PIN
#endif
#endif
//
// Misc. Functions
//
#define LED_PIN P4_28 // (13)
// define digital pin 5 for the filament runout sensor. Use the RAMPS 1.4 digital input 5 on the servos connector
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN P1_19 // (5)
#endif
#define PS_ON_PIN P2_12 // (12)
#if !defined(TEMP_0_CS_PIN) && !(HAS_Z_AXIS && Z_HOME_DIR)
#define TEMP_0_CS_PIN P1_28
#endif
#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENA_PIN)
#if !defined(NUM_SERVOS) || NUM_SERVOS < 4 // Try to use servo connector
#define CASE_LIGHT_PIN P1_18 // (4) MUST BE HARDWARE PWM
#endif
#endif
//
// M3/M4/M5 - Spindle/Laser Control
// Use servo pins, if available
//
#if HAS_CUTTER && !PIN_EXISTS(SPINDLE_LASER_ENA)
#if NUM_SERVOS > 1
#if ENABLED(SPINDLE_FEATURE)
#error "SPINDLE_FEATURE requires 3 free servo pins."
#else
#error "LASER_FEATURE requires 3 free servo pins."
#endif
#endif
#define SPINDLE_LASER_PWM_PIN SERVO3_PIN // (4) MUST BE HARDWARE PWM
#define SPINDLE_LASER_ENA_PIN SERVO1_PIN // (6) Pin should have a pullup/pulldown!
#define SPINDLE_DIR_PIN SERVO2_PIN // (5)
#endif
//
// Průša i3 MK2 Multiplexer Support
//
#if HAS_PRUSA_MMU1
#if SERIAL_PORT != 0 && SERIAL_PORT_2 != 0
#define E_MUX0_PIN P0_03 // ( 0) Z_CS_PIN
#define E_MUX1_PIN P0_02 // ( 1) E0_CS_PIN
#endif
#define E_MUX2_PIN P0_26 // (63) E1_CS_PIN
#endif
/**
* LCD / Controller
*
* All controllers can use J3 and J5 on the Re-ARM board. Custom cabling will be required.
*
* - https://github.com/wolfmanjm/universal-panel-adapter
* - https://panucattdevices.freshdesk.com/support/solutions/articles/1000243195-lcd-display-installation
*/
/**
* Smart LCD adapter
*
* The Smart LCD adapter can be used for the two 10 pin LCD controllers such as
* REPRAP_DISCOUNT_SMART_CONTROLLER. It can't be used for controllers that use
* DOGLCD_A0, DOGLCD_CS, LCD_PINS_D5, LCD_PINS_D6 or LCD_PINS_D7. A custom cable
* is needed to pick up 5V for the EXP1 connection.
*
* SD card on the LCD uses the same SPI signals as the LCD. This results in garbage/lines
* on the LCD display during accesses of the SD card. The menus/code has been arranged so
* that the garbage/lines are erased immediately after the SD card accesses are completed.
*/
#if ENABLED(CR10_STOCKDISPLAY)
// Re-Arm can support Creality stock display without SD card reader and single cable on EXP3.
// Re-Arm J3 pins 1 (P1.31) & 2 (P3.26) are not used. Stock cable will need to have one
// 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3.
#define BEEPER_PIN P2_11 // J3-3 & AUX-4
#define BTN_EN1 P1_23 // J3-5 & AUX-4
#define BTN_EN2 P0_16 // J3-7 & AUX-4
#define BTN_ENC P3_25 // J3-4 & AUX-4
#define LCD_PINS_RS P0_15 // J3-9 & AUX-4 (CS)
#define LCD_PINS_EN P0_18 // J3-10 & AUX-3 (SID, MOSI)
#define LCD_PINS_D4 P2_06 // J3-8 & AUX-3 (SCK, CLK)
#elif ENABLED(ZONESTAR_LCD)
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD on REARM requires wiring modifications. NB. ADCs are not 5V tolerant. See 'pins_RAMPS_RE_ARM.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
#elif IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS P3_26 // (31) J3-2 & AUX-4
#endif
#define SD_DETECT_PIN P1_31 // (49) J3-1 & AUX-3 (NOT 5V tolerant)
#define KILL_PIN P1_22 // (41) J5-4 & AUX-4
#elif HAS_WIRED_LCD
#if ENABLED(FYSETC_MINI_12864)
#define BEEPER_PIN P1_01 // (79) J12-12
#define BTN_ENC P1_04 // (77) J12-10
#else
#define BEEPER_PIN P1_30 // (37) not 5V tolerant
#define BTN_ENC P2_11 // (35) J3-3 & AUX-4
#endif
#define BTN_EN1 P3_26 // (31) J3-2 & AUX-4
#define BTN_EN2 P3_25 // (33) J3-4 & AUX-4
#define SD_DETECT_PIN P1_31 // (49) J3-1 & AUX-3 (NOT 5V tolerant)
#define KILL_PIN P1_22 // (41) J5-4 & AUX-4
#define LCD_PINS_RS P0_16 // (16) J3-7 & AUX-4
#define LCD_SDSS P1_23 // (53) J3-5 & AUX-3
#if IS_NEWPANEL
#if IS_RRW_KEYPAD
#define SHIFT_OUT_PIN P0_18 // (51) (MOSI) J3-10 & AUX-3
#define SHIFT_CLK_PIN P0_15 // (52) (SCK) J3-9 & AUX-3
#define SHIFT_LD_PIN P1_31 // (49) J3-1 & AUX-3 (NOT 5V tolerant)
#endif
#else
//#define SHIFT_CLK_PIN P3_26 // (31) J3-2 & AUX-4
//#define SHIFT_LD_PIN P3_25 // (33) J3-4 & AUX-4
//#define SHIFT_OUT_PIN P2_11 // (35) J3-3 & AUX-4
//#define SHIFT_EN_PIN P1_22 // (41) J5-4 & AUX-4
#endif
#if ANY(VIKI2, miniVIKI)
#define DOGLCD_CS P0_16 // (16)
#define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2
#define DOGLCD_SCK P0_15 // (52) (SCK) J3-9 & AUX-3
#define DOGLCD_MOSI P0_18 // (51) (MOSI) J3-10 & AUX-3
#define STAT_LED_BLUE_PIN P0_26 // (63) may change if cable changes
#define STAT_LED_RED_PIN P1_21 // ( 6) may change if cable changes
//#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
#else
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_SCK P0_15 // (52) (SCK) J3-9 & AUX-3
#define DOGLCD_MOSI P0_18 // (51) (MOSI) J3-10 & AUX-3
// EXP1 on LCD adapter is not usable - using Ethernet connector instead
#define DOGLCD_CS P1_09 // (74) J12-7
#define DOGLCD_A0 P1_14 // (73) J12-6
//#define FORCE_SOFT_SPI // Use this if Hardware SPI causes display problems.
// Results in LCD Software SPI mode 3, SD Software SPI mode 0.
#define LCD_RESET_PIN P0_16 // Must be high or open for LCD to operate normally.
#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN P1_00
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN P1_01
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN P1_08
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN P1_00
#endif
#else
#define DOGLCD_CS P0_26 // (63) J5-3 & AUX-2
#define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2
#endif
#define LCD_BACKLIGHT_PIN P0_16 // (16) J3-7 & AUX-4 - only used on DOGLCD controllers
#define LCD_PINS_EN P0_18 // (51) (MOSI) J3-10 & AUX-3
#define LCD_PINS_D4 P0_15 // (52) (SCK) J3-9 & AUX-3
#if IS_ULTIPANEL
#define LCD_PINS_D5 P1_17 // (71) ENET_MDIO
#define LCD_PINS_D6 P1_14 // (73) ENET_RX_ER
#define LCD_PINS_D7 P1_10 // (75) ENET_RXD1
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#endif
#endif
#if ENABLED(MINIPANEL)
//#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
#endif
#endif // HAS_WIRED_LCD
//
// Ethernet pins
//
#if !IS_ULTIPANEL
#define ENET_MDIO P1_17 // (71) J12-4
#define ENET_RX_ER P1_14 // (73) J12-6
#define ENET_RXD1 P1_10 // (75) J12-8
#endif
#define ENET_MOC P1_16 // (70) J12-3
#define REF_CLK P1_15 // (72) J12-5
#define ENET_RXD0 P1_09 // (74) J12-7
#define ENET_CRS P1_08 // (76) J12-9
#define ENET_TX_EN P1_04 // (77) J12-10
#define ENET_TXD0 P1_00 // (78) J12-11
#define ENET_TXD1 P1_01 // (79) J12-12
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(LCD)
#define SD_SCK_PIN P0_15 // (52) System-defined J3-9 & AUX-3
#define SD_MISO_PIN P0_17 // (50) System-defined J3-10 & AUX-3
#define SD_MOSI_PIN P0_18 // (51) System-defined J3-10 & AUX-3
#define SD_SS_PIN P1_23 // (53) System-defined J3-5 & AUX-3 (aka SDSS, CS)
#elif SD_CONNECTION_IS(ONBOARD)
#undef SD_DETECT_PIN
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
/**
* Fast PWMs
*
* The LPC1768's hardware PWM controller has 6 channels. Each channel
* can be setup to either control a dedicated pin directly or to generate
* an interrupt. The direct method's duty cycle is accurate to within a
* a microsecond. The interrupt method's average duty cycle has the
* the same accuracy but the individual cycles can vary because of higher
* priority interrupts.
*
* All Fast PWMs have a 50Hz rate.
*
* The following pins/signals use the direct method. All other pins use the
* the interrupt method. Note that SERVO2_PIN and MOSFET_C_PIN use the
* interrupt method.
*
* P1_20 (11) SERVO0_PIN
* P1_21 ( 6) SERVO1_PIN J5-1
* P0_18 ( 4) SERVO3_PIN 5V output
* *P2_04 ( 9) MOSFET_B_PIN
* *P2_05 (10) MOSFET_A_PIN
*
* * - If used as a heater driver then a Fast PWM is NOT assigned. If used as
* a fan driver then enabling FAST_PWM_FAN assigns a Fast PWM to it.
*/
/**
* Special pins
* P1_30 (37) (NOT 5V tolerant)
* P1_31 (49) (NOT 5V tolerant)
* P0_27 (57) (Open collector)
* P0_28 (58) (Open collector)
*/
/**
* The following mega2560 pins are NOT available in a Re-ARM system:
*
* 7, 17, 22, 23, 25, 27, 29, 32, 39, 40, 42, 43, 44, 45, 47, 64, 65, 66
*/
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h
|
C
|
agpl-3.0
| 18,456
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Selena Compact pin assignments
* Schematic: https://github.com/f61/Selena/blob/master/Compact%20Pinout.pdf
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Selena Compact"
#define BOARD_WEBSITE_URL "github.com/Ales2-k/Selena"
//
// Servos
//
#define SERVO0_PIN P1_23
//
// Limit Switches
//
#define X_MIN_PIN P1_28
#define X_MAX_PIN P1_25
#define Y_STOP_PIN P2_11
#define Z_STOP_PIN P1_27
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P1_22
#endif
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
#define E1_STEP_PIN P2_08
#define E1_DIR_PIN P2_13
#define E1_ENABLE_PIN P4_29
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_BED_PIN P0_23_A0 // A0 (TH1)
#define TEMP_0_PIN P0_24_A1 // A1 (TH2)
#define TEMP_1_PIN P0_25_A2 // A2 (TH3)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_BED2_PIN P2_04
#define HEATER_0_PIN P2_07
#define HEATER_1_PIN P2_06
#ifndef FAN0_PIN
#define FAN0_PIN P1_24
#endif
#define FAN1_PIN P1_26
//
// Display
//
#if IS_RRD_FG_SC
#define LCD_PINS_RS P0_16
#define LCD_PINS_EN P0_18
#define LCD_PINS_D4 P0_15
#define LCD_PINS_D5 P1_00
#define LCD_PINS_D6 P1_01
#define LCD_PINS_D7 P1_04
#define BEEPER_PIN P1_31
#define BTN_EN1 P3_25
#define BTN_EN2 P3_26
#define BTN_ENC P1_30
#define SD_DETECT_PIN -1
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#endif // IS_RRD_FG_SC
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h
|
C
|
agpl-3.0
| 3,606
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifndef ENV_VALIDATE_H
#define ENV_VALIDATE_H
#if NOT_TARGET(MCU_LPC1769)
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/env_validate.h
|
C
|
agpl-3.0
| 1,034
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Azteeg X5 GT pin assignments
* Schematic: https://panucattdevices.freshdesk.com/support/solutions/articles/1000244740-support-files
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Azteeg X5 GT"
#define BOARD_WEBSITE_URL "tinyurl.com/yx8tdqa3"
//
// Servos
//
#define SERVO0_PIN P1_23
//
// Limit Switches
//
#define X_MIN_PIN P1_24
#define X_MAX_PIN P1_27
#define Y_MIN_PIN P1_25
#define Y_MAX_PIN P1_28
#define Z_MIN_PIN P1_26
#define Z_MAX_PIN P1_29
//
// Steppers
//
#define X_STEP_PIN P2_01
#define X_DIR_PIN P0_11
#define X_ENABLE_PIN P0_10
#ifndef X_CS_PIN
#define X_CS_PIN P0_10 // BSD2660 default
#endif
#define Y_STEP_PIN P2_02
#define Y_DIR_PIN P0_20
#define Y_ENABLE_PIN P0_19
#ifndef Y_CS_PIN
#define Y_CS_PIN P0_19 // BSD2660 default
#endif
#define Z_STEP_PIN P2_03
#define Z_DIR_PIN P0_22
#define Z_ENABLE_PIN P0_21
#ifndef Z_CS_PIN
#define Z_CS_PIN P0_21 // BSD2660 default
#endif
#define E0_STEP_PIN P2_00
#define E0_DIR_PIN P0_05
#define E0_ENABLE_PIN P0_04
#ifndef E0_CS_PIN
#define E0_CS_PIN P0_04 // BSD2660 default
#endif
#define E1_STEP_PIN P2_08
#define E1_DIR_PIN P2_13
#define E1_ENABLE_PIN P4_29
#ifndef E1_CS_PIN
#define E1_CS_PIN P4_29 // BSD2660 default
#endif
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_BED_PIN P0_23_A0 // A0 (TH1)
#define TEMP_0_PIN P0_24_A1 // A1 (TH2)
#define TEMP_1_PIN P0_25_A2 // A2 (TH3)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_07
#define HEATER_0_PIN P2_04
#define HEATER_1_PIN P2_05
#ifndef FAN0_PIN
#define FAN0_PIN P0_26
#endif
#define FAN1_PIN P1_22
//
// Display
//
#if ANY(VIKI2, miniVIKI)
#define BEEPER_PIN P1_31
#define DOGLCD_A0 P2_06
#define DOGLCD_CS P0_16
#define BTN_EN1 P3_25
#define BTN_EN2 P3_26
#define BTN_ENC P2_11
#define SD_DETECT_PIN P1_18
#define SDSS P1_21
#define STAT_LED_RED_PIN P1_19
#define STAT_LED_BLUE_PIN P1_20
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h
|
C
|
agpl-3.0
| 3,846
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Azteeg X5 MINI pin assignments
* Schematic: http://files.panucatt.com/datasheets/x5mini_design_files.zip
*/
#include "env_validate.h"
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Azteeg X5 MINI"
#endif
#define BOARD_WEBSITE_URL "panucatt.com"
//
// LED
//
#define LED_PIN P1_18
#define LED2_PIN P1_20
#define LED3_PIN P1_19
#define LED4_PIN P1_21
//
// Servos
//
#define SERVO0_PIN P1_29
//
// Limit Switches
//
#define X_STOP_PIN P1_24
#define Y_STOP_PIN P1_26
#define Z_STOP_PIN P1_28
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN _EXP1_09
#endif
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN _EXP1_04 // Analog Input (P0_25)
#endif
//
// Steppers
//
#define X_STEP_PIN P2_01
#define X_DIR_PIN P0_11
#define X_ENABLE_PIN P0_10
#define Y_STEP_PIN P2_02
#define Y_DIR_PIN P0_20
#define Y_ENABLE_PIN P0_19
#define Z_STEP_PIN P2_03
#define Z_DIR_PIN P0_22
#define Z_ENABLE_PIN P0_21
#define E0_STEP_PIN P2_00
#define E0_DIR_PIN P0_05
#define E0_ENABLE_PIN P0_04
//
// DIGIPOT slave addresses (7-bit unshifted)
//
#ifndef DIGIPOT_I2C_ADDRESS_A
#define DIGIPOT_I2C_ADDRESS_A 0x2C
#endif
#ifndef DIGIPOT_I2C_ADDRESS_B
#define DIGIPOT_I2C_ADDRESS_B 0x2E
#endif
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_BED_PIN P0_23_A0 // A0 (TH1)
#define TEMP_0_PIN P0_24_A1 // A1 (TH2)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_07
#define HEATER_0_PIN P2_05
#ifndef FAN0_PIN
#define FAN0_PIN P0_26
#endif
#define FAN1_PIN P1_25
//
// Headers V1.1 - V3.0
//
//#define _EXP1_01 -1 // GND
#define _EXP1_02 P1_03
//#define _EXP1_03 -1 // 3.3V
#define _EXP1_04 P0_25_A2
#define _EXP1_05 P0_27 // SDA0
#define _EXP1_06 P4_29
#define _EXP1_07 P0_28 // SCL0
#define _EXP1_08 P2_08
#define _EXP1_09 P2_04
#define _EXP1_10 P1_22
#define _EXP2_01 P1_31
#define _EXP2_02 P3_26
#define _EXP2_03 P2_11
#define _EXP2_04 P3_25
#define _EXP2_05 P1_23
#define _EXP2_06 P0_17
#define _EXP2_07 P0_16
#define _EXP2_08 P2_06
#define _EXP2_09 P0_15
#define _EXP2_10 P0_18
//
// Only V2.0
//
//#define _J7_01 -1 // 3.3V
//#define _J7_02 -1 // GND
#define _J7_03 P1_16
#define _J7_04 P1_17
#define _J7_05 P1_15
#define _J7_06 P0_14
#define _J7_07 P1_09
#define _J7_08 P1_10
#define _J7_09 P1_08
#define _J7_10 P1_04
#define _J7_11 P1_00
#define _J7_12 P1_01
//
// Display
//
#if HAS_WIRED_LCD
#if ENABLED(CR10_STOCKDISPLAY)
// Re-Arm can support Creality stock display without SD card reader and single cable on EXP3.
// Re-Arm J3 pins 1 (p1.31) & 2 (P3.26) are not used. Stock cable will need to have one
// 10-pin IDC connector trimmed or replaced with a 12-pin IDC connector to fit J3.
// Requires REVERSE_ENCODER_DIRECTION in Configuration.h
#define BEEPER_PIN _EXP2_03
#define BTN_EN1 _EXP2_07
#define BTN_EN2 _EXP2_05
#define BTN_ENC _EXP2_04
#define LCD_PINS_RS _EXP2_09
#define LCD_PINS_EN _EXP2_10
#define LCD_PINS_D4 _EXP2_08
#else
#define BTN_EN1 _EXP2_02
#define BTN_EN2 _EXP2_04
#define BTN_ENC _EXP2_03
#define SD_DETECT_PIN _EXP2_01
#define KILL_PIN _EXP1_10
#define LCD_PINS_RS _EXP2_07
#define LCD_SDSS _EXP2_07
#define LCD_BACKLIGHT_PIN _EXP2_07
#define LCD_PINS_EN _EXP2_10
#define LCD_PINS_D4 _EXP2_09
#define DOGLCD_A0 _EXP2_08
#if IS_RRW_KEYPAD
#define SHIFT_OUT_PIN _EXP2_10
#define SHIFT_CLK_PIN _EXP2_09
#define SHIFT_LD_PIN _EXP2_01
#elif !IS_NEWPANEL
//#define SHIFT_OUT_PIN _EXP2_03
//#define SHIFT_CLK_PIN _EXP2_02
//#define SHIFT_LD_PIN _EXP2_04
//#define SHIFT_EN_PIN _EXP1_10
#endif
#if ANY(VIKI2, miniVIKI)
#define BEEPER_PIN P1_30
#define DOGLCD_CS P0_26
#define DOGLCD_SCK SD_SCK_PIN
#define DOGLCD_MOSI SD_MOSI_PIN
#define STAT_LED_BLUE_PIN P0_26
#define STAT_LED_RED_PIN P1_21
#else
#if IS_ULTIPANEL
#define LCD_PINS_D5 P1_17
#define LCD_PINS_D6 P1_14
#define LCD_PINS_D7 P1_10
#endif
#define BEEPER_PIN P1_30
#define DOGLCD_CS _EXP2_07
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#endif
#if ANY(VIKI2, miniVIKI, MINIPANEL)
//#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
#endif
#endif
#endif // HAS_WIRED_LCD
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(LCD)
#define SD_SCK_PIN _EXP2_09
#define SD_MISO_PIN _EXP2_06
#define SD_MOSI_PIN _EXP2_10
#define SD_SS_PIN _EXP2_05
#elif SD_CONNECTION_IS(ONBOARD)
#undef SD_DETECT_PIN
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h
|
C
|
agpl-3.0
| 8,139
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Azteeg X5 MINI WIFI pin assignments
* Schematic: http://files.panucatt.com/datasheets/x5mini_wifi_wiring.pdf
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Azteeg X5 MINI WIFI"
//
// DIGIPOT slave addresses
//
#ifndef DIGIPOT_I2C_ADDRESS_A
#define DIGIPOT_I2C_ADDRESS_A 0x58 // shifted slave address for first DIGIPOT (0x58 <- 0x2C << 1)
#endif
#ifndef DIGIPOT_I2C_ADDRESS_B
#define DIGIPOT_I2C_ADDRESS_B 0x5C // shifted slave address for second DIGIPOT (0x5C <- 0x2E << 1)
#endif
#include "pins_AZTEEG_X5_MINI.h"
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h
|
C
|
agpl-3.0
| 1,418
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* BigTreeTech SKR E3 Turbo pin assignments
* Schematic: https://github.com/bigtreetech/BIGTREETECH-SKR-E3-Turbo/blob/master/Hardware/BTT%20SKR%20E3%20Turbo-SCH.pdf
*/
#include "env_validate.h"
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "BTT SKR E3 Turbo"
#endif
#define USES_DIAG_JUMPERS
// Onboard I2C EEPROM
#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x1000 // 4K (AT24C32)
//
// Servos
//
#define SERVO0_PIN P1_23
//
// TMC StallGuard DIAG pins
//
#define X_DIAG_PIN P1_29 // X-STOP
#define Y_DIAG_PIN P1_28 // Y-STOP
#define Z_DIAG_PIN P1_27 // Z-STOP
#define E0_DIAG_PIN P1_26 // E0DET
#define E1_DIAG_PIN P1_25 // E1DET
//
// Limit Switches
#define X_STOP_PIN X_DIAG_PIN
#define Y_STOP_PIN Y_DIAG_PIN
#define Z_STOP_PIN Z_DIAG_PIN
//
// Z Probe
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P1_22
#endif
//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif
//
// Filament Runout Sensor
//
#define FIL_RUNOUT_PIN P1_26 // E0DET
#define FIL_RUNOUT2_PIN P1_25 // E1DET
//
// Power Supply Control
//
#ifndef PS_ON_PIN
#define PS_ON_PIN P1_21
#endif
// LED driving pin
#ifndef BOARD_NEOPIXEL_PIN
#define BOARD_NEOPIXEL_PIN P1_24
#endif
//
// Power Loss Detection
//
#ifndef POWER_LOSS_PIN
#define POWER_LOSS_PIN P1_20 // PWRDET
#endif
//
// Steppers
//
#define X_STEP_PIN P1_04
#define X_DIR_PIN P1_08
#define X_ENABLE_PIN P1_00
#ifndef X_CS_PIN
#define X_CS_PIN P1_01
#endif
#define Y_STEP_PIN P1_14
#define Y_DIR_PIN P1_15
#define Y_ENABLE_PIN P1_09
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_10
#endif
#define Z_STEP_PIN P4_29
#define Z_DIR_PIN P4_28
#define Z_ENABLE_PIN P1_16
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_17
#endif
#define E0_STEP_PIN P2_06
#define E0_DIR_PIN P2_07
#define E0_ENABLE_PIN P0_04
#ifndef E0_CS_PIN
#define E0_CS_PIN P0_05
#endif
#define E1_STEP_PIN P2_11
#define E1_DIR_PIN P2_12
#define E1_ENABLE_PIN P0_21
#ifndef E1_CS_PIN
#define E1_CS_PIN P0_22
#endif
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
#define X_SERIAL_TX_PIN P1_01
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN P1_10
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN P1_17
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN P0_05
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN P0_22
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// TMC Low Power Standby pins
//
#define X_STDBY_PIN P3_26
#define Y_STDBY_PIN P3_25
#define Z_STDBY_PIN P1_18
#define E0_STDBY_PIN P1_19
#define E1_STDBY_PIN P2_13
//
// Temperature Sensors
//
#define TEMP_0_PIN P0_24
#define TEMP_1_PIN P0_23
#define TEMP_BED_PIN P0_25
#ifndef TEMP_BOARD_PIN
#define TEMP_BOARD_PIN P1_30 // Onboard thermistor, NTC100K
#endif
//
// Heaters / Fans
//
#define HEATER_0_PIN P2_03 // EXTRUDER 0
#define HEATER_1_PIN P2_04 // EXTRUDER 1
#define HEATER_BED_PIN P2_05 // BED
#define FAN0_PIN P2_01
#define FAN1_PIN P2_02
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN FAN1_PIN
#endif
/**
* ------
* (BEEPER) P2_08 | 1 2 | P0_16 (BTN_ENC)
* (BTN_EN1) P0_19 | 3 4 | RESET
* (BTN_EN2) P0_20 5 6 | P0_15 (LCD_D4)
* (LCD_RS) P0_17 | 7 8 | P0_18 (LCD_EN)
* GND | 9 10 | 5V
* ------
* EXP
*/
#define EXP1_01_PIN P2_08
#define EXP1_02_PIN P0_16
#define EXP1_03_PIN P0_19
#define EXP1_04_PIN -1
#define EXP1_05_PIN P0_20
#define EXP1_06_PIN P0_15
#define EXP1_07_PIN P0_17
#define EXP1_08_PIN P0_18
#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! Ender-3 V2 display requires a custom cable with TX = P0_15, RX = P0_16. See 'pins_BTT_SKR_E3_TURBO.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
/**
* Ender-3 V2 display SKR E3 Turbo (EXP1) Ender-3 V2 display --> SKR E3 Turbo
* ------ ------ RX 3 --> 5 P0_15
* -- | 1 2 | -- (BEEPER) P2_08 |10 9 | P0_16 (BTN_ENC) TX 4 --> 9 P0_16
* (SKR_TX1) RX | 3 4 | TX (SKR_RX1) (BTN_EN1) P0_19 | 8 7 | RESET BEEPER 6 --> 10 P2_08
* (BTN_ENC) ENT 5 6 | BEEPER (BTN_EN2) P0_20 6 5 | P0_15 (LCD_D4)
* (BTN_E2) B | 7 8 | A (BTN_E1) (LCD_RS) P0_17 | 4 3 | P0_18 (LCD_EN)
* GND | 9 10 | 5V GND | 2 1 | 5V
* ------ ------
*/
#define BEEPER_PIN EXP1_01_PIN
#define BTN_EN1 EXP1_08_PIN
#define BTN_EN2 EXP1_07_PIN
#define BTN_ENC EXP1_05_PIN
#elif HAS_WIRED_LCD
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN EXP1_01_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define BTN_ENC EXP1_02_PIN
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_EN EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#ifndef NO_CONTROLLER_CUSTOM_WIRING_WARNING
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_E3_TURBO.h' for details. (Define NO_CONTROLLER_CUSTOM_WIRING_WARNING to suppress this warning.)"
#endif
#define LCD_PINS_RS EXP1_06_PIN
#define LCD_PINS_EN EXP1_02_PIN
#define LCD_PINS_D4 EXP1_07_PIN
#define LCD_PINS_D5 EXP1_05_PIN
#define LCD_PINS_D6 EXP1_03_PIN
#define LCD_PINS_D7 EXP1_01_PIN
#define ADC_KEYPAD_PIN P1_23 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#elif ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define BTN_ENC EXP1_02_PIN
#define DOGLCD_CS EXP1_07_PIN
#define DOGLCD_A0 EXP1_06_PIN
#define DOGLCD_SCK EXP1_01_PIN
#define DOGLCD_MOSI EXP1_08_PIN
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#else
#error "Only ZONESTAR_LCD, MKS_MINI_12864, ENDER2_STOCKDISPLAY, and CR10_STOCKDISPLAY are currently supported on the BTT_SKR_E3_TURBO."
#endif
#endif // HAS_WIRED_LCD
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN P2_00
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define SD_SS_PIN P0_06
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "SD CUSTOM_CABLE is not compatible with SKR E3 Turbo."
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h
|
C
|
agpl-3.0
| 9,841
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* BigTreeTech SKR 1.4 Turbo pin assignments
* Schematic: https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT%20SKR%20V1.4/Hardware/BTT%20SKR%20V1.4-SCH.pdf
*/
#define BOARD_INFO_NAME "BTT SKR V1.4 TURBO"
//
// Include SKR 1.4 pins
//
#define REQUIRE_LPC1769
#include "../lpc1768/pins_BTT_SKR_V1_4.h" // ... BTT_SKR_common
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h
|
C
|
agpl-3.0
| 1,223
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Cohesion3D Mini pin assignments
* Schematic: https://lasergods.com/cohesion3d-mini-pinout-diagram/
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Cohesion3D Mini"
//
// Servos
//
#define SERVO0_PIN P1_23
//
// Limit Switches
//
#define X_MIN_PIN P1_24 // 10k pullup to 3.3V
#define X_MAX_PIN P1_25 // 10k pullup to 3.3V
#define Y_MIN_PIN P1_26 // 10k pullup to 3.3V
#define Y_MAX_PIN P1_27 // 10k pullup to 3.3V
#define Z_MIN_PIN P1_28 // 10k pullup to 3.3V
#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#define X_CS_PIN P1_10 // Ethernet Expansion - Pin 9
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#define Y_CS_PIN P1_09 // Ethernet Expansion - Pin 10
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#define Z_CS_PIN P1_00 // Ethernet Expansion - Pin 11
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
#define E0_CS_PIN P1_04 // Ethernet Expansion - Pin 12
//
// Default pins for TMC software SPI
//
#ifndef TMC_SPI_MOSI
#define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5
#endif
#ifndef TMC_SPI_MISO
#define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6
#endif
#ifndef TMC_SPI_SCK
#define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7
#endif
//
// Analog Inputs
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_23_A0 // P0_23
#define TEMP_BED_PIN P0_24_A1 // P0_24
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_0_PIN P2_07 // FET 1
#ifndef FAN0_PIN
#define FAN0_PIN P2_06 // FET 3
#endif
//
// Auto fans
//
#define AUTO_FAN_PIN P2_04 // FET 4
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
//
// Misc. Functions
//
#define LED_PIN P4_28 // Play LED
//
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER
#undef HEATER_0_PIN
#define SPINDLE_LASER_ENA_PIN P2_07 // FET 1
#undef HEATER_BED_PIN
#define SPINDLE_LASER_PWM_PIN P2_05 // Bed FET
#undef FAN0_PIN
#define SPINDLE_DIR_PIN P2_06 // FET 3
#endif
//
// LCD / Controller
//
// LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be
// defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER.
//
// A remote SD card is currently not supported because the pins routed to the EXP2
// connector are shared with the onboard SD card, and Marlin does not support reading
// G-code files from the onboard SD card.
//
#if HAS_WIRED_LCD
#define BEEPER_PIN P0_27 // EXP2-7 - open drain
#define BTN_EN1 P3_26 // EXP2-5
#define BTN_EN2 P3_25 // EXP2-3
#define BTN_ENC P1_30 // EXP1-2
#define LCD_PINS_RS P0_16 // EXP1-4
#define LCD_SDSS P0_28 // EXP2-4
#define LCD_PINS_EN P0_18 // EXP1-3
#define LCD_PINS_D4 P0_15 // EXP1-5
#define KILL_PIN P2_11 // EXP2-10
#if HAS_MEDIA
#error "SDSUPPORT is not currently supported by the Cohesion3D boards"
#endif
#endif // HAS_WIRED_LCD
//
// Ethernet pins
//
#define ENET_MDIO P1_17
#define ENET_RX_ER P1_14
#define ENET_RXD1 P1_10
#define ENET_MOC P1_16
#define REF_CLK P1_15
#define ENET_RXD0 P1_09
#define ENET_CRS P1_08
#define ENET_TX_EN P1_04
#define ENET_TXD0 P1_00
#define ENET_TXD1 P1_01
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h
|
C
|
agpl-3.0
| 5,600
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Cohesion3D ReMix pin assignments
* Schematic: https://github.com/Cohesion3D/Cohesion3D-ReMix/blob/master/C3D%20ReMix%20rev2.sch
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Cohesion3D ReMix"
//
// Servos
//
#define SERVO0_PIN P2_04
//
// Limit Switches
//
#define X_MIN_PIN P1_24 // 10k pullup to 3.3V
#define X_MAX_PIN P1_25 // 10k pullup to 3.3V
#define Y_MIN_PIN P1_26 // 10k pullup to 3.3V
#define Y_MAX_PIN P1_27 // 10k pullup to 3.3V
#define Z_MIN_PIN P1_28 // 10k pullup to 3.3V
#define Z_MAX_PIN P1_29 // 10k pullup to 3.3V
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P1_29
#endif
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#define X_CS_PIN P1_10 // Ethernet Expansion - Pin 9
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#define Y_CS_PIN P1_09 // Ethernet Expansion - Pin 10
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#define Z_CS_PIN P1_00 // Ethernet Expansion - Pin 11
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
#define E0_CS_PIN P1_04 // Ethernet Expansion - Pin 12
#define E1_STEP_PIN P2_08
#define E1_DIR_PIN P2_13
#define E1_ENABLE_PIN P4_29
#define E1_CS_PIN P1_01 // Ethernet Expansion - Pin 14
#define E2_STEP_PIN P1_20
#define E2_DIR_PIN P1_19
#define E2_ENABLE_PIN P1_21
#define E2_CS_PIN P1_18 // FET 6
//
// Default pins for TMC software SPI
//
#ifndef TMC_SPI_MOSI
#define TMC_SPI_MOSI P1_16 // Ethernet Expansion - Pin 5
#endif
#ifndef TMC_SPI_MISO
#define TMC_SPI_MISO P1_17 // Ethernet Expansion - Pin 6
#endif
#ifndef TMC_SPI_SCK
#define TMC_SPI_SCK P1_08 // Ethernet Expansion - Pin 7
#endif
//
// Analog Inputs
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_23_A0
#define TEMP_BED_PIN P0_24_A1
#define TEMP_1_PIN P0_25_A2
#if ENABLED(FILAMENT_WIDTH_SENSOR)
#define FILWIDTH_PIN P0_26_A3
#else
#define TEMP_2_PIN P0_26_A3
#endif
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_0_PIN P2_07 // FET 1
#define HEATER_1_PIN P1_23 // FET 2
#define HEATER_2_PIN P1_22 // FET 3
#ifndef FAN0_PIN
#define FAN0_PIN P2_06 // FET 4
#endif
//
// Auto fans
//
#if HOTENDS == 3
#define AUTO_FAN_PIN P1_18 // FET 6
#else
#define AUTO_FAN_PIN P1_22 // FET 3
#endif
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
//
// Misc. Functions
//
#define LED_PIN P4_28 // Play LED
//
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER
#undef HEATER_0_PIN
#undef HEATER_BED_PIN
#undef FAN0_PIN
#define SPINDLE_LASER_PWM_PIN P2_05 // Bed FET
#define SPINDLE_LASER_ENA_PIN P2_07 // FET 1
#define SPINDLE_DIR_PIN P2_06 // FET 4
#endif
/** ------ ------
* (BEEPER) 1.31 | 1 2 | 1.30 (BTN_ENC) (MISO) 0.8 | 1 2 | 0.7 (SD_SCK)
* (EN) 0.18 | 3 4 | 0.16 (RS) (EN1) 3.26 | 3 4 | 0.28 (SD_CS2)
* (D4) 0.15 5 6 | -- (EN2) 3.25 5 6 | 0.9 (SD_MOSI)
* -- | 7 8 | 0.27 (D7) (SD_DET) 0.27 | 7 8 | 2.11
* GND | 9 10 | 5V GND | 9 10 | --
* ------ ------
* EXP1 EXP2
*/
#define EXP1_01_PIN P1_31
#define EXP1_02_PIN P1_30
#define EXP1_03_PIN P0_18
#define EXP1_04_PIN P0_16
#define EXP1_05_PIN P0_15
#define EXP1_06_PIN -1
#define EXP1_07_PIN -1
#define EXP1_08_PIN P0_27 // (also on EXP2-7)
#define EXP1_09_PIN -1
#define EXP1_10_PIN -1
#define EXP2_01_PIN P0_08
#define EXP2_02_PIN P0_07
#define EXP2_03_PIN P3_26
#define EXP2_04_PIN P0_28
#define EXP2_05_PIN P3_25
#define EXP2_06_PIN P0_09
#define EXP2_07_PIN P0_27 // (also on EXP1-8)
#define EXP2_08_PIN P2_11
#define EXP2_09_PIN -1
#define EXP2_10_PIN -1
//
// LCD / Controller
//
// LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be
// defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER.
//
// A remote SD card is currently not supported because the pins routed to the EXP2
// connector are shared with the onboard SD card, and Marlin does not support that
// hardware configuration.
//
#if ENABLED(FYSETC_MINI_12864)
#define FORCE_SOFT_SPI // REQUIRED. Results in LCD Software SPI mode 3
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_04_PIN
#define LCD_RESET_PIN EXP1_05_PIN
// A custom cable is REQUIRED for EXP2 cable because the SCK & MOSI on the card's EXP2 are dedicated
// to the onboard SD card. All required EXP2 signals come from the Ethernet connector. Pin 1 of this
// connector is the one nearest the motor power connector.
#define DOGLCD_SCK P1_17 // LCD2-2 => Ethernet pin 5 (bottom, 3 from left)
#define BTN_EN2 P1_09 // LCD2-3 => Ethernet pin 9 (bottom, 5 from left)
#define BTN_EN1 P1_04 // LCD2-5 => Ethernet pin 11 (bottom, 6 from left)
#define DOGLCD_MOSI P1_01 // LCD2-6 => Ethernet pin 13 (bottom, 7 from left)
// A custom EXP1 cable is required colored LEDs. Pins 1-5, 9, 10 of the cable go to pins 1-5, 9, 10
// on the board's EXP1 connector. Pins 6, 7, and 8 of the EXP1 cable go to the Ethernet connector.
// Rev 1.2 displays do NOT require the RGB LEDs. 2.0 and 2.1 displays do require RGB.
#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN P1_16 // LCD1-6 => Ethernet pin 6 (top row, 3 from left)
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN P1_10 // LCD1-7 => Ethernet pin 10 (top row, 5 from left)
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN P1_00 // LCD1-8 => Ethernet pin 12 (top row, 6 from left)
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN P1_16 // LCD1-6 => Ethernet pin 6 (top row, 3 from left)
#endif
#elif HAS_WIRED_LCD
#define BEEPER_PIN EXP1_01_PIN
//#define SD_DETECT_PIN EXP2_07_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define BTN_ENC EXP1_02_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_SDSS EXP2_04_PIN
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define KILL_PIN EXP2_08_PIN
#endif // HAS_WIRED_LCD
//
// SD Support
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD)
#define SD_SCK_PIN EXP2_02_PIN // (52) System-defined J3-9 & AUX-3
#define SD_MISO_PIN EXP2_01_PIN // (50) System-defined J3-10 & AUX-3
#define SD_MOSI_PIN EXP2_06_PIN // (51) System-defined J3-10 & AUX-3
#if SD_CONNECTION_IS(LCD)
#define SD_SS_PIN P1_23 // (53) System-defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin
#else
#undef SD_DETECT_PIN
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#endif
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
//
// Ethernet pins
//
//#define ENET_MDIO P1_17 // Ethernet pin 5 (bottom, 3 from left)
//#define ENET_RX_ER P1_14
//#define ENET_RXD1 P1_10 // Ethernet pin 10 (top row, 5 from left)
//#define ENET_MOC P1_16 // Ethernet pin 6 (top row, 3 from left)
//#define REF_CLK P1_15
//#define ENET_RXD0 P1_09 // Ethernet pin 9 (bottom, 5 from left)
//#define ENET_CRS P1_08 // Ethernet pin 8 (top row, 4 from left) - INPUT ONLY
//#define ENET_TX_EN P1_04 // Ethernet pin 11 (bottom, 6 from left)
//#define ENET_TXD0 P1_00 // Ethernet pin 12 (top row, 6 from left)
//#define ENET_TXD1 P1_01 // Ethernet pin 13 (bottom, 7 from left)
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h
|
C
|
agpl-3.0
| 11,213
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* FLYmaker FLY-CDY pin assignments
* Schematic: https://github.com/Mellow-3D/FLY-CDY/blob/master/Motherboard%20information/FLY_CDY%20SCH.pdf
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "FLY-CDY"
#define BOARD_WEBSITE_URL "github.com/FLYmaker/FLY-CDY"
//
// Servos
//
#define SERVO0_PIN P1_26
//
// Limit Switches
//
#define X_MIN_PIN P1_29 // X-
#define X_MAX_PIN P1_28 // X+
#define Y_MIN_PIN P1_27 // Y-
#define Y_MAX_PIN P1_25 // Y+
#define Z_MIN_PIN P1_22 // Z-
#define Z_MAX_PIN P0_27 // Z+
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P1_01
#define X_ENABLE_PIN P1_00
#ifndef X_CS_PIN
#define X_CS_PIN P1_04
#endif
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P1_09
#define Y_ENABLE_PIN P1_08
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_10
#endif
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P1_15
#define Z_ENABLE_PIN P1_14
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_16
#endif
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P4_29
#define E0_ENABLE_PIN P1_17
#ifndef E0_CS_PIN
#define E0_CS_PIN P4_28
#endif
#define E1_STEP_PIN P2_04
#define E1_DIR_PIN P2_11
#define E1_ENABLE_PIN P0_04
#ifndef E1_CS_PIN
#define E1_CS_PIN P2_12
#endif
#define E2_STEP_PIN P2_05
#define E2_DIR_PIN P0_11
#define E2_ENABLE_PIN P2_13
#ifndef E2_CS_PIN
#define E2_CS_PIN P0_10
#endif
//
// Default pins for TMC software SPI
//
#ifndef TMC_SPI_MOSI
#define TMC_SPI_MOSI P0_20
#endif
#ifndef TMC_SPI_MISO
#define TMC_SPI_MISO P0_19
#endif
#ifndef TMC_SPI_SCK
#define TMC_SPI_SCK P0_21
#endif
#if HAS_TMC_UART
#define X_SERIAL_TX_PIN P1_04
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN P1_10
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN P1_16
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN P4_28
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN P2_12
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
#define E2_SERIAL_TX_PIN P0_10
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors
//
#define TEMP_0_PIN P0_26_A3 // (T4)
#define TEMP_1_PIN P0_25_A2 // (T3)
#define TEMP_2_PIN P0_24_A1 // (T2)
#define TEMP_BED_PIN P0_23_A0 // (T1)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P3_26
#define HEATER_0_PIN P3_25
#define HEATER_1_PIN P1_20
#define HEATER_2_PIN P1_23
#ifndef FAN0_PIN
#define FAN0_PIN P1_18
#endif
#define FAN1_PIN P1_21
#define FAN2_PIN P1_24
//
// LCD / Controller
//
#define BEEPER_PIN P2_07
#define LCD_PINS_RS P2_10
#define LCD_PINS_EN P0_22
#define LCD_PINS_D4 P1_19
#define LCD_PINS_D5 P2_08
#define LCD_PINS_D6 P1_30
#define LCD_PINS_D7 P1_31
#define BTN_EN1 P0_00
#define BTN_EN2 P0_01
#define BTN_ENC P0_28
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(ONBOARD)
#define SD_SS_PIN P0_06
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define SD_DETECT_PIN P0_05
#elif SD_CONNECTION_IS(LCD)
#define SD_SCK_PIN P0_15
#define SD_MISO_PIN P0_17
#define SD_MOSI_PIN P0_18
#define SD_SS_PIN P0_16
#define SD_DETECT_PIN P2_06
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_FLY_CDY.h
|
C
|
agpl-3.0
| 5,785
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MKS SGen pin assignments
* Schematic: https://github.com/makerbase-mks/MKS-SGen/blob/master/Hardware/MKS%20SGEN%20V1.0_001/MKS%20SGEN%20V1.0_001%20SCH.pdf
*
* Pins diagram:
* https://github.com/makerbase-mks/MKS-SGen/blob/master/Hardware/MKS%20SGEN%20V1.0_001/MKS%20SGEN%20V1.0_001%20PIN.pdf
*/
#define BOARD_INFO_NAME "MKS SGen"
#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN"
#define REQUIRE_LPC1769
#include "../lpc1768/pins_MKS_SBASE.h"
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*/
#define X_SERIAL_TX_PIN P1_22 // J8-2
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN P1_23 // J8-3
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN P2_12 // J8-4
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN P2_11 // J8-5
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN P4_28 // J8-6
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_MKS_SGEN.h
|
C
|
agpl-3.0
| 2,121
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MKS SGen-L V2 pin assignments
* Schematic: https://github.com/makerbase-mks/MKS-SGEN_L-V2/blob/master/Hardware/MKS%20SGEN_L%20V2.0_003/MKS%20SGEN_L%20V2.0_003%20SCH.pdf
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "MKS SGEN_L V2"
#define BOARD_WEBSITE_URL "github.com/makerbase-mks"
#define USES_DIAG_JUMPERS
//
// EEPROM, MKS SGEN_L V2.0 hardware has 4K EEPROM on the board
//
#if NO_EEPROM_SELECTED
#define I2C_EEPROM // AT24C32
#define MARLIN_EEPROM_SIZE 0x1000 // 4K
#endif
//
// Servos
//
#define SERVO0_PIN P1_23 // SERVO P1.23
#define SERVO1_PIN P2_00 // SERVO P2.0
//
// Trinamic Stallguard pins, can connect or disconnect by jumpers cap on the board
//
#define X_DIAG_PIN P1_29 // X-
#define Y_DIAG_PIN P1_27 // Y-
#define Z_DIAG_PIN P1_25 // Z-
#define E0_DIAG_PIN P1_28 // X+
#define E1_DIAG_PIN P1_26 // Y+
//
// Limit Switches
//
#if X_STALL_SENSITIVITY
#define X_STOP_PIN X_DIAG_PIN
#if X_HOME_TO_MIN
#define X_MAX_PIN P1_28 // X+
#else
#define X_MIN_PIN P1_28 // X+
#endif
#else
#define X_MIN_PIN P1_29 // X-
#define X_MAX_PIN P1_28 // X+
#endif
#if Y_STALL_SENSITIVITY
#define Y_STOP_PIN Y_DIAG_PIN
#if Y_HOME_TO_MIN
#define Y_MAX_PIN P1_26 // Y+
#else
#define Y_MIN_PIN P1_26 // Y+
#endif
#else
#define Y_MIN_PIN P1_27 // Y-
#define Y_MAX_PIN P1_26 // Y+
#endif
#if Z_STALL_SENSITIVITY
#define Z_STOP_PIN Z_DIAG_PIN
#if Z_HOME_TO_MIN
#define Z_MAX_PIN P1_24 // Z+
#else
#define Z_MIN_PIN P1_24 // Z+
#endif
#else
#define Z_MIN_PIN P1_25 // Z-
#define Z_MAX_PIN P1_24 // Z+
#endif
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN P1_24
#endif
//
// Probe enable
//
#if ENABLED(PROBE_ENABLE_DISABLE) && !defined(PROBE_ENABLE_PIN)
#define PROBE_ENABLE_PIN SERVO0_PIN
#endif
//
// Filament Runout Sensor
//
#define FIL_RUNOUT_PIN P1_28 // X+
#define FIL_RUNOUT2_PIN P1_26 // Y+
//
// Steppers
//
#define X_STEP_PIN P2_02
#define X_DIR_PIN P2_03
#define X_ENABLE_PIN P2_01
#ifndef X_CS_PIN
#define X_CS_PIN P1_01
#endif
#define Y_STEP_PIN P0_19
#define Y_DIR_PIN P0_20
#define Y_ENABLE_PIN P2_08
#ifndef Y_CS_PIN
#define Y_CS_PIN P1_08
#endif
#define Z_STEP_PIN P0_22
#define Z_DIR_PIN P2_11
#define Z_ENABLE_PIN P0_21
#ifndef Z_CS_PIN
#define Z_CS_PIN P1_10
#endif
#define E0_STEP_PIN P2_13
#define E0_DIR_PIN P0_11
#define E0_ENABLE_PIN P2_12
#ifndef E0_CS_PIN
#define E0_CS_PIN P1_15
#endif
#define E1_STEP_PIN P1_09
#define E1_DIR_PIN P1_14
#define E1_ENABLE_PIN P0_10
#ifndef E1_CS_PIN
#define E1_CS_PIN P1_17
#endif
//
// Default pins for TMC software SPI
//
#ifndef TMC_SPI_MOSI
#define TMC_SPI_MOSI P1_16
#endif
#ifndef TMC_SPI_MISO
#define TMC_SPI_MISO P0_05
#endif
#ifndef TMC_SPI_SCK
#define TMC_SPI_SCK P0_04
#endif
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial1
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
#define X_SERIAL_TX_PIN P1_01
#define X_SERIAL_RX_PIN X_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN P1_08
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN P1_10
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN P1_15
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN P1_17
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_23_A0 // Analog Input A0 (TH1)
#define TEMP_BED_PIN P0_24_A1 // Analog Input A1 (TB)
#define TEMP_1_PIN P0_25_A2 // Analog Input A2 (TH2)
#define TEMP_2_PIN P0_26_A3 // Analog Input A3 (P0.26, No pull up)
#if HOTENDS == 1 && !REDUNDANT_TEMP_MATCH(SOURCE, E1)
#if TEMP_SENSOR_PROBE
#define TEMP_PROBE_PIN TEMP_1_PIN
#elif TEMP_SENSOR_CHAMBER
#define TEMP_CHAMBER_PIN TEMP_1_PIN
#endif
#endif
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_0_PIN P2_07
#if HAS_MULTI_HOTEND
#ifndef HEATER_1_PIN
#define HEATER_1_PIN P2_06
#endif
#else
#ifndef FAN2_PIN
#define FAN2_PIN P2_06 // HE1 for FAN3
#endif
#endif
#ifndef FAN0_PIN
#define FAN0_PIN P2_04 // FAN1
#endif
#ifndef FAN1_PIN
#define FAN1_PIN P1_04 // FAN2
#endif
//
// Misc. Functions
//
#define LED_PIN P1_18 // Used as a status indicator
//
// Power Supply Control
//
#if ENABLED(MKS_PWC)
#define PS_ON_PIN P2_00 // SERVO1
#define KILL_PIN P1_24 // Z+
#define KILL_PIN_STATE HIGH
#endif
//
// RGB LED
//
#if ENABLED(RGB_LED)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN P1_19
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN P1_20
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN P1_21
#endif
#else
#define LED2_PIN P1_19 // Initialized by HAL/LPC1768/main.cpp
#define LED3_PIN P1_20
#define LED4_PIN P1_21
#endif
/** ------ ------
* (BEEPER) 1.31 | 1 2 | 1.30 (BTN_ENC) (MISO) 0.8 | 1 2 | 0.7 (SD_SCK)
* (LCD_EN) 0.18 | 3 4 | 0.16 (LCD_RS) (BTN_EN1) 3.25 | 3 4 | 0.28 (SD_CS2)
* (LCD_D4) 0.15 5 6 | 0.17 (LCD_D5) (BTN_EN2) 3.26 5 6 | 0.9 (SD_MOSI)
* (LCD_D6) 1.0 | 7 8 | 1.22 (LCD_D7) (SD_DETECT) 0.27 | 7 8 | RST
* GND | 9 10 | 5V GND | 9 10 | --
* ------ ------
* EXP1 EXP2
*/
#define EXP1_01_PIN P1_31
#define EXP1_02_PIN P1_30
#define EXP1_03_PIN P0_18
#define EXP1_04_PIN P0_16
#define EXP1_05_PIN P0_15
#define EXP1_06_PIN P0_17
#define EXP1_07_PIN P1_00
#define EXP1_08_PIN P1_22
#define EXP2_01_PIN P0_08
#define EXP2_02_PIN P0_07
#define EXP2_03_PIN P3_25
#define EXP2_04_PIN P0_28
#define EXP2_05_PIN P3_26
#define EXP2_06_PIN P0_09
#define EXP2_07_PIN P0_27
#define EXP2_08_PIN -1 // RESET
#if IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS EXP2_03_PIN
#endif
#define SD_DETECT_PIN EXP2_07_PIN
#elif HAS_WIRED_LCD
#define BEEPER_PIN EXP1_01_PIN
#define BTN_ENC EXP1_02_PIN
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS EXP1_07_PIN
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define LCD_PINS_EN EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#else
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define LCD_SDSS EXP2_04_PIN
#if ENABLED(MKS_12864OLED_SSD1306)
#define LCD_PINS_DC EXP1_06_PIN
#define DOGLCD_CS EXP1_04_PIN
#define DOGLCD_A0 LCD_PINS_DC
#define DOGLCD_SCK EXP1_05_PIN
#define DOGLCD_MOSI EXP1_03_PIN
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
#define KILL_PIN -1 // NC
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI
#define TFT_CS_PIN EXP1_07_PIN
#define TFT_DC_PIN EXP1_08_PIN
#define TFT_A0_PIN TFT_DC_PIN
#define TFT_MISO_PIN EXP2_01_PIN
#define TFT_BACKLIGHT_PIN EXP1_03_PIN
#define TFT_RESET_PIN EXP1_04_PIN
#define LCD_USE_DMA_SPI
#define TOUCH_INT_PIN EXP1_06_PIN
#define TOUCH_CS_PIN EXP1_05_PIN
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
// Disable any LCD related PINs config
#define LCD_PINS_EN -1
#define LCD_PINS_RS -1
#ifndef TFT_BUFFER_WORDS
#define TFT_BUFFER_WORDS 1200
#endif
#ifndef TFT_QUEUE_SIZE
#define TFT_QUEUE_SIZE 6144
#endif
#else // !MKS_12864OLED_SSD1306
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_04_PIN
#define DOGLCD_SCK EXP2_02_PIN
#define DOGLCD_MOSI EXP2_06_PIN
#define LCD_BACKLIGHT_PIN -1
#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems
// results in LCD soft SPI mode 3, SD soft SPI mode 0
#define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
#if ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN EXP1_06_PIN
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN EXP1_07_PIN
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN EXP1_08_PIN
#endif
#elif ENABLED(FYSETC_MINI_12864_2_1)
#define NEOPIXEL_PIN EXP1_06_PIN
#endif
#else // !FYSETC_MINI_12864
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS EXP1_06_PIN
#define DOGLCD_A0 EXP1_07_PIN
#endif
#if IS_ULTIPANEL
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#endif
#endif // !FYSETC_MINI_12864
#endif // !MKS_12864OLED_SSD1306
#endif // !CR10_STOCKDISPLAY
#endif // HAS_WIRED_LCD
//
// SD Card
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD)
#define SD_DETECT_PIN EXP2_07_PIN
#define SD_SCK_PIN EXP2_02_PIN
#define SD_MISO_PIN EXP2_01_PIN
#define SD_MOSI_PIN EXP2_06_PIN
#if SD_CONNECTION_IS(ONBOARD)
#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card
#define SD_SS_PIN ONBOARD_SD_CS_PIN
#else
#define SD_SS_PIN EXP2_04_PIN
#endif
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
//
// Other Pins
//
//#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
//#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0)
//#define PS_ON_PIN P1_23 // SERVO0 P1.23
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h
|
C
|
agpl-3.0
| 14,423
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Smoothieware Smoothieboard pin assignments
* Schematic: http://smoothieware.org/_media///external/http.i.imgur.com.oj4zqs3.png
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Smoothieboard"
#define BOARD_WEBSITE_URL "smoothieware.org/smoothieboard"
//
// Servos
//
#define SERVO0_PIN P1_23
//
// Limit Switches
//
#define X_MIN_PIN P1_24
#define X_MAX_PIN P1_25
#define Y_MIN_PIN P1_26
#define Y_MAX_PIN P1_27
#define Z_MIN_PIN P1_28
#define Z_MAX_PIN P1_29
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P0_05
#define X_ENABLE_PIN P0_04
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P0_11
#define Y_ENABLE_PIN P0_10
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P0_20
#define Z_ENABLE_PIN P0_19
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P0_22
#define E0_ENABLE_PIN P0_21
#define E1_STEP_PIN P2_08
#define E1_DIR_PIN P2_13
#define E1_ENABLE_PIN P4_29
//
// Temperature Sensors
// 3.3V max when defined as an analog input
//
#define TEMP_0_PIN P0_23_A0 // (T1)
#define TEMP_BED_PIN P0_24_A1 // (T2)
#define TEMP_1_PIN P0_25_A2 // (T3)
#define TEMP_2_PIN P0_26_A3 // (T4)
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_0_PIN P2_07
#define HEATER_1_PIN P1_23
#ifndef FAN0_PIN
#define FAN0_PIN P2_06
#endif
#define FAN1_PIN P2_04
//
// LCD / Controller
//
#if ANY(VIKI2, miniVIKI)
#define BEEPER_PIN P1_31
#define DOGLCD_A0 P2_11
#define DOGLCD_CS P0_16
#define BTN_EN1 P3_25
#define BTN_EN2 P3_26
#define BTN_ENC P1_30
#define SD_DETECT_PIN P1_18
#define SDSS P1_21
#define STAT_LED_RED_PIN P1_19
#define STAT_LED_BLUE_PIN P1_20
#elif HAS_WIRED_LCD
/**
* SD Support
*
* For the RRD GLCD it CANNOT share the same SPI as the LCD so it must be
* hooked up to the onboard SDCard SPI and use a spare pin for the SDCS.
* Also note that an external SDCard sharing the SPI port with the
* onboard/internal SDCard must be ejected before rebooting as the bootloader
* does not like the external card. NOTE Smoothie will not boot if the external
* sdcard is inserted in the RRD LCD sdcard slot at boot time, it must be
* inserted after it has booted.
*/
#define SD_DETECT_PIN P0_27 // EXP2 Pin 7 (SD_CD, SD_DET)
#define SD_MISO_PIN P0_08 // EXP2 Pin 1 (PB3, SD_MISO)
#define SD_SCK_PIN P0_07 // EXP2 Pin 2 (SD_SCK)
#define SD_SS_PIN P0_28 // EXP2 Pin 4 (SD_CSEL, SD_CS)
#define SD_MOSI_PIN P0_09 // EXP2 Pin 6 (PB2, SD_MOSI)
/**
* The Smoothieboard supports the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with either
* a custom cable with breakouts to the pins indicated below or the RRD GLCD Adapter board
* found at http://smoothieware.org/rrdglcdadapter
*
* Other links to information about setting up a display panel with Smoothieboard
* http://chibidibidiwah.wdfiles.com/local--files/panel/smoothieboard2sd.jpg
* http://smoothieware.org/panel
*/
#if IS_RRD_FG_SC
// EXP1 Pins
#define BEEPER_PIN P1_31 // EXP1 Pin 1
#define BTN_ENC P1_30 // EXP1 Pin 2
#define LCD_PINS_EN P0_18 // EXP1 Pin 3 (MOSI)
#define LCD_PINS_RS P0_16 // EXP1 Pin 4 (CS)
#define LCD_PINS_D4 P0_15 // EXP1 Pin 5 (SCK)
// EXP2 Pins
#define BTN_EN2 P3_26 // EXP2 Pin 3
#define BTN_EN1 P3_25 // EXP2 Pin 5
#elif IS_TFTGLCD_PANEL
#define SD_DETECT_PIN P0_27 // EXP2 Pin 7 (SD_CD, SD_DET)
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS P3_26 // EXP2 Pin 3
#endif
#else
#error "Marlin's Smoothieboard support cannot drive your LCD."
#endif
#endif
/**
* I2C Digipots - MCP4451
* Address 58 (2C << 1)
* Set from 0 - 127 with stop bit.
* (Ex. 3F << 1 | 1)
*/
#define DIGIPOTS_I2C_SCL P0_00
#define DIGIPOTS_I2C_SDA_X P0_04
#define DIGIPOTS_I2C_SDA_Y P0_10
#define DIGIPOTS_I2C_SDA_Z P0_19
#define DIGIPOTS_I2C_SDA_E0 P0_21
#define DIGIPOTS_I2C_SDA_E1 P4_29
#ifndef DIGIPOT_I2C_ADDRESS_A
#define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address (58 <- 2C << 1)
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h
|
C
|
agpl-3.0
| 6,203
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* TH3D EZBoard pin assignments
*/
#include "env_validate.h"
//#define V3_EZABL_ON_SERVO // As in TH3D Firmware Config
#define BOARD_INFO_NAME "TH3D EZBoard"
#define BOARD_WEBSITE_URL "th3dstudio.com"
//
// Servos
//
#if ENABLED(V3_EZABL_ON_SERVO)
#define SERVO0_PIN -1
#else
#define SERVO0_PIN P2_04
#endif
//
// Limit Switches
//
#define X_STOP_PIN P1_24
#define Y_STOP_PIN P1_25
#if ENABLED(V3_EZABL_ON_SERVO)
#define Z_STOP_PIN P2_04
#else
#define Z_STOP_PIN P1_26
#endif
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN P1_27
#endif
//
// Steppers
//
#define X_STEP_PIN P2_00
#define X_DIR_PIN P1_16
#define X_ENABLE_PIN P1_17
#define Y_STEP_PIN P2_01
#define Y_DIR_PIN P1_10
#define Y_ENABLE_PIN P1_09
#define Z_STEP_PIN P2_02
#define Z_DIR_PIN P1_15
#define Z_ENABLE_PIN P1_14
#define E0_STEP_PIN P2_03
#define E0_DIR_PIN P1_04
#define E0_ENABLE_PIN P1_08
#define E1_STEP_PIN P2_08
#define E1_DIR_PIN P2_13
#define E1_ENABLE_PIN P4_29
#if HAS_TMC_UART
//
// TMC220x stepper drivers
//
#define X_SERIAL_TX_PIN P0_04
#define X_SERIAL_RX_PIN P0_05
#define Y_SERIAL_TX_PIN P0_10
#define Y_SERIAL_RX_PIN P0_11
#define Z_SERIAL_TX_PIN P0_19
#define Z_SERIAL_RX_PIN P0_20
#define E0_SERIAL_TX_PIN P0_22
#define E0_SERIAL_RX_PIN P0_21
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temp Sensors
// 3.3V max when defined as an Analog Input!
//
#if TEMP_SENSOR_0 == 20 // PT100 Adapter
#define TEMP_0_PIN P0_02_A7 // Analog Input
#else
#define TEMP_0_PIN P0_23_A0 // Analog Input P0_23
#endif
#define TEMP_BED_PIN P0_24_A1 // Analog Input P0_24
//
// Heaters / Fans
//
#define HEATER_BED_PIN P2_05
#define HEATER_0_PIN P2_07
#ifndef FAN0_PIN
#define FAN0_PIN P2_06
#endif
#define FAN1_PIN P1_22
//
// Auto fans
//
#define AUTO_FAN_PIN P1_22 // FET 3
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
//
// SD Card
//
#define SDCARD_CONNECTION ONBOARD
#define SD_DETECT_PIN P0_27 // SD_CD
#define SD_SCK_PIN P0_07
#define SD_MISO_PIN P0_08
#define SD_MOSI_PIN P0_09
#define ONBOARD_SD_CS_PIN P0_06
#define SD_SS_PIN ONBOARD_SD_CS_PIN
//
// LCD / Controller
//
/**
* ------
* P1_31 | 1 2 | P1_30
* P3_26 | 3 4 | P2_11
* P3_25 5 6 | P0_15
* P0_16 | 7 8 | P0_18
* GND | 9 10 | 5V
* ------
* EXP1
*
* LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be
* defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER.
*
* A remote SD card is currently not supported because the pins routed to the EXP2
* connector are shared with the onboard SD card.
*/
#define EXP1_01_PIN P1_31
#define EXP1_02_PIN P1_30
#define EXP1_03_PIN P3_26
#define EXP1_04_PIN P2_11
#define EXP1_05_PIN P3_25
#define EXP1_06_PIN P0_15
#define EXP1_07_PIN P0_16
#define EXP1_08_PIN P0_18
#if ENABLED(CR10_STOCKDISPLAY)
/** ------
* BEEPER | 1 2 | ENC
* EN1 | 3 4 | KILL
* EN2 5 6 | LCD_D4
* LCD_RS | 7 8 | LCD_EN
* GND | 9 10 | 5V
* ------
*/
#define BEEPER_PIN EXP1_01_PIN
#define LCD_PINS_RS EXP1_07_PIN
#define LCD_PINS_EN EXP1_08_PIN
#define LCD_PINS_D4 EXP1_06_PIN
#define KILL_PIN EXP1_04_PIN
#elif ENABLED(MKS_MINI_12864)
/** ------
* SCK | 1 2 | ENC
* EN1 | 3 4 | --
* EN2 5 6 | A0
* CS | 7 8 | MOSI
* GND | 9 10 | 5V
* ------
*/
#define DOGLCD_CS EXP1_07_PIN
#define DOGLCD_A0 EXP1_06_PIN
#define DOGLCD_SCK EXP1_01_PIN
#define DOGLCD_MOSI EXP1_08_PIN
#define LCD_CONTRAST_INIT 160
#define LCD_CONTRAST_MIN 120
#define LCD_CONTRAST_MAX 180
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#elif HAS_WIRED_LCD
#error "Only CR10_STOCKDISPLAY or MKS_MINI_12864 are supported with TH3D EZBoard."
#endif
#if ANY(CR10_STOCKDISPLAY, MKS_MINI_12864)
#define BTN_EN1 EXP1_03_PIN
#define BTN_EN2 EXP1_05_PIN
#define BTN_ENC EXP1_02_PIN
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h
|
C
|
agpl-3.0
| 6,450
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#ifndef ENV_VALIDATE_H
#define ENV_VALIDATE_H
#if NOT_TARGET(__AVR_ATmega2560__)
#if DISABLED(ALLOW_MEGA1280)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
#elif NOT_TARGET(__AVR_ATmega1280__)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560 or 1280' in 'Tools > Board.'"
#endif
#endif
#undef ALLOW_MEGA1280
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/env_validate.h
|
C
|
agpl-3.0
| 1,233
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Cheaptronic v1.0 pin assignments
* ATmega2560
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Cheaptronic v1.0"
//
// Limit Switches
//
#define X_STOP_PIN 3
#define Y_STOP_PIN 2
#define Z_STOP_PIN 5
//
// Steppers
//
#define X_STEP_PIN 14
#define X_DIR_PIN 15
#define X_ENABLE_PIN 24
#define Y_STEP_PIN 35
#define Y_DIR_PIN 36
#define Y_ENABLE_PIN 31
#define Z_STEP_PIN 40
#define Z_DIR_PIN 41
#define Z_ENABLE_PIN 37
#define E0_STEP_PIN 26
#define E0_DIR_PIN 28
#define E0_ENABLE_PIN 25
#define E1_STEP_PIN 33
#define E1_DIR_PIN 34
#define E1_ENABLE_PIN 30
//
// Temperature sensors
//
#define TEMP_0_PIN 15 // Analog Input
#define TEMP_1_PIN 14 // Analog Input
#define TEMP_BED_PIN 13 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 19 // EXTRUDER 1
#define HEATER_1_PIN 23 // EXTRUDER 2
#define HEATER_BED_PIN 22
//
// LCD / Controller
//
// Cheaptronic v1.0 doesn't support LCD
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_CHEAPTRONIC.h
|
C
|
agpl-3.0
| 2,431
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Cheaptronic v2.0 pin assignments
* Built and sold by Michal Dyntar - RRO
* www.reprapobchod.cz (DOES NOT EXIST ANYMORE)
* https://web.archive.org/web/20190306201523/http://reprapobchod.cz/
* ATmega2560
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Cheaptronic v2.0"
//
// Limit Switches
//
#define X_MIN_PIN 30
#define X_MAX_PIN 31
#define Y_MIN_PIN 32
#define Y_MAX_PIN 33
#define Z_MIN_PIN 34
#define Z_MAX_PIN 35
//
// Steppers
//
#define X_STEP_PIN 17
#define X_DIR_PIN 16
#define X_ENABLE_PIN 48
#define Y_STEP_PIN 54
#define Y_DIR_PIN 47
#define Y_ENABLE_PIN 55
#define Z_STEP_PIN 57
#define Z_DIR_PIN 56
#define Z_ENABLE_PIN 62
#define E0_STEP_PIN 23
#define E0_DIR_PIN 22
#define E0_ENABLE_PIN 24
#define E1_STEP_PIN 26
#define E1_DIR_PIN 25
#define E1_ENABLE_PIN 27
#define E2_STEP_PIN 29
#define E2_DIR_PIN 28
#define E2_ENABLE_PIN 39
//
// Temperature sensors
//
#define TEMP_0_PIN 15
#define TEMP_1_PIN 13
#define TEMP_2_PIN 14
#define TEMP_3_PIN 11 // should be used for chamber temperature control
#define TEMP_BED_PIN 12
//
// Heaters / Fans
//
#define HEATER_0_PIN 6
#define HEATER_1_PIN 7
#define HEATER_2_PIN 8
#define HEATER_BED_PIN 9
#ifndef FAN0_PIN
#define FAN0_PIN 3
#endif
#define FAN2_PIN 58 // additional fan or light control output
//
// Other board specific pins
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 37 // board input labeled as F-DET
#endif
#define Z_MIN_PROBE_PIN 36 // additional external board input labeled as E-SENS (should be used for Z-probe)
#define LED_PIN 13
#define SPINDLE_ENABLE_PIN 4 // additional PWM pin 1 at JP1 connector - should be used for laser control too
#define EXT_2 5 // additional PWM pin 2 at JP1 connector
#define EXT_3 2 // additional PWM pin 3 at JP1 connector
#define PS_ON_PIN 45
#define KILL_PIN 46
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 11 // shared with TEMP_3 analog input
#endif
//
// LCD / Controller
//
#define LCD_PINS_RS 19
#define LCD_PINS_EN 42
#define LCD_PINS_D4 18
#define LCD_PINS_D5 38
#define LCD_PINS_D6 41
#define LCD_PINS_D7 40
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
//
// Beeper, SD Card, Encoder
//
#define BEEPER_PIN 44
#if HAS_MEDIA
#define SDSS 53
#define SD_DETECT_PIN 49
#endif
#if IS_NEWPANEL
#define BTN_EN1 11
#define BTN_EN2 12
#define BTN_ENC 43
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_CHEAPTRONICv2.h
|
C
|
agpl-3.0
| 4,823
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* CartesioV11 pin assignments
* Comes with an Arduino Mega, see
* https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly
* ATmega2560, ATmega1280
*/
#define ALLOW_MEGA1280
#include "env_validate.h"
#define BOARD_INFO_NAME "CN Controls V11"
//
// Limit Switches
//
#define X_STOP_PIN 43
#define Y_STOP_PIN 45
#define Z_STOP_PIN 42
//
// Steppers
//
#define X_STEP_PIN 34
#define X_DIR_PIN 36
#define X_ENABLE_PIN 35
#define Y_STEP_PIN 37
#define Y_DIR_PIN 39
#define Y_ENABLE_PIN 38
#define Z_STEP_PIN 40
#define Z_DIR_PIN 48
#define Z_ENABLE_PIN 41
#define E0_STEP_PIN 29
#define E0_DIR_PIN 28
#define E0_ENABLE_PIN 3
#define E1_STEP_PIN 61
#define E1_DIR_PIN 62
#define E1_ENABLE_PIN 60
#define E2_STEP_PIN 15
#define E2_DIR_PIN 14
#define E2_ENABLE_PIN 16
#define E3_STEP_PIN 44
#define E3_DIR_PIN 49
#define E3_ENABLE_PIN 47
//
// Temperature Sensors
//
#define TEMP_0_PIN 0 // Analog Input
#define TEMP_1_PIN 3 // Analog Input. 3 for tool2 -> 2 for chambertemp
#define TEMP_2_PIN 2 // Analog Input. 9 for tool3 -> 2 for chambertemp
#define TEMP_3_PIN 11 // Analog Input. 11 for tool4 -> 2 for chambertemp
#define TEMP_BED_PIN 1 // Analog Input
#ifndef TEMP_CHAMBER_PIN
//#define TEMP_CHAMBER_PIN 2 // Analog Input
#endif
//
// Heaters / Fans
//
#define HEATER_0_PIN 5
#define HEATER_1_PIN 58
#define HEATER_2_PIN 64
#define HEATER_3_PIN 46
#define HEATER_BED_PIN 2
#ifndef FAN0_PIN
//#define FAN0_PIN 7 // common PWM pin for all tools
#endif
//
// Auto fans
//
#define AUTO_FAN_PIN 7
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E3_AUTO_FAN_PIN
#define E3_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
//
// Misc. Functions
//
#define SDSS 53
#define SD_DETECT_PIN 13
// Tools
//#define TOOL_0_PIN 4
//#define TOOL_1_PIN 59
//#define TOOL_2_PIN 8
//#define TOOL_3_PIN 30
//#define TOOL_PWM_PIN 7 // common PWM pin for all tools
// Common I/O
//#define FIL_RUNOUT_PIN -1
//#define PWM_1_PIN 11
//#define PWM_2_PIN 10
//#define SPARE_IO 12
//
// LCD / Controller
//
#if HAS_WIRED_LCD
#define BEEPER_PIN 6
#define BTN_EN1 23
#define BTN_EN2 25
#define BTN_ENC 27
#if HAS_MARLINUI_U8GLIB
#define DOGLCD_A0 26
#define DOGLCD_CS 24
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
#define DOGLCD_SCK -1
#endif
#endif
// Hardware buttons for manual movement of XYZ
#define SHIFT_OUT_PIN 19
#define SHIFT_LD_PIN 18
#define SHIFT_CLK_PIN 17
//#define UI1 31
//#define UI2 22
#define STAT_LED_BLUE_PIN -1
#define STAT_LED_RED_PIN 31
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_CNCONTROLS_11.h
|
C
|
agpl-3.0
| 5,275
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* CartesioV12 pin assignments
* Comes with an Arduino Mega, see
* https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly
* ATmega2560, ATmega1280
*/
#define ALLOW_MEGA1280
#include "env_validate.h"
#define BOARD_INFO_NAME "CN Controls V12"
//
// Limit Switches
//
#define X_STOP_PIN 19
#define Y_STOP_PIN 22
#define Z_STOP_PIN 23
//
// Steppers
//
#define X_STEP_PIN 25
#define X_DIR_PIN 27
#define X_ENABLE_PIN 26
#define Y_STEP_PIN 28
#define Y_DIR_PIN 30
#define Y_ENABLE_PIN 29
#define Z_STEP_PIN 31
#define Z_DIR_PIN 33
#define Z_ENABLE_PIN 32
#define E0_STEP_PIN 57
#define E0_DIR_PIN 55
#define E0_ENABLE_PIN 58
#define E1_STEP_PIN 61
#define E1_DIR_PIN 62
#define E1_ENABLE_PIN 60
#define E2_STEP_PIN 46
#define E2_DIR_PIN 66
#define E2_ENABLE_PIN 44
#define E3_STEP_PIN 45
#define E3_DIR_PIN 69
#define E3_ENABLE_PIN 47
//
// Temperature Sensors
//
#define TEMP_0_PIN 0 // Analog Input
#define TEMP_1_PIN 9 // Analog Input. 9 for tool2 -> 13 for chambertemp
#define TEMP_2_PIN 13 // Analog Input. 10 for tool3 -> 13 for chambertemp
#define TEMP_3_PIN 11 // Analog Input. 11 for tool4 -> 13 for chambertemp
#define TEMP_BED_PIN 14 // Analog Input
#ifndef TEMP_CHAMBER_PIN
//#define TEMP_CHAMBER_PIN 13 // Analog Input
#endif
//
// Heaters / Fans
//
#define HEATER_0_PIN 11
#define HEATER_1_PIN 9
#define HEATER_2_PIN 6
#define HEATER_3_PIN 3
#define HEATER_BED_PIN 24
#ifndef FAN0_PIN
#define FAN0_PIN 5 // 5 is PWMtool3 -> 7 is common PWM pin for all tools
#endif
//
// Auto fans
//
#define AUTO_FAN_PIN 7
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E3_AUTO_FAN_PIN
#define E3_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
//
// Misc. Functions
//
#define SDSS 53
#define SD_DETECT_PIN 15
// Tools
//#define TOOL_0_PIN 56
//#define TOOL_0_PWM_PIN 10 // red warning led at dual extruder
//#define TOOL_1_PIN 59
//#define TOOL_1_PWM_PIN 8 // lights at dual extruder
//#define TOOL_2_PIN 4
//#define TOOL_2_PWM_PIN 5
//#define TOOL_3_PIN 14
//#define TOOL_3_PWM_PIN 2
// Common I/O
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 18
#endif
//#define PWM_1_PIN 12
//#define PWM_2_PIN 13
//#define SPARE_IO 17
//
// LCD / Controller
//
#if HAS_WIRED_LCD
#define BEEPER_PIN 16
#define BTN_EN1 36
#define BTN_EN2 34
#define BTN_ENC 38
#if HAS_MARLINUI_U8GLIB
#define DOGLCD_A0 39
#define DOGLCD_CS 35
#define DOGLCD_MOSI 48
#define DOGLCD_SCK 49
#endif
#endif
// Hardware buttons for manual movement of XYZ
#define SHIFT_OUT_PIN 42
#define SHIFT_LD_PIN 41
#define SHIFT_CLK_PIN 40
//#define UI1 43
//#define UI2 37
#define STAT_LED_BLUE_PIN -1
#define STAT_LED_RED_PIN 10 // TOOL_0_PWM_PIN
#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_CNCONTROLS_12.h
|
C
|
agpl-3.0
| 5,551
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* CNControls V15 for HMS434 pin assignments
* ATmega2560, ATmega1280
*/
#define ALLOW_MEGA1280
#include "env_validate.h"
#define BOARD_INFO_NAME "CN Controls V15"
//
// Servos
//
#define SERVO0_PIN 6
//
// Limit Switches
//
#define X_STOP_PIN 34
#define Y_STOP_PIN 39
#define Z_STOP_PIN 62
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 49
#endif
//
// Steppers
//
#define X_STEP_PIN 14
#define X_DIR_PIN 25
#define X_ENABLE_PIN 26
#define Y_STEP_PIN 11
#define Y_DIR_PIN 12
#define Y_ENABLE_PIN 15
#define Z_STEP_PIN 24
#define Z_DIR_PIN 27
#define Z_ENABLE_PIN 28
#define E0_STEP_PIN 64
#define E0_DIR_PIN 65
#define E0_ENABLE_PIN 63
//
// Temperature Sensors
// Analog Inputs
//
#define TEMP_0_PIN 2 // Analog Input
#define TEMP_BED_PIN 4 // Analog Input
#ifndef TEMP_CHAMBER_PIN
#define TEMP_CHAMBER_PIN 5 // Analog Input
#endif
//
// Heaters
//
#define HEATER_0_PIN 4
#define HEATER_BED_PIN 32
#define HEATER_CHAMBER_PIN 33
//
// Fans
//
#define FAN0_PIN 8
//
// Auto fans
//
#define AUTO_FAN_PIN 30
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E2_AUTO_FAN_PIN
#define E2_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef E3_AUTO_FAN_PIN
#define E3_AUTO_FAN_PIN AUTO_FAN_PIN
#endif
#ifndef CHAMBER_AUTO_FAN_PIN
//#define CHAMBER_AUTO_FAN_PIN 10
#endif
//
// Misc. Functions
//
#define SDSS 53
#define SD_DETECT_PIN 40
// Common I/O
#define FIL_RUNOUT_PIN 9
//#define FIL_RUNOUT_PIN 29 // encoder sensor
//#define PWM_1_PIN 12
//#define PWM_2_PIN 13
//#define SPARE_IO 17
#define BEEPER_PIN 13
#define STAT_LED_BLUE_PIN -1
#define STAT_LED_RED_PIN 10 // 31
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_CNCONTROLS_15.h
|
C
|
agpl-3.0
| 3,516
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Einstart-S pin assignments
* ATmega2560, ATmega1280
* PCB Silkscreen: 3DPrinterCon_v3.5
*/
#define ALLOW_MEGA1280
#include "env_validate.h"
#define BOARD_INFO_NAME "Einstart-S"
//
// Limit Switches
//
#define X_STOP_PIN 44
#define Y_STOP_PIN 43
#define Z_STOP_PIN 42
//
// Steppers
//
#define X_STEP_PIN 76
#define X_DIR_PIN 75
#define X_ENABLE_PIN 73
#define Y_STEP_PIN 31
#define Y_DIR_PIN 32
#define Y_ENABLE_PIN 72
#define Z_STEP_PIN 34
#define Z_DIR_PIN 35
#define Z_ENABLE_PIN 33
#define E0_STEP_PIN 36
#define E0_DIR_PIN 37
#define E0_ENABLE_PIN 30
//
// Temperature Sensors
//
#define TEMP_0_PIN 0 // Analog Input
#define TEMP_BED_PIN 1 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 83
#define HEATER_BED_PIN 38
#define FAN0_PIN 82
//
// Misc. Functions
//
#define SDSS 53
#define LED_PIN 4
//
// LCD / Controller
//
// Requires #define U8GLIB_SH1106_EINSTART in Configuration.h
// u8glib constructor
// U8GLIB_SH1106_128X64 u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, LCD_PINS_DC, LCD_PINS_RS);
#define LCD_PINS_DC 78
#define LCD_PINS_RS 79
// DOGM SPI LCD Support
#define DOGLCD_CS 3
#define DOGLCD_MOSI 2
#define DOGLCD_SCK 5
#define DOGLCD_A0 2
//
// LCD Display input pins
//
#define BTN_UP 25
#define BTN_DOWN 26
#define BTN_LEFT 27
#define BTN_RIGHT 28
// 'OK' button
#define BTN_ENC 29
// Set Kill to right arrow, same as RIGID_PANEL
#define KILL_PIN 28
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_EINSTART-S.h
|
C
|
agpl-3.0
| 3,220
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Elefu RA Board Pin Assignments
* Schematic: https://github.com/kiyoshigawa/Elefu-RAv3/blob/master/RA_Circuits.zip
* ATmega2560
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Elefu Ra v3"
//
// Limit Switches
//
#define X_MIN_PIN 35
#define X_MAX_PIN 34
#define Y_MIN_PIN 33
#define Y_MAX_PIN 32
#define Z_MIN_PIN 31
#define Z_MAX_PIN 30
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 30
#endif
//
// Steppers
//
#define X_STEP_PIN 49
#define X_DIR_PIN 13
#define X_ENABLE_PIN 48
#define Y_STEP_PIN 11
#define Y_DIR_PIN 9
#define Y_ENABLE_PIN 12
#define Z_STEP_PIN 7
#define Z_DIR_PIN 6
#define Z_ENABLE_PIN 8
#define E0_STEP_PIN 40
#define E0_DIR_PIN 41
#define E0_ENABLE_PIN 37
#define E1_STEP_PIN 18
#define E1_DIR_PIN 19
#define E1_ENABLE_PIN 38
#define E2_STEP_PIN 43
#define E2_DIR_PIN 47
#define E2_ENABLE_PIN 42
//
// Temperature Sensors
//
#define TEMP_0_PIN 3 // Analog Input
#define TEMP_1_PIN 2 // Analog Input
#define TEMP_2_PIN 1 // Analog Input
#define TEMP_BED_PIN 0 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 45 // 12V PWM1
#define HEATER_1_PIN 46 // 12V PWM2
#define HEATER_2_PIN 17 // 12V PWM3
#define HEATER_BED_PIN 44 // DOUBLE 12V PWM
#ifndef FAN0_PIN
#define FAN0_PIN 16 // 5V PWM
#endif
//
// Misc. Functions
//
#define 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 PHOTOGRAPH_PIN 29
//
// LCD / Controller
//
#define BEEPER_PIN 36
#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
#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
#define TLC_CLOCK_PORT &PORTA
#define TLC_BLANK_BIT 1
#define TLC_BLANK_PORT &PORTA
#define TLC_DATA_BIT 2
#define TLC_DATA_PORT &PORTA
#define TLC_XLAT_BIT 0
#define TLC_XLAT_PORT &PORTA
// 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 } // forward
//#define TRANS_ARRAY { 7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15 } // backward
#endif // RA_DISCO
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_ELEFU_3.h
|
C
|
agpl-3.0
| 5,531
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Geeetech GT2560 Revision A board pin assignments, based on the work of
* George Robles (https://georges3dprinters.com) and
* Richard Smith <galorin@gmail.com>
* Schematic: https://www.geeetech.com/wiki/images/9/90/GT2560_sch.pdf
* ATmega2560
*/
#define ALLOW_MEGA1280
#include "env_validate.h"
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "GT2560 Rev.A"
#endif
#define DEFAULT_MACHINE_NAME "Prusa i3 Pro B"
//
// Limit Switches
//
#define X_MIN_PIN 22
#define X_MAX_PIN 24
#define Y_MIN_PIN 26
#define Y_MAX_PIN 28
#define Z_MIN_PIN 30
#if ENABLED(BLTOUCH) && !defined(SERVO0_PIN)
#define SERVO0_PIN 32
#endif
#if SERVO0_PIN == 32
#define Z_MAX_PIN -1
#else
#define Z_MAX_PIN 32
#endif
//
// Steppers
//
#define X_STEP_PIN 25
#define X_DIR_PIN 23
#define X_ENABLE_PIN 27
#define Y_STEP_PIN 31
#define Y_DIR_PIN 33
#define Y_ENABLE_PIN 29
#define Z_STEP_PIN 37
#define Z_DIR_PIN 39
#define Z_ENABLE_PIN 35
#define E0_STEP_PIN 43
#define E0_DIR_PIN 45
#define E0_ENABLE_PIN 41
#define E1_STEP_PIN 49
#define E1_DIR_PIN 47
#define E1_ENABLE_PIN 48
//
// Temperature Sensors
//
#define TEMP_0_PIN 8
#define TEMP_1_PIN 9
#define TEMP_BED_PIN 10
//
// Heaters / Fans
//
#define HEATER_0_PIN 2
#define HEATER_1_PIN 3
#define HEATER_BED_PIN 4
#ifndef FAN0_PIN
#define FAN0_PIN 7
#endif
//
// Misc. Functions
//
// Power monitoring pins - set to 0 for main VIN, 1 for dedicated bed supply rail.
// Don't forget to enable POWER_MONITOR_VOLTAGE in Configuration_adv.h
// and set POWER_MONITOR_VOLTS_PER_VOLT to 0.090909.
#define POWER_MONITOR_VOLTAGE_PIN 0
/** LCD SDCARD
* ------ ------
* (TX1) 18 | 1 2 | 19 (RX1) (MISO) 50 | 1 2 | 52 (SCK)
* (RX2) 17 | 3 4 | 20 (SDA) 42 | 3 4 | 53 (SS)
* (TX2) 16 | 5 6 21 (SCL) 40 | 5 6 51 (MOSI)
* 5 | 7 8 | 6 38 | 7 8 | RESET
* GND | 9 10 | 5V GND | 9 10 | 5V/3V3
* ------ ------
* SV1 SV3
*
* GT2560 LCD & SD headers follow typical EXP1 & EXP2 format.
* SD header voltage pin set by link pads beneath the header; R25 for 5V, R44 for 3.3V (default)
* Pins 20 (SDA) and 21 (SCL) have external 10K pull-ups on the board.
*/
#define EXP1_01_PIN 18 // TX1 / BEEPER
#define EXP1_02_PIN 19 // RX1 / ENC
#define EXP1_03_PIN 17 // RX2 / CS
#define EXP1_04_PIN 20 // SDA / A0
#define EXP1_05_PIN 16 // TX2 / LCD_RS
#define EXP1_06_PIN 21 // SCL / CS
#define EXP1_07_PIN 5 // D6 / A0
#define EXP1_08_PIN 6 // D7 / D4
#define EXP2_01_PIN 50 // MISO
#define EXP2_02_PIN 52 // SCK
#define EXP2_03_PIN 42 // EN2
#define EXP2_04_PIN 53 // SDSS
#define EXP2_05_PIN 40 // EN1
#define EXP2_06_PIN 51 // MOSI
#define EXP2_07_PIN 38 // SD_DET
#define EXP2_08_PIN -1 // RESET
#define SDSS EXP2_04_PIN
#define LED_PIN 13
#if HAS_WIRED_LCD
#define BEEPER_PIN EXP1_01_PIN
#if IS_NEWPANEL
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS EXP1_06_PIN
#define DOGLCD_A0 EXP1_07_PIN
#define BTN_EN1 EXP2_05_PIN
#define BTN_EN2 EXP2_03_PIN
#elif ENABLED(FYSETC_MINI_12864)
// Disconnect EXP2-1 and EXP2-2, otherwise future firmware upload won't work.
#define DOGLCD_CS EXP1_03_PIN
#define DOGLCD_A0 EXP1_04_PIN
#define NEOPIXEL_PIN EXP1_06_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#define LCD_RESET_PIN EXP1_05_PIN
#define LCD_CONTRAST_INIT 220
#define LCD_BACKLIGHT_PIN -1
#else
#define LCD_PINS_RS EXP1_04_PIN
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_D4 EXP1_05_PIN
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_07_PIN
#define LCD_PINS_D7 EXP1_08_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#endif
#define BTN_ENC EXP1_02_PIN
#define SD_DETECT_PIN EXP2_07_PIN
#else // !IS_NEWPANEL
#define SHIFT_CLK_PIN EXP2_07_PIN
#define SHIFT_LD_PIN EXP2_03_PIN
#define SHIFT_OUT_PIN EXP2_05_PIN
#define SHIFT_EN_PIN EXP1_03_PIN
#define LCD_PINS_RS EXP1_05_PIN
#define LCD_PINS_EN EXP1_07_PIN
#define LCD_PINS_D4 EXP1_08_PIN
#define LCD_PINS_D5 EXP1_06_PIN
#define LCD_PINS_D6 EXP1_04_PIN
#define LCD_PINS_D7 EXP1_02_PIN
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif
#define SD_DETECT_PIN -1
#endif // !IS_NEWPANEL
#endif // HAS_WIRED_LCD
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_GT2560_REV_A.h
|
C
|
agpl-3.0
| 7,252
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Geeetech GT2560 Revision A+ board pin assignments
* Schematic: https://www.geeetech.com/wiki/images/d/d3/Hardware_GT2560_RevA%2B.pdf
* ATmega2560
*/
#define BOARD_INFO_NAME "GT2560 Rev.A+"
#define SERVO0_PIN 11
#include "pins_GT2560_REV_A.h"
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_GT2560_REV_A_PLUS.h
|
C
|
agpl-3.0
| 1,158
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Geeetech GT2560 Rev B Pins
* Schematic: https://www.geeetech.com/wiki/images/7/72/GT2560_REVB.pdf
* ATmega2560
*/
#define BOARD_INFO_NAME "GT2560 Rev B"
#include "pins_GT2560_V3.h"
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_GT2560_REV_B.h
|
C
|
agpl-3.0
| 1,069
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Geeetech GT2560 3.0/3.1 pin assignments
* Schematic (3.0): https://github.com/Geeetech3D/Diagram/blob/master/GT2560_V3.0_SCH.pdf
* ATmega2560
*
* Also GT2560 RevB and GT2560 4.0/4.1
*/
#define ALLOW_MEGA1280
#include "env_validate.h"
#if HOTENDS > 3 || E_STEPPERS > 3
#error "GT2560 supports up to 3 hotends / E steppers."
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "GT2560 3.x"
#endif
//
// Servos
//
#define SERVO0_PIN 11 // 13 untested 3Dtouch
//
// Limit Switches
//
#ifndef X_STOP_PIN
#ifndef X_MIN_PIN
#define X_MIN_PIN 24
#endif
#ifndef X_MAX_PIN
#define X_MAX_PIN 22
#endif
#endif
#ifndef Y_STOP_PIN
#ifndef Y_MIN_PIN
#define Y_MIN_PIN 28
#endif
#ifndef Y_MAX_PIN
#define Y_MAX_PIN 26
#endif
#endif
#ifndef Z_STOP_PIN
#ifndef Z_MIN_PIN
#define Z_MIN_PIN 30
#endif
#ifndef Z_MAX_PIN
#define Z_MAX_PIN 32
#endif
#endif
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 32
#endif
//
// Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 66
#endif
#ifndef FIL_RUNOUT2_PIN
#define FIL_RUNOUT2_PIN 67
#endif
#ifndef FIL_RUNOUT3_PIN
#define FIL_RUNOUT3_PIN 54
#endif
//
// Power Loss Detection
//
#define POWER_LOSS_PIN 69 // Pin to detect power loss
#define POWER_LOSS_STATE LOW
//
// Steppers
//
#define X_STEP_PIN 37
#define X_DIR_PIN 39
#define X_ENABLE_PIN 35
#define Y_STEP_PIN 31
#define Y_DIR_PIN 33
#define Y_ENABLE_PIN 29
#define Z_STEP_PIN 25
#define Z_DIR_PIN 23
#define Z_ENABLE_PIN 27
#define E0_STEP_PIN 46
#define E0_DIR_PIN 44
#define E0_ENABLE_PIN 12
#define E1_STEP_PIN 49
#define E1_DIR_PIN 47
#define E1_ENABLE_PIN 48
#define E2_STEP_PIN 43
#define E2_DIR_PIN 45
#define E2_ENABLE_PIN 41
//
// Temperature Sensors
//
#define TEMP_0_PIN 11 // Analog Input
#define TEMP_1_PIN 9 // Analog Input
#define TEMP_2_PIN 8 // Analog Input
#define TEMP_BED_PIN 10 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 10
#define HEATER_1_PIN 3
#define HEATER_2_PIN 2
#define HEATER_BED_PIN 4
#define FAN0_PIN 9
#define FAN1_PIN 8
#define FAN2_PIN 7
//
// Misc. Functions
//
#define SD_DETECT_PIN 38
#define SDSS 53
#define LED_PIN 13 // Use 6 (case light) for external LED. 13 is internal (yellow) LED.
#define PS_ON_PIN 12
#if NUM_RUNOUT_SENSORS < 3
#define SUICIDE_PIN 54 // This pin must be enabled at boot to keep power flowing
#endif
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 6 // 21
#endif
//
// LCD Controller
//
#define BEEPER_PIN 18
#if ENABLED(YHCB2004)
#ifndef YHCB2004_MOSI_PIN
#define YHCB2004_MOSI_PIN 21
#endif
#ifndef YHCB2004_MISO_PIN
#define YHCB2004_MISO_PIN 36
#endif
#ifndef YHCB2004_SCK_PIN
#define YHCB2004_SCK_PIN 5
#endif
#ifndef YHCB2004_SS_PIN
#define YHCB2004_SS_PIN SS
#endif
#elif HAS_WIRED_LCD
#ifndef LCD_PINS_RS
#define LCD_PINS_RS 20
#endif
#ifndef LCD_PINS_EN
#define LCD_PINS_EN 17
#endif
#ifndef LCD_PINS_D4
#define LCD_PINS_D4 16
#endif
#ifndef LCD_PINS_D5
#define LCD_PINS_D5 21
#endif
#ifndef LCD_PINS_D6
#define LCD_PINS_D6 5
#endif
#ifndef LCD_PINS_D7
#define LCD_PINS_D7 36
#endif
#endif
#if ENABLED(YHCB2004)
#ifndef BTN_EN1
#define BTN_EN1 16
#endif
#ifndef BTN_EN2
#define BTN_EN2 17
#endif
#ifndef BTN_ENC
#define BTN_ENC 19
#endif
#elif IS_NEWPANEL
#ifndef BTN_EN1
#define BTN_EN1 42
#endif
#ifndef BTN_EN2
#define BTN_EN2 40
#endif
#ifndef BTN_ENC
#define BTN_ENC 19
#endif
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_GT2560_V3.h
|
C
|
agpl-3.0
| 6,034
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Geeetech A20M board pin assignments
* ATmega2560
*/
#if HAS_WIRED_LCD
#define LCD_PINS_RS 5
#define LCD_PINS_EN 36
#define LCD_PINS_D4 21
#define LCD_PINS_D7 6
#endif
#if IS_NEWPANEL
#define BTN_EN1 16
#define BTN_EN2 17
#define BTN_ENC 19
#endif
#include "pins_GT2560_V3.h"
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_GT2560_V3_A20.h
|
C
|
agpl-3.0
| 1,359
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Geeetech GT2560 V 3.0 board pin assignments (for Mecreator 2)
* ATmega2560
*/
#define BOARD_INFO_NAME "GT2560 V3.0 (MC2)"
#define X_MIN_PIN 22
#define X_MAX_PIN 24
#define Y_MIN_PIN 26
#define Y_MAX_PIN 28
#include "pins_GT2560_V3.h"
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_GT2560_V3_MC2.h
|
C
|
agpl-3.0
| 1,234
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Geeetech GT2560 V4.X Pins
* Schematic: https://www.geeetech.com/download.html?spm=a2g0s.imconversation.0.0.22d23e5fXlQBWv&download_id=45
*/
#define BOARD_INFO_NAME "GT2560 4.x"
#include "pins_GT2560_V3.h"
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_GT2560_V4.h
|
C
|
agpl-3.0
| 1,092
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Geeetech GT2560 V4.1b Pins
* Schematic: https://www.geeetech.com/download.html?spm=a2g0s.imconversation.0.0.22d23e5fXlQBWv&download_id=45
* ATmega2560
*/
#define ALLOW_MEGA1280
#include "env_validate.h"
#if HOTENDS > 3 || E_STEPPERS > 3
#error "GT2560 supports up to 3 hotends / E steppers."
#endif
#define BOARD_INFO_NAME "GT2560 4.1b"
/** Limit Switches Connectors
* All have external 10k pull-up resistors
*
* X-Y-Z AXIS MAX LIMIT SWITCHES CONNECTOR (H6)
* ---------
* | 1 4 7 | 5V 32 Z0_MAX GND
* | 2 5 8 | 5V 26 Y_MAX GND
* | 3 6 9 | 5V 22 X_MAX GND
* ---------
* H6
*
* X AXIS Y AXIS Z1 AXIS Z0 AXIS
* --- --- --- ---
* | 1 | 5V | 1 | 5V | 1 | 5V | 1 | 5V
* | 2 | 24 X_MIN | 2 | 28 Y_MIN | 2 | 80 Z1_MIN | 2 | 30 Z0_MIN
* | 3 | GND | 3 | GND | 3 | GND | 3 | GND
* --- --- --- ---
* J3 J4 J5 J6
*
*/
#ifndef X_STOP_PIN
#ifndef X_MIN_PIN
#define X_MIN_PIN 24
#endif
#ifndef X_MAX_PIN
#define X_MAX_PIN 22
#endif
#endif
#ifndef Y_STOP_PIN
#ifndef Y_MIN_PIN
#define Y_MIN_PIN 28
#endif
#ifndef Y_MAX_PIN
#define Y_MAX_PIN 26
#endif
#endif
#ifndef Z_STOP_PIN
#ifndef Z_MIN_PIN
#define Z_MIN_PIN 30
#endif
#ifndef Z_MAX_PIN
#define Z_MAX_PIN 32
#endif
#endif
#ifndef Z2_STOP_PIN
#define Z2_STOP_PIN 80 // PE7 - Extended mega2560 pin
#endif
/** Filament Runout Sensors
*
* Filament 1 Filament 2 Filament 3
* --- --- ---
* | 1 | 5V | 1 | 5V | 1 | 5V
* | 2 | 66 F_DET0 | 2 | 67 F_DET1 | 2 | 54 F_DET2
* | 3 | GND | 3 | GND | 3 | GND
* --- --- ---
* J12 J13 J14
*/
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 66
#endif
#ifndef FIL_RUNOUT2_PIN
#define FIL_RUNOUT2_PIN 67
#endif
#ifndef FIL_RUNOUT3_PIN
#define FIL_RUNOUT3_PIN 54
#endif
//
// Power Loss Detection
//
#define POWER_LOSS_PIN 69 // Pin to detect power loss
#define POWER_LOSS_STATE LOW
//
// Steppers
//
#define X_STEP_PIN 37
#define X_DIR_PIN 39
#define X_ENABLE_PIN 35
#define Y_STEP_PIN 31
#define Y_DIR_PIN 33
#define Y_ENABLE_PIN 29
#define Z_STEP_PIN 25
#define Z_DIR_PIN 23
#define Z_ENABLE_PIN 27
#define E0_STEP_PIN 46
#define E0_DIR_PIN 44
#define E0_ENABLE_PIN 12
#define E1_STEP_PIN 49
#define E1_DIR_PIN 47
#define E1_ENABLE_PIN 48
#define E2_STEP_PIN 43
#define E2_DIR_PIN 45
#define E2_ENABLE_PIN 41
/** Printhead Connector
* ------
* (PWM8_FAN0) FAN_E0 9 | 1 2 | 9 FAN_E0 24V PWM FROM (PWM8_FAN0)
* (T0) A11 | 3 4 | A11 (T0) E0 Temp
* GND | 5 6 | 30 Z_MIN1 same as (Z0_MIN)
* 5V | 7 8 | 11 (PB5) servo for BL_TOUCH/3D_TOUCH
* (PB4_HE2) HE2 19 | 9 10 | GND
* (PB4_HE2) HE2 19 |11 12 | 19 HE2 24V PWM out for E0 (PB4_HE2)
* V24 |13 14 | V24
* V24 |15 16 | V24
* ------
* H3
*/
#define SERVO0_PIN 11 // BLTouch / 3DTouch
//
// Z Probe PIN6 Header H3 (Print head connector)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN Z_MIN_PIN
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN 11 // Analog Input
#define TEMP_1_PIN 9 // Analog Input
#define TEMP_2_PIN 8 // Analog Input
#define TEMP_BED_PIN 10 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 10 // PWM out to E0
#define HEATER_1_PIN 3
#define HEATER_2_PIN 2
#define HEATER_BED_PIN 4
#define FAN0_PIN 9
#define FAN1_PIN 8
#define FAN2_PIN 7
//
// Misc. Functions
//
#define SD_DETECT_PIN 38
#define SDSS 53
#define LED_PIN 13 // Use 6 (case light) for external LED. 13 is internal (yellow) LED.
#define PS_ON_PIN 12
#if NUM_RUNOUT_SENSORS < 3
#define SUICIDE_PIN 54 // This pin must be enabled at boot to keep power flowing
#endif
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 6 // 21
#endif
/** LCD Connector
* ------
* 5V | 1 2 | GND
* (LCM_D7) 36 | 3 4 | 5 (LCM_D6)
* (LCM_D5) 21 | 5 6 | GND
* (LCM_D4) 16 | 7 8 | 17 (LCM_EN)
* (EC_PRESS) 19 | 9 10 | GND
* (RESET) |11 12 | 18 (BEEP)
* ------
* H2
*/
//#define H2_01_PIN 5V
//#define H2_02_PIN GND
#define H2_03_PIN 36 // LCM_D7
#define H2_04_PIN 5 // LCM_D6
#define H2_05_PIN 21 // LCM_D5
//#define H2_06_PIN GND
#define H2_07_PIN 16 // LCM_D4
#define H2_08_PIN 17 // LCM_EN
#define H2_09_PIN 19 // EC_PRESS
//#define H2_10_PIN GND
//#define H2_11_PIN RESET
#define H2_12_PIN 18 // BEEP
#define LCM_RS 20 // Pin named and connected to 10k pull-up resistor but unused
#if ENABLED(YHCB2004)
#define YHCB2004_SS_PIN H2_04_PIN
#define YHCB2004_SCK_PIN H2_05_PIN
#define YHCB2004_MOSI_PIN H2_03_PIN
#define YHCB2004_MISO_PIN LCM_RS // Unused on V4.1b board
#define BTN_EN1 H2_07_PIN
#define BTN_EN2 H2_08_PIN
#define BTN_ENC H2_09_PIN
#define BEEPER_PIN H2_12_PIN
#elif ENABLED(CR10_STOCKDISPLAY) // Firmware compatible with stock GT 128x64 12pin LCD for the V41b
#define LCD_PINS_RS H2_04_PIN // DOGLCD_CS
#define LCD_PINS_D4 H2_05_PIN // DOGLCD_SCK
#define LCD_PINS_EN H2_03_PIN // DOGLCD_MOSI
#define BTN_EN1 H2_07_PIN
#define BTN_EN2 H2_08_PIN
#define BTN_ENC H2_09_PIN
#define BEEPER_PIN H2_12_PIN
#elif HAS_WIRED_LCD
#error "GT2560 V4.1b requires an adapter for common LCDs."
/* Cannot use because V4.1b board has not LCD_PINS_RS wired to display connector */
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_GT2560_V41b.h
|
C
|
agpl-3.0
| 8,705
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Geeetech A20 GT2560 V4.x board pin assignments
* ATmega2560
*/
#define BOARD_INFO_NAME "GT2560 4.x"
#if HAS_WIRED_LCD
#define LCD_PINS_RS 5
#define LCD_PINS_EN 36
#define LCD_PINS_D4 21
#define LCD_PINS_D7 6
#endif
#if IS_NEWPANEL
#define BTN_EN1 16
#define BTN_EN2 17
#define BTN_ENC 19
#endif
#include "pins_GT2560_V3.h"
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_GT2560_V4_A20.h
|
C
|
agpl-3.0
| 1,408
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Geeetech HJC2560-C Rev 2.x board pin assignments
* ATmega2560
*/
#include "env_validate.h"
#define DEFAULT_MACHINE_NAME "ADIMLab Gantry v2"
#define BOARD_INFO_NAME "HJC2560-C"
//
// Servos
//
//#ifndef SERVO0_PIN
// #define SERVO0_PIN 11
//#endif
//
// Limit Switches
//
#define X_STOP_PIN 22
#define Y_STOP_PIN 26
#define Z_STOP_PIN 29
//#define EXP_STOP_PIN 28
//
// Steppers
//
#define X_STEP_PIN 25
#define X_DIR_PIN 23
#define X_ENABLE_PIN 27
#define Y_STEP_PIN 32
#define Y_DIR_PIN 33
#define Y_ENABLE_PIN 31
#define Z_STEP_PIN 35
#define Z_DIR_PIN 36
#define Z_ENABLE_PIN 34
#define E0_STEP_PIN 42
#define E0_DIR_PIN 43
#define E0_ENABLE_PIN 37
#define E1_STEP_PIN 49
#define E1_DIR_PIN 47
#define E1_ENABLE_PIN 48
#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
#ifndef MOTOR_CURRENT_PWM_RANGE
#define MOTOR_CURRENT_PWM_RANGE 2000
#endif
#define DEFAULT_PWM_MOTOR_CURRENT { 1300, 1300, 1250 }
//
// Temperature Sensors
//
#define TEMP_0_PIN 8 // Analog Input
#define TEMP_1_PIN 9 // Analog Input
#define TEMP_BED_PIN 10 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 2
#define HEATER_1_PIN 3
#define HEATER_BED_PIN 4
#ifndef FAN0_PIN
#define FAN0_PIN 7 //默认不使用PWM_FAN冷却喷嘴,如果需要,则取消注释
#endif
//
// Misc. Functions
//
#define SDSS 53
#define SD_DETECT_PIN 39
//#define LED_PIN 8
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 8 // 8 默认挤出机风扇作为Case LED,如果需要PWM FAN,则需要将FAN_PIN置为7,LED_PIN置为8
#endif
//#define SAFETY_TRIGGERED_PIN 28 // PIN to detect the safety circuit has triggered
//#define MAIN_VOLTAGE_MEASURE_PIN 14 // ANALOG PIN to measure the main voltage, with a 100k - 4k7 resitor divider.
//
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER
#define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 17 // Pin should have a pullup!
#define SPINDLE_DIR_PIN 16
#endif
//
// LCD / Controller
//
#if HAS_WIRED_LCD
#define BEEPER_PIN 18
#if IS_NEWPANEL
#define LCD_PINS_RS 20 // LCD_CS
#define LCD_PINS_EN 15 // LCD_SDA
#define LCD_PINS_D4 14 // LCD_SCK
#if ENABLED(HJC_LCD_SMART_CONTROLLER)
#define LCD_BACKLIGHT_PIN 5 // LCD_Backlight
//#ifndef LCD_CONTRAST_PIN
// #define LCD_CONTRAST_PIN 5 // LCD_Contrast
//#endif
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 24 // Filament runout
#endif
#else
#define LCD_PINS_D5 21
#define LCD_PINS_D6 5
#define LCD_PINS_D7 6
#endif
#define BTN_EN1 41
#define BTN_EN2 40
#define BTN_ENC 19
#define SD_DETECT_PIN 39
#else
// Buttons attached to a shift register
#define SHIFT_CLK_PIN 38
#define SHIFT_LD_PIN 42
#define SHIFT_OUT_PIN 40
#define SHIFT_EN_PIN 17
#define LCD_PINS_RS 16
#define LCD_PINS_EN 5
#define LCD_PINS_D4 6
#define LCD_PINS_D5 21
#define LCD_PINS_D6 20
#define LCD_PINS_D7 19
#endif // !IS_NEWPANEL
#endif // HAS_WIRED_LCD
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_HJC2560C_REV2.h
|
C
|
agpl-3.0
| 5,487
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Intamsys Funmat HT V4.0 Mainboard
* ATmega2560
* 4988 Drivers Tested
* 2208 version exists and may or may not work
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Intamsys 4.0"
//
// Servos
//
#define SERVO0_PIN 12 // Uses High Temp Present Jumper Pin
//
// Limit Switches
//
#define X_STOP_PIN 22
#define Y_STOP_PIN 26
#define Z_MIN_PIN 29
#define Z_MAX_PIN 69
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 69
#endif
#define FIL_RUNOUT_PIN 10
//
// Steppers
//
#define X_STEP_PIN 25
#define X_DIR_PIN 23
#define X_ENABLE_PIN 27 // 44
#define Y_STEP_PIN 32 // 33
#define Y_DIR_PIN 33 // 31, 32
#define Y_ENABLE_PIN 31 // 32
#define Z_STEP_PIN 35 // 35
#define Z_DIR_PIN 36
#define Z_ENABLE_PIN 34 // 34
#define E0_STEP_PIN 42
#define E0_DIR_PIN 43
#define E0_ENABLE_PIN 37
#define E1_STEP_PIN 49
#define E1_DIR_PIN 47
#define E1_ENABLE_PIN 48
#define MOTOR_CURRENT_PWM_X_PIN 11
#define MOTOR_CURRENT_PWM_Y_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
#ifndef MOTOR_CURRENT_PWM_RANGE
#define MOTOR_CURRENT_PWM_RANGE 2000
#endif
#define DEFAULT_PWM_MOTOR_CURRENT { 1300, 1300, 1250 }
//
// Temperature Sensors
//
#define TEMP_0_PIN 8 // Analog Input D62
#define TEMP_BED_PIN 10 // Analog Input D64
#define TEMP_CHAMBER_PIN 9 // Analog Input D63
//
// Heaters / Fans
//
#define HEATER_0_PIN 2 // PWM
#define HEATER_BED_PIN 4 // PWM
#define HEATER_CHAMBER_PIN 3 // PWM
#define FAN0_PIN 7 // PWM
//
// Misc. Functions
//
#define SDSS 53
#define SD_DETECT_PIN 39
#if ENABLED(CASE_LIGHT_ENABLE)
#define CASE_LIGHT_PIN 8
#endif
#if ENABLED(PSU_CONTROL)
#define PS_ON_PIN 38 // UPS Module
#endif
//
// LCD Controller
//
#define BEEPER_PIN 18
#if HAS_WIRED_LCD
#define LCD_PINS_RS 20
#define LCD_PINS_EN 30
#define LCD_PINS_D4 14
#define LCD_PINS_D5 21
#define LCD_PINS_D6 5
#define LCD_PINS_D7 6
#define BTN_EN1 40
#define BTN_EN2 41
#define BTN_ENC 19
#endif
///////////////////// SPARE HEADERS //////////////
/**
* J25
* 1 D54
* 2 D55
* 3 D56
* 4 D57
* 5 D58
* 6 D59
* 7 D60
* 8 D61
Hotend High Temp Connected : D12
*/
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_INTAMSYS40.h
|
C
|
agpl-3.0
| 4,272
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Leapfrog Driver board pin assignments
* ATmega2560, ATmega1280
*/
#define ALLOW_MEGA1280
#include "env_validate.h"
#define BOARD_INFO_NAME "Leapfrog"
//
// Limit Switches
//
#define X_MIN_PIN 47
#define X_MAX_PIN 2
#define Y_MIN_PIN 48
#define Y_MAX_PIN 15
#define Z_MIN_PIN 49
#define Z_MAX_PIN -1
//
// Steppers
//
#define X_STEP_PIN 28
#define X_DIR_PIN 63
#define X_ENABLE_PIN 29
#define Y_STEP_PIN 14 // A6
#define Y_DIR_PIN 15 // A0
#define Y_ENABLE_PIN 39
#define Z_STEP_PIN 31 // A2
#define Z_DIR_PIN 32 // A6
#define Z_ENABLE_PIN 30 // A1
#define E0_STEP_PIN 34 // 34
#define E0_DIR_PIN 35 // 35
#define E0_ENABLE_PIN 33 // 33
#define E1_STEP_PIN 37 // 37
#define E1_DIR_PIN 40 // 40
#define E1_ENABLE_PIN 36 // 36
//
// Temperature Sensors
//
#define TEMP_0_PIN 13 // Analog Input (D27)
#define TEMP_1_PIN 15 // Analog Input (1)
#define TEMP_BED_PIN 14 // Analog Input (1,2 or I2C)
//
// Heaters / Fans
//
#define HEATER_0_PIN 9
#define HEATER_1_PIN 8 // 12
#define HEATER_2_PIN 11 // 13
#define HEATER_BED_PIN 10 // 14/15
#define FAN0_PIN 7
//
// Misc. Functions
//
#define SDSS 11
#define LED_PIN 13
#define SOL1_PIN 16
#define SOL2_PIN 17
/* 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) */
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_LEAPFROG.h
|
C
|
agpl-3.0
| 3,095
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Leapfrog Xeed Driver board pin assignments
* ATmega2560
*
* This board is used by other Leapfrog printers in addition to the Xeed,
* such as the Creatr HS and Bolt. The pin assignments vary wildly between
* printer models. As such this file is currently specific to the Xeed.
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Leapfrog Xeed 2015"
//
// Limit Switches
//
#define X_STOP_PIN 47 // 'X Min'
#define Y_STOP_PIN 48 // 'Y Min'
#define Z_STOP_PIN 49 // 'Z Min'
//
// Steppers
// The Xeed utilizes three Z-axis motors, which use the X, Y, and Z stepper connectors
// on the board. The X and Y steppers use external drivers, attached to signal-level
// Y-axis and X-axis connectors on the board, which map to distinct CPU pins from
// the on-board X/Y stepper drivers.
//
// X-axis signal-level connector
#define X_STEP_PIN 65
#define X_DIR_PIN 64
#define X_ENABLE_PIN 66 // Not actually used on Xeed, could be repurposed
// Y-axis signal-level connector
#define Y_STEP_PIN 23
#define Y_DIR_PIN 22
#define Y_ENABLE_PIN 24 // Not actually used on Xeed, could be repurposed
// ZMOT connector (Front Right Z Motor)
#define Z_STEP_PIN 31
#define Z_DIR_PIN 32
#define Z_ENABLE_PIN 30
// XMOT connector (Rear Z Motor)
#define Z2_STEP_PIN 28
#define Z2_DIR_PIN 63
#define Z2_ENABLE_PIN 29
// YMOT connector (Front Left Z Motor)
#define Z3_STEP_PIN 14
#define Z3_DIR_PIN 15
#define Z3_ENABLE_PIN 39
// EMOT2 connector
#define E0_STEP_PIN 37
#define E0_DIR_PIN 40
#define E0_ENABLE_PIN 36
// EMOT connector
#define E1_STEP_PIN 34
#define E1_DIR_PIN 35
#define E1_ENABLE_PIN 33
//
// Filament Runout Sensor
//
#define FIL_RUNOUT_PIN 42 // ROT2 Connector
#define FIL_RUNOUT2_PIN 44 // ROT1 Connector
//
// Temperature Sensors
//
#define TEMP_0_PIN 15 // T3 Connector
#define TEMP_1_PIN 13 // T1 Connector
#define TEMP_BED_PIN 14 // BED Connector (Between T1 and T3)
//
// Heaters / Fans
//
#define HEATER_0_PIN 8 // Misc Connector, pins 3 and 4 (Out2)
#define HEATER_1_PIN 9 // Misc Connector, pins 5 and 6 (Out3)
#define HEATER_BED_PIN 6 // Misc Connector, pins 9(-) and 10(+) (OutA)
#define FAN0_PIN 10 // Misc Connector, pins 7(-) and 8 (+) (Out4)
#define LED_PIN 13
#define SOL1_PIN 7 // Misc Connector, pins 1(-) and 2(+) (Out1)
// Door Closed Sensor
//#define DOOR_PIN 45 // HM1 Connector
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h
|
C
|
agpl-3.0
| 4,162
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Malyan M180 pin assignments
* Contributed by Timo Birnschein (timo.birnschein@microforge.de)
* @Timo: sind diese Pin Definitionen immernoch korrekt? (Antwort an turningtides@outlook.de bitte)
* ATmega2560
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Malyan M180 v.2"
//
// Limit Switches
//
#define X_STOP_PIN 48
#define Y_STOP_PIN 46
#define Z_STOP_PIN 42
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN -1
#endif
//
// Steppers
//
#define X_STEP_PIN 55
#define X_DIR_PIN 54
#define X_ENABLE_PIN 56
#define Y_STEP_PIN 59
#define Y_DIR_PIN 58
#define Y_ENABLE_PIN 60
#define Z_STEP_PIN 63
#define Z_DIR_PIN 62
#define Z_ENABLE_PIN 64
#define E0_STEP_PIN 25
#define E0_DIR_PIN 24
#define E0_ENABLE_PIN 26
#define E1_STEP_PIN 29
#define E1_DIR_PIN 28
#define E1_ENABLE_PIN 39
//
// Temperature Sensors
//
#define TEMP_BED_PIN 15 // Analog Input
// Extruder thermocouples 0 and 1 are read out by two separate ICs using
// SPI for MAX Thermocouple
// Uses a separate SPI bus
#define TEMP_0_CS_PIN 5 // E3 - CS0
#define TEMP_0_SCK_PIN 78 // E2 - SCK
#define TEMP_0_MISO_PIN 3 // E5 - MISO
//#define TEMP_0_MOSI_PIN ... // For MAX31865
#define TEMP_1_CS_PIN 2 // E4 - CS1
#define TEMP_1_SCK_PIN TEMP_0_SCK_PIN
#define TEMP_1_MISO_PIN TEMP_0_MISO_PIN
//#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN
//
// Heaters / Fans
//
#define HEATER_0_PIN 6
#define HEATER_1_PIN 11
#define HEATER_BED_PIN 45
#ifndef FAN0_PIN
#define FAN0_PIN 7 // M106 Sxxx command supported and tested. M107 as well.
#endif
#ifndef FAN1_PIN
#define FAN1_PIN 12 // Currently Unsupported by Marlin
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_MALYAN_M180.h
|
C
|
agpl-3.0
| 3,314
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Mega controller pin assignments
* Schematic: https://reprap.org/mediawiki/images/b/ba/Mega_controller.pdf
* ATmega2560
*/
#if HOTENDS > 2 || E_STEPPERS > 2
#error "Mega Controller supports up to 2 hotends / E steppers."
#endif
#include "env_validate.h"
#define BOARD_INFO_NAME "Mega Controller"
//
// Servos
//
#define SERVO0_PIN 30
#define SERVO1_PIN 31
#define SERVO2_PIN 32
#define SERVO3_PIN 33
//
// Limit Switches
//
#define X_MIN_PIN 43
#define X_MAX_PIN 42
#define Y_MIN_PIN 38
#define Y_MAX_PIN 41
#define Z_MIN_PIN 40
#define Z_MAX_PIN 37
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 37
#endif
//
// Steppers
//
#define X_STEP_PIN 62 // A8
#define X_DIR_PIN 63 // A9
#define X_ENABLE_PIN 61 // A7
#define Y_STEP_PIN 65 // A11
#define Y_DIR_PIN 66 // A12
#define Y_ENABLE_PIN 64 // A10
#define Z_STEP_PIN 68 // A14
#define Z_DIR_PIN 69 // A15
#define Z_ENABLE_PIN 67 // A13
#define E0_STEP_PIN 23
#define E0_DIR_PIN 24
#define E0_ENABLE_PIN 22
#define E1_STEP_PIN 26
#define E1_DIR_PIN 27
#define E1_ENABLE_PIN 25
//
// Temperature Sensors
//
#if TEMP_SENSOR_0 == -1
#define TEMP_0_PIN 4 // Analog Input
#else
#define TEMP_0_PIN 0 // Analog Input
#endif
#if TEMP_SENSOR_1 == -1
#define TEMP_1_PIN 5 // Analog Input
#else
#define TEMP_1_PIN 2 // Analog Input
#endif
#define TEMP_2_PIN 3 // Analog Input
#if TEMP_SENSOR_BED == -1
#define TEMP_BED_PIN 6 // Analog Input
#else
#define TEMP_BED_PIN 1 // Analog Input
#endif
//
// Heaters / Fans
//
#define HEATER_0_PIN 29
#define HEATER_1_PIN 34
#define HEATER_BED_PIN 28
#ifndef FAN0_PIN
#define FAN0_PIN 39
#endif
#define FAN1_PIN 35
#define FAN2_PIN 36
#ifndef CONTROLLER_FAN_PIN
#define CONTROLLER_FAN_PIN FAN2_PIN
#endif
#define FAN_SOFT_PWM_REQUIRED
//
// Misc. Functions
//
#define SDSS MINI_06
#define LED_PIN 13
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 2
#endif
/**
* MegaController LCD/SD Connector
*
* SDD MOSI SDSS -- RESET -- LCDSS A0 KILL ENC
* 49 51 53 | 45 47 12 10
* PL0 PB2 PB0 | PL4 PL2 PB6 PB4
* ----------------------------------------------------------
* | 2 4 6 8 10 12 14 16 18 20 |
* | 1 3 5 7 9 11 13 15 17 19 |
* ----------------------------------------------------------
* | PB3 PB1 | | PL5 PL3 PL1 PB5
* | 50 52 | | 44 46 48 11
* 5V MISO SCK GND 3V3 -- BL BEEP EN1 EN2
*/
#define MINI_02 49 // SD_DETECT
#define MINI_03 50 // MISO
#define MINI_04 51 // MOSI
#define MINI_05 52 // SCK
#define MINI_06 53 // SDSS
#define MINI_13 44 // BACKLIGHT
#define MINI_14 45 // LCDSS
#define MINI_15 46 // BEEP
#define MINI_16 47 // A0
#define MINI_17 48 // EN1
#define MINI_18 12 // KILL
#define MINI_19 11 // EN2
#define MINI_20 10 // ENC
//
// LCD / Controller
//
#if ENABLED(MINIPANEL)
#define BEEPER_PIN MINI_15
#define DOGLCD_A0 MINI_16
#define DOGLCD_CS MINI_14
#define LCD_BACKLIGHT_PIN MINI_13 // backlight LED on PA3
#define KILL_PIN MINI_18
#define BTN_ENC MINI_20
#define BTN_EN1 MINI_17
#define BTN_EN2 MINI_19
#define SD_DETECT_PIN MINI_02
//#define LCD_SCREEN_ROTATE 180 // 0, 90, 180, 270
#endif // MINIPANEL
//
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER
#define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 7 // Pullup!
#define SPINDLE_DIR_PIN 8
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_MEGACONTROLLER.h
|
C
|
agpl-3.0
| 6,239
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MegaTronics pin assignments
* Schematic: https://reprap.org/mediawiki/images/a/a3/Megatronics_1_0_sch.pdf
* ATmega2560
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Megatronics"
//
// Limit Switches
//
#define X_MIN_PIN 41
#define X_MAX_PIN 37
#define Y_MIN_PIN 14
#define Y_MAX_PIN 15
#define Z_MIN_PIN 18
#define Z_MAX_PIN 19
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 19
#endif
//
// Steppers
//
#define X_STEP_PIN 26
#define X_DIR_PIN 28
#define X_ENABLE_PIN 24
#define Y_STEP_PIN 60 // A6
#define Y_DIR_PIN 61 // A7
#define Y_ENABLE_PIN 22
#define Z_STEP_PIN 54 // A0
#define Z_DIR_PIN 55 // A1
#define Z_ENABLE_PIN 56 // A2
#define E0_STEP_PIN 31
#define E0_DIR_PIN 32
#define E0_ENABLE_PIN 38
#define E1_STEP_PIN 34
#define E1_DIR_PIN 36
#define E1_ENABLE_PIN 30
//
// Temperature Sensors
//
#if TEMP_SENSOR_0 == -1
#define TEMP_0_PIN 8 // Analog Input
#else
#define TEMP_0_PIN 13 // Analog Input
#endif
#define TEMP_1_PIN 15 // Analog Input
#define TEMP_BED_PIN 14 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 9
#define HEATER_1_PIN 8
#define HEATER_BED_PIN 10
#ifndef FAN0_PIN
#define FAN0_PIN 7 // IO pin. Buffer needed
#endif
//
// Misc. Functions
//
#define SDSS 53
#define LED_PIN 13
#define PS_ON_PIN 12
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 2
#endif
//
// LCD / Controller
//
#define BEEPER_PIN 33
#if HAS_WIRED_LCD && IS_NEWPANEL
#define LCD_PINS_RS 16
#define LCD_PINS_EN 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
// Buttons directly attached to AUX-2
#define BTN_EN1 59
#define BTN_EN2 64
#define BTN_ENC 43
#define SD_DETECT_PIN -1 // RAMPS doesn't use this
#endif // HAS_WIRED_LCD && IS_NEWPANEL
//
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER
#define SPINDLE_LASER_PWM_PIN 3 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 4 // Pullup!
#define SPINDLE_DIR_PIN 11
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_MEGATRONICS.h
|
C
|
agpl-3.0
| 4,111
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MegaTronics v2.0 pin assignments
* Schematic: https://reprap.org/wiki/File:Megatronicsv2PDF.zip
* ATmega2560
*/
#include "env_validate.h"
#define BOARD_INFO_NAME "Megatronics v2.0"
//
// Limit Switches
//
#define X_MIN_PIN 37
#define X_MAX_PIN 40
#define Y_MIN_PIN 41
#define Y_MAX_PIN 38
#define Z_MIN_PIN 18
#define Z_MAX_PIN 19
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 19
#endif
//
// Steppers
//
#define X_STEP_PIN 26
#define X_DIR_PIN 27
#define X_ENABLE_PIN 25
#define Y_STEP_PIN 4 // A6
#define Y_DIR_PIN 54 // A0
#define Y_ENABLE_PIN 5
#define Z_STEP_PIN 56 // A2
#define Z_DIR_PIN 60 // A6
#define Z_ENABLE_PIN 55 // A1
#define E0_STEP_PIN 35
#define E0_DIR_PIN 36
#define E0_ENABLE_PIN 34
#define E1_STEP_PIN 29
#define E1_DIR_PIN 39
#define E1_ENABLE_PIN 28
#define E2_STEP_PIN 23 // ? schematic says 24
#define E2_DIR_PIN 24 // ? schematic says 23
#define E2_ENABLE_PIN 22
//
// Temperature Sensors
//
#if TEMP_SENSOR_0 == -1
#define TEMP_0_PIN 4 // Analog Input
#else
#define TEMP_0_PIN 13 // Analog Input
#endif
#if TEMP_SENSOR_1 == -1
#define TEMP_1_PIN 8 // Analog Input
#else
#define TEMP_1_PIN 15 // Analog Input
#endif
#if TEMP_SENSOR_BED == -1
#define TEMP_BED_PIN 8 // Analog Input
#else
#define TEMP_BED_PIN 14 // Analog Input
#endif
//
// Heaters / Fans
//
#define HEATER_0_PIN 9
#define HEATER_1_PIN 8
#define HEATER_BED_PIN 10
#ifndef FAN0_PIN
#define FAN0_PIN 7
#endif
#define FAN1_PIN 6
//
// Misc. Functions
//
#define SDSS 53
#define LED_PIN 13
#define PS_ON_PIN 12
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 2
#endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER
#define SPINDLE_LASER_PWM_PIN 3 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 16 // Pullup!
#define SPINDLE_DIR_PIN 11
#endif
//
// LCD / Controller
//
#define BEEPER_PIN 64
#if HAS_WIRED_LCD
#define LCD_PINS_RS 14
#define LCD_PINS_EN 15
#define LCD_PINS_D4 30
#define LCD_PINS_D5 31
#define LCD_PINS_D6 32
#define LCD_PINS_D7 33
#if IS_NEWPANEL
// Buttons are directly attached using keypad
#define BTN_EN1 61
#define BTN_EN2 59
#define BTN_ENC 43
#else
// Buttons attached to shift register of reprapworld keypad v1.1
#define SHIFT_CLK_PIN 63
#define SHIFT_LD_PIN 42
#define SHIFT_OUT_PIN 17
#define SHIFT_EN_PIN 17
#endif
#endif // HAS_WIRED_LCD
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_MEGATRONICS_2.h
|
C
|
agpl-3.0
| 4,738
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* MegaTronics v3.0 / v3.1 / v3.2 pin assignments
* Schematic: https://github.com/brupje/Megatronics_3/blob/master/Design%20Files/megatronics.sch
* ATmega2560
*/
#include "env_validate.h"
#if MB(MEGATRONICS_32)
#define BOARD_INFO_NAME "Megatronics v3.2"
#elif MB(MEGATRONICS_31)
#define BOARD_INFO_NAME "Megatronics v3.1"
#else
#define BOARD_INFO_NAME "Megatronics v3.0"
#endif
//
// Servos
//
#define SERVO0_PIN 46 // AUX3-6
#define SERVO1_PIN 47 // AUX3-5
#define SERVO2_PIN 48 // AUX3-4
#define SERVO3_PIN 49 // AUX3-3
//
// Limit Switches
//
#define X_MIN_PIN 37 // No INT
#define X_MAX_PIN 40 // No INT
#define Y_MIN_PIN 41 // No INT
#define Y_MAX_PIN 38 // No INT
#define Z_MIN_PIN 18 // No INT
#define Z_MAX_PIN 19 // No INT
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 19
#endif
//
// Steppers
//
#define X_STEP_PIN 58
#define X_DIR_PIN 57
#define X_ENABLE_PIN 59
#if ENABLED(REPRAPWORLD_KEYPAD) && EXTRUDERS <= 2
#define Y_ENABLE_PIN 23
#define Y_STEP_PIN 22
#define Y_DIR_PIN 60
#else
#define Y_STEP_PIN 5
#define Y_DIR_PIN 17
#define Y_ENABLE_PIN 4
#define E2_STEP_PIN 22
#define E2_DIR_PIN 60
#define E2_ENABLE_PIN 23
#endif
#define Z_STEP_PIN 16
#define Z_DIR_PIN 11
#define Z_ENABLE_PIN 3
#define E0_STEP_PIN 28
#define E0_DIR_PIN 27
#define E0_ENABLE_PIN 29
#define E1_STEP_PIN 25
#define E1_DIR_PIN 24
#define E1_ENABLE_PIN 26
//
// Temperature Sensors
//
#if TEMP_SENSOR_0 == -1
#define TEMP_0_PIN 11 // Analog Input
#else
#define TEMP_0_PIN 15 // Analog Input
#endif
#if TEMP_SENSOR_1 == -1
#define TEMP_1_PIN 10 // Analog Input
#else
#define TEMP_1_PIN 13 // Analog Input
#endif
#if TEMP_SENSOR_2 == -1
#define TEMP_2_PIN 9 // Analog Input
#else
#define TEMP_2_PIN 12 // Analog Input
#endif
#if TEMP_SENSOR_BED == -1
#define TEMP_BED_PIN 8 // Analog Input
#else
#define TEMP_BED_PIN 14 // Analog Input
#endif
//
// Heaters / Fans
//
#define HEATER_0_PIN 2
#define HEATER_1_PIN 9
#define HEATER_2_PIN 8
#define HEATER_BED_PIN 10
#ifndef FAN0_PIN
#define FAN0_PIN 6
#endif
#define FAN1_PIN 7
//
// Misc. Functions
//
#define SDSS 53
#define LED_PIN 13
#define PS_ON_PIN 12
#ifndef CASE_LIGHT_PIN
#define CASE_LIGHT_PIN 45 // Try the keypad connector
#endif
//
// LCD / Controller
//
#define BEEPER_PIN 61
#define BTN_EN1 44
#define BTN_EN2 45
#define BTN_ENC 33
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS 56 // CS chip select / SS chip slave select
#define LCD_PINS_EN 51 // SID (MOSI)
#define LCD_PINS_D4 52 // SCK (CLK) clock
#define SD_DETECT_PIN 35
#else
#define LCD_PINS_RS 32
#define LCD_PINS_EN 31
#define LCD_PINS_D4 14
#define LCD_PINS_D5 30
#define LCD_PINS_D6 39
#define LCD_PINS_D7 15
#define SHIFT_CLK_PIN 43
#define SHIFT_LD_PIN 35
#define SHIFT_OUT_PIN 34
#define SHIFT_EN_PIN 44
#if MB(MEGATRONICS_31, MEGATRONICS_32)
#define SD_DETECT_PIN 56
#endif
#endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#if DISABLED(REPRAPWORLD_KEYPAD) // try to use the keypad connector first
#define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 43 // Pullup!
#define SPINDLE_DIR_PIN 42
#elif EXTRUDERS <= 2
// Hijack the last extruder so that we can get the PWM signal off the Y breakout
// Move Y to the E2 plug. This makes dual Y steppers harder
#define SPINDLE_LASER_PWM_PIN 4 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 17 // Pullup!
#define SPINDLE_DIR_PIN 5
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_MEGATRONICS_3.h
|
C
|
agpl-3.0
| 6,284
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Mightyboard Rev.E pin assignments
* Schematic: https://github.com/sciguy14/HelioWatcher/blob/master/HelioWatcher%20Circuit/MakerBot%20MightyBoard%20REVE%20Schematic.pdf
* also works for Rev D boards. It's all rev E despite what the silk screen says
*/
/**
* Rev B 2 JAN 2017
*
* Added pin definitions for:
* M3, M4 & M5 spindle control commands
* case light
*
* Corrected pin assignment for EX2_HEAT_PIN pin. Changed it from 9 to 11. The port
* number (B5) agrees with the schematic but B5 is assigned to logical pin 11.
*/
#define ALLOW_MEGA1280
#include "env_validate.h"
#define BOARD_INFO_NAME "Mightyboard"
#define DEFAULT_MACHINE_NAME "MB Replicator"
//
// Servos
//
#define SERVO0_PIN 36 // C1 (1280-EX1)
#define SERVO1_PIN 37 // C0 (1280-EX2)
#define SERVO2_PIN 40 // G1 (1280-EX3)
#define SERVO3_PIN 41 // G0 (1280-EX4)
//
// Limit Switches
//
#define X_MIN_PIN 49 // L0
#define X_MAX_PIN 48 // L1
#define Y_MIN_PIN 47 // L2
#define Y_MAX_PIN 46 // L3
#define Z_MIN_PIN 43 // L6
#define Z_MAX_PIN 42 // L7
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 42
#endif
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 49
#endif
#ifndef FIL_RUNOUT2_PIN
#define FIL_RUNOUT2_PIN 47
#endif
//
// Steppers
//
#define X_STEP_PIN 55 // F1
#define X_DIR_PIN 54 // F0
#define X_ENABLE_PIN 56 // F2
#define Y_STEP_PIN 59 // F5
#define Y_DIR_PIN 58 // F4
#define Y_ENABLE_PIN 60 // F6
#define Z_STEP_PIN 63 // K1
#define Z_DIR_PIN 62 // K0
#define Z_ENABLE_PIN 64 // K2
#define E0_STEP_PIN 25 // A3
#define E0_DIR_PIN 24 // A2
#define E0_ENABLE_PIN 26 // A4
#define E1_STEP_PIN 29 // A7
#define E1_DIR_PIN 28 // A6
#define E1_ENABLE_PIN 39 // G2
//
// I2C Digipots - MCP4018
// Address 5E (2F << 1)
// Set from 0 - 127 with stop bit.
// (Ex. 3F << 1 | 1)
//
#define DIGIPOTS_I2C_SCL 76 // J5
#define DIGIPOTS_I2C_SDA_X 57 // F3
#define DIGIPOTS_I2C_SDA_Y 61 // F7
#define DIGIPOTS_I2C_SDA_Z 65 // K3
#define DIGIPOTS_I2C_SDA_E0 27 // A5
#define DIGIPOTS_I2C_SDA_E1 77 // J6
#ifndef DIGIPOT_I2C_ADDRESS_A
#define DIGIPOT_I2C_ADDRESS_A 0x2F // unshifted slave address (5E <- 2F << 1)
#endif
#define DIGIPOT_ENABLE_I2C_PULLUPS // MightyBoard doesn't have hardware I2C pin pull-ups.
//
// Temperature Sensors
//
// K7 - 69 / ADC15 - 15
#define TEMP_BED_PIN 15
// SPI for MAX Thermocouple
// Uses a separate SPI bus
//
// 3 E5 DO (SO)
// 5 E3 CS1
// 2 E4 CS2
// 78 E2 SCK
//
#define TEMP_0_CS_PIN 5 // E3
#define TEMP_0_SCK_PIN 78 // E2
#define TEMP_0_MISO_PIN 3 // E5
//#define TEMP_0_MOSI_PIN ... // For MAX31865
#define TEMP_1_CS_PIN 2 // E4
#define TEMP_1_SCK_PIN TEMP_0_SCK_PIN
#define TEMP_1_MISO_PIN TEMP_0_MISO_PIN
//#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN
//
// FET Pin Mapping - FET A is closest to the input power connector
//
#define MOSFET_A_PIN 6 // Plug EX1 Pin 1-2 -> PH3 #15 -> Logical 06
#define MOSFET_B_PIN 11 // Plug EX2 1-2 -> PB5 #24 -> Logical 11
#define MOSFET_C_PIN 45 // Plug HBD 1-2 -> PL4 #39 -> Logical 45
#define MOSFET_D_PIN 7 // Plug EX1 Pin 3-4 -> PH4 #16 -> Logical 07
#define MOSFET_E_PIN 12 // Plug EX2 3-4 -> PB6 #25 -> Logical 12
#define MOSFET_F_PIN 44 // Plug Extra 1-2 -> PL5 #40 -> Logical 44 (FET not soldered in all boards)
//
// Heaters / Fans (24V)
//
#define HEATER_0_PIN MOSFET_A_PIN // EX1
#define HEATER_1_PIN MOSFET_B_PIN // EX2
#define HEATER_BED_PIN MOSFET_C_PIN // HBP
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN MOSFET_D_PIN
#elif !defined(FAN0_PIN)
#define FAN0_PIN MOSFET_D_PIN
#endif
#ifndef E1_AUTO_FAN_PIN
#define E1_AUTO_FAN_PIN MOSFET_E_PIN
#elif !defined(FAN1_PIN)
#define FAN1_PIN MOSFET_E_PIN
#endif
//
// Misc. Functions
//
#define LED_PIN 13 // B7
#define CUTOFF_RESET_PIN 16 // H1
#define CUTOFF_TEST_PIN 17 // H0
#define CUTOFF_SR_CHECK_PIN 70 // G4 (TOSC1)
//
// LCD / Controller
//
#if HAS_WIRED_LCD
#if IS_RRD_FG_SC
#define LCD_PINS_RS 33 // C4: LCD-STROBE
#define LCD_PINS_EN 72 // J2: LEFT
#define LCD_PINS_D4 35 // C2: LCD-CLK
#define LCD_PINS_D5 32 // C5: RLED
#define LCD_PINS_D6 34 // C3: LCD-DATA
#define LCD_PINS_D7 31 // C6: GLED
#define BTN_EN2 75 // J4, UP
#define BTN_EN1 73 // J3, DOWN
// STOP button connected as KILL_PIN
#define KILL_PIN 14 // J1, RIGHT (not connected)
#define BEEPER_PIN 8 // H5, SD_WP
// Onboard leds
#define STAT_LED_RED_PIN SERVO0_PIN // C1 (1280-EX1, DEBUG2)
#define STAT_LED_BLUE_PIN SERVO1_PIN // C0 (1280-EX2, DEBUG3)
#else
// Replicator uses a 3-wire SR controller with HD44780
#define SR_DATA_PIN 34 // C3
#define SR_CLK_PIN 35 // C2
#define SR_STROBE_PIN 33 // C4
#define BTN_UP 75 // J4
#define BTN_DOWN 73 // J3
#define BTN_LEFT 72 // J2
#define BTN_RIGHT 14 // J1
// Disable encoder
#undef BTN_EN1
#undef BTN_EN2
#define BEEPER_PIN 4 // G5
#define STAT_LED_RED_PIN 32 // C5
#define STAT_LED_BLUE_PIN 31 // C6 (Actually green)
#endif
#define BTN_CENTER 15 // J0
#define BTN_ENC BTN_CENTER
#endif // HAS_WIRED_LCD
//
// SD Card
//
#define SDSS 53 // B0
#define SD_DETECT_PIN 9 // H6
#if HAS_TMC_UART
/**
* TMC220x stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
#define X_HARDWARE_SERIAL Serial2
#define Y_HARDWARE_SERIAL Serial1
/**
* Software serial
*/
#define X_SERIAL_TX_PIN 16
#define X_SERIAL_RX_PIN 17
#define Y_SERIAL_TX_PIN 18
#define Y_SERIAL_RX_PIN 19
#define Z_SERIAL_TX_PIN 41
#define Z_SERIAL_RX_PIN 66
#define E0_SERIAL_TX_PIN 40
#define E0_SERIAL_RX_PIN 67
#define E1_SERIAL_TX_PIN 37
#define E1_SERIAL_RX_PIN 68
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h
|
C
|
agpl-3.0
| 8,865
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Minitronics v1.0/1.1 pin assignments
* Schematic (1.0): https://reprap.org/wiki/File:MinitronicsPDF.zip
* Schematic (1.1): https://reprapworld.nl/documentation/datasheet%20minitronics%20v1.1.pdf
* ATmega1281
*/
/**
* Rev B 2 JAN 2017
*
* Added pin definitions for M3, M4 & M5 spindle control commands
*/
#if NOT_TARGET(__AVR_ATmega1281__)
#error "Oops! Select 'Minitronics' in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "Minitronics supports up to 2 hotends / E steppers."
#endif
#define BOARD_INFO_NAME "Minitronics v1.0/1.1"
//
// Limit Switches
//
#define X_MIN_PIN 5
#define X_MAX_PIN 2
#define Y_MIN_PIN 2
#define Y_MAX_PIN 15
#define Z_MIN_PIN 6
#define Z_MAX_PIN -1
//
// Steppers
//
#define X_STEP_PIN 48
#define X_DIR_PIN 47
#define X_ENABLE_PIN 49
#define Y_STEP_PIN 39 // A6
#define Y_DIR_PIN 40 // A0
#define Y_ENABLE_PIN 38
#define Z_STEP_PIN 42 // A2
#define Z_DIR_PIN 43 // A6
#define Z_ENABLE_PIN 41 // A1
#define E0_STEP_PIN 45
#define E0_DIR_PIN 44
#define E0_ENABLE_PIN 27
#define E1_STEP_PIN 36
#define E1_DIR_PIN 35
#define E1_ENABLE_PIN 37
//
// Temperature Sensors
//
#define TEMP_0_PIN 7 // Analog Input
#define TEMP_1_PIN 6 // Analog Input
#define TEMP_BED_PIN 6 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 7 // EXTRUDER 1
#define HEATER_1_PIN 8 // EXTRUDER 2
#define HEATER_BED_PIN 3 // BED
#ifndef FAN0_PIN
#define FAN0_PIN 9
#endif
//
// Misc. Functions
//
#define SDSS 16
#define LED_PIN 46
//
// LCD / Controller
//
#define BEEPER_PIN -1
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS 15 // CS chip select /SS chip slave select
#define LCD_PINS_EN 11 // SID (MOSI)
#define LCD_PINS_D4 10 // SCK (CLK) clock
#define BTN_EN1 18
#define BTN_EN2 17
#define BTN_ENC 25
#define SD_DETECT_PIN 30
#else
#define LCD_PINS_RS -1
#define LCD_PINS_EN -1
// Buttons are directly attached using keypad
#define BTN_EN1 -1
#define BTN_EN2 -1
#define BTN_ENC -1
#define SD_DETECT_PIN -1 // Minitronics doesn't use this
#endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER // assumes we're only doing CNC work (no 3D printing)
#undef HEATER_BED_PIN
#undef TEMP_BED_PIN // need to free up some pins but also need to
#undef TEMP_0_PIN // re-assign them (to unused pins) because Marlin
#undef TEMP_1_PIN // requires the presence of certain pins or else it
#define HEATER_BED_PIN 4 // won't compile
#define TEMP_BED_PIN 50
#define TEMP_0_PIN 51
#define SPINDLE_LASER_PWM_PIN 3 // WARNING - LED & resistor pull up to +12/+24V stepper voltage
#define SPINDLE_LASER_ENA_PIN 52 // using A6 because it already has a pullup
#define SPINDLE_DIR_PIN 53
#endif
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_MINITRONICS.h
|
C
|
agpl-3.0
| 5,021
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Dreammaker Overlord v1.1 pin assignments
* Schematic: https://github.com/jdpiercy/Overlord-Pro/blob/master/Motherboard/Schematic.pdf
* ATmega2560
*/
#if HOTENDS > 2 || E_STEPPERS > 2
#error "Overlord supports up to 2 hotends / E steppers."
#endif
#include "env_validate.h"
#define BOARD_INFO_NAME "OVERLORD"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
//
// Limit Switches
//
#define X_STOP_PIN 24
#define Y_STOP_PIN 28
#define Z_MIN_PIN 46
#define Z_MAX_PIN 32
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 46 // JP4, Tfeed1
#endif
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 44 // JP3, Tfeed2
#endif
//
// Steppers
//
#define X_STEP_PIN 25
#define X_DIR_PIN 23
#define X_ENABLE_PIN 27
#define Y_STEP_PIN 31
#define Y_DIR_PIN 33
#define Y_ENABLE_PIN 29
#define Z_STEP_PIN 37
#define Z_DIR_PIN 39
#define Z_ENABLE_PIN 35
#define E0_STEP_PIN 43
#define E0_DIR_PIN 45
#define E0_ENABLE_PIN 41
#define E1_STEP_PIN 49
#define E1_DIR_PIN 47
#define E1_ENABLE_PIN 48
//
// Temperature Sensors
//
#define TEMP_0_PIN 8 // Analog Input
#define TEMP_1_PIN 9 // Analog Input - Redundant temp sensor
#define TEMP_2_PIN 12 // Analog Input
#define TEMP_3_PIN 14 // Analog Input
#define TEMP_BED_PIN 10 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN 2
#define HEATER_1_PIN 3
#define HEATER_BED_PIN 4
#define FAN0_PIN 7 // material cooling fan
//
// SD Card
//
#define SDSS 53
#define SD_DETECT_PIN 38
//
// Misc. Functions
//
#define LED_PIN 13 // On PCB status led
#define PS_ON_PIN 12 // For stepper/heater/fan power. Active HIGH.
#define POWER_LOSS_PIN 34 // Power check - whether hotends/steppers/fans have power
#if ENABLED(BATTERY_STATUS_AVAILABLE)
#undef BATTERY_STATUS_PIN
#define BATTERY_STATUS_PIN 26 // Status of power loss battery, whether it is charged (low) or charging (high)
#endif
#if ENABLED(INPUT_VOLTAGE_AVAILABLE)
#undef VOLTAGE_DETECTION_PIN
#define VOLTAGE_DETECTION_PIN 11 // Analog Input - ADC Voltage level of main input
#endif
//
// LCD / Controller
//
#if HAS_WIRED_LCD
// OVERLORD OLED pins
#define LCD_PINS_RS 20
#define LCD_PINS_D5 21
#define LCD_PINS_EN 15
#define LCD_PINS_D4 14
#define LCD_PINS_D6 5
#define LCD_PINS_D7 6
#ifndef LCD_RESET_PIN
#define LCD_RESET_PIN 5 // LCD_PINS_D6
#endif
#endif
#if IS_NEWPANEL
#define BTN_ENC 16 // Enter Pin
#define BTN_UP 19 // Button UP Pin
#define BTN_DOWN 17 // Button DOWN Pin
#endif
// Additional connectors/pins on the Overlord V1.X board
#define PCB_VERSION_PIN 22
#define APPROACH_PIN 11 // JP7, Tpd
#define GATE_PIN 36 // Threshold, JP6, Tg
|
2301_81045437/Marlin
|
Marlin/src/pins/mega/pins_OVERLORD.h
|
C
|
agpl-3.0
| 4,825
|