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 24KB

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