Advertisement
esepich

Untitled

Feb 28th, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 72.51 KB | None | 0 0
  1. #ifndef PINS_H
  2. #define PINS_H
  3.  
  4. #if MOTHERBOARD != 88
  5. #define X_MS1_PIN -1
  6. #define X_MS2_PIN -1
  7. #define Y_MS1_PIN -1
  8. #define Y_MS2_PIN -1
  9. #define Z_MS1_PIN -1
  10. #define Z_MS2_PIN -1
  11. #define E0_MS1_PIN -1
  12. #define E0_MS2_PIN -1
  13. #define E1_MS1_PIN -1
  14. #define E1_MS2_PIN -1
  15. #define DIGIPOTSS_PIN -1
  16. #endif
  17.  
  18. /****************************************************************************************
  19. * 5DPrint D8 Driver board
  20. * https://bitbucket.org/makible/5dprint-d8-controller-board
  21. ****************************************************************************************/
  22.  
  23. #if MOTHERBOARD == 88
  24.  
  25. #define KNOWN_BOARD 1
  26. #define AT90USB 1286 // Disable MarlinSerial etc.
  27.  
  28. #ifndef __AVR_AT90USB1286__
  29. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  30. #endif
  31.  
  32. #define LARGE_FLASH true
  33.  
  34. #define X_STEP_PIN 0
  35. #define X_DIR_PIN 1
  36. #define X_ENABLE_PIN 23
  37. #define X_STOP_PIN 37
  38.  
  39. #define Y_STEP_PIN 2
  40. #define Y_DIR_PIN 3
  41. #define Y_ENABLE_PIN 19
  42. #define Y_STOP_PIN 36
  43.  
  44. #define Z_STEP_PIN 4
  45. #define Z_DIR_PIN 5
  46. #define Z_ENABLE_PIN 18
  47. #define Z_STOP_PIN 39
  48.  
  49. #define E0_STEP_PIN 6
  50. #define E0_DIR_PIN 7
  51. #define E0_ENABLE_PIN 17
  52.  
  53. #define HEATER_0_PIN 21 // Extruder
  54. #define HEATER_1_PIN -1
  55. #define HEATER_2_PIN -1
  56. #define HEATER_BED_PIN 20 // Bed
  57. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  58. // for the fan and Teensyduino uses a different pin mapping.
  59. #define FAN_PIN 16 // Fan
  60.  
  61. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  62. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  63.  
  64. #define TEMP_1_PIN -1
  65. #define TEMP_2_PIN -1
  66.  
  67. #define SDPOWER -1
  68. #define LED_PIN -1
  69. #define PS_ON_PIN -1
  70. #define KILL_PIN -1
  71. #define ALARM_PIN -1
  72.  
  73. // The SDSS pin uses a different pin mapping from file Sd2PinMap.h
  74. #define SDSS 20
  75.  
  76. #ifndef SDSUPPORT
  77. // these pins are defined in the SD library if building with SD support
  78. #define SCK_PIN 9
  79. #define MISO_PIN 11
  80. #define MOSI_PIN 10
  81. #endif
  82.  
  83. // Microstepping pins
  84. // Note that the pin mapping is not from fastio.h
  85. // See Sd2PinMap.h for the pin configurations
  86. #define X_MS1_PIN 25
  87. #define X_MS2_PIN 26
  88. #define Y_MS1_PIN 9
  89. #define Y_MS2_PIN 8
  90. #define Z_MS1_PIN 7
  91. #define Z_MS2_PIN 6
  92. #define E0_MS1_PIN 5
  93. #define E0_MS2_PIN 4
  94.  
  95. #endif /* 88 */
  96.  
  97. /****************************************************************************************
  98. *
  99. *
  100. ****************************************************************************************/
  101.  
  102. #if MOTHERBOARD == 99
  103. #define KNOWN_BOARD 1
  104.  
  105. #define X_STEP_PIN 2
  106. #define X_DIR_PIN 3
  107. #define X_ENABLE_PIN -1
  108. #define X_STOP_PIN 16
  109.  
  110. #define Y_STEP_PIN 5
  111. #define Y_DIR_PIN 6
  112. #define Y_ENABLE_PIN -1
  113. #define Y_STOP_PIN 67
  114.  
  115. #define Z_STEP_PIN 62
  116. #define Z_DIR_PIN 63
  117. #define Z_ENABLE_PIN -1
  118. #define Z_STOP_PIN 59
  119.  
  120. #define E0_STEP_PIN 65
  121. #define E0_DIR_PIN 66
  122. #define E0_ENABLE_PIN -1
  123.  
  124. #define SDPOWER -1
  125. #define SDSS 53
  126. #define LED_PIN -1
  127. #define FAN_PIN -1
  128. #define PS_ON_PIN 9
  129. #define KILL_PIN -1
  130.  
  131. #define HEATER_0_PIN 13
  132. #define HEATER_1_PIN -1
  133. #define HEATER_2_PIN -1
  134. #define TEMP_0_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  135. #define TEMP_1_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  136. #define TEMP_2_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  137. #define HEATER_BED_PIN 4
  138. #define TEMP_BED_PIN 10
  139.  
  140. #endif /* 99 */
  141.  
  142. /****************************************************************************************
  143. * Sethi 3D_1 pin assignment - www.sethi3d.com.br
  144. *
  145. ****************************************************************************************/
  146.  
  147. #if MOTHERBOARD == 20
  148. #define KNOWN_BOARD
  149.  
  150. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  151. #error Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu.
  152.  
  153. #endif
  154.  
  155. #ifndef GEN7_VERSION
  156. #define GEN7_VERSION 12 // v1.x
  157. #endif
  158.  
  159. //x axis pins
  160. #define X_STEP_PIN 19
  161. #define X_DIR_PIN 18
  162. #define X_ENABLE_PIN 24
  163. #define X_STOP_PIN 2
  164.  
  165. //y axis pins
  166. #define Y_STEP_PIN 23
  167. #define Y_DIR_PIN 22
  168. #define Y_ENABLE_PIN 24
  169. #define Y_STOP_PIN 0
  170.  
  171. //z axis pins
  172. #define Z_STEP_PIN 26
  173. #define Z_DIR_PIN 25
  174. #define Z_ENABLE_PIN 24
  175. #define Z_MIN_PIN 1
  176. #define Z_MAX_PIN 0
  177.  
  178. //extruder pins
  179. #define E0_STEP_PIN 28
  180. #define E0_DIR_PIN 27
  181. #define E0_ENABLE_PIN 24
  182.  
  183. #define TEMP_0_PIN 1
  184. #define TEMP_1_PIN -1
  185. #define TEMP_2_PIN -1
  186. #define TEMP_BED_PIN 2
  187.  
  188. #define HEATER_0_PIN 4
  189. #define HEATER_1_PIN -1
  190. #define HEATER_2_PIN -1
  191. #define HEATER_BED_PIN 3
  192.  
  193. #define KILL_PIN -1
  194.  
  195. #define SDPOWER -1
  196. #define SDSS -1 // SCL pin of I2C header
  197. #define LED_PIN -1
  198.  
  199. #if (GEN7_VERSION >= 13)
  200. // Gen7 v1.3 removed the fan pin
  201. #define FAN_PIN -1
  202. #else
  203. #define FAN_PIN 31
  204. #endif
  205. #define PS_ON_PIN 15
  206.  
  207. //All these generations of Gen7 supply thermistor power
  208. //via PS_ON, so ignore bad thermistor readings
  209. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  210.  
  211. //our pin for debugging.
  212. #define DEBUG_PIN 0
  213.  
  214. //our RS485 pins
  215. #define TX_ENABLE_PIN 12
  216. #define RX_ENABLE_PIN 13
  217.  
  218. #endif
  219.  
  220. /****************************************************************************************
  221. * Gen7 v1.1, v1.2, v1.3 pin assignment
  222. *
  223. ****************************************************************************************/
  224.  
  225.  
  226. #if MOTHERBOARD == 12
  227. #define MOTHERBOARD 11
  228. #define GEN7_VERSION 13 // v1.3
  229. #endif
  230.  
  231. #if MOTHERBOARD == 11
  232. #define KNOWN_BOARD
  233.  
  234. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  235. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  236.  
  237. #endif
  238.  
  239. #ifndef GEN7_VERSION
  240. #define GEN7_VERSION 12 // v1.x
  241. #endif
  242.  
  243. //x axis pins
  244. #define X_STEP_PIN 19
  245. #define X_DIR_PIN 18
  246. #define X_ENABLE_PIN 24
  247. #define X_STOP_PIN 7
  248.  
  249. //y axis pins
  250. #define Y_STEP_PIN 23
  251. #define Y_DIR_PIN 22
  252. #define Y_ENABLE_PIN 24
  253. #define Y_STOP_PIN 5
  254.  
  255. //z axis pins
  256. #define Z_STEP_PIN 26
  257. #define Z_DIR_PIN 25
  258. #define Z_ENABLE_PIN 24
  259. #define Z_MIN_PIN 1
  260. #define Z_MAX_PIN 0
  261.  
  262. //extruder pins
  263. #define E0_STEP_PIN 28
  264. #define E0_DIR_PIN 27
  265. #define E0_ENABLE_PIN 24
  266.  
  267. #define TEMP_0_PIN 1
  268. #define TEMP_1_PIN -1
  269. #define TEMP_2_PIN -1
  270. #define TEMP_BED_PIN 2
  271.  
  272. #define HEATER_0_PIN 4
  273. #define HEATER_1_PIN -1
  274. #define HEATER_2_PIN -1
  275. #define HEATER_BED_PIN 3
  276.  
  277. #define KILL_PIN -1
  278.  
  279. #define SDPOWER -1
  280. #define SDSS -1 // SCL pin of I2C header
  281. #define LED_PIN -1
  282.  
  283. #if (GEN7_VERSION >= 13)
  284. // Gen7 v1.3 removed the fan pin
  285. #define FAN_PIN -1
  286. #else
  287. #define FAN_PIN 31
  288. #endif
  289. #define PS_ON_PIN 15
  290.  
  291. //All these generations of Gen7 supply thermistor power
  292. //via PS_ON, so ignore bad thermistor readings
  293. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  294.  
  295. //our pin for debugging.
  296. #define DEBUG_PIN 0
  297.  
  298. //our RS485 pins
  299. #define TX_ENABLE_PIN 12
  300. #define RX_ENABLE_PIN 13
  301.  
  302. #endif
  303.  
  304. /****************************************************************************************
  305. * Gen7 v1.4 pin assignment
  306. *
  307. ****************************************************************************************/
  308.  
  309. #if MOTHERBOARD == 13
  310. #define GEN7_VERSION 14 // v1.4
  311. #endif
  312.  
  313. #if MOTHERBOARD == 13
  314. #define KNOWN_BOARD
  315.  
  316. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  317. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  318.  
  319. #endif
  320.  
  321. #ifndef GEN7_VERSION
  322. #define GEN7_VERSION 14 // v1.x
  323. #endif
  324.  
  325. //x axis pins
  326. #define X_STEP_PIN 29
  327. #define X_DIR_PIN 28
  328. #define X_ENABLE_PIN 25
  329. #define X_STOP_PIN 0
  330.  
  331. //y axis pins
  332. #define Y_STEP_PIN 27
  333. #define Y_DIR_PIN 26
  334. #define Y_ENABLE_PIN 25
  335. #define Y_STOP_PIN 1
  336.  
  337. //z axis pins
  338. #define Z_STEP_PIN 23
  339. #define Z_DIR_PIN 22
  340. #define Z_ENABLE_PIN 25
  341. #define Z_STOP_PIN 2
  342.  
  343. //extruder pins
  344. #define E0_STEP_PIN 19
  345. #define E0_DIR_PIN 18
  346. #define E0_ENABLE_PIN 25
  347.  
  348. #define TEMP_0_PIN 1
  349. #define TEMP_1_PIN -1
  350. #define TEMP_2_PIN -1
  351. #define TEMP_BED_PIN 0
  352.  
  353. #define HEATER_0_PIN 4
  354. #define HEATER_1_PIN -1
  355. #define HEATER_2_PIN -1
  356. #define HEATER_BED_PIN 3
  357.  
  358. #define KILL_PIN -1
  359.  
  360. #define SDPOWER -1
  361. #define SDSS -1 // SCL pin of I2C header
  362. #define LED_PIN -1
  363.  
  364. #define FAN_PIN -1
  365.  
  366. #define PS_ON_PIN 15
  367.  
  368. //our pin for debugging.
  369. #define DEBUG_PIN 0
  370.  
  371. //our RS485 pins
  372. #define TX_ENABLE_PIN 12
  373. #define RX_ENABLE_PIN 13
  374.  
  375. #endif
  376.  
  377. /*******************************************************************************
  378. *********
  379. * Gen7 Alfons3 pin assignment
  380. *
  381. ********************************************************************************
  382. ********/
  383. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  384.  
  385. #if MOTHERBOARD == 10
  386. #define KNOWN_BOARD
  387.  
  388. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  389. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  390.  
  391. #endif
  392.  
  393. //x axis pins
  394. #define X_STEP_PIN 21 // different from standard GEN7
  395. #define X_DIR_PIN 20 // different from standard GEN7
  396. #define X_ENABLE_PIN 24
  397. #define X_STOP_PIN 0
  398.  
  399. //y axis pins
  400. #define Y_STEP_PIN 23
  401. #define Y_DIR_PIN 22
  402. #define Y_ENABLE_PIN 24
  403. #define Y_STOP_PIN 1
  404.  
  405. //z axis pins
  406. #define Z_STEP_PIN 26
  407. #define Z_DIR_PIN 25
  408. #define Z_ENABLE_PIN 24
  409. #define Z_STOP_PIN 2
  410.  
  411. //extruder pins
  412. #define E0_STEP_PIN 28
  413. #define E0_DIR_PIN 27
  414. #define E0_ENABLE_PIN 24
  415.  
  416. #define TEMP_0_PIN 2
  417. #define TEMP_1_PIN -1
  418. #define TEMP_2_PIN -1
  419. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  420.  
  421. #define HEATER_0_PIN 4
  422. #define HEATER_1_PIN -1
  423. #define HEATER_2_PIN -1
  424. #define HEATER_BED_PIN 3 // (bed)
  425.  
  426. #define SDPOWER -1
  427. #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
  428. #define LED_PIN -1
  429.  
  430. #define FAN_PIN -1
  431. #define PS_ON_PIN 19
  432. //our pin for debugging.
  433.  
  434. #define DEBUG_PIN -1
  435.  
  436. //our RS485 pins
  437. //#define TX_ENABLE_PIN 12
  438. //#define RX_ENABLE_PIN 13
  439.  
  440. #define BEEPER -1
  441. #define SDCARDDETECT -1
  442. #define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
  443.  
  444. #define KILL_PIN -1
  445. //Pins for 4bit LCD Support
  446. #define LCD_PINS_RS 18
  447. #define LCD_PINS_ENABLE 17
  448. #define LCD_PINS_D4 16
  449. #define LCD_PINS_D5 15
  450. #define LCD_PINS_D6 13
  451. #define LCD_PINS_D7 14
  452.  
  453. //buttons are directly attached
  454. #define BTN_EN1 11
  455. #define BTN_EN2 10
  456. #define BTN_ENC 12 //the click
  457.  
  458. #endif
  459.  
  460. /****************************************************************************************
  461. * Arduino Mega pin assignment
  462. *
  463. ****************************************************************************************/
  464. #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
  465. #define KNOWN_BOARD 1
  466.  
  467. //////////////////FIX THIS//////////////
  468. #ifndef __AVR_ATmega1280__
  469. #ifndef __AVR_ATmega2560__
  470. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  471. #endif
  472. #endif
  473.  
  474.  
  475. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  476. // #define RAMPS_V_1_3
  477. // #define RAMPS_V_1_0
  478.  
  479.  
  480. #if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
  481.  
  482. #define LARGE_FLASH true
  483.  
  484. #if MOTHERBOARD == 77
  485. #define X_STEP_PIN 54
  486. #define X_DIR_PIN 55
  487. #define X_ENABLE_PIN 38
  488. #define X_MIN_PIN 3
  489. #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  490.  
  491. #define Y_STEP_PIN 60
  492. #define Y_DIR_PIN 61
  493. #define Y_ENABLE_PIN 56
  494. #define Y_MIN_PIN 14
  495. #define Y_MAX_PIN -1 //15
  496.  
  497. #define Z_STEP_PIN 46
  498. #define Z_DIR_PIN 48
  499. #define Z_ENABLE_PIN 63
  500. #define Z_MIN_PIN 18
  501. #define Z_MAX_PIN -1
  502.  
  503. #define Y2_STEP_PIN 36
  504. #define Y2_DIR_PIN 34
  505. #define Y2_ENABLE_PIN 30
  506.  
  507. #define Z2_STEP_PIN 36
  508. #define Z2_DIR_PIN 34
  509. #define Z2_ENABLE_PIN 30
  510.  
  511. #define E0_STEP_PIN 26
  512. #define E0_DIR_PIN 28
  513. #define E0_ENABLE_PIN 24
  514.  
  515. #define E1_STEP_PIN 36
  516. #define E1_DIR_PIN 34
  517. #define E1_ENABLE_PIN 30
  518.  
  519. #define SDPOWER -1
  520. #define SDSS 25//53
  521. #define LED_PIN 13
  522.  
  523. #define BEEPER 33
  524.  
  525. #else
  526.  
  527. #define X_STEP_PIN 54
  528. #define X_DIR_PIN 55
  529. #define X_ENABLE_PIN 38
  530. #define X_MIN_PIN 3
  531. #define X_MAX_PIN 2
  532.  
  533. #define Y_STEP_PIN 60
  534. #define Y_DIR_PIN 61
  535. #define Y_ENABLE_PIN 56
  536. #define Y_MIN_PIN 14
  537. #define Y_MAX_PIN 15
  538.  
  539. #define Z_STEP_PIN 46
  540. #define Z_DIR_PIN 48
  541. #define Z_ENABLE_PIN 62
  542. #define Z_MIN_PIN 18
  543. #define Z_MAX_PIN 19
  544.  
  545. #define Y2_STEP_PIN 36
  546. #define Y2_DIR_PIN 34
  547. #define Y2_ENABLE_PIN 30
  548.  
  549. #define Z2_STEP_PIN 36
  550. #define Z2_DIR_PIN 34
  551. #define Z2_ENABLE_PIN 30
  552.  
  553. #define E0_STEP_PIN 26
  554. #define E0_DIR_PIN 28
  555. #define E0_ENABLE_PIN 24
  556.  
  557. #define E1_STEP_PIN 36
  558. #define E1_DIR_PIN 34
  559. #define E1_ENABLE_PIN 30
  560.  
  561. #if MOTHERBOARD == 68
  562. #define E2_STEP_PIN 23
  563. #define E2_DIR_PIN 25
  564. #define E2_ENABLE_PIN 40
  565.  
  566. #define E3_STEP_PIN 27
  567. #define E3_DIR_PIN 29
  568. #define E3_ENABLE_PIN 41
  569.  
  570. #define E4_STEP_PIN 43
  571. #define E4_DIR_PIN 37
  572. #define E4_ENABLE_PIN 42
  573. #endif
  574.  
  575. #define SDPOWER -1
  576. #define SDSS 53
  577. #define LED_PIN 13
  578. #endif
  579.  
  580. #if MOTHERBOARD == 33 || MOTHERBOARD == 35 || MOTHERBOARD == 67 || MOTHERBOARD == 68
  581. #define FAN_PIN 9 // (Sprinter config)
  582. #else
  583. #define FAN_PIN 4 // IO pin. Buffer needed
  584. #endif
  585.  
  586. #if MOTHERBOARD == 77
  587. #define FAN_PIN 8
  588. #endif
  589.  
  590. #if MOTHERBOARD == 35
  591. #define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller
  592. #endif
  593.  
  594. #define PS_ON_PIN 12
  595.  
  596. #if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
  597. #define KILL_PIN 41
  598. #else
  599. #define KILL_PIN -1
  600. #endif
  601.  
  602. #if MOTHERBOARD == 35
  603. #define HEATER_0_PIN 8
  604. #else
  605. #define HEATER_0_PIN 10 // EXTRUDER 1
  606. #endif
  607.  
  608. #if MOTHERBOARD == 33 || MOTHERBOARD == 67
  609. #define HEATER_1_PIN -1
  610. #else
  611. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  612. #endif
  613.  
  614.  
  615. #if MOTHERBOARD == 77
  616. #define HEATER_0_PIN 10
  617. #define HEATER_1_PIN 12
  618. #define HEATER_2_PIN 6
  619. #elif MOTHERBOARD == 68
  620. #define HEATER_2_PIN 16
  621. #define HEATER_3_PIN 17
  622. #define HEATER_4_PIN 4
  623. #define HEATER_5_PIN 5
  624. #define HEATER_6_PIN 6
  625. #define HEATER_7_PIN 11
  626. #else
  627. #define HEATER_2_PIN -1
  628. #endif
  629.  
  630. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  631. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  632. #if MOTHERBOARD == 68
  633. #define TEMP_2_PIN 12 // ANALOG NUMBERING
  634. #define TEMP_3_PIN 11 // ANALOG NUMBERING
  635. #define TEMP_4_PIN 10 // ANALOG NUMBERING
  636. #define TC1 4 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
  637. #define TC2 5 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
  638. #else
  639. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  640. #endif
  641.  
  642. #if MOTHERBOARD == 35
  643. #define HEATER_BED_PIN -1 // NO BED
  644. #else
  645. #if MOTHERBOARD == 77
  646. #define HEATER_BED_PIN 9 // BED
  647. #else
  648. #define HEATER_BED_PIN 8 // BED
  649. #endif
  650. #endif
  651.  
  652. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  653.  
  654. #ifdef NUM_SERVOS
  655. #define SERVO0_PIN 11
  656.  
  657. #if NUM_SERVOS > 1
  658. #define SERVO1_PIN 6
  659. #endif
  660.  
  661. #if NUM_SERVOS > 2
  662. #define SERVO2_PIN 5
  663. #endif
  664.  
  665. #if NUM_SERVOS > 3
  666. #define SERVO3_PIN 4
  667. #endif
  668. #endif
  669.  
  670. #if MOTHERBOARD == 68
  671. #define BEEPER 33
  672. #endif
  673.  
  674. #ifdef TEMP_STAT_LEDS
  675. #if MOTHERBOARD == 67
  676. #define STAT_LED_RED 6
  677. #define STAT_LED_BLUE 11
  678. #endif
  679. #endif
  680.  
  681. #ifdef ULTRA_LCD
  682.  
  683. #ifdef NEWPANEL
  684. #define LCD_PINS_RS 16
  685. #define LCD_PINS_ENABLE 17
  686. #define LCD_PINS_D4 23
  687. #define LCD_PINS_D5 25
  688. #define LCD_PINS_D6 27
  689. #define LCD_PINS_D7 29
  690.  
  691. #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
  692. #define BEEPER 37
  693.  
  694. #define BTN_EN1 31
  695. #define BTN_EN2 33
  696. #define BTN_ENC 35
  697.  
  698. #define SDCARDDETECT 49
  699. #elif defined(LCD_I2C_PANELOLU2)
  700. #define BTN_EN1 47 //reverse if the encoder turns the wrong way.
  701. #define BTN_EN2 43
  702. #define BTN_ENC 32
  703. #define SDSS 53
  704. #define SDCARDDETECT -1
  705. #define KILL_PIN 41
  706. #elif defined(LCD_I2C_VIKI)
  707. #define BTN_EN1 22 //reverse if the encoder turns the wrong way.
  708. #define BTN_EN2 7
  709. #define BTN_ENC -1
  710. #define SDSS 53
  711. #define SDCARDDETECT 49
  712. #else
  713. //arduino pin which triggers an piezzo beeper
  714. #define BEEPER 33 // Beeper on AUX-4
  715.  
  716. //buttons are directly attached using AUX-2
  717. #ifdef REPRAPWORLD_KEYPAD
  718. #define BTN_EN1 64 // encoder
  719. #define BTN_EN2 59 // encoder
  720. #define BTN_ENC 63 // enter button
  721. #define SHIFT_OUT 40 // shift register
  722. #define SHIFT_CLK 44 // shift register
  723. #define SHIFT_LD 42 // shift register
  724. #else
  725. #define BTN_EN1 37
  726. #define BTN_EN2 35
  727. #define BTN_ENC 31 //the click
  728. #endif
  729.  
  730. #ifdef G3D_PANEL
  731. #define SDCARDDETECT 49
  732. #else
  733. #define SDCARDDETECT -1 // Ramps does not use this port
  734. #endif
  735.  
  736. #endif
  737.  
  738. #if MOTHERBOARD == 77
  739. #define BEEPER -1
  740.  
  741. #define LCD_PINS_RS 27
  742. #define LCD_PINS_ENABLE 29
  743. #define LCD_PINS_D4 37
  744. #define LCD_PINS_D5 35
  745. #define LCD_PINS_D6 33
  746. #define LCD_PINS_D7 31
  747.  
  748. //buttons
  749. #define BTN_EN1 16
  750. #define BTN_EN2 17
  751. #define BTN_ENC 23 //the click
  752.  
  753. #endif
  754. #else //old style panel with shift register
  755. //arduino pin witch triggers an piezzo beeper
  756. #define BEEPER 33 //No Beeper added
  757.  
  758. //buttons are attached to a shift register
  759. // Not wired this yet
  760. //#define SHIFT_CLK 38
  761. //#define SHIFT_LD 42
  762. //#define SHIFT_OUT 40
  763. //#define SHIFT_EN 17
  764.  
  765. #define LCD_PINS_RS 16
  766. #define LCD_PINS_ENABLE 17
  767. #define LCD_PINS_D4 23
  768. #define LCD_PINS_D5 25
  769. #define LCD_PINS_D6 27
  770. #define LCD_PINS_D7 29
  771. #endif
  772. #endif //ULTRA_LCD
  773.  
  774. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3)
  775.  
  776. #define X_STEP_PIN 26
  777. #define X_DIR_PIN 28
  778. #define X_ENABLE_PIN 24
  779. #define X_MIN_PIN 3
  780. #define X_MAX_PIN -1 //2
  781.  
  782. #define Y_STEP_PIN 38
  783. #define Y_DIR_PIN 40
  784. #define Y_ENABLE_PIN 36
  785. #define Y_MIN_PIN 16
  786. #define Y_MAX_PIN -1 //17
  787.  
  788. #define Z_STEP_PIN 44
  789. #define Z_DIR_PIN 46
  790. #define Z_ENABLE_PIN 42
  791. #define Z_MIN_PIN 18
  792. #define Z_MAX_PIN -1 //19
  793.  
  794. #define E0_STEP_PIN 32
  795. #define E0_DIR_PIN 34
  796. #define E0_ENABLE_PIN 30
  797.  
  798. #define SDPOWER 48
  799. #define SDSS 53
  800. #define LED_PIN 13
  801. #define PS_ON_PIN -1
  802. #define KILL_PIN -1
  803.  
  804. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  805. #define HEATER_0_PIN 12 // RAMPS 1.0
  806. #define HEATER_BED_PIN -1 // RAMPS 1.0
  807. #define FAN_PIN 11 // RAMPS 1.0
  808. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  809. #define HEATER_0_PIN 10 // RAMPS 1.1
  810. #define HEATER_BED_PIN 8 // RAMPS 1.1
  811. #define FAN_PIN 9 // RAMPS 1.1
  812. #endif
  813. #define HEATER_1_PIN -1
  814. #define HEATER_2_PIN -1
  815. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  816. #define TEMP_1_PIN -1
  817. #define TEMP_2_PIN -1
  818. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  819.  
  820. #endif // MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
  821.  
  822. // SPI for Max6675 Thermocouple
  823.  
  824. #ifndef SDSUPPORT
  825. // these pins are defined in the SD library if building with SD support
  826. #define MAX_SCK_PIN 52
  827. #define MAX_MISO_PIN 50
  828. #define MAX_MOSI_PIN 51
  829. #define MAX6675_SS 53
  830. #else
  831. #define MAX6675_SS 49
  832. #endif
  833.  
  834. #endif //MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
  835.  
  836. /****************************************************************************************
  837. * Duemilanove w/ ATMega328P pin assignment
  838. *
  839. ****************************************************************************************/
  840. #if MOTHERBOARD == 4
  841. #define KNOWN_BOARD 1
  842.  
  843. #ifndef __AVR_ATmega328P__
  844. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  845. #endif
  846.  
  847. #define X_STEP_PIN 19
  848. #define X_DIR_PIN 18
  849. #define X_ENABLE_PIN -1
  850. #define X_STOP_PIN 17
  851.  
  852. #define Y_STEP_PIN 10
  853. #define Y_DIR_PIN 7
  854. #define Y_ENABLE_PIN -1
  855. #define Y_STOP_PIN 8
  856.  
  857. #define Z_STEP_PIN 13
  858. #define Z_DIR_PIN 3
  859. #define Z_ENABLE_PIN 2
  860. #define Z_STOP_PIN 4
  861.  
  862. #define E0_STEP_PIN 11
  863. #define E0_DIR_PIN 12
  864. #define E0_ENABLE_PIN -1
  865.  
  866. #define SDPOWER -1
  867. #define SDSS -1
  868. #define LED_PIN -1
  869. #define FAN_PIN 5
  870. #define PS_ON_PIN -1
  871. #define KILL_PIN -1
  872.  
  873. #define HEATER_0_PIN 6
  874. #define HEATER_1_PIN -1
  875. #define HEATER_2_PIN -1
  876. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  877. #define TEMP_1_PIN -1
  878. #define TEMP_2_PIN -1
  879. #define HEATER_BED_PIN -1
  880. #define TEMP_BED_PIN -1
  881.  
  882. #endif
  883.  
  884. /****************************************************************************************
  885. * Elefu RA Board Pin Assignments
  886. *
  887. ****************************************************************************************/
  888. #if MOTHERBOARD == 21
  889. #define KNOWN_BOARD 1
  890.  
  891. #ifndef __AVR_ATmega2560__
  892. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  893. #endif
  894.  
  895.  
  896. #define X_STEP_PIN 49
  897. #define X_DIR_PIN 13
  898. #define X_ENABLE_PIN 48
  899. #define X_MIN_PIN 35
  900. #define X_MAX_PIN -1 //34
  901.  
  902. #define Y_STEP_PIN 11
  903. #define Y_DIR_PIN 9
  904. #define Y_ENABLE_PIN 12
  905. #define Y_MIN_PIN 33
  906. #define Y_MAX_PIN -1 //32
  907.  
  908. #define Z_STEP_PIN 7
  909. #define Z_DIR_PIN 6
  910. #define Z_ENABLE_PIN 8
  911. #define Z_MIN_PIN 31
  912. #define Z_MAX_PIN -1 //30
  913.  
  914. #define E2_STEP_PIN 43
  915. #define E2_DIR_PIN 47
  916. #define E2_ENABLE_PIN 42
  917.  
  918. #define E1_STEP_PIN 18
  919. #define E1_DIR_PIN 19
  920. #define E1_ENABLE_PIN 38
  921.  
  922. #define E0_STEP_PIN 40
  923. #define E0_DIR_PIN 41
  924. #define E0_ENABLE_PIN 37
  925.  
  926. #define SDPOWER -1
  927. #define LED_PIN -1 //Use +12V Aux port for LED Ring
  928.  
  929. #define FAN_PIN 16 //5V PWM
  930.  
  931. #define PS_ON_PIN 10 //Set to -1 if using a manual switch on the PWRSW Connector
  932. #define SLEEP_WAKE_PIN 26 //This feature still needs work
  933.  
  934. #define HEATER_0_PIN 45 //12V PWM1
  935. #define HEATER_1_PIN 46 //12V PWM2
  936. #define HEATER_2_PIN 17 //12V PWM3
  937. #define HEATER_BED_PIN 44 //DOUBLE 12V PWM
  938. #define TEMP_0_PIN 3 //ANALOG NUMBERING
  939. #define TEMP_1_PIN 2 //ANALOG NUMBERING
  940. #define TEMP_2_PIN 1 //ANALOG NUMBERING
  941. #define TEMP_BED_PIN 0 //ANALOG NUMBERING
  942.  
  943. #define BEEPER 36
  944.  
  945. #define KILL_PIN -1
  946.  
  947. // M240 Triggers a camera by emulating a Canon RC-1 Remote
  948. // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
  949. #define PHOTOGRAPH_PIN 29
  950.  
  951. #ifdef RA_CONTROL_PANEL
  952.  
  953. #define SDSS 53
  954. #define SDCARDDETECT 28
  955.  
  956. #define BTN_EN1 14
  957. #define BTN_EN2 39
  958. #define BTN_ENC 15 //the click
  959.  
  960. #define BLEN_C 2
  961. #define BLEN_B 1
  962. #define BLEN_A 0
  963.  
  964. //encoder rotation values
  965. #define encrot0 0
  966. #define encrot1 2
  967. #define encrot2 3
  968. #define encrot3 1
  969.  
  970. #endif //RA_CONTROL_PANEL
  971.  
  972. #ifdef RA_DISCO
  973. //variables for which pins the TLC5947 is using
  974. #define TLC_CLOCK_PIN 25
  975. #define TLC_BLANK_PIN 23
  976. #define TLC_XLAT_PIN 22
  977. #define TLC_DATA_PIN 24
  978.  
  979. //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!
  980. //This currently only works with the RA Board.
  981. #define TLC_CLOCK_BIT 3 //bit 3 on port A
  982. #define TLC_CLOCK_PORT &PORTA //bit 3 on port A
  983.  
  984. #define TLC_BLANK_BIT 1 //bit 1 on port A
  985. #define TLC_BLANK_PORT &PORTA //bit 1 on port A
  986.  
  987. #define TLC_DATA_BIT 2 //bit 2 on port A
  988. #define TLC_DATA_PORT &PORTA //bit 2 on port A
  989.  
  990. #define TLC_XLAT_BIT 0 //bit 0 on port A
  991. #define TLC_XLAT_PORT &PORTA //bit 0 on port A
  992.  
  993. //change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful
  994. //Leave it at at least 1 if you have enabled RA_LIGHTING
  995. //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.
  996. #define NUM_TLCS 2
  997.  
  998. //These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions.
  999. //Modify them according to your specific situation.
  1000. //NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs.
  1001. #define TRANS_ARRAY {0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8} //forwards
  1002. //#define TRANS_ARRAY {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15} //backwards
  1003. #endif //RA_LIGHTING
  1004.  
  1005.  
  1006. #endif /* Ra Board */
  1007.  
  1008.  
  1009. /****************************************************************************************
  1010. * Gen6 pin assignment
  1011. *
  1012. ****************************************************************************************/
  1013. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  1014. #define KNOWN_BOARD 1
  1015.  
  1016. #ifndef __AVR_ATmega644P__
  1017. #ifndef __AVR_ATmega1284P__
  1018. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  1019. #endif
  1020. #endif
  1021.  
  1022. //x axis pins
  1023. #define X_STEP_PIN 15
  1024. #define X_DIR_PIN 18
  1025. #define X_ENABLE_PIN 19
  1026. #define X_STOP_PIN 20
  1027.  
  1028. //y axis pins
  1029. #define Y_STEP_PIN 23
  1030. #define Y_DIR_PIN 22
  1031. #define Y_ENABLE_PIN 24
  1032. #define Y_STOP_PIN 25
  1033.  
  1034. //z axis pins
  1035. #define Z_STEP_PIN 27
  1036. #define Z_DIR_PIN 28
  1037. #define Z_ENABLE_PIN 29
  1038. #define Z_STOP_PIN 30
  1039.  
  1040. //extruder pins
  1041. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  1042. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  1043. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  1044. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  1045. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  1046.  
  1047.  
  1048. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  1049. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  1050. #define HEATER_1_PIN -1
  1051. #define HEATER_2_PIN -1
  1052. #if MOTHERBOARD == 5
  1053. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  1054. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  1055. #else
  1056. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  1057. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  1058. #endif
  1059. #define SDPOWER -1
  1060. #define SDSS 17
  1061. #define LED_PIN -1 //changed @ rkoeppl 20110410
  1062. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  1063. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  1064. #define KILL_PIN -1 //changed @ drakelive 20120830
  1065. //our pin for debugging.
  1066.  
  1067. #define DEBUG_PIN 0
  1068.  
  1069. //our RS485 pins
  1070. #define TX_ENABLE_PIN 12
  1071. #define RX_ENABLE_PIN 13
  1072.  
  1073.  
  1074. #endif
  1075.  
  1076. /****************************************************************************************
  1077. * Sanguinololu pin assignment
  1078. *
  1079. ****************************************************************************************/
  1080. #if MOTHERBOARD == 64
  1081. #define STB
  1082. #endif
  1083. #if MOTHERBOARD == 63 || MOTHERBOARD == 66
  1084. #define MELZI
  1085. #endif
  1086. #if MOTHERBOARD == 65
  1087. #define AZTEEG_X1
  1088. #endif
  1089. #if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64 || MOTHERBOARD == 65 || MOTHERBOARD == 66
  1090. #undef MOTHERBOARD
  1091. #define MOTHERBOARD 6
  1092. #define SANGUINOLOLU_V_1_2
  1093.  
  1094. #if defined(__AVR_ATmega1284P__)
  1095. #define LARGE_FLASH true
  1096. #endif
  1097. #endif
  1098. #if MOTHERBOARD == 6
  1099. #define KNOWN_BOARD 1
  1100. #ifndef __AVR_ATmega644P__
  1101. #ifndef __AVR_ATmega1284P__
  1102. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  1103. #endif
  1104. #endif
  1105.  
  1106. #define X_STEP_PIN 15
  1107. #define X_DIR_PIN 21
  1108. #define X_STOP_PIN 18
  1109.  
  1110. #define Y_STEP_PIN 22
  1111. #define Y_DIR_PIN 23
  1112. #define Y_STOP_PIN 19
  1113.  
  1114. #define Z_STEP_PIN 3
  1115. #define Z_DIR_PIN 2
  1116. #define Z_STOP_PIN 20
  1117.  
  1118. #define E0_STEP_PIN 1
  1119. #define E0_DIR_PIN 0
  1120.  
  1121. #define LED_PIN -1
  1122.  
  1123. #define FAN_PIN -1
  1124. #if FAN_PIN == 12 || FAN_PIN ==13
  1125. #define FAN_SOFT_PWM
  1126. #endif
  1127.  
  1128. #ifdef MELZI
  1129. #define LED_PIN 27 /* On some broken versions of the Sanguino libraries the pin definitions are wrong, which then needs LED_PIN as pin 28. But you better upgrade your Sanguino libraries! See #368. */
  1130. #define FAN_PIN 4 // Works for Panelolu2 too
  1131. #endif
  1132.  
  1133. #ifdef STB
  1134. #define FAN_PIN 4
  1135. // Uncomment this if you have the first generation (V1.10) of STBs board
  1136. #define LCD_PIN_BL 17 // LCD backlight LED
  1137. #endif
  1138.  
  1139. #ifdef AZTEEG_X1
  1140. #define FAN_PIN 4
  1141. #endif
  1142.  
  1143. #ifdef NUM_SERVOS
  1144. #define SERVO0_PIN -1
  1145.  
  1146. #if NUM_SERVOS > 1
  1147. #define SERVO1_PIN -1
  1148. #endif
  1149.  
  1150. #if NUM_SERVOS > 2
  1151. #define SERVO2_PIN -1
  1152. #endif
  1153.  
  1154. #if NUM_SERVOS > 3
  1155. #define SERVO3_PIN -1
  1156. #endif
  1157. #endif
  1158.  
  1159. #define PS_ON_PIN -1
  1160. #define KILL_PIN -1
  1161.  
  1162. #define HEATER_0_PIN 13 // (extruder)
  1163. #define HEATER_1_PIN -1
  1164. #define HEATER_2_PIN -1
  1165.  
  1166. #ifdef SANGUINOLOLU_V_1_2
  1167.  
  1168. #define HEATER_BED_PIN 12 // (bed)
  1169. #define X_ENABLE_PIN 14
  1170. #define Y_ENABLE_PIN 14
  1171. #define Z_ENABLE_PIN 26
  1172. #define E0_ENABLE_PIN 14
  1173.  
  1174. #ifdef LCD_I2C_PANELOLU2
  1175. #define FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan
  1176. #endif
  1177.  
  1178. #else
  1179.  
  1180. #define HEATER_BED_PIN 14 // (bed)
  1181. #define X_ENABLE_PIN -1
  1182. #define Y_ENABLE_PIN -1
  1183. #define Z_ENABLE_PIN -1
  1184. #define E0_ENABLE_PIN -1
  1185.  
  1186. #endif
  1187.  
  1188. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  1189. #define TEMP_1_PIN -1
  1190. #define TEMP_2_PIN -1
  1191. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  1192. #define SDPOWER -1
  1193. #define SDSS 31
  1194.  
  1195. /* On some broken versions of the Sanguino libraries the pin definitions are wrong, which then needs SDSS as pin 24. But you better upgrade your Sanguino libraries! See #368. */
  1196. //#define SDSS 24
  1197.  
  1198. #ifdef ULTRA_LCD
  1199. #ifdef NEWPANEL
  1200. //we have no buzzer installed
  1201. #define BEEPER -1
  1202. //LCD Pins
  1203. #ifdef DOGLCD
  1204. // Pins for DOGM SPI LCD Support
  1205. #define DOGLCD_A0 30
  1206. #define DOGLCD_CS 29
  1207. // GLCD features
  1208. #define LCD_CONTRAST 1
  1209. // Uncomment screen orientation
  1210. // #define LCD_SCREEN_ROT_0
  1211. // #define LCD_SCREEN_ROT_90
  1212. #define LCD_SCREEN_ROT_180
  1213. // #define LCD_SCREEN_ROT_270
  1214. #else // standard Hitachi LCD controller
  1215. #define LCD_PINS_RS 4
  1216. #define LCD_PINS_ENABLE 17
  1217. #define LCD_PINS_D4 30
  1218. #define LCD_PINS_D5 29
  1219. #define LCD_PINS_D6 28
  1220. #define LCD_PINS_D7 27
  1221. #endif
  1222. //The encoder and click button
  1223. #define BTN_EN1 11
  1224. #define BTN_EN2 10
  1225. #ifdef LCD_I2C_PANELOLU2
  1226. #ifdef MELZI
  1227. #define BTN_ENC 29 //the click switch
  1228. #define SDSS 30 //to use the SD card reader on the Panelolu2 rather than the melzi board
  1229. #else
  1230. #define BTN_ENC 30 //the click switch
  1231. #endif
  1232. #else
  1233. #define BTN_ENC 16 //the click switch
  1234. #endif //Panelolu2
  1235. //not connected to a pin
  1236. #define SDCARDDETECT -1
  1237.  
  1238. #endif //Newpanel
  1239. #endif //Ultipanel
  1240.  
  1241. #ifdef MAKRPANEL
  1242. #define BEEPER 29
  1243. // Pins for DOGM SPI LCD Support
  1244. #define DOGLCD_A0 30
  1245. #define DOGLCD_CS 17
  1246. #define LCD_PIN_BL 28 // backlight LED on PA3
  1247. // GLCD features
  1248. #define LCD_CONTRAST 1
  1249. // Uncomment screen orientation
  1250. #define LCD_SCREEN_ROT_0
  1251. // #define LCD_SCREEN_ROT_90
  1252. // #define LCD_SCREEN_ROT_180
  1253. // #define LCD_SCREEN_ROT_270
  1254. //The encoder and click button
  1255. #define BTN_EN1 11
  1256. #define BTN_EN2 10
  1257. #define BTN_ENC 16 //the click switch
  1258. //not connected to a pin
  1259. #define SDCARDDETECT -1
  1260. #endif //Makrpanel
  1261.  
  1262. #endif
  1263.  
  1264.  
  1265. #if MOTHERBOARD == 7
  1266. #define KNOWN_BOARD
  1267. /*****************************************************************
  1268. * Ultimaker pin assignment
  1269. ******************************************************************/
  1270.  
  1271. #ifndef __AVR_ATmega1280__
  1272. #ifndef __AVR_ATmega2560__
  1273. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1274. #endif
  1275. #endif
  1276.  
  1277. #define LARGE_FLASH true
  1278.  
  1279. #define X_STEP_PIN 25
  1280. #define X_DIR_PIN 23
  1281. #define X_MIN_PIN 22
  1282. #define X_MAX_PIN 24
  1283. #define X_ENABLE_PIN 27
  1284.  
  1285. #define Y_STEP_PIN 31
  1286. #define Y_DIR_PIN 33
  1287. #define Y_MIN_PIN 26
  1288. #define Y_MAX_PIN 28
  1289. #define Y_ENABLE_PIN 29
  1290.  
  1291. #define Z_STEP_PIN 37
  1292. #define Z_DIR_PIN 39
  1293. #define Z_MIN_PIN 30
  1294. #define Z_MAX_PIN 32
  1295. #define Z_ENABLE_PIN 35
  1296.  
  1297. #define HEATER_BED_PIN 4
  1298. #define TEMP_BED_PIN 10
  1299.  
  1300. #define HEATER_0_PIN 2
  1301. #define TEMP_0_PIN 8
  1302.  
  1303. #define HEATER_1_PIN 3
  1304. #define TEMP_1_PIN 9
  1305.  
  1306. #define HEATER_2_PIN -1
  1307. #define TEMP_2_PIN -1
  1308.  
  1309. #define E0_STEP_PIN 43
  1310. #define E0_DIR_PIN 45
  1311. #define E0_ENABLE_PIN 41
  1312.  
  1313. #define E1_STEP_PIN 49
  1314. #define E1_DIR_PIN 47
  1315. #define E1_ENABLE_PIN 48
  1316.  
  1317. #define SDPOWER -1
  1318. #define SDSS 53
  1319. #define LED_PIN 13
  1320. #define FAN_PIN 7
  1321. #define PS_ON_PIN 12
  1322. #define KILL_PIN -1
  1323. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  1324.  
  1325. #ifdef ULTRA_LCD
  1326.  
  1327. #ifdef NEWPANEL
  1328. //arduino pin witch triggers an piezzo beeper
  1329. #define BEEPER 18
  1330.  
  1331. #define LCD_PINS_RS 20
  1332. #define LCD_PINS_ENABLE 17
  1333. #define LCD_PINS_D4 16
  1334. #define LCD_PINS_D5 21
  1335. #define LCD_PINS_D6 5
  1336. #define LCD_PINS_D7 6
  1337.  
  1338. //buttons are directly attached
  1339. #define BTN_EN1 40
  1340. #define BTN_EN2 42
  1341. #define BTN_ENC 19 //the click
  1342.  
  1343. #define SDCARDDETECT 38
  1344.  
  1345. #else //old style panel with shift register
  1346. //arduino pin witch triggers an piezzo beeper
  1347. #define BEEPER 18
  1348.  
  1349. //buttons are attached to a shift register
  1350. #define SHIFT_CLK 38
  1351. #define SHIFT_LD 42
  1352. #define SHIFT_OUT 40
  1353. #define SHIFT_EN 17
  1354.  
  1355. #define LCD_PINS_RS 16
  1356. #define LCD_PINS_ENABLE 5
  1357. #define LCD_PINS_D4 6
  1358. #define LCD_PINS_D5 21
  1359. #define LCD_PINS_D6 20
  1360. #define LCD_PINS_D7 19
  1361.  
  1362. #define SDCARDDETECT -1
  1363. #endif
  1364. #endif //ULTRA_LCD
  1365.  
  1366. #endif
  1367.  
  1368. #if MOTHERBOARD == 71
  1369. #define KNOWN_BOARD
  1370. /*****************************************************************
  1371. * Ultimaker pin assignment (Old electronics)
  1372. ******************************************************************/
  1373.  
  1374. #ifndef __AVR_ATmega1280__
  1375. #ifndef __AVR_ATmega2560__
  1376. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1377. #endif
  1378. #endif
  1379.  
  1380. #define LARGE_FLASH true
  1381.  
  1382. #define X_STEP_PIN 25
  1383. #define X_DIR_PIN 23
  1384. #define X_MIN_PIN 15
  1385. #define X_MAX_PIN 14
  1386. #define X_ENABLE_PIN 27
  1387.  
  1388. #define Y_STEP_PIN 31
  1389. #define Y_DIR_PIN 33
  1390. #define Y_MIN_PIN 17
  1391. #define Y_MAX_PIN 16
  1392. #define Y_ENABLE_PIN 29
  1393.  
  1394. #define Z_STEP_PIN 37
  1395. #define Z_DIR_PIN 39
  1396. #define Z_MIN_PIN 19
  1397. #define Z_MAX_PIN 18
  1398. #define Z_ENABLE_PIN 35
  1399.  
  1400. #define HEATER_BED_PIN -1
  1401. #define TEMP_BED_PIN -1
  1402.  
  1403. #define HEATER_0_PIN 2
  1404. #define TEMP_0_PIN 8
  1405.  
  1406. #define HEATER_1_PIN 1
  1407. #define TEMP_1_PIN 1
  1408.  
  1409. #define HEATER_2_PIN -1
  1410. #define TEMP_2_PIN -1
  1411.  
  1412. #define E0_STEP_PIN 43
  1413. #define E0_DIR_PIN 45
  1414. #define E0_ENABLE_PIN 41
  1415.  
  1416. #define E1_STEP_PIN -1
  1417. #define E1_DIR_PIN -1
  1418. #define E1_ENABLE_PIN -1
  1419.  
  1420. #define SDPOWER -1
  1421. #define SDSS -1
  1422. #define LED_PIN -1
  1423. #define FAN_PIN -1
  1424. #define PS_ON_PIN -1
  1425. #define KILL_PIN -1
  1426. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1427.  
  1428. #define LCD_PINS_RS 24
  1429. #define LCD_PINS_ENABLE 22
  1430. #define LCD_PINS_D4 36
  1431. #define LCD_PINS_D5 34
  1432. #define LCD_PINS_D6 32
  1433. #define LCD_PINS_D7 30
  1434.  
  1435. #endif
  1436.  
  1437. #if MOTHERBOARD == 72
  1438. #define KNOWN_BOARD
  1439. /*****************************************************************
  1440. * Ultiboard v2.0 pin assignment
  1441. ******************************************************************/
  1442.  
  1443. #ifndef __AVR_ATmega2560__
  1444. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1445. #endif
  1446.  
  1447. #define X_STEP_PIN 25
  1448. #define X_DIR_PIN 23
  1449. #define X_STOP_PIN 22
  1450. #define X_ENABLE_PIN 27
  1451.  
  1452. #define Y_STEP_PIN 32
  1453. #define Y_DIR_PIN 33
  1454. #define Y_STOP_PIN 26
  1455. #define Y_ENABLE_PIN 31
  1456.  
  1457. #define Z_STEP_PIN 35
  1458. #define Z_DIR_PIN 36
  1459. #define Z_STOP_PIN 29
  1460. #define Z_ENABLE_PIN 34
  1461.  
  1462. #define HEATER_BED_PIN 4
  1463. #define TEMP_BED_PIN 10
  1464.  
  1465. #define HEATER_0_PIN 2
  1466. #define TEMP_0_PIN 8
  1467.  
  1468. #define HEATER_1_PIN 3
  1469. #define TEMP_1_PIN 9
  1470.  
  1471. #define HEATER_2_PIN -1
  1472. #define TEMP_2_PIN -1
  1473.  
  1474. #define E0_STEP_PIN 42
  1475. #define E0_DIR_PIN 43
  1476. #define E0_ENABLE_PIN 37
  1477.  
  1478. #define E1_STEP_PIN 49
  1479. #define E1_DIR_PIN 47
  1480. #define E1_ENABLE_PIN 48
  1481.  
  1482. #define SDPOWER -1
  1483. #define SDSS 53
  1484. #define LED_PIN 8
  1485. #define FAN_PIN 7
  1486. #define PS_ON_PIN -1
  1487. #define KILL_PIN -1
  1488. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1489. #define SAFETY_TRIGGERED_PIN 28 //PIN to detect the safety circuit has triggered
  1490. #define MAIN_VOLTAGE_MEASURE_PIN 14 //Analogue PIN to measure the main voltage, with a 100k - 4k7 resitor divider.
  1491.  
  1492. #define MOTOR_CURRENT_PWM_XY_PIN 44
  1493. #define MOTOR_CURRENT_PWM_Z_PIN 45
  1494. #define MOTOR_CURRENT_PWM_E_PIN 46
  1495. //Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range
  1496. #define MOTOR_CURRENT_PWM_RANGE 2000
  1497. #define DEFAULT_PWM_MOTOR_CURRENT {1300, 1300, 1250}
  1498.  
  1499. //arduino pin witch triggers an piezzo beeper
  1500. #define BEEPER 18
  1501.  
  1502. #define LCD_PINS_RS 20
  1503. #define LCD_PINS_ENABLE 15
  1504. #define LCD_PINS_D4 14
  1505. #define LCD_PINS_D5 21
  1506. #define LCD_PINS_D6 5
  1507. #define LCD_PINS_D7 6
  1508.  
  1509. //buttons are directly attached
  1510. #define BTN_EN1 40
  1511. #define BTN_EN2 41
  1512. #define BTN_ENC 19 //the click
  1513.  
  1514. #define BLEN_C 2
  1515. #define BLEN_B 1
  1516. #define BLEN_A 0
  1517.  
  1518. #define SDCARDDETECT 39
  1519.  
  1520. #endif//MOTHERBOARD == 72
  1521.  
  1522. /****************************************************************************************
  1523. * RUMBA pin assignment
  1524. *
  1525. ****************************************************************************************/
  1526. #if MOTHERBOARD == 80
  1527. #define KNOWN_BOARD 1
  1528.  
  1529. #ifndef __AVR_ATmega2560__
  1530. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1531. #endif
  1532.  
  1533. #define X_STEP_PIN 17
  1534. #define X_DIR_PIN 16
  1535. #define X_ENABLE_PIN 48
  1536. #define X_MIN_PIN 37
  1537. #define X_MAX_PIN 36
  1538.  
  1539. #define Y_STEP_PIN 54
  1540. #define Y_DIR_PIN 47
  1541. #define Y_ENABLE_PIN 55
  1542. #define Y_MIN_PIN 35
  1543. #define Y_MAX_PIN 34
  1544.  
  1545. #define Z_STEP_PIN 57
  1546. #define Z_DIR_PIN 56
  1547. #define Z_ENABLE_PIN 62
  1548. #define Z_MIN_PIN 33
  1549. #define Z_MAX_PIN 32
  1550.  
  1551. #define E0_STEP_PIN 23
  1552. #define E0_DIR_PIN 22
  1553. #define E0_ENABLE_PIN 24
  1554.  
  1555. #define E1_STEP_PIN 26
  1556. #define E1_DIR_PIN 25
  1557. #define E1_ENABLE_PIN 27
  1558.  
  1559. #define E2_STEP_PIN 29
  1560. #define E2_DIR_PIN 28
  1561. #define E2_ENABLE_PIN 39
  1562.  
  1563. #define LED_PIN 13
  1564.  
  1565. #define FAN_PIN 7
  1566. //additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
  1567.  
  1568. #define PS_ON_PIN 45
  1569. #define KILL_PIN 46
  1570.  
  1571. #if (TEMP_SENSOR_0==0)
  1572. #define TEMP_0_PIN -1
  1573. #define HEATER_0_PIN -1
  1574. #else
  1575. #define HEATER_0_PIN 2 // EXTRUDER 1
  1576. #if (TEMP_SENSOR_0==-1)
  1577. #define TEMP_0_PIN 6 // ANALOG NUMBERING - connector *K1* on RUMBA thermocouple ADD ON is used
  1578. #else
  1579. #define TEMP_0_PIN 15 // ANALOG NUMBERING - default connector for thermistor *T0* on rumba board is used
  1580. #endif
  1581. #endif
  1582.  
  1583. #if (TEMP_SENSOR_1==0)
  1584. #define TEMP_1_PIN -1
  1585. #define HEATER_1_PIN -1
  1586. #else
  1587. #define HEATER_1_PIN 3 // EXTRUDER 2
  1588. #if (TEMP_SENSOR_1==-1)
  1589. #define TEMP_1_PIN 5 // ANALOG NUMBERING - connector *K2* on RUMBA thermocouple ADD ON is used
  1590. #else
  1591. #define TEMP_1_PIN 14 // ANALOG NUMBERING - default connector for thermistor *T1* on rumba board is used
  1592. #endif
  1593. #endif
  1594.  
  1595. #if (TEMP_SENSOR_2==0)
  1596. #define TEMP_2_PIN -1
  1597. #define HEATER_2_PIN -1
  1598. #else
  1599. #define HEATER_2_PIN 6 // EXTRUDER 3
  1600. #if (TEMP_SENSOR_2==-1)
  1601. #define TEMP_2_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_BED is defined as thermocouple
  1602. #else
  1603. #define TEMP_2_PIN 13 // ANALOG NUMBERING - default connector for thermistor *T2* on rumba board is used
  1604. #endif
  1605. #endif
  1606.  
  1607. //optional for extruder 4 or chamber: #define TEMP_X_PIN 12 // ANALOG NUMBERING - default connector for thermistor *T3* on rumba board is used
  1608. //optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4
  1609.  
  1610. #if (TEMP_SENSOR_BED==0)
  1611. #define TEMP_BED_PIN -1
  1612. #define HEATER_BED_PIN -1
  1613. #else
  1614. #define HEATER_BED_PIN 9 // BED
  1615. #if (TEMP_SENSOR_BED==-1)
  1616. #define TEMP_BED_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_2 is defined as thermocouple
  1617. #else
  1618. #define TEMP_BED_PIN 11 // ANALOG NUMBERING - default connector for thermistor *THB* on rumba board is used
  1619. #endif
  1620. #endif
  1621.  
  1622. #define SDPOWER -1
  1623. #define SDSS 53
  1624. #define SDCARDDETECT 49
  1625. #define BEEPER 44
  1626. #define LCD_PINS_RS 19
  1627. #define LCD_PINS_ENABLE 42
  1628. #define LCD_PINS_D4 18
  1629. #define LCD_PINS_D5 38
  1630. #define LCD_PINS_D6 41
  1631. #define LCD_PINS_D7 40
  1632. #define BTN_EN1 11
  1633. #define BTN_EN2 12
  1634. #define BTN_ENC 43
  1635.  
  1636. #endif //MOTHERBOARD==80
  1637.  
  1638.  
  1639. /****************************************************************************************
  1640. * Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
  1641. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  1642. http://www.pjrc.com/teensy/teensyduino.html
  1643. * See http://reprap.org/wiki/Printrboard for more info
  1644. ****************************************************************************************/
  1645. #if MOTHERBOARD == 8 || MOTHERBOARD == 81
  1646. #define KNOWN_BOARD 1
  1647. #define AT90USB 1286 // Disable MarlinSerial etc.
  1648.  
  1649. #ifndef __AVR_AT90USB1286__
  1650. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  1651. #endif
  1652.  
  1653. #define LARGE_FLASH true
  1654.  
  1655. #define X_STEP_PIN 0
  1656. #define X_DIR_PIN 1
  1657. #define X_ENABLE_PIN 39
  1658.  
  1659. #define Y_STEP_PIN 2
  1660. #define Y_DIR_PIN 3
  1661. #define Y_ENABLE_PIN 38
  1662.  
  1663. #define Z_STEP_PIN 4
  1664. #define Z_DIR_PIN 5
  1665. #define Z_ENABLE_PIN 23
  1666.  
  1667. #define E0_STEP_PIN 6
  1668. #define E0_DIR_PIN 7
  1669. #define E0_ENABLE_PIN 19
  1670.  
  1671. #define HEATER_0_PIN 21 // Extruder
  1672. #define HEATER_1_PIN -1
  1673. #define HEATER_2_PIN -1
  1674. #define HEATER_BED_PIN 20 // Bed
  1675. #define FAN_PIN 22 // Fan
  1676. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  1677. // for the fan and Teensyduino uses a different pin mapping.
  1678.  
  1679. #if MOTHERBOARD == 8 // Teensylu
  1680. #define X_STOP_PIN 13
  1681. #define Y_STOP_PIN 14
  1682. #define Z_STOP_PIN 15
  1683. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1684. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1685. #else // Printrboard
  1686. #define X_STOP_PIN 35
  1687. #define Y_STOP_PIN 8
  1688. #define Z_STOP_PIN 36
  1689. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  1690. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  1691. #endif
  1692.  
  1693. #define TEMP_1_PIN -1
  1694. #define TEMP_2_PIN -1
  1695.  
  1696. #define SDPOWER -1
  1697. #define SDSS 8
  1698. #define LED_PIN -1
  1699. #define PS_ON_PIN -1
  1700. #define KILL_PIN -1
  1701. #define ALARM_PIN -1
  1702.  
  1703. #ifndef SDSUPPORT
  1704. // these pins are defined in the SD library if building with SD support
  1705. #define SCK_PIN 9
  1706. #define MISO_PIN 11
  1707. #define MOSI_PIN 10
  1708. #endif
  1709.  
  1710. #endif // MOTHERBOARD == 8 (Teensylu) or 81 (Printrboard)
  1711.  
  1712. /****************************************************************************************
  1713. * Brainwave 1.0 pin assignments (AT90USB646)
  1714. * Requires hardware bundle for Arduino:
  1715. https://github.com/unrepentantgeek/brainwave-arduino
  1716. ****************************************************************************************/
  1717. #if MOTHERBOARD == 82
  1718. #define KNOWN_BOARD 1
  1719. #define AT90USB 646 // Disable MarlinSerial etc.
  1720.  
  1721. #ifndef __AVR_AT90USB646__
  1722. #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
  1723. #endif
  1724.  
  1725. #define X_STEP_PIN 27
  1726. #define X_DIR_PIN 29
  1727. #define X_ENABLE_PIN 28
  1728. #define X_STOP_PIN 7
  1729. #define X_ATT_PIN 26
  1730.  
  1731. #define Y_STEP_PIN 31
  1732. #define Y_DIR_PIN 33
  1733. #define Y_ENABLE_PIN 32
  1734. #define Y_STOP_PIN 6
  1735. #define Y_ATT_PIN 30
  1736.  
  1737. #define Z_STEP_PIN 17
  1738. #define Z_DIR_PIN 19
  1739. #define Z_ENABLE_PIN 18
  1740. #define Z_STOP_PIN 5
  1741. #define Z_ATT_PIN 16
  1742.  
  1743. #define E0_STEP_PIN 21
  1744. #define E0_DIR_PIN 23
  1745. #define E0_ENABLE_PIN 22
  1746. #define E0_ATT_PIN 20
  1747.  
  1748. #define HEATER_0_PIN 4 // Extruder
  1749. #define HEATER_1_PIN -1
  1750. #define HEATER_2_PIN -1
  1751. #define HEATER_BED_PIN 38 // Bed
  1752. #define FAN_PIN 3 // Fan
  1753.  
  1754. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1755. #define TEMP_1_PIN -1
  1756. #define TEMP_2_PIN -1
  1757. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1758.  
  1759. #define SDPOWER -1
  1760. #define SDSS -1
  1761. #define LED_PIN 39
  1762. #define PS_ON_PIN -1
  1763. #define KILL_PIN -1
  1764. #define ALARM_PIN -1
  1765.  
  1766. #ifndef SDSUPPORT
  1767. // these pins are defined in the SD library if building with SD support
  1768. #define SCK_PIN 9
  1769. #define MISO_PIN 11
  1770. #define MOSI_PIN 10
  1771. #endif
  1772.  
  1773. #endif // MOTHERBOARD == 82 (Brainwave)
  1774.  
  1775. //
  1776. // SAV Mk-I
  1777. // -----------------------------------------------------------------------------------
  1778. /****************************************************************************************
  1779. * SAV MkI pin assignments (AT90USB1286)
  1780. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  1781. http://www.pjrc.com/teensy/teensyduino.html
  1782. RepRap Clone Wars project board.
  1783. ****************************************************************************************/
  1784. #if MOTHERBOARD == 83 // SAV Mk-I
  1785. #define KNOWN_BOARD 1
  1786. #define AT90USB 1286 // Disable MarlinSerial etc.
  1787.  
  1788. #ifndef __AVR_AT90USB1286__
  1789. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  1790. #endif
  1791.  
  1792. #define LARGE_FLASH true
  1793.  
  1794.  
  1795. #define X_STEP_PIN 0
  1796. #define X_DIR_PIN 1
  1797. #define X_ENABLE_PIN 39
  1798.  
  1799. #define Y_STEP_PIN 2
  1800. #define Y_DIR_PIN 3
  1801. #define Y_ENABLE_PIN 38
  1802.  
  1803. #define Z_STEP_PIN 4
  1804. #define Z_DIR_PIN 5
  1805. #define Z_ENABLE_PIN 23
  1806.  
  1807. #define E0_STEP_PIN 6
  1808. #define E0_DIR_PIN 7
  1809. #define E0_ENABLE_PIN 19
  1810.  
  1811. #define HEATER_0_PIN 21 // Extruder
  1812. #define HEATER_1_PIN -1
  1813. #define HEATER_2_PIN -1
  1814. #define HEATER_BED_PIN 20 // Bed
  1815. #define FAN_PIN 16 // Fan -- from Teensyduino environment.
  1816. // For the fan and Teensyduino uses a different pin mapping.
  1817.  
  1818. #define X_STOP_PIN 13
  1819. #define Y_STOP_PIN 14
  1820. #define Z_STOP_PIN 15
  1821. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1822. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1823.  
  1824. #define TEMP_1_PIN -1
  1825. #define TEMP_2_PIN -1
  1826.  
  1827. #define SDPOWER -1
  1828. #define SDSS 20 // PB0 - 8 in marlin env.
  1829. #define LED_PIN -1
  1830. #define PS_ON_PIN -1
  1831. #define KILL_PIN -1
  1832. #define ALARM_PIN -1
  1833. #define SDCARDDETECT -1
  1834.  
  1835.  
  1836. #ifndef SDSUPPORT
  1837. // these pins are defined in the SD library if building with SD support
  1838. #define SCK_PIN 9
  1839. #define MISO_PIN 11
  1840. #define MOSI_PIN 10
  1841. #endif
  1842.  
  1843. #define BEEPER -1
  1844. #define LCD_PINS_RS -1
  1845. #define LCD_PINS_ENABLE -1
  1846. #define LCD_PINS_D4 -1
  1847. #define LCD_PINS_D5 -1
  1848. #define LCD_PINS_D6 -1
  1849. #define LCD_PINS_D7 -1
  1850. #define BTN_EN1 -1
  1851. #define BTN_EN2 -1
  1852. #define BTN_ENC -1
  1853.  
  1854. // For LCD SHIFT register LCD
  1855. #define SR_DATA_PIN 0
  1856. #define SR_CLK_PIN 1
  1857.  
  1858. #endif // MOTHERBOARD == 83
  1859.  
  1860.  
  1861. /****************************************************************************************
  1862. * Gen3+ pin assignment
  1863. *
  1864. ****************************************************************************************/
  1865. #if MOTHERBOARD == 9
  1866. #define MOTHERBOARD 6 /*TODO: Figure out, Why is this done?*/
  1867. #define KNOWN_BOARD 1
  1868. #ifndef __AVR_ATmega644P__
  1869. #ifndef __AVR_ATmega1284P__
  1870. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  1871. #endif
  1872. #endif
  1873.  
  1874. #define X_STEP_PIN 15
  1875. #define X_DIR_PIN 18
  1876. #define X_STOP_PIN 20
  1877.  
  1878. #define Y_STEP_PIN 23
  1879. #define Y_DIR_PIN 22
  1880. #define Y_STOP_PIN 25
  1881.  
  1882. #define Z_STEP_PIN 27
  1883. #define Z_DIR_PIN 28
  1884. #define Z_STOP_PIN 30
  1885.  
  1886. #define E0_STEP_PIN 17
  1887. #define E0_DIR_PIN 21
  1888.  
  1889. #define LED_PIN -1
  1890.  
  1891. #define FAN_PIN -1
  1892.  
  1893. #define PS_ON_PIN 14
  1894. #define KILL_PIN -1
  1895.  
  1896. #define HEATER_0_PIN 12 // (extruder)
  1897.  
  1898. #define HEATER_BED_PIN 16 // (bed)
  1899. #define X_ENABLE_PIN 19
  1900. #define Y_ENABLE_PIN 24
  1901. #define Z_ENABLE_PIN 29
  1902. #define E0_ENABLE_PIN 13
  1903.  
  1904. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  1905. #define TEMP_1_PIN -1
  1906. #define TEMP_2_PIN -1
  1907. #define TEMP_BED_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  1908. #define SDPOWER -1
  1909. #define SDSS 4
  1910. #define HEATER_2_PIN -1
  1911.  
  1912. #endif
  1913.  
  1914.  
  1915.  
  1916. /****************************************************************************************
  1917. * Open Motion controller with enable based extruders
  1918. *
  1919. * ATMega644
  1920. *
  1921. * +---\/---+
  1922. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  1923. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  1924. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  1925. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  1926. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  1927. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  1928. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  1929. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  1930. * RST 9| |32 AREF
  1931. * VCC 10| |31 GND
  1932. * GND 11| |30 AVCC
  1933. * XTAL2 12| |29 PC7 (D 23)
  1934. * XTAL1 13| |28 PC6 (D 22)
  1935. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  1936. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  1937. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  1938. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  1939. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  1940. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  1941. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  1942. * +--------+
  1943. *
  1944. ****************************************************************************************/
  1945. #if MOTHERBOARD == 90 //Alpha OMCA board
  1946. #define KNOWN_BOARD 1
  1947.  
  1948. #ifndef __AVR_ATmega644__
  1949. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  1950. #endif
  1951.  
  1952. #define X_STEP_PIN 21
  1953. #define X_DIR_PIN 20
  1954. #define X_ENABLE_PIN 24
  1955. #define X_STOP_PIN 0
  1956.  
  1957. #define Y_STEP_PIN 23
  1958. #define Y_DIR_PIN 22
  1959. #define Y_ENABLE_PIN 24
  1960. #define Y_STOP_PIN 1
  1961.  
  1962. #define Z_STEP_PIN 26
  1963. #define Z_DIR_PIN 25
  1964. #define Z_ENABLE_PIN 24
  1965. #define Z_STOP_PIN 2
  1966.  
  1967. #define E0_STEP_PIN 28
  1968. #define E0_DIR_PIN 27
  1969. #define E0_ENABLE_PIN 24
  1970.  
  1971. #define E1_STEP_PIN -1 // 19
  1972. #define E1_DIR_PIN -1 // 18
  1973. #define E1_ENABLE_PIN 24
  1974.  
  1975. #define E2_STEP_PIN -1 // 17
  1976. #define E2_DIR_PIN -1 // 16
  1977. #define E2_ENABLE_PIN 24
  1978.  
  1979. #define SDPOWER -1
  1980. #define SDSS 11
  1981. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1982. #define LED_PIN -1
  1983. #define FAN_PIN 3
  1984. #define PS_ON_PIN -1
  1985. #define KILL_PIN -1
  1986.  
  1987. #define HEATER_0_PIN 4
  1988. #define HEATER_1_PIN -1 // 12
  1989. #define HEATER_2_PIN -1 // 13
  1990. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  1991. #define TEMP_1_PIN -1 // 1
  1992. #define TEMP_2_PIN -1 // 2
  1993. #define HEATER_BED_PIN -1 // 14/15
  1994. #define TEMP_BED_PIN -1 // 1,2 or I2C
  1995. /* 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) */
  1996.  
  1997. #endif
  1998.  
  1999. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  2000. #define KNOWN_BOARD 1
  2001.  
  2002. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  2003. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  2004. #endif
  2005.  
  2006. #define X_STEP_PIN 26
  2007. #define X_DIR_PIN 25
  2008. #define X_ENABLE_PIN 10
  2009. #define X_STOP_PIN 0
  2010.  
  2011. #define Y_STEP_PIN 28
  2012. #define Y_DIR_PIN 27
  2013. #define Y_ENABLE_PIN 10
  2014. #define Y_STOP_PIN 1
  2015.  
  2016. #define Z_STEP_PIN 23
  2017. #define Z_DIR_PIN 22
  2018. #define Z_ENABLE_PIN 10
  2019. #define Z_STOP_PIN 2
  2020.  
  2021. #define E0_STEP_PIN 24
  2022. #define E0_DIR_PIN 21
  2023. #define E0_ENABLE_PIN 10
  2024.  
  2025. /* future proofing */
  2026. #define __FS 20
  2027. #define __FD 19
  2028. #define __GS 18
  2029. #define __GD 13
  2030.  
  2031. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  2032.  
  2033. #define E1_STEP_PIN -1 // 21
  2034. #define E1_DIR_PIN -1 // 20
  2035. #define E1_ENABLE_PIN -1 // 19
  2036.  
  2037. #define E2_STEP_PIN -1 // 21
  2038. #define E2_DIR_PIN -1 // 20
  2039. #define E2_ENABLE_PIN -1 // 18
  2040.  
  2041. #define SDPOWER -1
  2042. #define SDSS 11
  2043. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  2044. #define LED_PIN -1
  2045. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  2046. #define PS_ON_PIN -1
  2047. #define KILL_PIN -1
  2048.  
  2049. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  2050. #define HEATER_1_PIN -1
  2051. #define HEATER_2_PIN -1
  2052. #define HEATER_1_PIN -1
  2053. #define HEATER_2_PIN -1
  2054. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  2055. #define TEMP_1_PIN 1 // ANALOG
  2056. #define TEMP_2_PIN -1 // 2
  2057. #define HEATER_BED_PIN 4
  2058. #define TEMP_BED_PIN 2 // 1,2 or I2C
  2059.  
  2060. #define I2C_SCL 16
  2061. #define I2C_SDA 17
  2062.  
  2063. #endif
  2064.  
  2065. #if MOTHERBOARD == 301
  2066. #define KNOWN_BOARD
  2067. /*****************************************************************
  2068. * Rambo Pin Assignments
  2069. ******************************************************************/
  2070.  
  2071. #ifndef __AVR_ATmega2560__
  2072. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  2073. #endif
  2074.  
  2075. #define LARGE_FLASH true
  2076.  
  2077. #define X_STEP_PIN 37
  2078. #define X_DIR_PIN 48
  2079. #define X_MIN_PIN 12
  2080. #define X_MAX_PIN 24
  2081. #define X_ENABLE_PIN 29
  2082. #define X_MS1_PIN 40
  2083. #define X_MS2_PIN 41
  2084.  
  2085. #define Y_STEP_PIN 36
  2086. #define Y_DIR_PIN 49
  2087. #define Y_MIN_PIN 11
  2088. #define Y_MAX_PIN 23
  2089. #define Y_ENABLE_PIN 28
  2090. #define Y_MS1_PIN 69
  2091. #define Y_MS2_PIN 39
  2092.  
  2093. #define Z_STEP_PIN 35
  2094. #define Z_DIR_PIN 47
  2095. #define Z_MIN_PIN 10
  2096. #define Z_MAX_PIN 30
  2097. #define Z_ENABLE_PIN 27
  2098. #define Z_MS1_PIN 68
  2099. #define Z_MS2_PIN 67
  2100.  
  2101. #define HEATER_BED_PIN 3
  2102. #define TEMP_BED_PIN 2
  2103.  
  2104. #define HEATER_0_PIN 9
  2105. #define TEMP_0_PIN 0
  2106.  
  2107. #define HEATER_1_PIN 7
  2108. #define TEMP_1_PIN 1
  2109.  
  2110. #ifdef BARICUDA
  2111. #define HEATER_2_PIN 6
  2112. #else
  2113. #define HEATER_2_PIN -1
  2114. #endif
  2115. #define TEMP_2_PIN -1
  2116.  
  2117. #define E0_STEP_PIN 34
  2118. #define E0_DIR_PIN 43
  2119. #define E0_ENABLE_PIN 26
  2120. #define E0_MS1_PIN 65
  2121. #define E0_MS2_PIN 66
  2122.  
  2123. #define E1_STEP_PIN 33
  2124. #define E1_DIR_PIN 42
  2125. #define E1_ENABLE_PIN 25
  2126. #define E1_MS1_PIN 63
  2127. #define E1_MS2_PIN 64
  2128.  
  2129. #define DIGIPOTSS_PIN 38
  2130. #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
  2131.  
  2132. #define SDPOWER -1
  2133. #define SDSS 53
  2134. #define LED_PIN 13
  2135. #define FAN_PIN 8
  2136. #define PS_ON_PIN 4
  2137. #define KILL_PIN -1 //80 with Smart Controller LCD
  2138. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  2139.  
  2140. #ifdef ULTRA_LCD
  2141. #define KILL_PIN 80
  2142. #ifdef NEWPANEL
  2143. //arduino pin which triggers an piezzo beeper
  2144. #define BEEPER 79 // Beeper on AUX-4
  2145. #define LCD_PINS_RS 70
  2146. #define LCD_PINS_ENABLE 71
  2147. #define LCD_PINS_D4 72
  2148. #define LCD_PINS_D5 73
  2149. #define LCD_PINS_D6 74
  2150. #define LCD_PINS_D7 75
  2151.  
  2152. //buttons are directly attached using AUX-2
  2153. #define BTN_EN1 76
  2154. #define BTN_EN2 77
  2155. #define BTN_ENC 78 //the click
  2156.  
  2157. #define BLEN_C 2
  2158. #define BLEN_B 1
  2159. #define BLEN_A 0
  2160.  
  2161. #define SDCARDDETECT 81 // Ramps does not use this port
  2162.  
  2163. //encoder rotation values
  2164. #define encrot0 0
  2165. #define encrot1 2
  2166. #define encrot2 3
  2167. #define encrot3 1
  2168. #else //old style panel with shift register
  2169. //arduino pin witch triggers an piezzo beeper
  2170. #define BEEPER 33 No Beeper added
  2171. //buttons are attached to a shift register
  2172. // Not wired this yet
  2173. // #define SHIFT_CLK 38
  2174. // #define SHIFT_LD 42
  2175. // #define SHIFT_OUT 40
  2176. // #define SHIFT_EN 17
  2177.  
  2178. #define LCD_PINS_RS 75
  2179. #define LCD_PINS_ENABLE 17
  2180. #define LCD_PINS_D4 23
  2181. #define LCD_PINS_D5 25
  2182. #define LCD_PINS_D6 27
  2183. #define LCD_PINS_D7 29
  2184.  
  2185. //encoder rotation values
  2186. #define encrot0 0
  2187. #define encrot1 2
  2188. #define encrot2 3
  2189. #define encrot3 1
  2190.  
  2191. //bits in the shift register that carry the buttons for:
  2192. // left up center down right red
  2193. #define BL_LE 7
  2194. #define BL_UP 6
  2195. #define BL_MI 5
  2196. #define BL_DW 4
  2197. #define BL_RI 3
  2198. #define BL_ST 2
  2199. #define BLEN_B 1
  2200. #define BLEN_A 0
  2201. #endif
  2202. #endif //ULTRA_LCD
  2203.  
  2204.  
  2205. #endif
  2206.  
  2207. /****************************************************************************************
  2208. * MegaTronics
  2209. *
  2210. ****************************************************************************************/
  2211. #if MOTHERBOARD == 70
  2212. #define KNOWN_BOARD 1
  2213.  
  2214.  
  2215. #ifndef __AVR_ATmega2560__
  2216. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  2217. #endif
  2218.  
  2219.  
  2220. #define LARGE_FLASH true
  2221.  
  2222. #define X_STEP_PIN 26
  2223. #define X_DIR_PIN 28
  2224. #define X_ENABLE_PIN 24
  2225. #define X_MIN_PIN 41
  2226. #define X_MAX_PIN 37
  2227.  
  2228. #define Y_STEP_PIN 60 // A6
  2229. #define Y_DIR_PIN 61 // A7
  2230. #define Y_ENABLE_PIN 22
  2231. #define Y_MIN_PIN 14
  2232. #define Y_MAX_PIN 15
  2233.  
  2234. #define Z_STEP_PIN 54 // A0
  2235. #define Z_DIR_PIN 55 // A1
  2236. #define Z_ENABLE_PIN 56 // A2
  2237. #define Z_MIN_PIN 18
  2238. #define Z_MAX_PIN 19
  2239.  
  2240. #define E0_STEP_PIN 31
  2241. #define E0_DIR_PIN 32
  2242. #define E0_ENABLE_PIN 38
  2243.  
  2244. #define E1_STEP_PIN 34
  2245. #define E1_DIR_PIN 36
  2246. #define E1_ENABLE_PIN 30
  2247.  
  2248. #define SDPOWER -1
  2249. #define SDSS 53
  2250. #define LED_PIN 13
  2251.  
  2252.  
  2253. #define FAN_PIN 7 // IO pin. Buffer needed
  2254. #define PS_ON_PIN 12
  2255. #define KILL_PIN -1
  2256.  
  2257. #define HEATER_0_PIN 9 // EXTRUDER 1
  2258. #define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
  2259. #define HEATER_2_PIN -1
  2260.  
  2261. #if TEMP_SENSOR_0 == -1
  2262. #define TEMP_0_PIN 8 // ANALOG NUMBERING
  2263. #else
  2264. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  2265.  
  2266. #endif
  2267.  
  2268. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  2269. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  2270. #define HEATER_BED_PIN 10 // BED
  2271. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  2272.  
  2273. #define BEEPER 33 // Beeper on AUX-4
  2274.  
  2275.  
  2276. #ifdef ULTRA_LCD
  2277.  
  2278. #ifdef NEWPANEL
  2279. //arduino pin which triggers an piezzo beeper
  2280.  
  2281. #define LCD_PINS_RS 16
  2282. #define LCD_PINS_ENABLE 17
  2283. #define LCD_PINS_D4 23
  2284. #define LCD_PINS_D5 25
  2285. #define LCD_PINS_D6 27
  2286. #define LCD_PINS_D7 29
  2287.  
  2288. //buttons are directly attached using AUX-2
  2289. #define BTN_EN1 59
  2290. #define BTN_EN2 64
  2291. #define BTN_ENC 43 //the click
  2292.  
  2293. #define BLEN_C 2
  2294. #define BLEN_B 1
  2295. #define BLEN_A 0
  2296.  
  2297. #define SDCARDDETECT -1 // Ramps does not use this port
  2298.  
  2299. //encoder rotation values
  2300. #define encrot0 0
  2301. #define encrot1 2
  2302. #define encrot2 3
  2303. #define encrot3 1
  2304. #endif
  2305. #endif //ULTRA_LCD
  2306.  
  2307. #endif
  2308.  
  2309. /****************************************************************************************
  2310. * MegaTronics v2.0
  2311. *
  2312. ****************************************************************************************/
  2313. #if MOTHERBOARD == 701
  2314. #define KNOWN_BOARD 1
  2315.  
  2316.  
  2317. #ifndef __AVR_ATmega2560__
  2318. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  2319. #endif
  2320.  
  2321. #define LARGE_FLASH true
  2322.  
  2323. #define X_STEP_PIN 26
  2324. #define X_DIR_PIN 27
  2325. #define X_ENABLE_PIN 25
  2326. #define X_MIN_PIN 37
  2327. #define X_MAX_PIN 40 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  2328.  
  2329. #define Y_STEP_PIN 4 // A6
  2330. #define Y_DIR_PIN 54 // A0
  2331. #define Y_ENABLE_PIN 5
  2332. #define Y_MIN_PIN 41
  2333. #define Y_MAX_PIN 38 //15
  2334.  
  2335. #define Z_STEP_PIN 56 // A2
  2336. #define Z_DIR_PIN 60 // A6
  2337. #define Z_ENABLE_PIN 55 // A1
  2338. #define Z_MIN_PIN 18
  2339. #define Z_MAX_PIN 19
  2340.  
  2341. #define E0_STEP_PIN 35
  2342. #define E0_DIR_PIN 36
  2343. #define E0_ENABLE_PIN 34
  2344.  
  2345. #define E1_STEP_PIN 29
  2346. #define E1_DIR_PIN 39
  2347. #define E1_ENABLE_PIN 28
  2348.  
  2349. #define E2_STEP_PIN 23
  2350. #define E2_DIR_PIN 24
  2351. #define E2_ENABLE_PIN 22
  2352.  
  2353. #define SDPOWER -1
  2354. #define SDSS 53
  2355. #define LED_PIN 13
  2356.  
  2357. #define FAN_PIN 7
  2358. #define FAN2_PIN 6
  2359. #define PS_ON_PIN 12
  2360. #define KILL_PIN -1
  2361.  
  2362. #define HEATER_0_PIN 9 // EXTRUDER 1
  2363. #define HEATER_1_PIN 8 // EXTRUDER 2
  2364. #define HEATER_2_PIN -1
  2365.  
  2366. #if TEMP_SENSOR_0 == -1
  2367. #define TEMP_0_PIN 4 // ANALOG NUMBERING
  2368. #else
  2369. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  2370. #endif
  2371.  
  2372.  
  2373. #if TEMP_SENSOR_1 == -1
  2374. #define TEMP_1_PIN 8 // ANALOG NUMBERING
  2375. #else
  2376. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  2377. #endif
  2378.  
  2379. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  2380.  
  2381. #define HEATER_BED_PIN 10 // BED
  2382.  
  2383. #if TEMP_SENSOR_BED == -1
  2384. #define TEMP_BED_PIN 8 // ANALOG NUMBERING
  2385. #else
  2386. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  2387. #endif
  2388.  
  2389. #define BEEPER 64
  2390.  
  2391.  
  2392. #define LCD_PINS_RS 14
  2393. #define LCD_PINS_ENABLE 15
  2394. #define LCD_PINS_D4 30
  2395. #define LCD_PINS_D5 31
  2396. #define LCD_PINS_D6 32
  2397. #define LCD_PINS_D7 33
  2398.  
  2399.  
  2400. //buttons are directly attached using keypad
  2401. #define BTN_EN1 61
  2402. #define BTN_EN2 59
  2403. #define BTN_ENC 43 //the click
  2404.  
  2405. #define BLEN_C 2
  2406. #define BLEN_B 1
  2407. #define BLEN_A 0
  2408.  
  2409. #define SDCARDDETECT -1 // Megatronics does not use this port
  2410.  
  2411. //encoder rotation values
  2412. #define encrot0 0
  2413. #define encrot1 2
  2414. #define encrot2 3
  2415. #define encrot3 1
  2416.  
  2417. #endif
  2418.  
  2419.  
  2420. /****************************************************************************************
  2421. * Minitronics v1.0
  2422. *
  2423. ****************************************************************************************/
  2424. #if MOTHERBOARD == 702
  2425. #define KNOWN_BOARD 1
  2426.  
  2427.  
  2428. #ifndef __AVR_ATmega1281__
  2429. #error Oops! Make sure you have 'Minitronics ' selected from the 'Tools -> Boards' menu.
  2430. #endif
  2431.  
  2432. #define LARGE_FLASH true
  2433.  
  2434. #define X_STEP_PIN 48
  2435. #define X_DIR_PIN 47
  2436. #define X_ENABLE_PIN 49
  2437. #define X_MIN_PIN 5
  2438. #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  2439.  
  2440. #define Y_STEP_PIN 39 // A6
  2441. #define Y_DIR_PIN 40 // A0
  2442. #define Y_ENABLE_PIN 38
  2443. #define Y_MIN_PIN 2
  2444. #define Y_MAX_PIN -1 //15
  2445.  
  2446. #define Z_STEP_PIN 42 // A2
  2447. #define Z_DIR_PIN 43 // A6
  2448. #define Z_ENABLE_PIN 41 // A1
  2449. #define Z_MIN_PIN 6
  2450. #define Z_MAX_PIN -1
  2451.  
  2452. #define E0_STEP_PIN 45
  2453. #define E0_DIR_PIN 44
  2454. #define E0_ENABLE_PIN 27
  2455.  
  2456. #define E1_STEP_PIN 36
  2457. #define E1_DIR_PIN 35
  2458. #define E1_ENABLE_PIN 37
  2459.  
  2460. #define E2_STEP_PIN -1
  2461. #define E2_DIR_PIN -1
  2462. #define E2_ENABLE_PIN -1
  2463.  
  2464. #define SDPOWER -1
  2465. #define SDSS 16
  2466. #define LED_PIN 46
  2467.  
  2468. #define FAN_PIN 9
  2469. #define FAN2_PIN -1
  2470. #define PS_ON_PIN -1
  2471. #define KILL_PIN -1
  2472.  
  2473. #define HEATER_0_PIN 7 // EXTRUDER 1
  2474. #define HEATER_1_PIN 8 // EXTRUDER 2
  2475. #define HEATER_2_PIN -1
  2476.  
  2477.  
  2478. #define TEMP_0_PIN 7 // ANALOG NUMBERING
  2479. #define TEMP_1_PIN 6 // ANALOG NUMBERING
  2480. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  2481.  
  2482. #define HEATER_BED_PIN 3 // BED
  2483. #define TEMP_BED_PIN 6 // ANALOG NUMBERING
  2484.  
  2485. #define BEEPER -1
  2486.  
  2487.  
  2488. #define LCD_PINS_RS -1
  2489. #define LCD_PINS_ENABLE -1
  2490. #define LCD_PINS_D4 -1
  2491. #define LCD_PINS_D5 -1
  2492. #define LCD_PINS_D6 -1
  2493. #define LCD_PINS_D7 -1
  2494.  
  2495.  
  2496. //buttons are directly attached using keypad
  2497. #define BTN_EN1 -1
  2498. #define BTN_EN2 -1
  2499. #define BTN_ENC -1 //the click
  2500.  
  2501. #define BLEN_C 2
  2502. #define BLEN_B 1
  2503. #define BLEN_A 0
  2504.  
  2505. #define SDCARDDETECT -1 // Megatronics does not use this port
  2506.  
  2507. //encoder rotation values
  2508. #define encrot0 0
  2509. #define encrot1 2
  2510. #define encrot2 3
  2511. #define encrot3 1
  2512.  
  2513. #endif
  2514.  
  2515. /****************************************************************************************
  2516. * Cheaptronic v1.0
  2517. *
  2518. ****************************************************************************************/
  2519. #if MOTHERBOARD == 2
  2520. #define KNOWN_BOARD 1
  2521.  
  2522. #ifndef __AVR_ATmega2560__
  2523. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  2524. #endif
  2525.  
  2526. #define LARGE_FLASH true
  2527.  
  2528. //X motor stepper
  2529. #define X_STEP_PIN 14
  2530. #define X_DIR_PIN 15
  2531. #define X_ENABLE_PIN 24
  2532.  
  2533. //X endstop
  2534. #define X_MIN_PIN 3
  2535. #define X_MAX_PIN -1
  2536.  
  2537. //Y motor stepper
  2538. #define Y_STEP_PIN 35
  2539. #define Y_DIR_PIN 36
  2540. #define Y_ENABLE_PIN 31
  2541.  
  2542. //Y endstop
  2543. #define Y_MIN_PIN 2
  2544. #define Y_MAX_PIN -1
  2545.  
  2546. //Z motor stepper
  2547. #define Z_STEP_PIN 40
  2548. #define Z_DIR_PIN 41
  2549. #define Z_ENABLE_PIN 37
  2550.  
  2551. //Z endstop
  2552. #define Z_MIN_PIN 5
  2553. #define Z_MAX_PIN -1
  2554.  
  2555. //Extruder 0 stepper
  2556. #define E0_STEP_PIN 26
  2557. #define E0_DIR_PIN 28
  2558. #define E0_ENABLE_PIN 25
  2559.  
  2560. //Extruder 1 stepper
  2561. #define E1_STEP_PIN 33
  2562. #define E1_DIR_PIN 34
  2563. #define E1_ENABLE_PIN 30
  2564.  
  2565. #define SDPOWER -1
  2566. #define SDSS -1
  2567. #define LED_PIN -1
  2568.  
  2569. //FAN
  2570. #define FAN_PIN -1
  2571.  
  2572. #define PS_ON_PIN -1
  2573. #define KILL_PIN -1
  2574.  
  2575. #define HEATER_0_PIN 19 // EXTRUDER 1
  2576. #define HEATER_1_PIN 23 // EXTRUDER 2
  2577. //HeatedBad
  2578. #define HEATER_BED_PIN 22
  2579. //Cheaptronic v1.0 hasent EXTRUDER 3
  2580. #define HEATER_2_PIN -1
  2581.  
  2582. //Temperature sensors
  2583. #define TEMP_0_PIN 15
  2584. #define TEMP_1_PIN 14
  2585. #define TEMP_2_PIN -1
  2586. #define TEMP_BED_PIN 13
  2587.  
  2588. //Cheaptronic v1.0 dont support LCD
  2589. #define LCD_PINS_RS -1
  2590. #define LCD_PINS_ENABLE -1
  2591. #define LCD_PINS_D4 -1
  2592. #define LCD_PINS_D5 -1
  2593. #define LCD_PINS_D6 -1
  2594. #define LCD_PINS_D7 -1
  2595.  
  2596. //Cheaptronic v1.0 dont support keypad
  2597. #define BTN_EN1 -1
  2598. #define BTN_EN2 -1
  2599. #define BTN_ENC -1
  2600.  
  2601. #define BLEN_C 2
  2602. #define BLEN_B 1
  2603. #define BLEN_A 0
  2604.  
  2605. //Cheaptronic v1.0 does not use this port
  2606. #define SDCARDDETECT -1
  2607.  
  2608. //encoder rotation values
  2609. #define encrot0 0
  2610. #define encrot1 2
  2611. #define encrot2 3
  2612. #define encrot3 1
  2613.  
  2614. #endif
  2615.  
  2616.  
  2617.  
  2618. #ifndef KNOWN_BOARD
  2619. #error Unknown MOTHERBOARD value in configuration.h
  2620. #endif
  2621.  
  2622. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  2623. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  2624. #if EXTRUDERS > 1
  2625. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  2626. #else
  2627. #define _E1_PINS
  2628. #endif
  2629. #if EXTRUDERS > 2
  2630. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  2631. #else
  2632. #define _E2_PINS
  2633. #endif
  2634.  
  2635. #ifdef X_STOP_PIN
  2636. #if X_HOME_DIR < 0
  2637. #define X_MIN_PIN X_STOP_PIN
  2638. #define X_MAX_PIN -1
  2639. #else
  2640. #define X_MIN_PIN -1
  2641. #define X_MAX_PIN X_STOP_PIN
  2642. #endif
  2643. #endif
  2644.  
  2645. #ifdef Y_STOP_PIN
  2646. #if Y_HOME_DIR < 0
  2647. #define Y_MIN_PIN Y_STOP_PIN
  2648. #define Y_MAX_PIN -1
  2649. #else
  2650. #define Y_MIN_PIN -1
  2651. #define Y_MAX_PIN Y_STOP_PIN
  2652. #endif
  2653. #endif
  2654.  
  2655. #ifdef Z_STOP_PIN
  2656. #if Z_HOME_DIR < 0
  2657. #define Z_MIN_PIN Z_STOP_PIN
  2658. #define Z_MAX_PIN -1
  2659. #else
  2660. #define Z_MIN_PIN -1
  2661. #define Z_MAX_PIN Z_STOP_PIN
  2662. #endif
  2663. #endif
  2664.  
  2665. #ifdef DISABLE_MAX_ENDSTOPS
  2666. #define X_MAX_PIN -1
  2667. #define Y_MAX_PIN -1
  2668. #define Z_MAX_PIN -1
  2669. #endif
  2670.  
  2671. #ifdef DISABLE_MIN_ENDSTOPS
  2672. #define X_MIN_PIN -1
  2673. #define Y_MIN_PIN -1
  2674. #define Z_MIN_PIN -1
  2675. #endif
  2676.  
  2677. #define SENSITIVE_PINS {0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \
  2678. HEATER_BED_PIN, FAN_PIN, \
  2679. _E0_PINS _E1_PINS _E2_PINS \
  2680. analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
  2681. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement