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

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