Advertisement
Guest User

pins.h

a guest
Jan 18th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.25 KB | None | 0 0
  1. #ifndef PINS_H
  2. #define PINS_H
  3.  
  4. #define X_MS1_PIN -1
  5. #define X_MS2_PIN -1
  6. #define Y_MS1_PIN -1
  7. #define Y_MS2_PIN -1
  8. #define Z_MS1_PIN -1
  9. #define Z_MS2_PIN -1
  10. #define E0_MS1_PIN -1
  11. #define E0_MS2_PIN -1
  12. #define E1_MS1_PIN -1
  13. #define E1_MS2_PIN -1
  14. #define DIGIPOTSS_PIN -1
  15.  
  16. #if MOTHERBOARD == 99
  17. #define KNOWN_BOARD 1
  18.  
  19. #define X_STEP_PIN 2
  20. #define X_DIR_PIN 3
  21. #define X_ENABLE_PIN -1
  22. #define X_STOP_PIN 16
  23.  
  24. #define Y_STEP_PIN 5
  25. #define Y_DIR_PIN 6
  26. #define Y_ENABLE_PIN -1
  27. #define Y_STOP_PIN 67
  28.  
  29. #define Z_STEP_PIN 62
  30. #define Z_DIR_PIN 63
  31. #define Z_ENABLE_PIN -1
  32. #define Z_STOP_PIN 59
  33.  
  34. #define E0_STEP_PIN 65
  35. #define E0_DIR_PIN 66
  36. #define E0_ENABLE_PIN -1
  37.  
  38. #define SDPOWER -1
  39. #define SDSS 53
  40. #define LED_PIN -1
  41. #define FAN_PIN -1
  42. #define PS_ON_PIN 9
  43. #define KILL_PIN -1
  44.  
  45. #define HEATER_0_PIN 13
  46. #define HEATER_1_PIN -1
  47. #define HEATER_2_PIN -1
  48. #define TEMP_0_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  49. #define TEMP_1_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  50. #define TEMP_2_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  51. #define HEATER_BED_PIN 14
  52. #define TEMP_BED_PIN 10
  53.  
  54. #endif /* 99 */
  55.  
  56. /****************************************************************************************
  57. * Gen7 v1.1, v1.2, v1.3 pin assignment
  58. *
  59. ****************************************************************************************/
  60.  
  61.  
  62. #if MOTHERBOARD == 12
  63. #define MOTHERBOARD 11
  64. #define GEN7_VERSION 13 // v1.3
  65. #endif
  66.  
  67. #if MOTHERBOARD == 11
  68. #define KNOWN_BOARD
  69.  
  70. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  71. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  72.  
  73. #endif
  74.  
  75. #ifndef GEN7_VERSION
  76. #define GEN7_VERSION 12 // v1.x
  77. #endif
  78.  
  79. //x axis pins
  80. #define X_STEP_PIN 19
  81. #define X_DIR_PIN 18
  82. #define X_ENABLE_PIN 24
  83. #define X_STOP_PIN 7
  84.  
  85. //y axis pins
  86. #define Y_STEP_PIN 23
  87. #define Y_DIR_PIN 22
  88. #define Y_ENABLE_PIN 24
  89. #define Y_STOP_PIN 5
  90.  
  91. //z axis pins
  92. #define Z_STEP_PIN 26
  93. #define Z_DIR_PIN 25
  94. #define Z_ENABLE_PIN 24
  95. #define Z_MIN_PIN 1
  96. #define Z_MAX_PIN 0
  97.  
  98. //extruder pins
  99. #define E0_STEP_PIN 28
  100. #define E0_DIR_PIN 27
  101. #define E0_ENABLE_PIN 24
  102.  
  103. #define TEMP_0_PIN 1
  104. #define TEMP_1_PIN -1
  105. #define TEMP_2_PIN -1
  106. #define TEMP_BED_PIN 2
  107.  
  108. #define HEATER_0_PIN 4
  109. #define HEATER_1_PIN -1
  110. #define HEATER_2_PIN -1
  111. #define HEATER_BED_PIN 3
  112.  
  113. #define KILL_PIN -1
  114.  
  115. #define SDPOWER -1
  116. #define SDSS -1 // SCL pin of I2C header
  117. #define LED_PIN -1
  118.  
  119. #if (GEN7_VERSION >= 13)
  120. // Gen7 v1.3 removed the fan pin
  121. #define FAN_PIN -1
  122. #else
  123. #define FAN_PIN 31
  124. #endif
  125. #define PS_ON_PIN 15
  126.  
  127. //All these generations of Gen7 supply thermistor power
  128. //via PS_ON, so ignore bad thermistor readings
  129. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  130.  
  131. //our pin for debugging.
  132. #define DEBUG_PIN 0
  133.  
  134. //our RS485 pins
  135. #define TX_ENABLE_PIN 12
  136. #define RX_ENABLE_PIN 13
  137.  
  138. #endif
  139.  
  140. /****************************************************************************************
  141. * Gen7 v1.4 pin assignment
  142. *
  143. ****************************************************************************************/
  144.  
  145. #if MOTHERBOARD == 13
  146. #define GEN7_VERSION 14 // v1.4
  147. #endif
  148.  
  149. #if MOTHERBOARD == 13
  150. #define KNOWN_BOARD
  151.  
  152. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  153. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  154.  
  155. #endif
  156.  
  157. #ifndef GEN7_VERSION
  158. #define GEN7_VERSION 14 // v1.x
  159. #endif
  160.  
  161. //x axis pins
  162. #define X_STEP_PIN 29
  163. #define X_DIR_PIN 28
  164. #define X_ENABLE_PIN 25
  165. #define X_STOP_PIN 0
  166.  
  167. //y axis pins
  168. #define Y_STEP_PIN 27
  169. #define Y_DIR_PIN 26
  170. #define Y_ENABLE_PIN 25
  171. #define Y_STOP_PIN 1
  172.  
  173. //z axis pins
  174. #define Z_STEP_PIN 23
  175. #define Z_DIR_PIN 22
  176. #define Z_ENABLE_PIN 25
  177. #define Z_STOP_PIN 2
  178.  
  179. //extruder pins
  180. #define E0_STEP_PIN 19
  181. #define E0_DIR_PIN 18
  182. #define E0_ENABLE_PIN 25
  183.  
  184. #define TEMP_0_PIN 0
  185. #define TEMP_1_PIN -1
  186. #define TEMP_2_PIN -1
  187. #define TEMP_BED_PIN 1
  188.  
  189. #define HEATER_0_PIN 4
  190. #define HEATER_1_PIN -1
  191. #define HEATER_2_PIN -1
  192. #define HEATER_BED_PIN 3
  193.  
  194. #define KILL_PIN -1
  195.  
  196. #define SDPOWER -1
  197. #define SDSS -1 // SCL pin of I2C header
  198. #define LED_PIN -1
  199.  
  200. #define FAN_PIN -1
  201.  
  202. #define PS_ON_PIN 15
  203.  
  204. //our pin for debugging.
  205. #define DEBUG_PIN 0
  206.  
  207. //our RS485 pins
  208. #define TX_ENABLE_PIN 12
  209. #define RX_ENABLE_PIN 13
  210.  
  211. #endif
  212.  
  213. /*******************************************************************************
  214. *********
  215. * Gen7 Alfons3 pin assignment
  216. *
  217. ********************************************************************************
  218. ********/
  219. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  220.  
  221. #if MOTHERBOARD == 10
  222. #define KNOWN_BOARD
  223.  
  224. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  225. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  226.  
  227. #endif
  228.  
  229. //x axis pins
  230. #define X_STEP_PIN 21 //different from stanard GEN7
  231. #define X_DIR_PIN 20 //different from stanard GEN7
  232. #define X_ENABLE_PIN 24
  233. #define X_STOP_PIN 0
  234.  
  235. //y axis pins
  236. #define Y_STEP_PIN 23
  237. #define Y_DIR_PIN 22
  238. #define Y_ENABLE_PIN 24
  239. #define Y_STOP_PIN 1
  240.  
  241. //z axis pins
  242. #define Z_STEP_PIN 26
  243. #define Z_DIR_PIN 25
  244. #define Z_ENABLE_PIN 24
  245. #define Z_STOP_PIN 2
  246.  
  247. //extruder pins
  248. #define E0_STEP_PIN 28
  249. #define E0_DIR_PIN 27
  250. #define E0_ENABLE_PIN 24
  251.  
  252. #define TEMP_0_PIN 2
  253. #define TEMP_1_PIN -1
  254. #define TEMP_2_PIN -1
  255. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  256.  
  257. #define HEATER_0_PIN 4
  258. #define HEATER_1_PIN -1
  259. #define HEATER_2_PIN -1
  260. #define HEATER_BED_PIN 3 // (bed)
  261.  
  262. #define SDPOWER -1
  263. #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
  264. #define LED_PIN -1
  265.  
  266. #define FAN_PIN -1
  267. #define PS_ON_PIN 19
  268. //our pin for debugging.
  269.  
  270. #define DEBUG_PIN -1
  271.  
  272. //our RS485 pins
  273. //#define TX_ENABLE_PIN 12
  274. //#define RX_ENABLE_PIN 13
  275.  
  276. #define BEEPER -1
  277. #define SDCARDDETECT -1
  278. #define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
  279.  
  280. #define KILL_PIN -1
  281. //Pins for 4bit LCD Support
  282. #define LCD_PINS_RS 18
  283. #define LCD_PINS_ENABLE 17
  284. #define LCD_PINS_D4 16
  285. #define LCD_PINS_D5 15
  286. #define LCD_PINS_D6 13
  287. #define LCD_PINS_D7 14
  288.  
  289. //buttons are directly attached
  290. #define BTN_EN1 11
  291. #define BTN_EN2 10
  292. #define BTN_ENC 12 //the click
  293.  
  294. #define BLEN_C 2
  295. #define BLEN_B 1
  296. #define BLEN_A 0
  297.  
  298. #define encrot0 0
  299. #define encrot1 2
  300. #define encrot2 3
  301. #define encrot3 1
  302. #endif
  303.  
  304. /****************************************************************************************
  305. * Arduino Mega pin assignment
  306. *
  307. ****************************************************************************************/
  308. #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  309. #define KNOWN_BOARD 1
  310.  
  311. //////////////////FIX THIS//////////////
  312. #ifndef __AVR_ATmega1280__
  313. #ifndef __AVR_ATmega2560__
  314. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  315. #endif
  316. #endif
  317.  
  318. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  319. // #define RAMPS_V_1_3
  320. // #define RAMPS_V_1_0
  321.  
  322. #if MOTHERBOARD == 33 || MOTHERBOARD == 34
  323.  
  324. #define X_STEP_PIN 54
  325. #define X_DIR_PIN 55
  326. #define X_ENABLE_PIN 38
  327. #define X_MIN_PIN 3
  328. #define X_MAX_PIN 2
  329.  
  330. #define Y_STEP_PIN 60
  331. #define Y_DIR_PIN 61
  332. #define Y_ENABLE_PIN 56
  333. #define Y_MIN_PIN 14
  334. #define Y_MAX_PIN 15
  335.  
  336. #define Z_STEP_PIN 46
  337. #define Z_DIR_PIN 48
  338. #define Z_ENABLE_PIN 62
  339. #define Z_MIN_PIN 18
  340. #define Z_MAX_PIN 19
  341.  
  342. #define Z2_STEP_PIN 36
  343. #define Z2_DIR_PIN 34
  344. #define Z2_ENABLE_PIN 30
  345.  
  346. #define E0_STEP_PIN 26
  347. #define E0_DIR_PIN 28
  348. #define E0_ENABLE_PIN 24
  349.  
  350. #define E1_STEP_PIN 36
  351. #define E1_DIR_PIN 34
  352. #define E1_ENABLE_PIN 30
  353.  
  354. #define SDPOWER -1
  355. #define SDSS 53
  356. #define LED_PIN 13
  357.  
  358. #if MOTHERBOARD == 33
  359. #define FAN_PIN 9 // (Sprinter config)
  360. #else
  361. #define FAN_PIN 4 // IO pin. Buffer needed
  362. #endif
  363. #define PS_ON_PIN 12
  364.  
  365. #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
  366. #define KILL_PIN 41
  367. #else
  368. #define KILL_PIN -1
  369. #endif
  370.  
  371. #define HEATER_0_PIN 10 // EXTRUDER 1
  372. #if MOTHERBOARD == 33
  373. #define HEATER_1_PIN -1
  374. #else
  375. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  376. #endif
  377. #define HEATER_2_PIN -1
  378. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  379. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  380. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  381. #define HEATER_BED_PIN 8 // BED
  382. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  383.  
  384. #ifdef ULTRA_LCD
  385.  
  386. #ifdef NEWPANEL
  387. //encoder rotation values
  388. #define encrot0 0
  389. #define encrot1 2
  390. #define encrot2 3
  391. #define encrot3 1
  392.  
  393. #define BLEN_A 0
  394. #define BLEN_B 1
  395. #define BLEN_C 2
  396.  
  397. #define LCD_PINS_RS 16
  398. #define LCD_PINS_ENABLE 17
  399. #define LCD_PINS_D4 23
  400. #define LCD_PINS_D5 25
  401. #define LCD_PINS_D6 27
  402. #define LCD_PINS_D7 29
  403.  
  404. #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
  405. #define BEEPER 37
  406.  
  407. #define BTN_EN1 31
  408. #define BTN_EN2 33
  409. #define BTN_ENC 35
  410.  
  411. #define SDCARDDETECT 49
  412. #else
  413. //arduino pin which triggers an piezzo beeper
  414. #define BEEPER 33 // Beeper on AUX-4
  415.  
  416. //buttons are directly attached using AUX-2
  417. #define BTN_EN1 37
  418. #define BTN_EN2 35
  419. #define BTN_ENC 31 //the click
  420.  
  421. #define SDCARDDETECT -1 // Ramps does not use this port
  422. #endif
  423.  
  424. #else //old style panel with shift register
  425. //arduino pin witch triggers an piezzo beeper
  426. #define BEEPER 33 No Beeper added
  427.  
  428. //buttons are attached to a shift register
  429. // Not wired this yet
  430. //#define SHIFT_CLK 38
  431. //#define SHIFT_LD 42
  432. //#define SHIFT_OUT 40
  433. //#define SHIFT_EN 17
  434.  
  435. #define LCD_PINS_RS 16
  436. #define LCD_PINS_ENABLE 17
  437. #define LCD_PINS_D4 23
  438. #define LCD_PINS_D5 25
  439. #define LCD_PINS_D6 27
  440. #define LCD_PINS_D7 29
  441.  
  442. //encoder rotation values
  443. #define encrot0 0
  444. #define encrot1 2
  445. #define encrot2 3
  446. #define encrot3 1
  447.  
  448.  
  449. //bits in the shift register that carry the buttons for:
  450. // left up center down right red
  451. #define BL_LE 7
  452. #define BL_UP 6
  453. #define BL_MI 5
  454. #define BL_DW 4
  455. #define BL_RI 3
  456. #define BL_ST 2
  457.  
  458. #define BLEN_B 1
  459. #define BLEN_A 0
  460. #endif
  461. #endif //ULTRA_LCD
  462.  
  463. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3)
  464.  
  465. #define X_STEP_PIN 26
  466. #define X_DIR_PIN 28
  467. #define X_ENABLE_PIN 24
  468. #define X_MIN_PIN 3
  469. #define X_MAX_PIN -1 //2
  470.  
  471. #define Y_STEP_PIN 38
  472. #define Y_DIR_PIN 40
  473. #define Y_ENABLE_PIN 36
  474. #define Y_MIN_PIN 16
  475. #define Y_MAX_PIN -1 //17
  476.  
  477. #define Z_STEP_PIN 44
  478. #define Z_DIR_PIN 46
  479. #define Z_ENABLE_PIN 42
  480. #define Z_MIN_PIN 18
  481. #define Z_MAX_PIN -1 //19
  482.  
  483. #define E0_STEP_PIN 32
  484. #define E0_DIR_PIN 34
  485. #define E0_ENABLE_PIN 30
  486.  
  487. #define SDPOWER 48
  488. #define SDSS 53
  489. #define LED_PIN 13
  490. #define PS_ON_PIN -1
  491. #define KILL_PIN -1
  492.  
  493. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  494. #define HEATER_0_PIN 12 // RAMPS 1.0
  495. #define HEATER_BED_PIN -1 // RAMPS 1.0
  496. #define FAN_PIN 11 // RAMPS 1.0
  497. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  498. #define HEATER_0_PIN 10 // RAMPS 1.1
  499. #define HEATER_BED_PIN 8 // RAMPS 1.1
  500. #define FAN_PIN 9 // RAMPS 1.1
  501. #endif
  502. #define HEATER_1_PIN -1
  503. #define HEATER_2_PIN -1
  504. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  505. #define TEMP_1_PIN -1
  506. #define TEMP_2_PIN -1
  507. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  508. #endif// MOTHERBOARD == 33 || MOTHERBOARD == 34
  509.  
  510. // SPI for Max6675 Thermocouple
  511.  
  512. #ifndef SDSUPPORT
  513. // these pins are defined in the SD library if building with SD support
  514. #define MAX_SCK_PIN 52
  515. #define MAX_MISO_PIN 50
  516. #define MAX_MOSI_PIN 51
  517. #define MAX6675_SS 53
  518. #else
  519. #define MAX6675_SS 49
  520. #endif
  521.  
  522. #endif//MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  523.  
  524. /****************************************************************************************
  525. * Duemilanove w/ ATMega328P pin assignment
  526. *
  527. ****************************************************************************************/
  528. #if MOTHERBOARD == 4
  529. #define KNOWN_BOARD 1
  530.  
  531. #ifndef __AVR_ATmega328P__
  532. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  533. #endif
  534.  
  535. #define X_STEP_PIN 19
  536. #define X_DIR_PIN 18
  537. #define X_ENABLE_PIN -1
  538. #define X_STOP_PIN 17
  539.  
  540. #define Y_STEP_PIN 10
  541. #define Y_DIR_PIN 7
  542. #define Y_ENABLE_PIN -1
  543. #define Y_STOP_PIN 8
  544.  
  545. #define Z_STEP_PIN 13
  546. #define Z_DIR_PIN 3
  547. #define Z_ENABLE_PIN 2
  548. #define Z_STOP_PIN 4
  549.  
  550. #define E0_STEP_PIN 11
  551. #define E0_DIR_PIN 12
  552. #define E0_ENABLE_PIN -1
  553.  
  554. #define SDPOWER -1
  555. #define SDSS -1
  556. #define LED_PIN -1
  557. #define FAN_PIN 5
  558. #define PS_ON_PIN -1
  559. #define KILL_PIN -1
  560.  
  561. #define HEATER_0_PIN 6
  562. #define HEATER_1_PIN -1
  563. #define HEATER_2_PIN -1
  564. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  565. #define TEMP_1_PIN -1
  566. #define TEMP_2_PIN -1
  567. #define HEATER_BED_PIN -1
  568. #define TEMP_BED_PIN -1
  569.  
  570. #endif
  571.  
  572. /****************************************************************************************
  573. * Gen6 pin assignment
  574. *
  575. ****************************************************************************************/
  576. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  577. #define KNOWN_BOARD 1
  578.  
  579. #ifndef __AVR_ATmega644P__
  580. #ifndef __AVR_ATmega1284P__
  581. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  582. #endif
  583. #endif
  584.  
  585. //x axis pins
  586. #define X_STEP_PIN 15
  587. #define X_DIR_PIN 18
  588. #define X_ENABLE_PIN 19
  589. #define X_STOP_PIN 20
  590.  
  591. //y axis pins
  592. #define Y_STEP_PIN 23
  593. #define Y_DIR_PIN 22
  594. #define Y_ENABLE_PIN 24
  595. #define Y_STOP_PIN 25
  596.  
  597. //z axis pins
  598. #define Z_STEP_PIN 27
  599. #define Z_DIR_PIN 28
  600. #define Z_ENABLE_PIN 29
  601. #define Z_STOP_PIN 30
  602.  
  603. //extruder pins
  604. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  605. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  606. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  607. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  608. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  609.  
  610.  
  611. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  612. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  613. #define HEATER_1_PIN -1
  614. #define HEATER_2_PIN -1
  615. #if MOTHERBOARD == 5
  616. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  617. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  618. #else
  619. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  620. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  621. #endif
  622. #define SDPOWER -1
  623. #define SDSS 17
  624. #define LED_PIN -1 //changed @ rkoeppl 20110410
  625. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  626. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  627. #define KILL_PIN -1 //changed @ drakelive 20120830
  628. //our pin for debugging.
  629.  
  630. #define DEBUG_PIN 0
  631.  
  632. //our RS485 pins
  633. #define TX_ENABLE_PIN 12
  634. #define RX_ENABLE_PIN 13
  635.  
  636.  
  637. #endif
  638.  
  639. /****************************************************************************************
  640. * Sanguinololu pin assignment
  641. *
  642. ****************************************************************************************/
  643. #if MOTHERBOARD == 63
  644. #define MELZI
  645. #endif
  646. #if MOTHERBOARD == 62 || MOTHERBOARD == 63
  647. #undef MOTHERBOARD
  648. #define MOTHERBOARD 6
  649. #define SANGUINOLOLU_V_1_2
  650. #endif
  651. #if MOTHERBOARD == 6
  652. #define KNOWN_BOARD 1
  653. #ifndef __AVR_ATmega644P__
  654. #ifndef __AVR_ATmega1284P__
  655. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  656. #endif
  657. #endif
  658.  
  659. #define X_STEP_PIN 15
  660. #define X_DIR_PIN 21
  661. #define X_STOP_PIN 18
  662.  
  663. #define Y_STEP_PIN 22
  664. #define Y_DIR_PIN 23
  665. #define Y_STOP_PIN 19
  666.  
  667. #define Z_STEP_PIN 3
  668. #define Z_DIR_PIN 2
  669. #define Z_STOP_PIN 20
  670.  
  671. #define E0_STEP_PIN 1
  672. #define E0_DIR_PIN 0
  673.  
  674. #define LED_PIN -1
  675.  
  676. #define FAN_PIN -1
  677. #if FAN_PIN == 12 || FAN_PIN ==13
  678. #define FAN_SOFT_PWM
  679. #endif
  680.  
  681. #ifdef MELZI
  682. #define LED_PIN 28
  683. #define FAN_PIN 4
  684. #endif
  685.  
  686. #define PS_ON_PIN -1
  687. #define KILL_PIN -1
  688.  
  689. #define HEATER_0_PIN 13 // (extruder)
  690. #define HEATER_1_PIN -1
  691. #define HEATER_2_PIN -1
  692.  
  693. #ifdef SANGUINOLOLU_V_1_2
  694.  
  695. #define HEATER_BED_PIN 12 // (bed)
  696. #define X_ENABLE_PIN 14
  697. #define Y_ENABLE_PIN 14
  698. #define Z_ENABLE_PIN 26
  699. #define E0_ENABLE_PIN 14
  700.  
  701. #else
  702.  
  703. #define HEATER_BED_PIN 14 // (bed)
  704. #define X_ENABLE_PIN -1
  705. #define Y_ENABLE_PIN -1
  706. #define Z_ENABLE_PIN -1
  707. #define E0_ENABLE_PIN -1
  708.  
  709. #endif
  710.  
  711. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  712. #define TEMP_1_PIN -1
  713. #define TEMP_2_PIN -1
  714. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  715. #define SDPOWER -1
  716. #define SDSS 31
  717.  
  718. #ifdef MELZI
  719. #define SDSS 24
  720. #endif
  721.  
  722. #endif
  723.  
  724.  
  725. #if MOTHERBOARD == 7
  726. #define KNOWN_BOARD
  727. /*****************************************************************
  728. * Ultimaker pin assignment
  729. ******************************************************************/
  730.  
  731. #ifndef __AVR_ATmega1280__
  732. #ifndef __AVR_ATmega2560__
  733. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  734. #endif
  735. #endif
  736.  
  737. #define X_STEP_PIN 25
  738. #define X_DIR_PIN 23
  739. #define X_MIN_PIN 22
  740. #define X_MAX_PIN 24
  741. #define X_ENABLE_PIN 27
  742.  
  743. #define Y_STEP_PIN 31
  744. #define Y_DIR_PIN 33
  745. #define Y_MIN_PIN 26
  746. #define Y_MAX_PIN 28
  747. #define Y_ENABLE_PIN 29
  748.  
  749. #define Z_STEP_PIN 37
  750. #define Z_DIR_PIN 39
  751. #define Z_MIN_PIN 30
  752. #define Z_MAX_PIN 32
  753. #define Z_ENABLE_PIN 35
  754.  
  755. #define HEATER_BED_PIN 4
  756. #define TEMP_BED_PIN 10
  757.  
  758. #define HEATER_0_PIN 2
  759. #define TEMP_0_PIN 8
  760.  
  761. #define HEATER_1_PIN 3
  762. #define TEMP_1_PIN 9
  763.  
  764. #define HEATER_2_PIN -1
  765. #define TEMP_2_PIN -1
  766.  
  767. #define E0_STEP_PIN 43
  768. #define E0_DIR_PIN 45
  769. #define E0_ENABLE_PIN 41
  770.  
  771. #define E1_STEP_PIN 49
  772. #define E1_DIR_PIN 47
  773. #define E1_ENABLE_PIN 48
  774.  
  775. #define SDPOWER -1
  776. #define SDSS 53
  777. #define LED_PIN 13
  778. #define FAN_PIN 7
  779. #define PS_ON_PIN 12
  780. #define KILL_PIN -1
  781. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  782.  
  783. #ifdef ULTRA_LCD
  784.  
  785. #ifdef NEWPANEL
  786. //arduino pin witch triggers an piezzo beeper
  787. #define BEEPER 18
  788.  
  789. #define LCD_PINS_RS 20
  790. #define LCD_PINS_ENABLE 17
  791. #define LCD_PINS_D4 16
  792. #define LCD_PINS_D5 21
  793. #define LCD_PINS_D6 5
  794. #define LCD_PINS_D7 6
  795.  
  796. //buttons are directly attached
  797. #define BTN_EN1 40
  798. #define BTN_EN2 42
  799. #define BTN_ENC 19 //the click
  800.  
  801. #define BLEN_C 2
  802. #define BLEN_B 1
  803. #define BLEN_A 0
  804.  
  805. #define SDCARDDETECT 38
  806.  
  807. //encoder rotation values
  808. #define encrot0 0
  809. #define encrot1 2
  810. #define encrot2 3
  811. #define encrot3 1
  812. #else //old style panel with shift register
  813. //arduino pin witch triggers an piezzo beeper
  814. #define BEEPER 18
  815.  
  816. //buttons are attached to a shift register
  817. #define SHIFT_CLK 38
  818. #define SHIFT_LD 42
  819. #define SHIFT_OUT 40
  820. #define SHIFT_EN 17
  821.  
  822. #define LCD_PINS_RS 16
  823. #define LCD_PINS_ENABLE 5
  824. #define LCD_PINS_D4 6
  825. #define LCD_PINS_D5 21
  826. #define LCD_PINS_D6 20
  827. #define LCD_PINS_D7 19
  828.  
  829. //encoder rotation values
  830. #ifndef ULTIMAKERCONTROLLER
  831. #define encrot0 0
  832. #define encrot1 2
  833. #define encrot2 3
  834. #define encrot3 1
  835. #else
  836. #define encrot0 0
  837. #define encrot1 1
  838. #define encrot2 3
  839. #define encrot3 2
  840.  
  841. #endif
  842.  
  843. #define SDCARDDETECT -1
  844. //bits in the shift register that carry the buttons for:
  845. // left up center down right red
  846. #define BL_LE 7
  847. #define BL_UP 6
  848. #define BL_MI 5
  849. #define BL_DW 4
  850. #define BL_RI 3
  851. #define BL_ST 2
  852.  
  853. #define BLEN_B 1
  854. #define BLEN_A 0
  855. #endif
  856. #endif //ULTRA_LCD
  857.  
  858. #endif
  859.  
  860. #if MOTHERBOARD == 71
  861. #define KNOWN_BOARD
  862. /*****************************************************************
  863. * Ultimaker pin assignment (Old electronics)
  864. ******************************************************************/
  865.  
  866. #ifndef __AVR_ATmega1280__
  867. #ifndef __AVR_ATmega2560__
  868. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  869. #endif
  870. #endif
  871.  
  872. #define X_STEP_PIN 25
  873. #define X_DIR_PIN 23
  874. #define X_MIN_PIN 15
  875. #define X_MAX_PIN 14
  876. #define X_ENABLE_PIN 27
  877.  
  878. #define Y_STEP_PIN 31
  879. #define Y_DIR_PIN 33
  880. #define Y_MIN_PIN 17
  881. #define Y_MAX_PIN 16
  882. #define Y_ENABLE_PIN 29
  883.  
  884. #define Z_STEP_PIN 37
  885. #define Z_DIR_PIN 39
  886. #define Z_MIN_PIN 19
  887. #define Z_MAX_PIN 18
  888. #define Z_ENABLE_PIN 35
  889.  
  890. #define HEATER_BED_PIN -1
  891. #define TEMP_BED_PIN -1
  892.  
  893. #define HEATER_0_PIN 2
  894. #define TEMP_0_PIN 8
  895.  
  896. #define HEATER_1_PIN 1
  897. #define TEMP_1_PIN 1
  898.  
  899. #define HEATER_2_PIN -1
  900. #define TEMP_2_PIN -1
  901.  
  902. #define E0_STEP_PIN 43
  903. #define E0_DIR_PIN 45
  904. #define E0_ENABLE_PIN 41
  905.  
  906. #define E1_STEP_PIN -1
  907. #define E1_DIR_PIN -1
  908. #define E1_ENABLE_PIN -1
  909.  
  910. #define SDPOWER -1
  911. #define SDSS -1
  912. #define LED_PIN -1
  913. #define FAN_PIN -1
  914. #define PS_ON_PIN -1
  915. #define KILL_PIN -1
  916. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  917.  
  918. #define LCD_PINS_RS 24
  919. #define LCD_PINS_ENABLE 22
  920. #define LCD_PINS_D4 36
  921. #define LCD_PINS_D5 34
  922. #define LCD_PINS_D6 32
  923. #define LCD_PINS_D7 30
  924.  
  925. #endif
  926.  
  927. /****************************************************************************************
  928. * Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
  929. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  930. http://www.pjrc.com/teensy/teensyduino.html
  931. * See http://reprap.org/wiki/Printrboard for more info
  932. ****************************************************************************************/
  933. #if MOTHERBOARD == 8 || MOTHERBOARD == 81
  934. #define KNOWN_BOARD 1
  935. #define AT90USB 1286 // Disable MarlinSerial etc.
  936.  
  937. #ifndef __AVR_AT90USB1286__
  938. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  939. #endif
  940.  
  941. #define X_STEP_PIN 0
  942. #define X_DIR_PIN 1
  943. #define X_ENABLE_PIN 39
  944.  
  945. #define Y_STEP_PIN 2
  946. #define Y_DIR_PIN 3
  947. #define Y_ENABLE_PIN 38
  948.  
  949. #define Z_STEP_PIN 4
  950. #define Z_DIR_PIN 5
  951. #define Z_ENABLE_PIN 23
  952.  
  953. #define E0_STEP_PIN 6
  954. #define E0_DIR_PIN 7
  955. #define E0_ENABLE_PIN 19
  956.  
  957. #define HEATER_0_PIN 21 // Extruder
  958. #define HEATER_1_PIN -1
  959. #define HEATER_2_PIN -1
  960. #define HEATER_BED_PIN 20 // Bed
  961. #define FAN_PIN 22 // Fan
  962. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  963. // for the fan and Teensyduino uses a different pin mapping.
  964.  
  965. #if MOTHERBOARD == 8 // Teensylu
  966. #define X_STOP_PIN 13
  967. #define Y_STOP_PIN 14
  968. #define Z_STOP_PIN 15
  969. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  970. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  971. #else // Printrboard
  972. #define X_STOP_PIN 35
  973. #define Y_STOP_PIN 8
  974. #define Z_STOP_PIN 36
  975. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  976. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  977. #endif
  978.  
  979. #define TEMP_1_PIN -1
  980. #define TEMP_2_PIN -1
  981.  
  982. #define SDPOWER -1
  983. #define SDSS 8
  984. #define LED_PIN -1
  985. #define PS_ON_PIN -1
  986. #define KILL_PIN -1
  987. #define ALARM_PIN -1
  988.  
  989. #ifndef SDSUPPORT
  990. // these pins are defined in the SD library if building with SD support
  991. #define SCK_PIN 9
  992. #define MISO_PIN 11
  993. #define MOSI_PIN 10
  994. #endif
  995.  
  996. #endif // MOTHERBOARD == 8 (Teensylu) or 81 (Printrboard)
  997.  
  998. /****************************************************************************************
  999. * Brainwave 1.0 pin assignments (AT90USB646)
  1000. * Requires hardware bundle for Arduino:
  1001. https://github.com/unrepentantgeek/brainwave-arduino
  1002. ****************************************************************************************/
  1003. #if MOTHERBOARD == 82
  1004. #define KNOWN_BOARD 1
  1005. #define AT90USB 646 // Disable MarlinSerial etc.
  1006.  
  1007. #ifndef __AVR_AT90USB646__
  1008. #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
  1009. #endif
  1010.  
  1011. #define X_STEP_PIN 27
  1012. #define X_DIR_PIN 29
  1013. #define X_ENABLE_PIN 28
  1014. #define X_STOP_PIN 7
  1015. #define X_ATT_PIN 26
  1016.  
  1017. #define Y_STEP_PIN 31
  1018. #define Y_DIR_PIN 33
  1019. #define Y_ENABLE_PIN 32
  1020. #define Y_STOP_PIN 6
  1021. #define Y_ATT_PIN 30
  1022.  
  1023. #define Z_STEP_PIN 17
  1024. #define Z_DIR_PIN 19
  1025. #define Z_ENABLE_PIN 18
  1026. #define Z_STOP_PIN 5
  1027. #define Z_ATT_PIN 16
  1028.  
  1029. #define E0_STEP_PIN 21
  1030. #define E0_DIR_PIN 23
  1031. #define E0_ENABLE_PIN 22
  1032. #define E0_ATT_PIN 20
  1033.  
  1034. #define HEATER_0_PIN 4 // Extruder
  1035. #define HEATER_1_PIN -1
  1036. #define HEATER_2_PIN -1
  1037. #define HEATER_BED_PIN 38 // Bed
  1038. #define FAN_PIN 3 // Fan
  1039.  
  1040. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1041. #define TEMP_1_PIN -1
  1042. #define TEMP_2_PIN -1
  1043. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1044.  
  1045. #define SDPOWER -1
  1046. #define SDSS -1
  1047. #define LED_PIN 39
  1048. #define PS_ON_PIN -1
  1049. #define KILL_PIN -1
  1050. #define ALARM_PIN -1
  1051.  
  1052. #ifndef SDSUPPORT
  1053. // these pins are defined in the SD library if building with SD support
  1054. #define SCK_PIN 9
  1055. #define MISO_PIN 11
  1056. #define MOSI_PIN 10
  1057. #endif
  1058.  
  1059. #endif // MOTHERBOARD == 82 (Brainwave)
  1060.  
  1061. /****************************************************************************************
  1062. * Gen3+ pin assignment
  1063. *
  1064. ****************************************************************************************/
  1065. #if MOTHERBOARD == 9
  1066. #define MOTHERBOARD 6 /*TODO: Figure out, Why is this done?*/
  1067. #define KNOWN_BOARD 1
  1068. #ifndef __AVR_ATmega644P__
  1069. #ifndef __AVR_ATmega1284P__
  1070. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  1071. #endif
  1072. #endif
  1073.  
  1074. #define X_STEP_PIN 15
  1075. #define X_DIR_PIN 18
  1076. #define X_STOP_PIN 20
  1077.  
  1078. #define Y_STEP_PIN 23
  1079. #define Y_DIR_PIN 22
  1080. #define Y_STOP_PIN 25
  1081.  
  1082. #define Z_STEP_PIN 27
  1083. #define Z_DIR_PIN 28
  1084. #define Z_STOP_PIN 30
  1085.  
  1086. #define E_STEP_PIN 17
  1087. #define E_DIR_PIN 21
  1088.  
  1089. #define LED_PIN -1
  1090.  
  1091. #define FAN_PIN -1
  1092.  
  1093. #define PS_ON_PIN 14
  1094. #define KILL_PIN -1
  1095.  
  1096. #define HEATER_0_PIN 12 // (extruder)
  1097.  
  1098. #define HEATER_1_PIN 16 // (bed)
  1099. #define X_ENABLE_PIN 19
  1100. #define Y_ENABLE_PIN 24
  1101. #define Z_ENABLE_PIN 29
  1102. #define E_ENABLE_PIN 13
  1103.  
  1104. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  1105. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  1106. #define TEMP_2_PIN -1
  1107. #define SDPOWER -1
  1108. #define SDSS 4
  1109. #define HEATER_2_PIN -1
  1110.  
  1111. #endif
  1112.  
  1113.  
  1114.  
  1115. /****************************************************************************************
  1116. * Open Motion controller with enable based extruders
  1117. *
  1118. * ATMega644
  1119. *
  1120. * +---\/---+
  1121. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  1122. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  1123. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  1124. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  1125. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  1126. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  1127. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  1128. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  1129. * RST 9| |32 AREF
  1130. * VCC 10| |31 GND
  1131. * GND 11| |30 AVCC
  1132. * XTAL2 12| |29 PC7 (D 23)
  1133. * XTAL1 13| |28 PC6 (D 22)
  1134. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  1135. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  1136. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  1137. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  1138. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  1139. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  1140. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  1141. * +--------+
  1142. *
  1143. ****************************************************************************************/
  1144. #if MOTHERBOARD == 90 //Alpha OMCA board
  1145. #define KNOWN_BOARD 1
  1146.  
  1147. #ifndef __AVR_ATmega644__
  1148. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  1149. #endif
  1150.  
  1151. #define X_STEP_PIN 21
  1152. #define X_DIR_PIN 20
  1153. #define X_ENABLE_PIN 24
  1154. #define X_STOP_PIN 0
  1155.  
  1156. #define Y_STEP_PIN 23
  1157. #define Y_DIR_PIN 22
  1158. #define Y_ENABLE_PIN 24
  1159. #define Y_STOP_PIN 1
  1160.  
  1161. #define Z_STEP_PIN 26
  1162. #define Z_DIR_PIN 25
  1163. #define Z_ENABLE_PIN 24
  1164. #define Z_STOP_PIN 2
  1165.  
  1166. #define E0_STEP_PIN 28
  1167. #define E0_DIR_PIN 27
  1168. #define E0_ENABLE_PIN 24
  1169.  
  1170. #define E1_STEP_PIN -1 // 19
  1171. #define E1_DIR_PIN -1 // 18
  1172. #define E1_ENABLE_PIN 24
  1173.  
  1174. #define E2_STEP_PIN -1 // 17
  1175. #define E2_DIR_PIN -1 // 16
  1176. #define E2_ENABLE_PIN 24
  1177.  
  1178. #define SDPOWER -1
  1179. #define SDSS 11
  1180. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1181. #define LED_PIN -1
  1182. #define FAN_PIN 3
  1183. #define PS_ON_PIN -1
  1184. #define KILL_PIN -1
  1185.  
  1186. #define HEATER_0_PIN 4
  1187. #define HEATER_1_PIN -1 // 12
  1188. #define HEATER_2_PIN -1 // 13
  1189. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  1190. #define TEMP_1_PIN -1 // 1
  1191. #define TEMP_2_PIN -1 // 2
  1192. #define HEATER_BED_PIN -1 // 14/15
  1193. #define TEMP_BED_PIN -1 // 1,2 or I2C
  1194. /* 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) */
  1195.  
  1196. #endif
  1197.  
  1198. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  1199. #define KNOWN_BOARD 1
  1200.  
  1201. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  1202. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  1203. #endif
  1204.  
  1205. #define X_STEP_PIN 26
  1206. #define X_DIR_PIN 25
  1207. #define X_ENABLE_PIN 10
  1208. #define X_STOP_PIN 0
  1209.  
  1210. #define Y_STEP_PIN 28
  1211. #define Y_DIR_PIN 27
  1212. #define Y_ENABLE_PIN 10
  1213. #define Y_STOP_PIN 1
  1214.  
  1215. #define Z_STEP_PIN 23
  1216. #define Z_DIR_PIN 22
  1217. #define Z_ENABLE_PIN 10
  1218. #define Z_STOP_PIN 2
  1219.  
  1220. #define E0_STEP_PIN 24
  1221. #define E0_DIR_PIN 21
  1222. #define E0_ENABLE_PIN 10
  1223.  
  1224. /* future proofing */
  1225. #define __FS 20
  1226. #define __FD 19
  1227. #define __GS 18
  1228. #define __GD 13
  1229.  
  1230. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  1231.  
  1232. #define E1_STEP_PIN -1 // 21
  1233. #define E1_DIR_PIN -1 // 20
  1234. #define E1_ENABLE_PIN -1 // 19
  1235.  
  1236. #define E2_STEP_PIN -1 // 21
  1237. #define E2_DIR_PIN -1 // 20
  1238. #define E2_ENABLE_PIN -1 // 18
  1239.  
  1240. #define SDPOWER -1
  1241. #define SDSS 11
  1242. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1243. #define LED_PIN -1
  1244. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  1245. #define PS_ON_PIN -1
  1246. #define KILL_PIN -1
  1247.  
  1248. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  1249. #define HEATER_1_PIN -1
  1250. #define HEATER_2_PIN -1
  1251. #define HEATER_1_PIN -1
  1252. #define HEATER_2_PIN -1
  1253. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  1254. #define TEMP_1_PIN 1 // ANALOG
  1255. #define TEMP_2_PIN -1 // 2
  1256. #define HEATER_BED_PIN 4
  1257. #define TEMP_BED_PIN 2 // 1,2 or I2C
  1258.  
  1259. #define I2C_SCL 16
  1260. #define I2C_SDA 17
  1261.  
  1262. #endif
  1263.  
  1264. #if MOTHERBOARD == 301
  1265. #define KNOWN_BOARD
  1266. /*****************************************************************
  1267. * Rambo Pin Assignments
  1268. ******************************************************************/
  1269.  
  1270. #ifndef __AVR_ATmega2560__
  1271. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1272. #endif
  1273.  
  1274. #define X_STEP_PIN 37
  1275. #define X_DIR_PIN 48
  1276. #define X_MIN_PIN 12
  1277. #define X_MAX_PIN 24
  1278. #define X_ENABLE_PIN 29
  1279. #define X_MS1_PIN 40
  1280. #define X_MS2_PIN 41
  1281.  
  1282. #define Y_STEP_PIN 36
  1283. #define Y_DIR_PIN 49
  1284. #define Y_MIN_PIN 11
  1285. #define Y_MAX_PIN 23
  1286. #define Y_ENABLE_PIN 28
  1287. #define Y_MS1_PIN 69
  1288. #define Y_MS2_PIN 39
  1289.  
  1290. #define Z_STEP_PIN 35
  1291. #define Z_DIR_PIN 47
  1292. #define Z_MIN_PIN 10
  1293. #define Z_MAX_PIN 30
  1294. #define Z_ENABLE_PIN 27
  1295. #define Z_MS1_PIN 68
  1296. #define Z_MS2_PIN 67
  1297.  
  1298. #define HEATER_BED_PIN 3
  1299. #define TEMP_BED_PIN 2
  1300.  
  1301. #define HEATER_0_PIN 9
  1302. #define TEMP_0_PIN 0
  1303.  
  1304. #define HEATER_1_PIN 7
  1305. #define TEMP_1_PIN 1
  1306.  
  1307. #define HEATER_2_PIN -1
  1308. #define TEMP_2_PIN -1
  1309.  
  1310. #define E0_STEP_PIN 34
  1311. #define E0_DIR_PIN 43
  1312. #define E0_ENABLE_PIN 26
  1313. #define E0_MS1_PIN 65
  1314. #define E0_MS2_PIN 66
  1315.  
  1316. #define E1_STEP_PIN 33
  1317. #define E1_DIR_PIN 42
  1318. #define E1_ENABLE_PIN 25
  1319. #define E1_MS1_PIN 63
  1320. #define E1_MS2_PIN 64
  1321.  
  1322. #define DIGIPOTSS_PIN 38
  1323. #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
  1324.  
  1325. #define SDPOWER -1
  1326. #define SDSS 53
  1327. #define LED_PIN 13
  1328. #define FAN_PIN 8
  1329. #define PS_ON_PIN 4
  1330. #define KILL_PIN -1
  1331. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1332.  
  1333. #endif
  1334.  
  1335. /****************************************************************************************
  1336. * MegaTronics
  1337. *
  1338. ****************************************************************************************/
  1339. #if MOTHERBOARD == 70
  1340. #define KNOWN_BOARD 1
  1341.  
  1342. //////////////////FIX THIS//////////////
  1343.  
  1344. #ifndef __AVR_ATmega2560__
  1345. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1346. #endif
  1347.  
  1348.  
  1349.  
  1350.  
  1351. #define X_STEP_PIN 26
  1352. #define X_DIR_PIN 28
  1353. #define X_ENABLE_PIN 24
  1354. #define X_MIN_PIN 41
  1355. #define X_MAX_PIN 37
  1356.  
  1357. #define Y_STEP_PIN 60 // A6
  1358. #define Y_DIR_PIN 61 // A7
  1359. #define Y_ENABLE_PIN 22
  1360. #define Y_MIN_PIN 14
  1361. #define Y_MAX_PIN 15
  1362.  
  1363. #define Z_STEP_PIN 54 // A0
  1364. #define Z_DIR_PIN 55 // A1
  1365. #define Z_ENABLE_PIN 56 // A2
  1366. #define Z_MIN_PIN 18
  1367. #define Z_MAX_PIN 19
  1368.  
  1369. #define E0_STEP_PIN 31
  1370. #define E0_DIR_PIN 32
  1371. #define E0_ENABLE_PIN 38
  1372.  
  1373. #define E1_STEP_PIN 34
  1374. #define E1_DIR_PIN 36
  1375. #define E1_ENABLE_PIN 30
  1376.  
  1377. #define SDPOWER -1
  1378. #define SDSS 53
  1379. #define LED_PIN 13
  1380.  
  1381.  
  1382. #define FAN_PIN 7 // IO pin. Buffer needed
  1383. #define PS_ON_PIN 12
  1384. #define KILL_PIN -1
  1385.  
  1386. #define HEATER_0_PIN 9 // EXTRUDER 1
  1387. #define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
  1388. #define HEATER_2_PIN -1
  1389.  
  1390. #if TEMP_SENSOR_0 == -1
  1391. #define TEMP_0_PIN 8 // ANALOG NUMBERING
  1392. #else
  1393. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  1394.  
  1395. #endif
  1396.  
  1397. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  1398. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1399. #define HEATER_BED_PIN 10 // BED
  1400. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  1401.  
  1402. #define BEEPER 33 // Beeper on AUX-4
  1403.  
  1404.  
  1405. #ifdef ULTRA_LCD
  1406.  
  1407. #ifdef NEWPANEL
  1408. //arduino pin which triggers an piezzo beeper
  1409.  
  1410. #define LCD_PINS_RS 16
  1411. #define LCD_PINS_ENABLE 17
  1412. #define LCD_PINS_D4 23
  1413. #define LCD_PINS_D5 25
  1414. #define LCD_PINS_D6 27
  1415. #define LCD_PINS_D7 29
  1416.  
  1417. //buttons are directly attached using AUX-2
  1418. #define BTN_EN1 59
  1419. #define BTN_EN2 64
  1420. #define BTN_ENC 43 //the click
  1421.  
  1422. #define BLEN_C 2
  1423. #define BLEN_B 1
  1424. #define BLEN_A 0
  1425.  
  1426. #define SDCARDDETECT -1 // Ramps does not use this port
  1427.  
  1428. //encoder rotation values
  1429. #define encrot0 0
  1430. #define encrot1 2
  1431. #define encrot2 3
  1432. #define encrot3 1
  1433. #endif
  1434. #endif //ULTRA_LCD
  1435.  
  1436. #endif
  1437.  
  1438. #ifndef KNOWN_BOARD
  1439. #error Unknown MOTHERBOARD value in configuration.h
  1440. #endif
  1441.  
  1442. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  1443. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  1444. #if EXTRUDERS > 1
  1445. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  1446. #else
  1447. #define _E1_PINS
  1448. #endif
  1449. #if EXTRUDERS > 2
  1450. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  1451. #else
  1452. #define _E2_PINS
  1453. #endif
  1454.  
  1455. #ifdef X_STOP_PIN
  1456. #if X_HOME_DIR < 0
  1457. #define X_MIN_PIN X_STOP_PIN
  1458. #define X_MAX_PIN -1
  1459. #else
  1460. #define X_MIN_PIN -1
  1461. #define X_MAX_PIN X_STOP_PIN
  1462. #endif
  1463. #endif
  1464.  
  1465. #ifdef Y_STOP_PIN
  1466. #if Y_HOME_DIR < 0
  1467. #define Y_MIN_PIN Y_STOP_PIN
  1468. #define Y_MAX_PIN -1
  1469. #else
  1470. #define Y_MIN_PIN -1
  1471. #define Y_MAX_PIN Y_STOP_PIN
  1472. #endif
  1473. #endif
  1474.  
  1475. #ifdef Z_STOP_PIN
  1476. #if Z_HOME_DIR < 0
  1477. #define Z_MIN_PIN Z_STOP_PIN
  1478. #define Z_MAX_PIN -1
  1479. #else
  1480. #define Z_MIN_PIN -1
  1481. #define Z_MAX_PIN Z_STOP_PIN
  1482. #endif
  1483. #endif
  1484.  
  1485. #ifdef DISABLE_MAX_ENDSTOPS
  1486. #define X_MAX_PIN -1
  1487. #define Y_MAX_PIN -1
  1488. #define Z_MAX_PIN -1
  1489. #endif
  1490.  
  1491. #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, \
  1492. HEATER_BED_PIN, FAN_PIN, \
  1493. _E0_PINS _E1_PINS _E2_PINS \
  1494. analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
  1495. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement