My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159
  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 Z2_STEP_PIN 36
  215. #define Z2_DIR_PIN 34
  216. #define Z2_ENABLE_PIN 30
  217. #define E0_STEP_PIN 26
  218. #define E0_DIR_PIN 28
  219. #define E0_ENABLE_PIN 24
  220. #define E1_STEP_PIN 36
  221. #define E1_DIR_PIN 34
  222. #define E1_ENABLE_PIN 30
  223. #define SDPOWER -1
  224. #define SDSS 53
  225. #define LED_PIN 13
  226. #if MOTHERBOARD == 33
  227. #define FAN_PIN 9 // (Sprinter config)
  228. #else
  229. #define FAN_PIN 4 // IO pin. Buffer needed
  230. #endif
  231. #define PS_ON_PIN 12
  232. #define KILL_PIN -1
  233. #define HEATER_0_PIN 10 // EXTRUDER 1
  234. #if MOTHERBOARD == 33
  235. #define HEATER_1_PIN -1
  236. #else
  237. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  238. #endif
  239. #define HEATER_2_PIN -1
  240. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  241. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  242. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  243. #define HEATER_BED_PIN 8 // BED
  244. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  245. #ifdef ULTRA_LCD
  246. #ifdef NEWPANEL
  247. //arduino pin which triggers an piezzo beeper
  248. #define BEEPER 33 // Beeper on AUX-4
  249. #define LCD_PINS_RS 16
  250. #define LCD_PINS_ENABLE 17
  251. #define LCD_PINS_D4 23
  252. #define LCD_PINS_D5 25
  253. #define LCD_PINS_D6 27
  254. #define LCD_PINS_D7 29
  255. //buttons are directly attached using AUX-2
  256. #define BTN_EN1 37
  257. #define BTN_EN2 35
  258. #define BTN_ENC 31 //the click
  259. #define BLEN_C 2
  260. #define BLEN_B 1
  261. #define BLEN_A 0
  262. #define SDCARDDETECT -1 // Ramps does not use this port
  263. //encoder rotation values
  264. #define encrot0 0
  265. #define encrot1 2
  266. #define encrot2 3
  267. #define encrot3 1
  268. #else //old style panel with shift register
  269. //arduino pin witch triggers an piezzo beeper
  270. #define BEEPER 33 No Beeper added
  271. //buttons are attached to a shift register
  272. // Not wired this yet
  273. //#define SHIFT_CLK 38
  274. //#define SHIFT_LD 42
  275. //#define SHIFT_OUT 40
  276. //#define SHIFT_EN 17
  277. #define LCD_PINS_RS 16
  278. #define LCD_PINS_ENABLE 17
  279. #define LCD_PINS_D4 23
  280. #define LCD_PINS_D5 25
  281. #define LCD_PINS_D6 27
  282. #define LCD_PINS_D7 29
  283. //encoder rotation values
  284. #define encrot0 0
  285. #define encrot1 2
  286. #define encrot2 3
  287. #define encrot3 1
  288. //bits in the shift register that carry the buttons for:
  289. // left up center down right red
  290. #define BL_LE 7
  291. #define BL_UP 6
  292. #define BL_MI 5
  293. #define BL_DW 4
  294. #define BL_RI 3
  295. #define BL_ST 2
  296. #define BLEN_B 1
  297. #define BLEN_A 0
  298. #endif
  299. #endif //ULTRA_LCD
  300. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default
  301. #define X_STEP_PIN 26
  302. #define X_DIR_PIN 28
  303. #define X_ENABLE_PIN 24
  304. #define X_MIN_PIN 3
  305. #define X_MAX_PIN -1 //2
  306. #define Y_STEP_PIN 38
  307. #define Y_DIR_PIN 40
  308. #define Y_ENABLE_PIN 36
  309. #define Y_MIN_PIN 16
  310. #define Y_MAX_PIN -1 //17
  311. #define Z_STEP_PIN 44
  312. #define Z_DIR_PIN 46
  313. #define Z_ENABLE_PIN 42
  314. #define Z_MIN_PIN 18
  315. #define Z_MAX_PIN -1 //19
  316. #define E0_STEP_PIN 32
  317. #define E0_DIR_PIN 34
  318. #define E0_ENABLE_PIN 30
  319. #define SDPOWER 48
  320. #define SDSS 53
  321. #define LED_PIN 13
  322. #define PS_ON_PIN -1
  323. #define KILL_PIN -1
  324. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  325. #define HEATER_0_PIN 12 // RAMPS 1.0
  326. #define HEATER_BED_PIN -1 // RAMPS 1.0
  327. #define FAN_PIN 11 // RAMPS 1.0
  328. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  329. #define HEATER_0_PIN 10 // RAMPS 1.1
  330. #define HEATER_BED_PIN 8 // RAMPS 1.1
  331. #define FAN_PIN 9 // RAMPS 1.1
  332. #endif
  333. #define HEATER_1_PIN -1
  334. #define HEATER_2_PIN -1
  335. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  336. #define TEMP_1_PIN -1
  337. #define TEMP_2_PIN -1
  338. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  339. #endif
  340. // SPI for Max6675 Thermocouple
  341. #ifndef SDSUPPORT
  342. // these pins are defined in the SD library if building with SD support
  343. #define MAX_SCK_PIN 52
  344. #define MAX_MISO_PIN 50
  345. #define MAX_MOSI_PIN 51
  346. #define MAX6675_SS 53
  347. #else
  348. #define MAX6675_SS 49
  349. #endif
  350. #endif
  351. /****************************************************************************************
  352. * Duemilanove w/ ATMega328P pin assignment
  353. *
  354. ****************************************************************************************/
  355. #if MOTHERBOARD == 4
  356. #define KNOWN_BOARD 1
  357. #ifndef __AVR_ATmega328P__
  358. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  359. #endif
  360. #define X_STEP_PIN 19
  361. #define X_DIR_PIN 18
  362. #define X_ENABLE_PIN -1
  363. #define X_MIN_PIN 17
  364. #define X_MAX_PIN -1
  365. #define Y_STEP_PIN 10
  366. #define Y_DIR_PIN 7
  367. #define Y_ENABLE_PIN -1
  368. #define Y_MIN_PIN 8
  369. #define Y_MAX_PIN -1
  370. #define Z_STEP_PIN 13
  371. #define Z_DIR_PIN 3
  372. #define Z_ENABLE_PIN 2
  373. #define Z_MIN_PIN 4
  374. #define Z_MAX_PIN -1
  375. #define E0_STEP_PIN 11
  376. #define E0_DIR_PIN 12
  377. #define E0_ENABLE_PIN -1
  378. #define SDPOWER -1
  379. #define SDSS -1
  380. #define LED_PIN -1
  381. #define FAN_PIN 5
  382. #define PS_ON_PIN -1
  383. #define KILL_PIN -1
  384. #define HEATER_0_PIN 6
  385. #define HEATER_1_PIN -1
  386. #define HEATER_2_PIN -1
  387. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  388. #define TEMP_1_PIN -1
  389. #define TEMP_2_PIN -1
  390. #define HEATER_BED_PIN -1
  391. #define TEMP_BED_PIN -1
  392. #endif
  393. /****************************************************************************************
  394. * Gen6 pin assignment
  395. *
  396. ****************************************************************************************/
  397. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  398. #define KNOWN_BOARD 1
  399. #ifndef __AVR_ATmega644P__
  400. #ifndef __AVR_ATmega1284P__
  401. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  402. #endif
  403. #endif
  404. //x axis pins
  405. #define X_STEP_PIN 15
  406. #define X_DIR_PIN 18
  407. #define X_ENABLE_PIN 19
  408. #define X_MIN_PIN 20
  409. #define X_MAX_PIN -1
  410. //y axis pins
  411. #define Y_STEP_PIN 23
  412. #define Y_DIR_PIN 22
  413. #define Y_ENABLE_PIN 24
  414. #define Y_MIN_PIN 25
  415. #define Y_MAX_PIN -1
  416. //z axis pins
  417. #define Z_STEP_PIN 27
  418. #define Z_DIR_PIN 28
  419. #define Z_ENABLE_PIN 29
  420. #define Z_MIN_PIN 30
  421. #define Z_MAX_PIN -1
  422. //extruder pins
  423. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  424. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  425. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  426. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  427. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  428. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  429. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  430. #define HEATER_1_PIN -1
  431. #define HEATER_2_PIN -1
  432. #if MOTHERBOARD == 5
  433. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  434. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  435. #else
  436. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  437. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  438. #endif
  439. #define SDPOWER -1
  440. #define SDSS 17
  441. #define LED_PIN -1 //changed @ rkoeppl 20110410
  442. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  443. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  444. //our pin for debugging.
  445. #define DEBUG_PIN 0
  446. //our RS485 pins
  447. #define TX_ENABLE_PIN 12
  448. #define RX_ENABLE_PIN 13
  449. #endif
  450. /****************************************************************************************
  451. * Sanguinololu pin assignment
  452. *
  453. ****************************************************************************************/
  454. #if MOTHERBOARD == 63
  455. #define MELZI
  456. #endif
  457. #if MOTHERBOARD == 62 || MOTHERBOARD == 63
  458. #undef MOTHERBOARD
  459. #define MOTHERBOARD 6
  460. #define SANGUINOLOLU_V_1_2
  461. #endif
  462. #if MOTHERBOARD == 6
  463. #define KNOWN_BOARD 1
  464. #ifndef __AVR_ATmega644P__
  465. #ifndef __AVR_ATmega1284P__
  466. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  467. #endif
  468. #endif
  469. #define X_STEP_PIN 15
  470. #define X_DIR_PIN 21
  471. #if X_HOME_DIR < 0
  472. # define X_MIN_PIN 18
  473. # define X_MAX_PIN -1
  474. #else
  475. # define X_MIN_PIN -1
  476. # define X_MAX_PIN 18
  477. #endif
  478. #define Y_STEP_PIN 22
  479. #define Y_DIR_PIN 23
  480. #if Y_HOME_DIR < 0
  481. # define Y_MIN_PIN 19
  482. # define Y_MAX_PIN -1
  483. #else
  484. # define Y_MIN_PIN -1
  485. # define Y_MAX_PIN 19
  486. #endif
  487. #define Z_STEP_PIN 3
  488. #define Z_DIR_PIN 2
  489. #if Z_HOME_DIR < 0
  490. # define Z_MIN_PIN 20
  491. # define Z_MAX_PIN -1
  492. #else
  493. # define Z_MIN_PIN -1
  494. # define Z_MAX_PIN 20
  495. #endif
  496. #define E0_STEP_PIN 1
  497. #define E0_DIR_PIN 0
  498. #define LED_PIN -1
  499. #define FAN_PIN -1
  500. #ifdef MELZI
  501. #define LED_PIN 28
  502. #define FAN_PIN 4
  503. #endif
  504. #define PS_ON_PIN -1
  505. #define KILL_PIN -1
  506. #define HEATER_0_PIN 13 // (extruder)
  507. #define HEATER_1_PIN -1
  508. #define HEATER_2_PIN -1
  509. #ifdef SANGUINOLOLU_V_1_2
  510. #define HEATER_BED_PIN 12 // (bed)
  511. #define X_ENABLE_PIN 14
  512. #define Y_ENABLE_PIN 14
  513. #define Z_ENABLE_PIN 26
  514. #define E0_ENABLE_PIN 14
  515. #else
  516. #define HEATER_BED_PIN 14 // (bed)
  517. #define X_ENABLE_PIN -1
  518. #define Y_ENABLE_PIN -1
  519. #define Z_ENABLE_PIN -1
  520. #define E0_ENABLE_PIN -1
  521. #endif
  522. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  523. #define TEMP_1_PIN -1
  524. #define TEMP_2_PIN -1
  525. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  526. #define SDPOWER -1
  527. #define SDSS 31
  528. #ifdef MELZI
  529. #define SDSS 24
  530. #endif
  531. #endif
  532. #if MOTHERBOARD == 7
  533. #define KNOWN_BOARD
  534. /*****************************************************************
  535. * Ultimaker pin assignment
  536. ******************************************************************/
  537. #ifndef __AVR_ATmega1280__
  538. #ifndef __AVR_ATmega2560__
  539. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  540. #endif
  541. #endif
  542. #define X_STEP_PIN 25
  543. #define X_DIR_PIN 23
  544. #define X_MIN_PIN 22
  545. #define X_MAX_PIN 24
  546. #define X_ENABLE_PIN 27
  547. #define Y_STEP_PIN 31
  548. #define Y_DIR_PIN 33
  549. #define Y_MIN_PIN 26
  550. #define Y_MAX_PIN 28
  551. #define Y_ENABLE_PIN 29
  552. #define Z_STEP_PIN 37
  553. #define Z_DIR_PIN 39
  554. #define Z_MIN_PIN 30
  555. #define Z_MAX_PIN 32
  556. #define Z_ENABLE_PIN 35
  557. #define HEATER_BED_PIN 4
  558. #define TEMP_BED_PIN 10
  559. #define HEATER_0_PIN 2
  560. #define TEMP_0_PIN 8
  561. #define HEATER_1_PIN 3
  562. #define TEMP_1_PIN 9
  563. #define HEATER_2_PIN -1
  564. #define TEMP_2_PIN -1
  565. #define E0_STEP_PIN 43
  566. #define E0_DIR_PIN 45
  567. #define E0_ENABLE_PIN 41
  568. #define E1_STEP_PIN 49
  569. #define E1_DIR_PIN 47
  570. #define E1_ENABLE_PIN 48
  571. #define SDPOWER -1
  572. #define SDSS 53
  573. #define LED_PIN 13
  574. #define FAN_PIN 7
  575. #define PS_ON_PIN 12
  576. #define KILL_PIN -1
  577. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  578. #ifdef ULTRA_LCD
  579. #ifdef NEWPANEL
  580. //arduino pin witch triggers an piezzo beeper
  581. #define BEEPER 18
  582. #define LCD_PINS_RS 20
  583. #define LCD_PINS_ENABLE 17
  584. #define LCD_PINS_D4 16
  585. #define LCD_PINS_D5 21
  586. #define LCD_PINS_D6 5
  587. #define LCD_PINS_D7 6
  588. //buttons are directly attached
  589. #define BTN_EN1 40
  590. #define BTN_EN2 42
  591. #define BTN_ENC 19 //the click
  592. #define BLEN_C 2
  593. #define BLEN_B 1
  594. #define BLEN_A 0
  595. #define SDCARDDETECT 38
  596. //encoder rotation values
  597. #define encrot0 0
  598. #define encrot1 2
  599. #define encrot2 3
  600. #define encrot3 1
  601. #else //old style panel with shift register
  602. //arduino pin witch triggers an piezzo beeper
  603. #define BEEPER 18
  604. //buttons are attached to a shift register
  605. #define SHIFT_CLK 38
  606. #define SHIFT_LD 42
  607. #define SHIFT_OUT 40
  608. #define SHIFT_EN 17
  609. #define LCD_PINS_RS 16
  610. #define LCD_PINS_ENABLE 5
  611. #define LCD_PINS_D4 6
  612. #define LCD_PINS_D5 21
  613. #define LCD_PINS_D6 20
  614. #define LCD_PINS_D7 19
  615. //encoder rotation values
  616. #ifndef ULTIMAKERCONTROLLER
  617. #define encrot0 0
  618. #define encrot1 2
  619. #define encrot2 3
  620. #define encrot3 1
  621. #else
  622. #define encrot0 0
  623. #define encrot1 1
  624. #define encrot2 3
  625. #define encrot3 2
  626. #endif
  627. #define SDCARDDETECT -1
  628. //bits in the shift register that carry the buttons for:
  629. // left up center down right red
  630. #define BL_LE 7
  631. #define BL_UP 6
  632. #define BL_MI 5
  633. #define BL_DW 4
  634. #define BL_RI 3
  635. #define BL_ST 2
  636. #define BLEN_B 1
  637. #define BLEN_A 0
  638. #endif
  639. #endif //ULTRA_LCD
  640. #endif
  641. #if MOTHERBOARD == 71
  642. #define KNOWN_BOARD
  643. /*****************************************************************
  644. * Ultimaker pin assignment (Old electronics)
  645. ******************************************************************/
  646. #ifndef __AVR_ATmega1280__
  647. #ifndef __AVR_ATmega2560__
  648. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  649. #endif
  650. #endif
  651. #define X_STEP_PIN 25
  652. #define X_DIR_PIN 23
  653. #define X_MIN_PIN 15
  654. #define X_MAX_PIN 14
  655. #define X_ENABLE_PIN 27
  656. #define Y_STEP_PIN 31
  657. #define Y_DIR_PIN 33
  658. #define Y_MIN_PIN 17
  659. #define Y_MAX_PIN 16
  660. #define Y_ENABLE_PIN 29
  661. #define Z_STEP_PIN 37
  662. #define Z_DIR_PIN 39
  663. #define Z_MIN_PIN 19
  664. #define Z_MAX_PIN 18
  665. #define Z_ENABLE_PIN 35
  666. #define HEATER_BED_PIN -1
  667. #define TEMP_BED_PIN -1
  668. #define HEATER_0_PIN 2
  669. #define TEMP_0_PIN 8
  670. #define HEATER_1_PIN 1
  671. #define TEMP_1_PIN 1
  672. #define HEATER_2_PIN -1
  673. #define TEMP_2_PIN -1
  674. #define E0_STEP_PIN 43
  675. #define E0_DIR_PIN 45
  676. #define E0_ENABLE_PIN 41
  677. #define E1_STEP_PIN -1
  678. #define E1_DIR_PIN -1
  679. #define E1_ENABLE_PIN -1
  680. #define SDPOWER -1
  681. #define SDSS -1
  682. #define LED_PIN -1
  683. #define FAN_PIN -1
  684. #define PS_ON_PIN -1
  685. #define KILL_PIN -1
  686. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  687. #define LCD_PINS_RS 24
  688. #define LCD_PINS_ENABLE 22
  689. #define LCD_PINS_D4 36
  690. #define LCD_PINS_D5 34
  691. #define LCD_PINS_D6 32
  692. #define LCD_PINS_D7 30
  693. #endif
  694. /****************************************************************************************
  695. * Teensylu 0.7 pin assingments (ATMEGA90USB)
  696. * Requires the Teensyduino software with Teensy2.0++ selected in arduino IDE!
  697. ****************************************************************************************/
  698. #if MOTHERBOARD == 8
  699. #define MOTHERBOARD 8
  700. #define KNOWN_BOARD 1
  701. #define X_STEP_PIN 0
  702. #define X_DIR_PIN 1
  703. #define X_ENABLE_PIN 39
  704. #define X_MIN_PIN 13
  705. #define X_MAX_PIN -1
  706. #define Y_STEP_PIN 2
  707. #define Y_DIR_PIN 3
  708. #define Y_ENABLE_PIN 38
  709. #define Y_MIN_PIN 14
  710. #define Y_MAX_PIN -1
  711. #define Z_STEP_PIN 4
  712. #define Z_DIR_PIN 5
  713. #define Z_ENABLE_PIN 23
  714. #define Z_MIN_PIN 15
  715. #define Z_MAX_PIN -1
  716. #define E0_STEP_PIN 6
  717. #define E0_DIR_PIN 7
  718. #define E0_ENABLE_PIN 19
  719. #define HEATER_0_PIN 21 // Extruder
  720. #define HEATER_1_PIN -1
  721. #define HEATER_2_PIN -1
  722. #define HEATER_BED_PIN 20 // Bed
  723. #define FAN_PIN 22 // Fan
  724. #define TEMP_0_PIN 7 // Extruder
  725. #define TEMP_1_PIN -1
  726. #define TEMP_2_PIN -1
  727. #define TEMP_BED_PIN 6 // Bed
  728. #define SDPOWER -1
  729. #define SDSS 8
  730. #define LED_PIN -1
  731. #define PS_ON_PIN -1
  732. #define KILL_PIN -1
  733. #define ALARM_PIN -1
  734. #ifndef SDSUPPORT
  735. // these pins are defined in the SD library if building with SD support
  736. #define SCK_PIN 9
  737. #define MISO_PIN 11
  738. #define MOSI_PIN 10
  739. #endif
  740. #endif
  741. /****************************************************************************************
  742. * Gen3+ pin assignment
  743. *
  744. ****************************************************************************************/
  745. #if MOTHERBOARD == 9
  746. #define MOTHERBOARD 6
  747. #define KNOWN_BOARD 1
  748. #ifndef __AVR_ATmega644P__
  749. #ifndef __AVR_ATmega1284P__
  750. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  751. #endif
  752. #endif
  753. #define X_STEP_PIN 15
  754. #define X_DIR_PIN 18
  755. #define X_MIN_PIN 20
  756. #define X_MAX_PIN -1
  757. #define Y_STEP_PIN 23
  758. #define Y_DIR_PIN 22
  759. #define Y_MIN_PIN 25
  760. #define Y_MAX_PIN -1
  761. #define Z_STEP_PIN 27
  762. #define Z_DIR_PIN 28
  763. #define Z_MIN_PIN 30
  764. #define Z_MAX_PIN -1
  765. #define E_STEP_PIN 17
  766. #define E_DIR_PIN 21
  767. #define LED_PIN -1
  768. #define FAN_PIN -1
  769. #define PS_ON_PIN 14
  770. #define KILL_PIN -1
  771. #define HEATER_0_PIN 12 // (extruder)
  772. #define HEATER_1_PIN 16 // (bed)
  773. #define X_ENABLE_PIN 19
  774. #define Y_ENABLE_PIN 24
  775. #define Z_ENABLE_PIN 29
  776. #define E_ENABLE_PIN 13
  777. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  778. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  779. #define TEMP_2_PIN -1
  780. #define SDPOWER -1
  781. #define SDSS 4
  782. #define HEATER_2_PIN -1
  783. #endif
  784. /****************************************************************************************
  785. * Open Motion controller with enable based extruders
  786. *
  787. * ATMega644
  788. *
  789. * +---\/---+
  790. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  791. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  792. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  793. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  794. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  795. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  796. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  797. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  798. * RST 9| |32 AREF
  799. * VCC 10| |31 GND
  800. * GND 11| |30 AVCC
  801. * XTAL2 12| |29 PC7 (D 23)
  802. * XTAL1 13| |28 PC6 (D 22)
  803. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  804. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  805. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  806. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  807. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  808. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  809. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  810. * +--------+
  811. *
  812. ****************************************************************************************/
  813. #if MOTHERBOARD == 90 //Alpha OMCA board
  814. #define KNOWN_BOARD 1
  815. #ifndef __AVR_ATmega644__
  816. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  817. #endif
  818. #define X_STEP_PIN 21
  819. #define X_DIR_PIN 20
  820. #define X_ENABLE_PIN 24
  821. #define X_MIN_PIN 0
  822. #define X_MAX_PIN -1
  823. #define Y_STEP_PIN 23
  824. #define Y_DIR_PIN 22
  825. #define Y_ENABLE_PIN 24
  826. #define Y_MIN_PIN 1
  827. #define Y_MAX_PIN -1
  828. #define Z_STEP_PIN 26
  829. #define Z_DIR_PIN 25
  830. #define Z_ENABLE_PIN 24
  831. #define Z_MIN_PIN 2
  832. #define Z_MAX_PIN -1
  833. #define E0_STEP_PIN 28
  834. #define E0_DIR_PIN 27
  835. #define E0_ENABLE_PIN 24
  836. #define E1_STEP_PIN -1 // 19
  837. #define E1_DIR_PIN -1 // 18
  838. #define E1_ENABLE_PIN 24
  839. #define E2_STEP_PIN -1 // 17
  840. #define E2_DIR_PIN -1 // 16
  841. #define E2_ENABLE_PIN 24
  842. #define SDPOWER -1
  843. #define SDSS 11
  844. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  845. #define LED_PIN -1
  846. #define FAN_PIN 3
  847. #define PS_ON_PIN -1
  848. #define KILL_PIN -1
  849. #define HEATER_0_PIN 4
  850. #define HEATER_1_PIN -1 // 12
  851. #define HEATER_2_PIN -1 // 13
  852. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  853. #define TEMP_1_PIN -1 // 1
  854. #define TEMP_2_PIN -1 // 2
  855. #define HEATER_BED_PIN -1 // 14/15
  856. #define TEMP_BED_PIN -1 // 1,2 or I2C
  857. /* 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) */
  858. #endif
  859. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  860. #define KNOWN_BOARD 1
  861. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  862. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  863. #endif
  864. #define X_STEP_PIN 26
  865. #define X_DIR_PIN 25
  866. #define X_ENABLE_PIN 10
  867. #define X_MIN_PIN 0
  868. #define X_MAX_PIN -1
  869. #define Y_STEP_PIN 28
  870. #define Y_DIR_PIN 27
  871. #define Y_ENABLE_PIN 10
  872. #define Y_MIN_PIN 1
  873. #define Y_MAX_PIN -1
  874. #define Z_STEP_PIN 23
  875. #define Z_DIR_PIN 22
  876. #define Z_ENABLE_PIN 10
  877. #define Z_MIN_PIN 2
  878. #define Z_MAX_PIN -1
  879. #define E0_STEP_PIN 24
  880. #define E0_DIR_PIN 21
  881. #define E0_ENABLE_PIN 10
  882. /* future proofing */
  883. #define __FS 20
  884. #define __FD 19
  885. #define __GS 18
  886. #define __GD 13
  887. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  888. #define E1_STEP_PIN -1 // 21
  889. #define E1_DIR_PIN -1 // 20
  890. #define E1_ENABLE_PIN -1 // 19
  891. #define E2_STEP_PIN -1 // 21
  892. #define E2_DIR_PIN -1 // 20
  893. #define E2_ENABLE_PIN -1 // 18
  894. #define SDPOWER -1
  895. #define SDSS 11
  896. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  897. #define LED_PIN -1
  898. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  899. #define PS_ON_PIN -1
  900. #define KILL_PIN -1
  901. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  902. #define HEATER_1_PIN -1
  903. #define HEATER_2_PIN -1
  904. #define HEATER_1_PIN -1
  905. #define HEATER_2_PIN -1
  906. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  907. #define TEMP_1_PIN 1 // ANALOG
  908. #define TEMP_2_PIN -1 // 2
  909. #define HEATER_BED_PIN 4
  910. #define TEMP_BED_PIN 2 // 1,2 or I2C
  911. #define I2C_SCL 16
  912. #define I2C_SDA 17
  913. #endif
  914. #ifndef KNOWN_BOARD
  915. #error Unknown MOTHERBOARD value in configuration.h
  916. #endif
  917. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  918. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  919. #if EXTRUDERS > 1
  920. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  921. #else
  922. #define _E1_PINS
  923. #endif
  924. #if EXTRUDERS > 2
  925. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  926. #else
  927. #define _E2_PINS
  928. #endif
  929. #ifdef DISABLE_MAX_ENDSTOPS
  930. #define X_MAX_PIN -1
  931. #define Y_MAX_PIN -1
  932. #define Z_MAX_PIN -1
  933. #endif
  934. #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, \
  935. HEATER_BED_PIN, FAN_PIN, \
  936. _E0_PINS _E1_PINS _E2_PINS \
  937. TEMP_0_PIN, TEMP_1_PIN, TEMP_2_PIN, TEMP_BED_PIN }
  938. #endif