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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  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 0
  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. #if 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 37
  254. #define BTN_EN2 35
  255. #define BTN_ENC 31 //the click
  256. #define BLEN_C 2
  257. #define BLEN_B 1
  258. #define BLEN_A 0
  259. #define SDCARDDETECT -1 // 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 == 63
  452. #define MELZI
  453. #endif
  454. #if MOTHERBOARD == 62 || MOTHERBOARD == 63
  455. #undef MOTHERBOARD
  456. #define MOTHERBOARD 6
  457. #define SANGUINOLOLU_V_1_2
  458. #endif
  459. #if MOTHERBOARD == 6
  460. #define KNOWN_BOARD 1
  461. #ifndef __AVR_ATmega644P__
  462. #ifndef __AVR_ATmega1284P__
  463. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  464. #endif
  465. #endif
  466. #define X_STEP_PIN 15
  467. #define X_DIR_PIN 21
  468. #if X_HOME_DIR < 0
  469. # define X_MIN_PIN 18
  470. # define X_MAX_PIN -1
  471. #else
  472. # define X_MIN_PIN -1
  473. # define X_MAX_PIN 18
  474. #endif
  475. #define Y_STEP_PIN 22
  476. #define Y_DIR_PIN 23
  477. #if Y_HOME_DIR < 0
  478. # define Y_MIN_PIN 19
  479. # define Y_MAX_PIN -1
  480. #else
  481. # define Y_MIN_PIN -1
  482. # define Y_MAX_PIN 19
  483. #endif
  484. #define Z_STEP_PIN 3
  485. #define Z_DIR_PIN 2
  486. #if Z_HOME_DIR < 0
  487. # define Z_MIN_PIN 20
  488. # define Z_MAX_PIN -1
  489. #else
  490. # define Z_MIN_PIN -1
  491. # define Z_MAX_PIN 20
  492. #endif
  493. #define E0_STEP_PIN 1
  494. #define E0_DIR_PIN 0
  495. #define LED_PIN -1
  496. #define FAN_PIN -1
  497. #ifdef MELZI
  498. #define LED_PIN 28
  499. #define FAN_PIN 4
  500. #endif
  501. #define PS_ON_PIN -1
  502. #define KILL_PIN -1
  503. #define HEATER_0_PIN 13 // (extruder)
  504. #define HEATER_1_PIN -1
  505. #define HEATER_2_PIN -1
  506. #ifdef SANGUINOLOLU_V_1_2
  507. #define HEATER_BED_PIN 12 // (bed)
  508. #define X_ENABLE_PIN 14
  509. #define Y_ENABLE_PIN 14
  510. #define Z_ENABLE_PIN 26
  511. #define E0_ENABLE_PIN 14
  512. #else
  513. #define HEATER_BED_PIN 14 // (bed)
  514. #define X_ENABLE_PIN -1
  515. #define Y_ENABLE_PIN -1
  516. #define Z_ENABLE_PIN -1
  517. #define E0_ENABLE_PIN -1
  518. #endif
  519. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  520. #define TEMP_1_PIN -1
  521. #define TEMP_2_PIN -1
  522. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  523. #define SDPOWER -1
  524. #define SDSS 31
  525. #ifdef MELZI
  526. #define SDSS 24
  527. #endif
  528. #endif
  529. #if MOTHERBOARD == 7
  530. #define KNOWN_BOARD
  531. /*****************************************************************
  532. * Ultimaker pin assignment
  533. ******************************************************************/
  534. #ifndef __AVR_ATmega1280__
  535. #ifndef __AVR_ATmega2560__
  536. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  537. #endif
  538. #endif
  539. #define X_STEP_PIN 25
  540. #define X_DIR_PIN 23
  541. #define X_MIN_PIN 22
  542. #define X_MAX_PIN 24
  543. #define X_ENABLE_PIN 27
  544. #define Y_STEP_PIN 31
  545. #define Y_DIR_PIN 33
  546. #define Y_MIN_PIN 26
  547. #define Y_MAX_PIN 28
  548. #define Y_ENABLE_PIN 29
  549. #define Z_STEP_PIN 37
  550. #define Z_DIR_PIN 39
  551. #define Z_MIN_PIN 30
  552. #define Z_MAX_PIN 32
  553. #define Z_ENABLE_PIN 35
  554. #define HEATER_BED_PIN 4
  555. #define TEMP_BED_PIN 10
  556. #define HEATER_0_PIN 2
  557. #define TEMP_0_PIN 8
  558. #define HEATER_1_PIN 3
  559. #define TEMP_1_PIN 9
  560. #define HEATER_2_PIN -1
  561. #define TEMP_2_PIN -1
  562. #define E0_STEP_PIN 43
  563. #define E0_DIR_PIN 45
  564. #define E0_ENABLE_PIN 41
  565. #define E1_STEP_PIN 49
  566. #define E1_DIR_PIN 47
  567. #define E1_ENABLE_PIN 48
  568. #define SDPOWER -1
  569. #define SDSS 53
  570. #define LED_PIN 13
  571. #define FAN_PIN 7
  572. #define PS_ON_PIN 12
  573. #define KILL_PIN -1
  574. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  575. #ifdef ULTRA_LCD
  576. #ifdef NEWPANEL
  577. //arduino pin witch triggers an piezzo beeper
  578. #define BEEPER 18
  579. #define LCD_PINS_RS 20
  580. #define LCD_PINS_ENABLE 17
  581. #define LCD_PINS_D4 16
  582. #define LCD_PINS_D5 21
  583. #define LCD_PINS_D6 5
  584. #define LCD_PINS_D7 6
  585. //buttons are directly attached
  586. #define BTN_EN1 40
  587. #define BTN_EN2 42
  588. #define BTN_ENC 19 //the click
  589. #define BLEN_C 2
  590. #define BLEN_B 1
  591. #define BLEN_A 0
  592. #define SDCARDDETECT 38
  593. //encoder rotation values
  594. #define encrot0 0
  595. #define encrot1 2
  596. #define encrot2 3
  597. #define encrot3 1
  598. #else //old style panel with shift register
  599. //arduino pin witch triggers an piezzo beeper
  600. #define BEEPER 18
  601. //buttons are attached to a shift register
  602. #define SHIFT_CLK 38
  603. #define SHIFT_LD 42
  604. #define SHIFT_OUT 40
  605. #define SHIFT_EN 17
  606. #define LCD_PINS_RS 16
  607. #define LCD_PINS_ENABLE 5
  608. #define LCD_PINS_D4 6
  609. #define LCD_PINS_D5 21
  610. #define LCD_PINS_D6 20
  611. #define LCD_PINS_D7 19
  612. //encoder rotation values
  613. #ifndef ULTIMAKERCONTROLLER
  614. #define encrot0 0
  615. #define encrot1 2
  616. #define encrot2 3
  617. #define encrot3 1
  618. #else
  619. #define encrot0 0
  620. #define encrot1 1
  621. #define encrot2 3
  622. #define encrot3 2
  623. #endif
  624. #define SDCARDDETECT -1
  625. //bits in the shift register that carry the buttons for:
  626. // left up center down right red
  627. #define BL_LE 7
  628. #define BL_UP 6
  629. #define BL_MI 5
  630. #define BL_DW 4
  631. #define BL_RI 3
  632. #define BL_ST 2
  633. #define BLEN_B 1
  634. #define BLEN_A 0
  635. #endif
  636. #endif //ULTRA_LCD
  637. #endif
  638. #if MOTHERBOARD == 71
  639. #define KNOWN_BOARD
  640. /*****************************************************************
  641. * Ultimaker pin assignment (Old electronics)
  642. ******************************************************************/
  643. #ifndef __AVR_ATmega1280__
  644. #ifndef __AVR_ATmega2560__
  645. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  646. #endif
  647. #endif
  648. #define X_STEP_PIN 25
  649. #define X_DIR_PIN 23
  650. #define X_MIN_PIN 15
  651. #define X_MAX_PIN 14
  652. #define X_ENABLE_PIN 27
  653. #define Y_STEP_PIN 31
  654. #define Y_DIR_PIN 33
  655. #define Y_MIN_PIN 17
  656. #define Y_MAX_PIN 16
  657. #define Y_ENABLE_PIN 29
  658. #define Z_STEP_PIN 37
  659. #define Z_DIR_PIN 39
  660. #define Z_MIN_PIN 19
  661. #define Z_MAX_PIN 18
  662. #define Z_ENABLE_PIN 35
  663. #define HEATER_BED_PIN -1
  664. #define TEMP_BED_PIN -1
  665. #define HEATER_0_PIN 2
  666. #define TEMP_0_PIN 8
  667. #define HEATER_1_PIN 1
  668. #define TEMP_1_PIN 1
  669. #define HEATER_2_PIN -1
  670. #define TEMP_2_PIN -1
  671. #define E0_STEP_PIN 43
  672. #define E0_DIR_PIN 45
  673. #define E0_ENABLE_PIN 41
  674. #define E1_STEP_PIN -1
  675. #define E1_DIR_PIN -1
  676. #define E1_ENABLE_PIN -1
  677. #define SDPOWER -1
  678. #define SDSS -1
  679. #define LED_PIN -1
  680. #define FAN_PIN -1
  681. #define PS_ON_PIN -1
  682. #define KILL_PIN -1
  683. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  684. #define LCD_PINS_RS 24
  685. #define LCD_PINS_ENABLE 22
  686. #define LCD_PINS_D4 36
  687. #define LCD_PINS_D5 34
  688. #define LCD_PINS_D6 32
  689. #define LCD_PINS_D7 30
  690. #endif
  691. /****************************************************************************************
  692. * Teensylu 0.7 pin assingments (ATMEGA90USB)
  693. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  694. ****************************************************************************************/
  695. #if MOTHERBOARD == 8
  696. #define MOTHERBOARD 8
  697. #define KNOWN_BOARD 1
  698. #define X_STEP_PIN 0
  699. #define X_DIR_PIN 1
  700. #define X_ENABLE_PIN 39
  701. #define X_MIN_PIN 13
  702. #define X_MAX_PIN -1
  703. #define Y_STEP_PIN 2
  704. #define Y_DIR_PIN 3
  705. #define Y_ENABLE_PIN 38
  706. #define Y_MIN_PIN 14
  707. #define Y_MAX_PIN -1
  708. #define Z_STEP_PIN 4
  709. #define Z_DIR_PIN 5
  710. #define Z_ENABLE_PIN 23
  711. #define Z_MIN_PIN 15
  712. #define Z_MAX_PIN -1
  713. #define E0_STEP_PIN 6
  714. #define E0_DIR_PIN 7
  715. #define E0_ENABLE_PIN 19
  716. #define HEATER_0_PIN 21 // Extruder
  717. #define HEATER_1_PIN -1
  718. #define HEATER_2_PIN -1
  719. #define HEATER_BED_PIN 20 // Bed
  720. #define FAN_PIN 22 // Fan
  721. #define TEMP_0_PIN 7 // Extruder
  722. #define TEMP_1_PIN -1
  723. #define TEMP_2_PIN -1
  724. #define TEMP_BED_PIN 6 // Bed
  725. #define SDPOWER -1
  726. #define SDSS 8
  727. #define LED_PIN -1
  728. #define PS_ON_PIN -1
  729. #define KILL_PIN -1
  730. #define ALARM_PIN -1
  731. #ifndef SDSUPPORT
  732. // these pins are defined in the SD library if building with SD support
  733. #define SCK_PIN 9
  734. #define MISO_PIN 11
  735. #define MOSI_PIN 10
  736. #endif
  737. #endif
  738. /****************************************************************************************
  739. * Gen3+ pin assignment
  740. *
  741. ****************************************************************************************/
  742. #if MOTHERBOARD == 9
  743. #define MOTHERBOARD 6
  744. #define KNOWN_BOARD 1
  745. #ifndef __AVR_ATmega644P__
  746. #ifndef __AVR_ATmega1284P__
  747. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  748. #endif
  749. #endif
  750. #define X_STEP_PIN 15
  751. #define X_DIR_PIN 18
  752. #define X_MIN_PIN 20
  753. #define X_MAX_PIN -1
  754. #define Y_STEP_PIN 23
  755. #define Y_DIR_PIN 22
  756. #define Y_MIN_PIN 25
  757. #define Y_MAX_PIN -1
  758. #define Z_STEP_PIN 27
  759. #define Z_DIR_PIN 28
  760. #define Z_MIN_PIN 30
  761. #define Z_MAX_PIN -1
  762. #define E_STEP_PIN 17
  763. #define E_DIR_PIN 21
  764. #define LED_PIN -1
  765. #define FAN_PIN -1
  766. #define PS_ON_PIN 14
  767. #define KILL_PIN -1
  768. #define HEATER_0_PIN 12 // (extruder)
  769. #define HEATER_1_PIN 16 // (bed)
  770. #define X_ENABLE_PIN 19
  771. #define Y_ENABLE_PIN 24
  772. #define Z_ENABLE_PIN 29
  773. #define E_ENABLE_PIN 13
  774. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  775. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  776. #define TEMP_2_PIN -1
  777. #define SDPOWER -1
  778. #define SDSS 4
  779. #define HEATER_2_PIN -1
  780. #endif
  781. /****************************************************************************************
  782. * Open Motion controller with enable based extruders
  783. *
  784. * ATMega644
  785. *
  786. * +---\/---+
  787. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  788. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  789. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  790. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  791. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  792. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  793. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  794. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  795. * RST 9| |32 AREF
  796. * VCC 10| |31 GND
  797. * GND 11| |30 AVCC
  798. * XTAL2 12| |29 PC7 (D 23)
  799. * XTAL1 13| |28 PC6 (D 22)
  800. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  801. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  802. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  803. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  804. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  805. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  806. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  807. * +--------+
  808. *
  809. ****************************************************************************************/
  810. #if MOTHERBOARD == 90 //Alpha OMCA board
  811. #define KNOWN_BOARD 1
  812. #ifndef __AVR_ATmega644__
  813. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  814. #endif
  815. #define X_STEP_PIN 21
  816. #define X_DIR_PIN 20
  817. #define X_ENABLE_PIN 24
  818. #define X_MIN_PIN 0
  819. #define X_MAX_PIN -1
  820. #define Y_STEP_PIN 23
  821. #define Y_DIR_PIN 22
  822. #define Y_ENABLE_PIN 24
  823. #define Y_MIN_PIN 1
  824. #define Y_MAX_PIN -1
  825. #define Z_STEP_PIN 26
  826. #define Z_DIR_PIN 25
  827. #define Z_ENABLE_PIN 24
  828. #define Z_MIN_PIN 2
  829. #define Z_MAX_PIN -1
  830. #define E0_STEP_PIN 28
  831. #define E0_DIR_PIN 27
  832. #define E0_ENABLE_PIN 24
  833. #define E1_STEP_PIN -1 // 19
  834. #define E1_DIR_PIN -1 // 18
  835. #define E1_ENABLE_PIN 24
  836. #define E2_STEP_PIN -1 // 17
  837. #define E2_DIR_PIN -1 // 16
  838. #define E2_ENABLE_PIN 24
  839. #define SDPOWER -1
  840. #define SDSS 11
  841. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  842. #define LED_PIN -1
  843. #define FAN_PIN 3
  844. #define PS_ON_PIN -1
  845. #define KILL_PIN -1
  846. #define HEATER_0_PIN 4
  847. #define HEATER_1_PIN -1 // 12
  848. #define HEATER_2_PIN -1 // 13
  849. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  850. #define TEMP_1_PIN -1 // 1
  851. #define TEMP_2_PIN -1 // 2
  852. #define HEATER_BED_PIN -1 // 14/15
  853. #define TEMP_BED_PIN -1 // 1,2 or I2C
  854. /* 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) */
  855. #endif
  856. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  857. #define KNOWN_BOARD 1
  858. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  859. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  860. #endif
  861. #define X_STEP_PIN 26
  862. #define X_DIR_PIN 25
  863. #define X_ENABLE_PIN 10
  864. #define X_MIN_PIN 0
  865. #define X_MAX_PIN -1
  866. #define Y_STEP_PIN 28
  867. #define Y_DIR_PIN 27
  868. #define Y_ENABLE_PIN 10
  869. #define Y_MIN_PIN 1
  870. #define Y_MAX_PIN -1
  871. #define Z_STEP_PIN 23
  872. #define Z_DIR_PIN 22
  873. #define Z_ENABLE_PIN 10
  874. #define Z_MIN_PIN 2
  875. #define Z_MAX_PIN -1
  876. #define E0_STEP_PIN 24
  877. #define E0_DIR_PIN 21
  878. #define E0_ENABLE_PIN 10
  879. /* future proofing */
  880. #define __FS 20
  881. #define __FD 19
  882. #define __GS 18
  883. #define __GD 13
  884. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  885. #define E1_STEP_PIN -1 // 21
  886. #define E1_DIR_PIN -1 // 20
  887. #define E1_ENABLE_PIN -1 // 19
  888. #define E2_STEP_PIN -1 // 21
  889. #define E2_DIR_PIN -1 // 20
  890. #define E2_ENABLE_PIN -1 // 18
  891. #define SDPOWER -1
  892. #define SDSS 11
  893. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  894. #define LED_PIN -1
  895. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  896. #define PS_ON_PIN -1
  897. #define KILL_PIN -1
  898. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  899. #define HEATER_1_PIN -1
  900. #define HEATER_2_PIN -1
  901. #define HEATER_1_PIN -1
  902. #define HEATER_2_PIN -1
  903. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  904. #define TEMP_1_PIN 1 // ANALOG
  905. #define TEMP_2_PIN -1 // 2
  906. #define HEATER_BED_PIN 4
  907. #define TEMP_BED_PIN 2 // 1,2 or I2C
  908. #define I2C_SCL 16
  909. #define I2C_SDA 17
  910. #endif
  911. #ifndef KNOWN_BOARD
  912. #error Unknown MOTHERBOARD value in configuration.h
  913. #endif
  914. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  915. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  916. #if EXTRUDERS > 1
  917. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  918. #else
  919. #define _E1_PINS
  920. #endif
  921. #if EXTRUDERS > 2
  922. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  923. #else
  924. #define _E2_PINS
  925. #endif
  926. #ifdef DISABLE_MAX_ENDSTOPS
  927. #define X_MAX_PIN -1
  928. #define Y_MAX_PIN -1
  929. #define Z_MAX_PIN -1
  930. #endif
  931. #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, \
  932. HEATER_BED_PIN, FAN_PIN, \
  933. _E0_PINS _E1_PINS _E2_PINS \
  934. TEMP_0_PIN, TEMP_1_PIN, TEMP_2_PIN, TEMP_BED_PIN }
  935. #endif