My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pins.h 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  1. #ifndef PINS_H
  2. #define PINS_H
  3. #if MOTHERBOARD == 99
  4. #define KNOWN_BOARD 1
  5. #define X_STEP_PIN 2
  6. #define X_DIR_PIN 3
  7. #define X_ENABLE_PIN -1
  8. #define X_MIN_PIN -1
  9. #define X_MAX_PIN 16
  10. #define Y_STEP_PIN 5
  11. #define Y_DIR_PIN 6
  12. #define Y_ENABLE_PIN -1
  13. #define Y_MIN_PIN 67
  14. #define Y_MAX_PIN -1
  15. #define Z_STEP_PIN 62
  16. #define Z_DIR_PIN 63
  17. #define Z_ENABLE_PIN -1
  18. #define Z_MIN_PIN 59
  19. #define Z_MAX_PIN -1
  20. #define E0_STEP_PIN 65
  21. #define E0_DIR_PIN 66
  22. #define E0_ENABLE_PIN -1
  23. #define SDPOWER -1
  24. #define SDSS 53
  25. #define LED_PIN -1
  26. #define FAN_PIN -1
  27. #define PS_ON_PIN 9
  28. #define KILL_PIN -1
  29. #define HEATER_0_PIN 13
  30. #define HEATER_1_PIN -1
  31. #define HEATER_2_PIN -1
  32. #define TEMP_0_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  33. #define TEMP_1_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  34. #define TEMP_2_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  35. #define HEATER_BED_PIN 4
  36. #define TEMP_BED_PIN 10
  37. #endif /* 99 */
  38. /****************************************************************************************
  39. * Gen7 v1.1, v1.2, v1.3, v1.4 pin assignment
  40. *
  41. ****************************************************************************************/
  42. #if MOTHERBOARD == 13
  43. #define MOTHERBOARD 11
  44. #define GEN7_VERSION 14 // v1.4
  45. #endif
  46. #if MOTHERBOARD == 12
  47. #define MOTHERBOARD 11
  48. #define GEN7_VERSION 13 // v1.3
  49. #endif
  50. #if MOTHERBOARD == 11
  51. #define KNOWN_BOARD
  52. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  53. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  54. #endif
  55. #ifndef GEN7_VERSION
  56. #define GEN7_VERSION 12 // v1.x
  57. #endif
  58. //x axis pins
  59. #define X_STEP_PIN 19
  60. #define X_DIR_PIN 18
  61. #define X_ENABLE_PIN 24
  62. #define X_MIN_PIN 7
  63. #define X_MAX_PIN -1
  64. //y axis pins
  65. #define Y_STEP_PIN 23
  66. #define Y_DIR_PIN 22
  67. #define Y_ENABLE_PIN 24
  68. #define Y_MIN_PIN 5
  69. #define Y_MAX_PIN -1
  70. //z axis pins
  71. #define Z_STEP_PIN 26
  72. #define Z_DIR_PIN 25
  73. #define Z_ENABLE_PIN 24
  74. #define Z_MIN_PIN 1
  75. #define Z_MAX_PIN
  76. //extruder pins
  77. #define E0_STEP_PIN 28
  78. #define E0_DIR_PIN 27
  79. #define E0_ENABLE_PIN 24
  80. #define TEMP_0_PIN 1
  81. #define TEMP_1_PIN -1
  82. #define TEMP_2_PIN -1
  83. #define TEMP_BED_PIN 2
  84. #define HEATER_0_PIN 4
  85. #define HEATER_1_PIN -1
  86. #define HEATER_2_PIN -1
  87. #define HEATER_BED_PIN 3
  88. #define SDPOWER -1
  89. #define SDSS -1 // SCL pin of I2C header
  90. #define LED_PIN -1
  91. #if (GEN7_VERSION >= 13)
  92. // Gen7 v1.3 removed the fan pin
  93. #define FAN_PIN -1
  94. #else
  95. #define FAN_PIN 31
  96. #endif
  97. #define PS_ON_PIN 15
  98. #if (GEN7_VERSION < 14)
  99. // Gen 1.3 and earlier supplied thermistor power via PS_ON
  100. // Need to ignore the bad thermistor readings on those units
  101. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  102. #endif
  103. //our pin for debugging.
  104. #define DEBUG_PIN 0
  105. //our RS485 pins
  106. #define TX_ENABLE_PIN 12
  107. #define RX_ENABLE_PIN 13
  108. #endif
  109. /*******************************************************************************
  110. *********
  111. * Gen7 Alfons3 pin assignment
  112. *
  113. ********************************************************************************
  114. ********/
  115. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  116. #if MOTHERBOARD == 10
  117. #define KNOWN_BOARD
  118. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  119. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  120. #endif
  121. //x axis pins
  122. #define X_STEP_PIN 21 //different from stanard GEN7
  123. #define X_DIR_PIN 20 //different from stanard GEN7
  124. #define X_ENABLE_PIN 24
  125. #define X_MIN_PIN 0
  126. #define X_MAX_PIN -1
  127. //y axis pins
  128. #define Y_STEP_PIN 23
  129. #define Y_DIR_PIN 22
  130. #define Y_ENABLE_PIN 24
  131. #define Y_MIN_PIN 1
  132. #define Y_MAX_PIN -1
  133. //z axis pins
  134. #define Z_STEP_PIN 26
  135. #define Z_DIR_PIN 25
  136. #define Z_ENABLE_PIN 24
  137. #define Z_MIN_PIN 2
  138. #define Z_MAX_PIN -1
  139. //extruder pins
  140. #define E0_STEP_PIN 28
  141. #define E0_DIR_PIN 27
  142. #define E0_ENABLE_PIN 24
  143. #define TEMP_0_PIN 2
  144. #define TEMP_1_PIN -1
  145. #define TEMP_2_PIN -1
  146. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  147. #define HEATER_0_PIN 4
  148. #define HEATER_1_PIN -1
  149. #define HEATER_2_PIN -1
  150. #define HEATER_BED_PIN 3 // (bed)
  151. #define SDPOWER -1
  152. #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
  153. #define LED_PIN -1
  154. #define FAN_PIN -1
  155. #define PS_ON_PIN 19
  156. //our pin for debugging.
  157. #define DEBUG_PIN -1
  158. //our RS485 pins
  159. //#define TX_ENABLE_PIN 12
  160. //#define RX_ENABLE_PIN 13
  161. #define BEEPER -1
  162. #define SDCARDDETECT -1
  163. #define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
  164. //Pins for 4bit LCD Support
  165. #define LCD_PINS_RS 18
  166. #define LCD_PINS_ENABLE 17
  167. #define LCD_PINS_D4 16
  168. #define LCD_PINS_D5 15
  169. #define LCD_PINS_D6 13
  170. #define LCD_PINS_D7 14
  171. //buttons are directly attached
  172. #define BTN_EN1 11
  173. #define BTN_EN2 10
  174. #define BTN_ENC 12 //the click
  175. #define BLEN_C 2
  176. #define BLEN_B 1
  177. #define BLEN_A 0
  178. #define encrot0 0
  179. #define encrot1 2
  180. #define encrot2 3
  181. #define encrot3 1
  182. #endif
  183. /****************************************************************************************
  184. * Arduino Mega pin assignment
  185. *
  186. ****************************************************************************************/
  187. #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  188. #define KNOWN_BOARD 1
  189. //////////////////FIX THIS//////////////
  190. #ifndef __AVR_ATmega1280__
  191. #ifndef __AVR_ATmega2560__
  192. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  193. #endif
  194. #endif
  195. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  196. // #define RAMPS_V_1_3
  197. // #define RAMPS_V_1_0
  198. #ifdef MOTHERBOARD == 33 || MOTHERBOARD == 34
  199. #define X_STEP_PIN 54
  200. #define X_DIR_PIN 55
  201. #define X_ENABLE_PIN 38
  202. #define X_MIN_PIN 3
  203. #define X_MAX_PIN 2 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  204. #define Y_STEP_PIN 60
  205. #define Y_DIR_PIN 61
  206. #define Y_ENABLE_PIN 56
  207. #define Y_MIN_PIN 14
  208. #define Y_MAX_PIN 15 //15
  209. #define Z_STEP_PIN 46
  210. #define Z_DIR_PIN 48
  211. #define Z_ENABLE_PIN 62
  212. #define Z_MIN_PIN 18
  213. #define Z_MAX_PIN 19
  214. #define E0_STEP_PIN 26
  215. #define E0_DIR_PIN 28
  216. #define E0_ENABLE_PIN 24
  217. #define E1_STEP_PIN 36
  218. #define E1_DIR_PIN 34
  219. #define E1_ENABLE_PIN 30
  220. #define SDPOWER -1
  221. #define SDSS 53
  222. #define LED_PIN 13
  223. #if MOTHERBOARD == 33
  224. #define FAN_PIN 9 // (Sprinter config)
  225. #else
  226. #define FAN_PIN 4 // IO pin. Buffer needed
  227. #endif
  228. #define PS_ON_PIN 12
  229. #define KILL_PIN -1
  230. #define HEATER_0_PIN 10 // EXTRUDER 1
  231. #if MOTHERBOARD == 33
  232. #define HEATER_1_PIN -1
  233. #else
  234. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  235. #endif
  236. #define HEATER_2_PIN -1
  237. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  238. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  239. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  240. #define HEATER_BED_PIN 8 // BED
  241. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  242. #ifdef ULTRA_LCD
  243. #ifdef NEWPANEL
  244. //arduino pin which triggers an piezzo beeper
  245. #define BEEPER 33 // Beeper on AUX-4
  246. #define LCD_PINS_RS 16
  247. #define LCD_PINS_ENABLE 17
  248. #define LCD_PINS_D4 23
  249. #define LCD_PINS_D5 25
  250. #define LCD_PINS_D6 27
  251. #define LCD_PINS_D7 29
  252. //buttons are directly attached using AUX-2
  253. #define BTN_EN1 44
  254. #define BTN_EN2 42
  255. #define BTN_ENC 64 //the click
  256. #define BLEN_C 2
  257. #define BLEN_B 1
  258. #define BLEN_A 0
  259. #define SDCARDDETECT 31 // Ramps does not use this port
  260. //encoder rotation values
  261. #define encrot0 0
  262. #define encrot1 2
  263. #define encrot2 3
  264. #define encrot3 1
  265. #else //old style panel with shift register
  266. //arduino pin witch triggers an piezzo beeper
  267. #define BEEPER 33 No Beeper added
  268. //buttons are attached to a shift register
  269. // Not wired this yet
  270. //#define SHIFT_CLK 38
  271. //#define SHIFT_LD 42
  272. //#define SHIFT_OUT 40
  273. //#define SHIFT_EN 17
  274. #define LCD_PINS_RS 16
  275. #define LCD_PINS_ENABLE 17
  276. #define LCD_PINS_D4 23
  277. #define LCD_PINS_D5 25
  278. #define LCD_PINS_D6 27
  279. #define LCD_PINS_D7 29
  280. //encoder rotation values
  281. #define encrot0 0
  282. #define encrot1 2
  283. #define encrot2 3
  284. #define encrot3 1
  285. //bits in the shift register that carry the buttons for:
  286. // left up center down right red
  287. #define BL_LE 7
  288. #define BL_UP 6
  289. #define BL_MI 5
  290. #define BL_DW 4
  291. #define BL_RI 3
  292. #define BL_ST 2
  293. #define BLEN_B 1
  294. #define BLEN_A 0
  295. #endif
  296. #endif //ULTRA_LCD
  297. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default
  298. #define X_STEP_PIN 26
  299. #define X_DIR_PIN 28
  300. #define X_ENABLE_PIN 24
  301. #define X_MIN_PIN 3
  302. #define X_MAX_PIN -1 //2
  303. #define Y_STEP_PIN 38
  304. #define Y_DIR_PIN 40
  305. #define Y_ENABLE_PIN 36
  306. #define Y_MIN_PIN 16
  307. #define Y_MAX_PIN -1 //17
  308. #define Z_STEP_PIN 44
  309. #define Z_DIR_PIN 46
  310. #define Z_ENABLE_PIN 42
  311. #define Z_MIN_PIN 18
  312. #define Z_MAX_PIN -1 //19
  313. #define E0_STEP_PIN 32
  314. #define E0_DIR_PIN 34
  315. #define E0_ENABLE_PIN 30
  316. #define SDPOWER 48
  317. #define SDSS 53
  318. #define LED_PIN 13
  319. #define PS_ON_PIN -1
  320. #define KILL_PIN -1
  321. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  322. #define HEATER_0_PIN 12 // RAMPS 1.0
  323. #define HEATER_BED_PIN -1 // RAMPS 1.0
  324. #define FAN_PIN 11 // RAMPS 1.0
  325. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  326. #define HEATER_0_PIN 10 // RAMPS 1.1
  327. #define HEATER_BED_PIN 8 // RAMPS 1.1
  328. #define FAN_PIN 9 // RAMPS 1.1
  329. #endif
  330. #define HEATER_1_PIN -1
  331. #define HEATER_2_PIN -1
  332. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  333. #define TEMP_1_PIN -1
  334. #define TEMP_2_PIN -1
  335. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  336. #endif
  337. // SPI for Max6675 Thermocouple
  338. #ifndef SDSUPPORT
  339. // these pins are defined in the SD library if building with SD support
  340. #define MAX_SCK_PIN 52
  341. #define MAX_MISO_PIN 50
  342. #define MAX_MOSI_PIN 51
  343. #define MAX6675_SS 53
  344. #else
  345. #define MAX6675_SS 49
  346. #endif
  347. #endif
  348. /****************************************************************************************
  349. * Duemilanove w/ ATMega328P pin assignment
  350. *
  351. ****************************************************************************************/
  352. #if MOTHERBOARD == 4
  353. #define KNOWN_BOARD 1
  354. #ifndef __AVR_ATmega328P__
  355. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  356. #endif
  357. #define X_STEP_PIN 19
  358. #define X_DIR_PIN 18
  359. #define X_ENABLE_PIN -1
  360. #define X_MIN_PIN 17
  361. #define X_MAX_PIN -1
  362. #define Y_STEP_PIN 10
  363. #define Y_DIR_PIN 7
  364. #define Y_ENABLE_PIN -1
  365. #define Y_MIN_PIN 8
  366. #define Y_MAX_PIN -1
  367. #define Z_STEP_PIN 13
  368. #define Z_DIR_PIN 3
  369. #define Z_ENABLE_PIN 2
  370. #define Z_MIN_PIN 4
  371. #define Z_MAX_PIN -1
  372. #define E0_STEP_PIN 11
  373. #define E0_DIR_PIN 12
  374. #define E0_ENABLE_PIN -1
  375. #define SDPOWER -1
  376. #define SDSS -1
  377. #define LED_PIN -1
  378. #define FAN_PIN 5
  379. #define PS_ON_PIN -1
  380. #define KILL_PIN -1
  381. #define HEATER_0_PIN 6
  382. #define HEATER_1_PIN -1
  383. #define HEATER_2_PIN -1
  384. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  385. #define TEMP_1_PIN -1
  386. #define TEMP_2_PIN -1
  387. #define HEATER_BED_PIN -1
  388. #define TEMP_BED_PIN -1
  389. #endif
  390. /****************************************************************************************
  391. * Gen6 pin assignment
  392. *
  393. ****************************************************************************************/
  394. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  395. #define KNOWN_BOARD 1
  396. #ifndef __AVR_ATmega644P__
  397. #ifndef __AVR_ATmega1284P__
  398. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  399. #endif
  400. #endif
  401. //x axis pins
  402. #define X_STEP_PIN 15
  403. #define X_DIR_PIN 18
  404. #define X_ENABLE_PIN 19
  405. #define X_MIN_PIN 20
  406. #define X_MAX_PIN -1
  407. //y axis pins
  408. #define Y_STEP_PIN 23
  409. #define Y_DIR_PIN 22
  410. #define Y_ENABLE_PIN 24
  411. #define Y_MIN_PIN 25
  412. #define Y_MAX_PIN -1
  413. //z axis pins
  414. #define Z_STEP_PIN 27
  415. #define Z_DIR_PIN 28
  416. #define Z_ENABLE_PIN 29
  417. #define Z_MIN_PIN 30
  418. #define Z_MAX_PIN -1
  419. //extruder pins
  420. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  421. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  422. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  423. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  424. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  425. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  426. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  427. #define HEATER_1_PIN -1
  428. #define HEATER_2_PIN -1
  429. #if MOTHERBOARD == 5
  430. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  431. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  432. #else
  433. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  434. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  435. #endif
  436. #define SDPOWER -1
  437. #define SDSS 17
  438. #define LED_PIN -1 //changed @ rkoeppl 20110410
  439. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  440. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  441. //our pin for debugging.
  442. #define DEBUG_PIN 0
  443. //our RS485 pins
  444. #define TX_ENABLE_PIN 12
  445. #define RX_ENABLE_PIN 13
  446. #endif
  447. /****************************************************************************************
  448. * Sanguinololu pin assignment
  449. *
  450. ****************************************************************************************/
  451. #if MOTHERBOARD == 62
  452. #undef MOTHERBOARD
  453. #define MOTHERBOARD 6
  454. #define SANGUINOLOLU_V_1_2
  455. #endif
  456. #if MOTHERBOARD == 6
  457. #define KNOWN_BOARD 1
  458. #ifndef __AVR_ATmega644P__
  459. #ifndef __AVR_ATmega1284P__
  460. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  461. #endif
  462. #endif
  463. #define X_STEP_PIN 15
  464. #define X_DIR_PIN 21
  465. #define X_MIN_PIN 18
  466. #define X_MAX_PIN -1
  467. #define Y_STEP_PIN 22
  468. #define Y_DIR_PIN 23
  469. #define Y_MIN_PIN 19
  470. #define Y_MAX_PIN -1
  471. #define Z_STEP_PIN 3
  472. #define Z_DIR_PIN 2
  473. #define Z_MIN_PIN 20
  474. #define Z_MAX_PIN -1
  475. #define E0_STEP_PIN 1
  476. #define E0_DIR_PIN 0
  477. #define LED_PIN -1
  478. #define FAN_PIN -1
  479. #define PS_ON_PIN -1
  480. #define KILL_PIN -1
  481. #define HEATER_0_PIN 13 // (extruder)
  482. #define HEATER_1_PIN -1
  483. #define HEATER_2_PIN -1
  484. #ifdef SANGUINOLOLU_V_1_2
  485. #define HEATER_BED_PIN 12 // (bed)
  486. #define X_ENABLE_PIN 14
  487. #define Y_ENABLE_PIN 14
  488. #define Z_ENABLE_PIN 26
  489. #define E0_ENABLE_PIN 14
  490. #else
  491. #define HEATER_BED_PIN 14 // (bed)
  492. #define X_ENABLE_PIN -1
  493. #define Y_ENABLE_PIN -1
  494. #define Z_ENABLE_PIN -1
  495. #define E0_ENABLE_PIN -1
  496. #endif
  497. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  498. #define TEMP_1_PIN -1
  499. #define TEMP_2_PIN -1
  500. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  501. #define SDPOWER -1
  502. #define SDSS 31
  503. #endif
  504. #if MOTHERBOARD == 7
  505. #define KNOWN_BOARD
  506. /*****************************************************************
  507. * Ultimaker pin assignment
  508. ******************************************************************/
  509. #ifndef __AVR_ATmega1280__
  510. #ifndef __AVR_ATmega2560__
  511. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  512. #endif
  513. #endif
  514. #define X_STEP_PIN 25
  515. #define X_DIR_PIN 23
  516. #define X_MIN_PIN 22
  517. #define X_MAX_PIN 24
  518. #define X_ENABLE_PIN 27
  519. #define Y_STEP_PIN 31
  520. #define Y_DIR_PIN 33
  521. #define Y_MIN_PIN 26
  522. #define Y_MAX_PIN 28
  523. #define Y_ENABLE_PIN 29
  524. #define Z_STEP_PIN 37
  525. #define Z_DIR_PIN 39
  526. #define Z_MIN_PIN 30
  527. #define Z_MAX_PIN 32
  528. #define Z_ENABLE_PIN 35
  529. #define HEATER_BED_PIN 4
  530. #define TEMP_BED_PIN 10
  531. #define HEATER_0_PIN 2
  532. #define TEMP_0_PIN 8
  533. #define HEATER_1_PIN 3
  534. #define TEMP_1_PIN 9
  535. #define HEATER_2_PIN -1
  536. #define TEMP_2_PIN -1
  537. #define E0_STEP_PIN 43
  538. #define E0_DIR_PIN 45
  539. #define E0_ENABLE_PIN 41
  540. #define E1_STEP_PIN 49
  541. #define E1_DIR_PIN 47
  542. #define E1_ENABLE_PIN 51
  543. #define SDPOWER -1
  544. #define SDSS 53
  545. #define LED_PIN 13
  546. #define FAN_PIN 7
  547. #define PS_ON_PIN 12
  548. #define KILL_PIN -1
  549. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  550. #ifdef ULTRA_LCD
  551. #ifdef NEWPANEL
  552. //arduino pin witch triggers an piezzo beeper
  553. #define BEEPER 18
  554. #define LCD_PINS_RS 20
  555. #define LCD_PINS_ENABLE 17
  556. #define LCD_PINS_D4 16
  557. #define LCD_PINS_D5 21
  558. #define LCD_PINS_D6 5
  559. #define LCD_PINS_D7 6
  560. //buttons are directly attached
  561. #define BTN_EN1 40
  562. #define BTN_EN2 42
  563. #define BTN_ENC 19 //the click
  564. #define BLEN_C 2
  565. #define BLEN_B 1
  566. #define BLEN_A 0
  567. #define SDCARDDETECT 38
  568. //encoder rotation values
  569. #define encrot0 0
  570. #define encrot1 2
  571. #define encrot2 3
  572. #define encrot3 1
  573. #else //old style panel with shift register
  574. //arduino pin witch triggers an piezzo beeper
  575. #define BEEPER 18
  576. //buttons are attached to a shift register
  577. #define SHIFT_CLK 38
  578. #define SHIFT_LD 42
  579. #define SHIFT_OUT 40
  580. #define SHIFT_EN 17
  581. #define LCD_PINS_RS 16
  582. #define LCD_PINS_ENABLE 5
  583. #define LCD_PINS_D4 6
  584. #define LCD_PINS_D5 21
  585. #define LCD_PINS_D6 20
  586. #define LCD_PINS_D7 19
  587. //encoder rotation values
  588. #define encrot0 0
  589. #define encrot1 2
  590. #define encrot2 3
  591. #define encrot3 1
  592. //bits in the shift register that carry the buttons for:
  593. // left up center down right red
  594. #define BL_LE 7
  595. #define BL_UP 6
  596. #define BL_MI 5
  597. #define BL_DW 4
  598. #define BL_RI 3
  599. #define BL_ST 2
  600. #define BLEN_B 1
  601. #define BLEN_A 0
  602. #endif
  603. #endif //ULTRA_LCD
  604. #endif
  605. #if MOTHERBOARD == 71
  606. #define KNOWN_BOARD
  607. /*****************************************************************
  608. * Ultimaker pin assignment (Old electronics)
  609. ******************************************************************/
  610. #ifndef __AVR_ATmega1280__
  611. #ifndef __AVR_ATmega2560__
  612. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  613. #endif
  614. #endif
  615. #define X_STEP_PIN 25
  616. #define X_DIR_PIN 23
  617. #define X_MIN_PIN 15
  618. #define X_MAX_PIN 14
  619. #define X_ENABLE_PIN 27
  620. #define Y_STEP_PIN 31
  621. #define Y_DIR_PIN 33
  622. #define Y_MIN_PIN 17
  623. #define Y_MAX_PIN 16
  624. #define Y_ENABLE_PIN 29
  625. #define Z_STEP_PIN 37
  626. #define Z_DIR_PIN 39
  627. #define Z_MIN_PIN 19
  628. #define Z_MAX_PIN 18
  629. #define Z_ENABLE_PIN 35
  630. #define HEATER_BED_PIN -1
  631. #define TEMP_BED_PIN -1
  632. #define HEATER_0_PIN 2
  633. #define TEMP_0_PIN 8
  634. #define HEATER_1_PIN 1
  635. #define TEMP_1_PIN 1
  636. #define HEATER_2_PIN -1
  637. #define TEMP_2_PIN -1
  638. #define E0_STEP_PIN 43
  639. #define E0_DIR_PIN 45
  640. #define E0_ENABLE_PIN 41
  641. #define E1_STEP_PIN -1
  642. #define E1_DIR_PIN -1
  643. #define E1_ENABLE_PIN -1
  644. #define SDPOWER -1
  645. #define SDSS -1
  646. #define LED_PIN -1
  647. #define FAN_PIN -1
  648. #define PS_ON_PIN -1
  649. #define KILL_PIN -1
  650. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  651. #define LCD_PINS_RS 24
  652. #define LCD_PINS_ENABLE 22
  653. #define LCD_PINS_D4 36
  654. #define LCD_PINS_D5 34
  655. #define LCD_PINS_D6 32
  656. #define LCD_PINS_D7 30
  657. #endif
  658. /****************************************************************************************
  659. * Teensylu 0.7 pin assingments (ATMEGA90USB)
  660. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  661. ****************************************************************************************/
  662. #if MOTHERBOARD == 8
  663. #define MOTHERBOARD 8
  664. #define KNOWN_BOARD 1
  665. #define X_STEP_PIN 0
  666. #define X_DIR_PIN 1
  667. #define X_ENABLE_PIN 39
  668. #define X_MIN_PIN 13
  669. #define X_MAX_PIN -1
  670. #define Y_STEP_PIN 2
  671. #define Y_DIR_PIN 3
  672. #define Y_ENABLE_PIN 38
  673. #define Y_MIN_PIN 14
  674. #define Y_MAX_PIN -1
  675. #define Z_STEP_PIN 4
  676. #define Z_DIR_PIN 5
  677. #define Z_ENABLE_PIN 23
  678. #define Z_MIN_PIN 15
  679. #define Z_MAX_PIN -1
  680. #define E0_STEP_PIN 6
  681. #define E0_DIR_PIN 7
  682. #define E0_ENABLE_PIN 19
  683. #define HEATER_0_PIN 21 // Extruder
  684. #define HEATER_1_PIN -1
  685. #define HEATER_2_PIN -1
  686. #define HEATER_BED_PIN 20 // Bed
  687. #define FAN_PIN 22 // Fan
  688. #define TEMP_0_PIN 7 // Extruder
  689. #define TEMP_1_PIN -1
  690. #define TEMP_2_PIN -1
  691. #define TEMP_BED_PIN 6 // Bed
  692. #define SDPOWER -1
  693. #define SDSS 8
  694. #define LED_PIN -1
  695. #define PS_ON_PIN -1
  696. #define KILL_PIN -1
  697. #define ALARM_PIN -1
  698. #ifndef SDSUPPORT
  699. // these pins are defined in the SD library if building with SD support
  700. #define SCK_PIN 9
  701. #define MISO_PIN 11
  702. #define MOSI_PIN 10
  703. #endif
  704. #endif
  705. /****************************************************************************************
  706. * Gen3+ pin assignment
  707. *
  708. ****************************************************************************************/
  709. #if MOTHERBOARD == 9
  710. #define MOTHERBOARD 6
  711. #define KNOWN_BOARD 1
  712. #ifndef __AVR_ATmega644P__
  713. #ifndef __AVR_ATmega1284P__
  714. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  715. #endif
  716. #endif
  717. #define X_STEP_PIN 15
  718. #define X_DIR_PIN 18
  719. #define X_MIN_PIN 20
  720. #define X_MAX_PIN -1
  721. #define Y_STEP_PIN 23
  722. #define Y_DIR_PIN 22
  723. #define Y_MIN_PIN 25
  724. #define Y_MAX_PIN -1
  725. #define Z_STEP_PIN 27
  726. #define Z_DIR_PIN 28
  727. #define Z_MIN_PIN 30
  728. #define Z_MAX_PIN -1
  729. #define E_STEP_PIN 17
  730. #define E_DIR_PIN 21
  731. #define LED_PIN -1
  732. #define FAN_PIN -1
  733. #define PS_ON_PIN 14
  734. #define KILL_PIN -1
  735. #define HEATER_0_PIN 12 // (extruder)
  736. #define HEATER_1_PIN 16 // (bed)
  737. #define X_ENABLE_PIN 19
  738. #define Y_ENABLE_PIN 24
  739. #define Z_ENABLE_PIN 29
  740. #define E_ENABLE_PIN 13
  741. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  742. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  743. #define TEMP_2_PIN -1
  744. #define SDPOWER -1
  745. #define SDSS 4
  746. #define HEATER_2_PIN -1
  747. #endif
  748. #ifndef KNOWN_BOARD
  749. #error Unknown MOTHERBOARD value in configuration.h
  750. #endif
  751. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  752. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN
  753. #if EXTRUDERS == 3
  754. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN
  755. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN
  756. #elif EXTRUDERS == 2
  757. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN
  758. #define _E2_PINS -1
  759. #elif EXTRUDERS == 1
  760. #define _E1_PINS -1
  761. #define _E2_PINS -1
  762. #else
  763. #error Unsupported number of extruders
  764. #endif
  765. #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, LED_PIN, PS_ON_PIN, \
  766. HEATER_0_PIN, HEATER_1_PIN, HEATER_2_PIN, \
  767. HEATER_BED_PIN, FAN_PIN, \
  768. _E0_PINS, _E1_PINS, _E2_PINS, \
  769. TEMP_0_PIN, TEMP_1_PIN, TEMP_2_PIN, TEMP_BED_PIN }
  770. #endif