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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495
  1. #ifndef PINS_H
  2. #define PINS_H
  3. #define X_MS1_PIN -1
  4. #define X_MS2_PIN -1
  5. #define Y_MS1_PIN -1
  6. #define Y_MS2_PIN -1
  7. #define Z_MS1_PIN -1
  8. #define Z_MS2_PIN -1
  9. #define E0_MS1_PIN -1
  10. #define E0_MS2_PIN -1
  11. #define E1_MS1_PIN -1
  12. #define E1_MS2_PIN -1
  13. #define DIGIPOTSS_PIN -1
  14. #if MOTHERBOARD == 99
  15. #define KNOWN_BOARD 1
  16. #define X_STEP_PIN 2
  17. #define X_DIR_PIN 3
  18. #define X_ENABLE_PIN -1
  19. #define X_STOP_PIN 16
  20. #define Y_STEP_PIN 5
  21. #define Y_DIR_PIN 6
  22. #define Y_ENABLE_PIN -1
  23. #define Y_STOP_PIN 67
  24. #define Z_STEP_PIN 62
  25. #define Z_DIR_PIN 63
  26. #define Z_ENABLE_PIN -1
  27. #define Z_STOP_PIN 59
  28. #define E0_STEP_PIN 65
  29. #define E0_DIR_PIN 66
  30. #define E0_ENABLE_PIN -1
  31. #define SDPOWER -1
  32. #define SDSS 53
  33. #define LED_PIN -1
  34. #define FAN_PIN -1
  35. #define PS_ON_PIN 9
  36. #define KILL_PIN -1
  37. #define HEATER_0_PIN 13
  38. #define HEATER_1_PIN -1
  39. #define HEATER_2_PIN -1
  40. #define TEMP_0_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  41. #define TEMP_1_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  42. #define TEMP_2_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  43. #define HEATER_BED_PIN 4
  44. #define TEMP_BED_PIN 10
  45. #endif /* 99 */
  46. /****************************************************************************************
  47. * Gen7 v1.1, v1.2, v1.3 pin assignment
  48. *
  49. ****************************************************************************************/
  50. #if MOTHERBOARD == 12
  51. #define MOTHERBOARD 11
  52. #define GEN7_VERSION 13 // v1.3
  53. #endif
  54. #if MOTHERBOARD == 11
  55. #define KNOWN_BOARD
  56. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  57. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  58. #endif
  59. #ifndef GEN7_VERSION
  60. #define GEN7_VERSION 12 // v1.x
  61. #endif
  62. //x axis pins
  63. #define X_STEP_PIN 19
  64. #define X_DIR_PIN 18
  65. #define X_ENABLE_PIN 24
  66. #define X_STOP_PIN 7
  67. //y axis pins
  68. #define Y_STEP_PIN 23
  69. #define Y_DIR_PIN 22
  70. #define Y_ENABLE_PIN 24
  71. #define Y_STOP_PIN 5
  72. //z axis pins
  73. #define Z_STEP_PIN 26
  74. #define Z_DIR_PIN 25
  75. #define Z_ENABLE_PIN 24
  76. #define Z_MIN_PIN 1
  77. #define Z_MAX_PIN 0
  78. //extruder pins
  79. #define E0_STEP_PIN 28
  80. #define E0_DIR_PIN 27
  81. #define E0_ENABLE_PIN 24
  82. #define TEMP_0_PIN 1
  83. #define TEMP_1_PIN -1
  84. #define TEMP_2_PIN -1
  85. #define TEMP_BED_PIN 2
  86. #define HEATER_0_PIN 4
  87. #define HEATER_1_PIN -1
  88. #define HEATER_2_PIN -1
  89. #define HEATER_BED_PIN 3
  90. #define KILL_PIN -1
  91. #define SDPOWER -1
  92. #define SDSS -1 // SCL pin of I2C header
  93. #define LED_PIN -1
  94. #if (GEN7_VERSION >= 13)
  95. // Gen7 v1.3 removed the fan pin
  96. #define FAN_PIN -1
  97. #else
  98. #define FAN_PIN 31
  99. #endif
  100. #define PS_ON_PIN 15
  101. //All these generations of Gen7 supply thermistor power
  102. //via PS_ON, so ignore bad thermistor readings
  103. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  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. * Gen7 v1.4 pin assignment
  112. *
  113. ****************************************************************************************/
  114. #if MOTHERBOARD == 13
  115. #define GEN7_VERSION 14 // v1.4
  116. #endif
  117. #if MOTHERBOARD == 13
  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. #ifndef GEN7_VERSION
  123. #define GEN7_VERSION 14 // v1.x
  124. #endif
  125. //x axis pins
  126. #define X_STEP_PIN 29
  127. #define X_DIR_PIN 28
  128. #define X_ENABLE_PIN 25
  129. #define X_STOP_PIN 0
  130. //y axis pins
  131. #define Y_STEP_PIN 27
  132. #define Y_DIR_PIN 26
  133. #define Y_ENABLE_PIN 25
  134. #define Y_STOP_PIN 1
  135. //z axis pins
  136. #define Z_STEP_PIN 23
  137. #define Z_DIR_PIN 22
  138. #define Z_ENABLE_PIN 25
  139. #define Z_STOP_PIN 2
  140. //extruder pins
  141. #define E0_STEP_PIN 19
  142. #define E0_DIR_PIN 18
  143. #define E0_ENABLE_PIN 25
  144. #define TEMP_0_PIN 0
  145. #define TEMP_1_PIN -1
  146. #define TEMP_2_PIN -1
  147. #define TEMP_BED_PIN 1
  148. #define HEATER_0_PIN 4
  149. #define HEATER_1_PIN -1
  150. #define HEATER_2_PIN -1
  151. #define HEATER_BED_PIN 3
  152. #define KILL_PIN -1
  153. #define SDPOWER -1
  154. #define SDSS -1 // SCL pin of I2C header
  155. #define LED_PIN -1
  156. #define FAN_PIN -1
  157. #define PS_ON_PIN 15
  158. //our pin for debugging.
  159. #define DEBUG_PIN 0
  160. //our RS485 pins
  161. #define TX_ENABLE_PIN 12
  162. #define RX_ENABLE_PIN 13
  163. #endif
  164. /*******************************************************************************
  165. *********
  166. * Gen7 Alfons3 pin assignment
  167. *
  168. ********************************************************************************
  169. ********/
  170. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  171. #if MOTHERBOARD == 10
  172. #define KNOWN_BOARD
  173. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  174. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  175. #endif
  176. //x axis pins
  177. #define X_STEP_PIN 21 //different from stanard GEN7
  178. #define X_DIR_PIN 20 //different from stanard GEN7
  179. #define X_ENABLE_PIN 24
  180. #define X_STOP_PIN 0
  181. //y axis pins
  182. #define Y_STEP_PIN 23
  183. #define Y_DIR_PIN 22
  184. #define Y_ENABLE_PIN 24
  185. #define Y_STOP_PIN 1
  186. //z axis pins
  187. #define Z_STEP_PIN 26
  188. #define Z_DIR_PIN 25
  189. #define Z_ENABLE_PIN 24
  190. #define Z_STOP_PIN 2
  191. //extruder pins
  192. #define E0_STEP_PIN 28
  193. #define E0_DIR_PIN 27
  194. #define E0_ENABLE_PIN 24
  195. #define TEMP_0_PIN 2
  196. #define TEMP_1_PIN -1
  197. #define TEMP_2_PIN -1
  198. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  199. #define HEATER_0_PIN 4
  200. #define HEATER_1_PIN -1
  201. #define HEATER_2_PIN -1
  202. #define HEATER_BED_PIN 3 // (bed)
  203. #define SDPOWER -1
  204. #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
  205. #define LED_PIN -1
  206. #define FAN_PIN -1
  207. #define PS_ON_PIN 19
  208. //our pin for debugging.
  209. #define DEBUG_PIN -1
  210. //our RS485 pins
  211. //#define TX_ENABLE_PIN 12
  212. //#define RX_ENABLE_PIN 13
  213. #define BEEPER -1
  214. #define SDCARDDETECT -1
  215. #define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
  216. #define KILL_PIN -1
  217. //Pins for 4bit LCD Support
  218. #define LCD_PINS_RS 18
  219. #define LCD_PINS_ENABLE 17
  220. #define LCD_PINS_D4 16
  221. #define LCD_PINS_D5 15
  222. #define LCD_PINS_D6 13
  223. #define LCD_PINS_D7 14
  224. //buttons are directly attached
  225. #define BTN_EN1 11
  226. #define BTN_EN2 10
  227. #define BTN_ENC 12 //the click
  228. #define BLEN_C 2
  229. #define BLEN_B 1
  230. #define BLEN_A 0
  231. #define encrot0 0
  232. #define encrot1 2
  233. #define encrot2 3
  234. #define encrot3 1
  235. #endif
  236. /****************************************************************************************
  237. * Arduino Mega pin assignment
  238. *
  239. ****************************************************************************************/
  240. #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  241. #define KNOWN_BOARD 1
  242. //////////////////FIX THIS//////////////
  243. #ifndef __AVR_ATmega1280__
  244. #ifndef __AVR_ATmega2560__
  245. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  246. #endif
  247. #endif
  248. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  249. // #define RAMPS_V_1_3
  250. // #define RAMPS_V_1_0
  251. #if MOTHERBOARD == 33 || MOTHERBOARD == 34
  252. #define X_STEP_PIN 54
  253. #define X_DIR_PIN 55
  254. #define X_ENABLE_PIN 38
  255. #define X_MIN_PIN 3
  256. #define X_MAX_PIN 2
  257. #define Y_STEP_PIN 60
  258. #define Y_DIR_PIN 61
  259. #define Y_ENABLE_PIN 56
  260. #define Y_MIN_PIN 14
  261. #define Y_MAX_PIN 15
  262. #define Z_STEP_PIN 46
  263. #define Z_DIR_PIN 48
  264. #define Z_ENABLE_PIN 62
  265. #define Z_MIN_PIN 18
  266. #define Z_MAX_PIN 19
  267. #define Z2_STEP_PIN 36
  268. #define Z2_DIR_PIN 34
  269. #define Z2_ENABLE_PIN 30
  270. #define E0_STEP_PIN 26
  271. #define E0_DIR_PIN 28
  272. #define E0_ENABLE_PIN 24
  273. #define E1_STEP_PIN 36
  274. #define E1_DIR_PIN 34
  275. #define E1_ENABLE_PIN 30
  276. #define SDPOWER -1
  277. #define SDSS 53
  278. #define LED_PIN 13
  279. #if MOTHERBOARD == 33
  280. #define FAN_PIN 9 // (Sprinter config)
  281. #else
  282. #define FAN_PIN 4 // IO pin. Buffer needed
  283. #endif
  284. #define PS_ON_PIN 12
  285. #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
  286. #define KILL_PIN 41
  287. #else
  288. #define KILL_PIN -1
  289. #endif
  290. #define HEATER_0_PIN 10 // EXTRUDER 1
  291. #if MOTHERBOARD == 33
  292. #define HEATER_1_PIN -1
  293. #else
  294. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  295. #endif
  296. #define HEATER_2_PIN -1
  297. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  298. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  299. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  300. #define HEATER_BED_PIN 8 // BED
  301. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  302. #ifdef ULTRA_LCD
  303. #ifdef NEWPANEL
  304. //encoder rotation values
  305. #define encrot0 0
  306. #define encrot1 2
  307. #define encrot2 3
  308. #define encrot3 1
  309. #define BLEN_A 0
  310. #define BLEN_B 1
  311. #define BLEN_C 2
  312. #define LCD_PINS_RS 16
  313. #define LCD_PINS_ENABLE 17
  314. #define LCD_PINS_D4 23
  315. #define LCD_PINS_D5 25
  316. #define LCD_PINS_D6 27
  317. #define LCD_PINS_D7 29
  318. #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
  319. #define BEEPER 37
  320. #define BTN_EN1 31
  321. #define BTN_EN2 33
  322. #define BTN_ENC 35
  323. #define SDCARDDETECT 49
  324. #else
  325. //arduino pin which triggers an piezzo beeper
  326. #define BEEPER 33 // Beeper on AUX-4
  327. //buttons are directly attached using AUX-2
  328. #define BTN_EN1 37
  329. #define BTN_EN2 35
  330. #define BTN_ENC 31 //the click
  331. #define SDCARDDETECT -1 // Ramps does not use this port
  332. #endif
  333. #else //old style panel with shift register
  334. //arduino pin witch triggers an piezzo beeper
  335. #define BEEPER 33 No Beeper added
  336. //buttons are attached to a shift register
  337. // Not wired this yet
  338. //#define SHIFT_CLK 38
  339. //#define SHIFT_LD 42
  340. //#define SHIFT_OUT 40
  341. //#define SHIFT_EN 17
  342. #define LCD_PINS_RS 16
  343. #define LCD_PINS_ENABLE 17
  344. #define LCD_PINS_D4 23
  345. #define LCD_PINS_D5 25
  346. #define LCD_PINS_D6 27
  347. #define LCD_PINS_D7 29
  348. //encoder rotation values
  349. #define encrot0 0
  350. #define encrot1 2
  351. #define encrot2 3
  352. #define encrot3 1
  353. //bits in the shift register that carry the buttons for:
  354. // left up center down right red
  355. #define BL_LE 7
  356. #define BL_UP 6
  357. #define BL_MI 5
  358. #define BL_DW 4
  359. #define BL_RI 3
  360. #define BL_ST 2
  361. #define BLEN_B 1
  362. #define BLEN_A 0
  363. #endif
  364. #endif //ULTRA_LCD
  365. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3)
  366. #define X_STEP_PIN 26
  367. #define X_DIR_PIN 28
  368. #define X_ENABLE_PIN 24
  369. #define X_MIN_PIN 3
  370. #define X_MAX_PIN -1 //2
  371. #define Y_STEP_PIN 38
  372. #define Y_DIR_PIN 40
  373. #define Y_ENABLE_PIN 36
  374. #define Y_MIN_PIN 16
  375. #define Y_MAX_PIN -1 //17
  376. #define Z_STEP_PIN 44
  377. #define Z_DIR_PIN 46
  378. #define Z_ENABLE_PIN 42
  379. #define Z_MIN_PIN 18
  380. #define Z_MAX_PIN -1 //19
  381. #define E0_STEP_PIN 32
  382. #define E0_DIR_PIN 34
  383. #define E0_ENABLE_PIN 30
  384. #define SDPOWER 48
  385. #define SDSS 53
  386. #define LED_PIN 13
  387. #define PS_ON_PIN -1
  388. #define KILL_PIN -1
  389. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  390. #define HEATER_0_PIN 12 // RAMPS 1.0
  391. #define HEATER_BED_PIN -1 // RAMPS 1.0
  392. #define FAN_PIN 11 // RAMPS 1.0
  393. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  394. #define HEATER_0_PIN 10 // RAMPS 1.1
  395. #define HEATER_BED_PIN 8 // RAMPS 1.1
  396. #define FAN_PIN 9 // RAMPS 1.1
  397. #endif
  398. #define HEATER_1_PIN -1
  399. #define HEATER_2_PIN -1
  400. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  401. #define TEMP_1_PIN -1
  402. #define TEMP_2_PIN -1
  403. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  404. #endif// MOTHERBOARD == 33 || MOTHERBOARD == 34
  405. // SPI for Max6675 Thermocouple
  406. #ifndef SDSUPPORT
  407. // these pins are defined in the SD library if building with SD support
  408. #define MAX_SCK_PIN 52
  409. #define MAX_MISO_PIN 50
  410. #define MAX_MOSI_PIN 51
  411. #define MAX6675_SS 53
  412. #else
  413. #define MAX6675_SS 49
  414. #endif
  415. #endif//MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  416. /****************************************************************************************
  417. * Duemilanove w/ ATMega328P pin assignment
  418. *
  419. ****************************************************************************************/
  420. #if MOTHERBOARD == 4
  421. #define KNOWN_BOARD 1
  422. #ifndef __AVR_ATmega328P__
  423. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  424. #endif
  425. #define X_STEP_PIN 19
  426. #define X_DIR_PIN 18
  427. #define X_ENABLE_PIN -1
  428. #define X_STOP_PIN 17
  429. #define Y_STEP_PIN 10
  430. #define Y_DIR_PIN 7
  431. #define Y_ENABLE_PIN -1
  432. #define Y_STOP_PIN 8
  433. #define Z_STEP_PIN 13
  434. #define Z_DIR_PIN 3
  435. #define Z_ENABLE_PIN 2
  436. #define Z_STOP_PIN 4
  437. #define E0_STEP_PIN 11
  438. #define E0_DIR_PIN 12
  439. #define E0_ENABLE_PIN -1
  440. #define SDPOWER -1
  441. #define SDSS -1
  442. #define LED_PIN -1
  443. #define FAN_PIN 5
  444. #define PS_ON_PIN -1
  445. #define KILL_PIN -1
  446. #define HEATER_0_PIN 6
  447. #define HEATER_1_PIN -1
  448. #define HEATER_2_PIN -1
  449. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  450. #define TEMP_1_PIN -1
  451. #define TEMP_2_PIN -1
  452. #define HEATER_BED_PIN -1
  453. #define TEMP_BED_PIN -1
  454. #endif
  455. /****************************************************************************************
  456. * Gen6 pin assignment
  457. *
  458. ****************************************************************************************/
  459. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  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. //x axis pins
  467. #define X_STEP_PIN 15
  468. #define X_DIR_PIN 18
  469. #define X_ENABLE_PIN 19
  470. #define X_STOP_PIN 20
  471. //y axis pins
  472. #define Y_STEP_PIN 23
  473. #define Y_DIR_PIN 22
  474. #define Y_ENABLE_PIN 24
  475. #define Y_STOP_PIN 25
  476. //z axis pins
  477. #define Z_STEP_PIN 27
  478. #define Z_DIR_PIN 28
  479. #define Z_ENABLE_PIN 29
  480. #define Z_STOP_PIN 30
  481. //extruder pins
  482. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  483. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  484. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  485. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  486. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  487. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  488. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  489. #define HEATER_1_PIN -1
  490. #define HEATER_2_PIN -1
  491. #if MOTHERBOARD == 5
  492. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  493. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  494. #else
  495. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  496. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  497. #endif
  498. #define SDPOWER -1
  499. #define SDSS 17
  500. #define LED_PIN -1 //changed @ rkoeppl 20110410
  501. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  502. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  503. #define KILL_PIN -1 //changed @ drakelive 20120830
  504. //our pin for debugging.
  505. #define DEBUG_PIN 0
  506. //our RS485 pins
  507. #define TX_ENABLE_PIN 12
  508. #define RX_ENABLE_PIN 13
  509. #endif
  510. /****************************************************************************************
  511. * Sanguinololu pin assignment
  512. *
  513. ****************************************************************************************/
  514. #if MOTHERBOARD == 63
  515. #define MELZI
  516. #endif
  517. #if MOTHERBOARD == 62 || MOTHERBOARD == 63
  518. #undef MOTHERBOARD
  519. #define MOTHERBOARD 6
  520. #define SANGUINOLOLU_V_1_2
  521. #endif
  522. #if MOTHERBOARD == 6
  523. #define KNOWN_BOARD 1
  524. #ifndef __AVR_ATmega644P__
  525. #ifndef __AVR_ATmega1284P__
  526. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  527. #endif
  528. #endif
  529. #define X_STEP_PIN 15
  530. #define X_DIR_PIN 21
  531. #define X_STOP_PIN 18
  532. #define Y_STEP_PIN 22
  533. #define Y_DIR_PIN 23
  534. #define Y_STOP_PIN 19
  535. #define Z_STEP_PIN 3
  536. #define Z_DIR_PIN 2
  537. #define Z_STOP_PIN 20
  538. #define E0_STEP_PIN 1
  539. #define E0_DIR_PIN 0
  540. #define LED_PIN -1
  541. #define FAN_PIN -1
  542. #if FAN_PIN == 12 || FAN_PIN ==13
  543. #define FAN_SOFT_PWM
  544. #endif
  545. #ifdef MELZI
  546. #define LED_PIN 28
  547. #define FAN_PIN 4
  548. #endif
  549. #define PS_ON_PIN -1
  550. #define KILL_PIN -1
  551. #define HEATER_0_PIN 13 // (extruder)
  552. #define HEATER_1_PIN -1
  553. #define HEATER_2_PIN -1
  554. #ifdef SANGUINOLOLU_V_1_2
  555. #define HEATER_BED_PIN 12 // (bed)
  556. #define X_ENABLE_PIN 14
  557. #define Y_ENABLE_PIN 14
  558. #define Z_ENABLE_PIN 26
  559. #define E0_ENABLE_PIN 14
  560. #else
  561. #define HEATER_BED_PIN 14 // (bed)
  562. #define X_ENABLE_PIN -1
  563. #define Y_ENABLE_PIN -1
  564. #define Z_ENABLE_PIN -1
  565. #define E0_ENABLE_PIN -1
  566. #endif
  567. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  568. #define TEMP_1_PIN -1
  569. #define TEMP_2_PIN -1
  570. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  571. #define SDPOWER -1
  572. #define SDSS 31
  573. #ifdef MELZI
  574. #define SDSS 24
  575. #endif
  576. #endif
  577. #if MOTHERBOARD == 7
  578. #define KNOWN_BOARD
  579. /*****************************************************************
  580. * Ultimaker pin assignment
  581. ******************************************************************/
  582. #ifndef __AVR_ATmega1280__
  583. #ifndef __AVR_ATmega2560__
  584. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  585. #endif
  586. #endif
  587. #define X_STEP_PIN 25
  588. #define X_DIR_PIN 23
  589. #define X_MIN_PIN 22
  590. #define X_MAX_PIN 24
  591. #define X_ENABLE_PIN 27
  592. #define Y_STEP_PIN 31
  593. #define Y_DIR_PIN 33
  594. #define Y_MIN_PIN 26
  595. #define Y_MAX_PIN 28
  596. #define Y_ENABLE_PIN 29
  597. #define Z_STEP_PIN 37
  598. #define Z_DIR_PIN 39
  599. #define Z_MIN_PIN 30
  600. #define Z_MAX_PIN 32
  601. #define Z_ENABLE_PIN 35
  602. #define HEATER_BED_PIN 4
  603. #define TEMP_BED_PIN 10
  604. #define HEATER_0_PIN 2
  605. #define TEMP_0_PIN 8
  606. #define HEATER_1_PIN 3
  607. #define TEMP_1_PIN 9
  608. #define HEATER_2_PIN -1
  609. #define TEMP_2_PIN -1
  610. #define E0_STEP_PIN 43
  611. #define E0_DIR_PIN 45
  612. #define E0_ENABLE_PIN 41
  613. #define E1_STEP_PIN 49
  614. #define E1_DIR_PIN 47
  615. #define E1_ENABLE_PIN 48
  616. #define SDPOWER -1
  617. #define SDSS 53
  618. #define LED_PIN 13
  619. #define FAN_PIN 7
  620. #define PS_ON_PIN 12
  621. #define KILL_PIN -1
  622. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  623. #ifdef ULTRA_LCD
  624. #ifdef NEWPANEL
  625. //arduino pin witch triggers an piezzo beeper
  626. #define BEEPER 18
  627. #define LCD_PINS_RS 20
  628. #define LCD_PINS_ENABLE 17
  629. #define LCD_PINS_D4 16
  630. #define LCD_PINS_D5 21
  631. #define LCD_PINS_D6 5
  632. #define LCD_PINS_D7 6
  633. //buttons are directly attached
  634. #define BTN_EN1 40
  635. #define BTN_EN2 42
  636. #define BTN_ENC 19 //the click
  637. #define BLEN_C 2
  638. #define BLEN_B 1
  639. #define BLEN_A 0
  640. #define SDCARDDETECT 38
  641. //encoder rotation values
  642. #define encrot0 0
  643. #define encrot1 2
  644. #define encrot2 3
  645. #define encrot3 1
  646. #else //old style panel with shift register
  647. //arduino pin witch triggers an piezzo beeper
  648. #define BEEPER 18
  649. //buttons are attached to a shift register
  650. #define SHIFT_CLK 38
  651. #define SHIFT_LD 42
  652. #define SHIFT_OUT 40
  653. #define SHIFT_EN 17
  654. #define LCD_PINS_RS 16
  655. #define LCD_PINS_ENABLE 5
  656. #define LCD_PINS_D4 6
  657. #define LCD_PINS_D5 21
  658. #define LCD_PINS_D6 20
  659. #define LCD_PINS_D7 19
  660. //encoder rotation values
  661. #ifndef ULTIMAKERCONTROLLER
  662. #define encrot0 0
  663. #define encrot1 2
  664. #define encrot2 3
  665. #define encrot3 1
  666. #else
  667. #define encrot0 0
  668. #define encrot1 1
  669. #define encrot2 3
  670. #define encrot3 2
  671. #endif
  672. #define SDCARDDETECT -1
  673. //bits in the shift register that carry the buttons for:
  674. // left up center down right red
  675. #define BL_LE 7
  676. #define BL_UP 6
  677. #define BL_MI 5
  678. #define BL_DW 4
  679. #define BL_RI 3
  680. #define BL_ST 2
  681. #define BLEN_B 1
  682. #define BLEN_A 0
  683. #endif
  684. #endif //ULTRA_LCD
  685. #endif
  686. #if MOTHERBOARD == 71
  687. #define KNOWN_BOARD
  688. /*****************************************************************
  689. * Ultimaker pin assignment (Old electronics)
  690. ******************************************************************/
  691. #ifndef __AVR_ATmega1280__
  692. #ifndef __AVR_ATmega2560__
  693. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  694. #endif
  695. #endif
  696. #define X_STEP_PIN 25
  697. #define X_DIR_PIN 23
  698. #define X_MIN_PIN 15
  699. #define X_MAX_PIN 14
  700. #define X_ENABLE_PIN 27
  701. #define Y_STEP_PIN 31
  702. #define Y_DIR_PIN 33
  703. #define Y_MIN_PIN 17
  704. #define Y_MAX_PIN 16
  705. #define Y_ENABLE_PIN 29
  706. #define Z_STEP_PIN 37
  707. #define Z_DIR_PIN 39
  708. #define Z_MIN_PIN 19
  709. #define Z_MAX_PIN 18
  710. #define Z_ENABLE_PIN 35
  711. #define HEATER_BED_PIN -1
  712. #define TEMP_BED_PIN -1
  713. #define HEATER_0_PIN 2
  714. #define TEMP_0_PIN 8
  715. #define HEATER_1_PIN 1
  716. #define TEMP_1_PIN 1
  717. #define HEATER_2_PIN -1
  718. #define TEMP_2_PIN -1
  719. #define E0_STEP_PIN 43
  720. #define E0_DIR_PIN 45
  721. #define E0_ENABLE_PIN 41
  722. #define E1_STEP_PIN -1
  723. #define E1_DIR_PIN -1
  724. #define E1_ENABLE_PIN -1
  725. #define SDPOWER -1
  726. #define SDSS -1
  727. #define LED_PIN -1
  728. #define FAN_PIN -1
  729. #define PS_ON_PIN -1
  730. #define KILL_PIN -1
  731. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  732. #define LCD_PINS_RS 24
  733. #define LCD_PINS_ENABLE 22
  734. #define LCD_PINS_D4 36
  735. #define LCD_PINS_D5 34
  736. #define LCD_PINS_D6 32
  737. #define LCD_PINS_D7 30
  738. #endif
  739. /****************************************************************************************
  740. * Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
  741. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  742. http://www.pjrc.com/teensy/teensyduino.html
  743. * See http://reprap.org/wiki/Printrboard for more info
  744. ****************************************************************************************/
  745. #if MOTHERBOARD == 8 || MOTHERBOARD == 81
  746. #define KNOWN_BOARD 1
  747. #define AT90USB 1286 // Disable MarlinSerial etc.
  748. #ifndef __AVR_AT90USB1286__
  749. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  750. #endif
  751. #define X_STEP_PIN 0
  752. #define X_DIR_PIN 1
  753. #define X_ENABLE_PIN 39
  754. #define Y_STEP_PIN 2
  755. #define Y_DIR_PIN 3
  756. #define Y_ENABLE_PIN 38
  757. #define Z_STEP_PIN 4
  758. #define Z_DIR_PIN 5
  759. #define Z_ENABLE_PIN 23
  760. #define E0_STEP_PIN 6
  761. #define E0_DIR_PIN 7
  762. #define E0_ENABLE_PIN 19
  763. #define HEATER_0_PIN 21 // Extruder
  764. #define HEATER_1_PIN -1
  765. #define HEATER_2_PIN -1
  766. #define HEATER_BED_PIN 20 // Bed
  767. #define FAN_PIN 22 // Fan
  768. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  769. // for the fan and Teensyduino uses a different pin mapping.
  770. #if MOTHERBOARD == 8 // Teensylu
  771. #define X_STOP_PIN 13
  772. #define Y_STOP_PIN 14
  773. #define Z_STOP_PIN 15
  774. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  775. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  776. #else // Printrboard
  777. #define X_STOP_PIN 35
  778. #define Y_STOP_PIN 8
  779. #define Z_STOP_PIN 36
  780. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  781. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  782. #endif
  783. #define TEMP_1_PIN -1
  784. #define TEMP_2_PIN -1
  785. #define SDPOWER -1
  786. #define SDSS 8
  787. #define LED_PIN -1
  788. #define PS_ON_PIN -1
  789. #define KILL_PIN -1
  790. #define ALARM_PIN -1
  791. #ifndef SDSUPPORT
  792. // these pins are defined in the SD library if building with SD support
  793. #define SCK_PIN 9
  794. #define MISO_PIN 11
  795. #define MOSI_PIN 10
  796. #endif
  797. #endif // MOTHERBOARD == 8 (Teensylu) or 81 (Printrboard)
  798. /****************************************************************************************
  799. * Brainwave 1.0 pin assignments (AT90USB646)
  800. * Requires hardware bundle for Arduino:
  801. https://github.com/unrepentantgeek/brainwave-arduino
  802. ****************************************************************************************/
  803. #if MOTHERBOARD == 82
  804. #define KNOWN_BOARD 1
  805. #define AT90USB 646 // Disable MarlinSerial etc.
  806. #ifndef __AVR_AT90USB646__
  807. #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
  808. #endif
  809. #define X_STEP_PIN 27
  810. #define X_DIR_PIN 29
  811. #define X_ENABLE_PIN 28
  812. #define X_STOP_PIN 7
  813. #define X_ATT_PIN 26
  814. #define Y_STEP_PIN 31
  815. #define Y_DIR_PIN 33
  816. #define Y_ENABLE_PIN 32
  817. #define Y_STOP_PIN 6
  818. #define Y_ATT_PIN 30
  819. #define Z_STEP_PIN 17
  820. #define Z_DIR_PIN 19
  821. #define Z_ENABLE_PIN 18
  822. #define Z_STOP_PIN 5
  823. #define Z_ATT_PIN 16
  824. #define E0_STEP_PIN 21
  825. #define E0_DIR_PIN 23
  826. #define E0_ENABLE_PIN 22
  827. #define E0_ATT_PIN 20
  828. #define HEATER_0_PIN 4 // Extruder
  829. #define HEATER_1_PIN -1
  830. #define HEATER_2_PIN -1
  831. #define HEATER_BED_PIN 38 // Bed
  832. #define FAN_PIN 3 // Fan
  833. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  834. #define TEMP_1_PIN -1
  835. #define TEMP_2_PIN -1
  836. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  837. #define SDPOWER -1
  838. #define SDSS -1
  839. #define LED_PIN 39
  840. #define PS_ON_PIN -1
  841. #define KILL_PIN -1
  842. #define ALARM_PIN -1
  843. #ifndef SDSUPPORT
  844. // these pins are defined in the SD library if building with SD support
  845. #define SCK_PIN 9
  846. #define MISO_PIN 11
  847. #define MOSI_PIN 10
  848. #endif
  849. #endif // MOTHERBOARD == 82 (Brainwave)
  850. /****************************************************************************************
  851. * Gen3+ pin assignment
  852. *
  853. ****************************************************************************************/
  854. #if MOTHERBOARD == 9
  855. #define MOTHERBOARD 6 /*TODO: Figure out, Why is this done?*/
  856. #define KNOWN_BOARD 1
  857. #ifndef __AVR_ATmega644P__
  858. #ifndef __AVR_ATmega1284P__
  859. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  860. #endif
  861. #endif
  862. #define X_STEP_PIN 15
  863. #define X_DIR_PIN 18
  864. #define X_STOP_PIN 20
  865. #define Y_STEP_PIN 23
  866. #define Y_DIR_PIN 22
  867. #define Y_STOP_PIN 25
  868. #define Z_STEP_PIN 27
  869. #define Z_DIR_PIN 28
  870. #define Z_STOP_PIN 30
  871. #define E_STEP_PIN 17
  872. #define E_DIR_PIN 21
  873. #define LED_PIN -1
  874. #define FAN_PIN -1
  875. #define PS_ON_PIN 14
  876. #define KILL_PIN -1
  877. #define HEATER_0_PIN 12 // (extruder)
  878. #define HEATER_1_PIN 16 // (bed)
  879. #define X_ENABLE_PIN 19
  880. #define Y_ENABLE_PIN 24
  881. #define Z_ENABLE_PIN 29
  882. #define E_ENABLE_PIN 13
  883. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  884. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  885. #define TEMP_2_PIN -1
  886. #define SDPOWER -1
  887. #define SDSS 4
  888. #define HEATER_2_PIN -1
  889. #endif
  890. /****************************************************************************************
  891. * Open Motion controller with enable based extruders
  892. *
  893. * ATMega644
  894. *
  895. * +---\/---+
  896. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  897. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  898. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  899. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  900. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  901. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  902. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  903. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  904. * RST 9| |32 AREF
  905. * VCC 10| |31 GND
  906. * GND 11| |30 AVCC
  907. * XTAL2 12| |29 PC7 (D 23)
  908. * XTAL1 13| |28 PC6 (D 22)
  909. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  910. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  911. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  912. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  913. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  914. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  915. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  916. * +--------+
  917. *
  918. ****************************************************************************************/
  919. #if MOTHERBOARD == 90 //Alpha OMCA board
  920. #define KNOWN_BOARD 1
  921. #ifndef __AVR_ATmega644__
  922. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  923. #endif
  924. #define X_STEP_PIN 21
  925. #define X_DIR_PIN 20
  926. #define X_ENABLE_PIN 24
  927. #define X_STOP_PIN 0
  928. #define Y_STEP_PIN 23
  929. #define Y_DIR_PIN 22
  930. #define Y_ENABLE_PIN 24
  931. #define Y_STOP_PIN 1
  932. #define Z_STEP_PIN 26
  933. #define Z_DIR_PIN 25
  934. #define Z_ENABLE_PIN 24
  935. #define Z_STOP_PIN 2
  936. #define E0_STEP_PIN 28
  937. #define E0_DIR_PIN 27
  938. #define E0_ENABLE_PIN 24
  939. #define E1_STEP_PIN -1 // 19
  940. #define E1_DIR_PIN -1 // 18
  941. #define E1_ENABLE_PIN 24
  942. #define E2_STEP_PIN -1 // 17
  943. #define E2_DIR_PIN -1 // 16
  944. #define E2_ENABLE_PIN 24
  945. #define SDPOWER -1
  946. #define SDSS 11
  947. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  948. #define LED_PIN -1
  949. #define FAN_PIN 3
  950. #define PS_ON_PIN -1
  951. #define KILL_PIN -1
  952. #define HEATER_0_PIN 4
  953. #define HEATER_1_PIN -1 // 12
  954. #define HEATER_2_PIN -1 // 13
  955. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  956. #define TEMP_1_PIN -1 // 1
  957. #define TEMP_2_PIN -1 // 2
  958. #define HEATER_BED_PIN -1 // 14/15
  959. #define TEMP_BED_PIN -1 // 1,2 or I2C
  960. /* 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) */
  961. #endif
  962. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  963. #define KNOWN_BOARD 1
  964. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  965. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  966. #endif
  967. #define X_STEP_PIN 26
  968. #define X_DIR_PIN 25
  969. #define X_ENABLE_PIN 10
  970. #define X_STOP_PIN 0
  971. #define Y_STEP_PIN 28
  972. #define Y_DIR_PIN 27
  973. #define Y_ENABLE_PIN 10
  974. #define Y_STOP_PIN 1
  975. #define Z_STEP_PIN 23
  976. #define Z_DIR_PIN 22
  977. #define Z_ENABLE_PIN 10
  978. #define Z_STOP_PIN 2
  979. #define E0_STEP_PIN 24
  980. #define E0_DIR_PIN 21
  981. #define E0_ENABLE_PIN 10
  982. /* future proofing */
  983. #define __FS 20
  984. #define __FD 19
  985. #define __GS 18
  986. #define __GD 13
  987. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  988. #define E1_STEP_PIN -1 // 21
  989. #define E1_DIR_PIN -1 // 20
  990. #define E1_ENABLE_PIN -1 // 19
  991. #define E2_STEP_PIN -1 // 21
  992. #define E2_DIR_PIN -1 // 20
  993. #define E2_ENABLE_PIN -1 // 18
  994. #define SDPOWER -1
  995. #define SDSS 11
  996. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  997. #define LED_PIN -1
  998. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  999. #define PS_ON_PIN -1
  1000. #define KILL_PIN -1
  1001. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  1002. #define HEATER_1_PIN -1
  1003. #define HEATER_2_PIN -1
  1004. #define HEATER_1_PIN -1
  1005. #define HEATER_2_PIN -1
  1006. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  1007. #define TEMP_1_PIN 1 // ANALOG
  1008. #define TEMP_2_PIN -1 // 2
  1009. #define HEATER_BED_PIN 4
  1010. #define TEMP_BED_PIN 2 // 1,2 or I2C
  1011. #define I2C_SCL 16
  1012. #define I2C_SDA 17
  1013. #endif
  1014. #if MOTHERBOARD == 301
  1015. #define KNOWN_BOARD
  1016. /*****************************************************************
  1017. * Rambo Pin Assignments
  1018. ******************************************************************/
  1019. #ifndef __AVR_ATmega2560__
  1020. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1021. #endif
  1022. #define X_STEP_PIN 37
  1023. #define X_DIR_PIN 48
  1024. #define X_MIN_PIN 12
  1025. #define X_MAX_PIN 24
  1026. #define X_ENABLE_PIN 29
  1027. #define X_MS1_PIN 40
  1028. #define X_MS2_PIN 41
  1029. #define Y_STEP_PIN 36
  1030. #define Y_DIR_PIN 49
  1031. #define Y_MIN_PIN 11
  1032. #define Y_MAX_PIN 23
  1033. #define Y_ENABLE_PIN 28
  1034. #define Y_MS1_PIN 69
  1035. #define Y_MS2_PIN 39
  1036. #define Z_STEP_PIN 35
  1037. #define Z_DIR_PIN 47
  1038. #define Z_MIN_PIN 10
  1039. #define Z_MAX_PIN 30
  1040. #define Z_ENABLE_PIN 27
  1041. #define Z_MS1_PIN 68
  1042. #define Z_MS2_PIN 67
  1043. #define HEATER_BED_PIN 3
  1044. #define TEMP_BED_PIN 2
  1045. #define HEATER_0_PIN 9
  1046. #define TEMP_0_PIN 0
  1047. #define HEATER_1_PIN 7
  1048. #define TEMP_1_PIN 1
  1049. #define HEATER_2_PIN -1
  1050. #define TEMP_2_PIN -1
  1051. #define E0_STEP_PIN 34
  1052. #define E0_DIR_PIN 43
  1053. #define E0_ENABLE_PIN 26
  1054. #define E0_MS1_PIN 65
  1055. #define E0_MS2_PIN 66
  1056. #define E1_STEP_PIN 33
  1057. #define E1_DIR_PIN 42
  1058. #define E1_ENABLE_PIN 25
  1059. #define E1_MS1_PIN 63
  1060. #define E1_MS2_PIN 64
  1061. #define DIGIPOTSS_PIN 38
  1062. #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
  1063. #define SDPOWER -1
  1064. #define SDSS 53
  1065. #define LED_PIN 13
  1066. #define FAN_PIN 8
  1067. #define PS_ON_PIN 4
  1068. #define KILL_PIN -1
  1069. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1070. #endif
  1071. /****************************************************************************************
  1072. * MegaTronics
  1073. *
  1074. ****************************************************************************************/
  1075. #if MOTHERBOARD == 70
  1076. #define KNOWN_BOARD 1
  1077. //////////////////FIX THIS//////////////
  1078. #ifndef __AVR_ATmega2560__
  1079. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1080. #endif
  1081. #define X_STEP_PIN 26
  1082. #define X_DIR_PIN 28
  1083. #define X_ENABLE_PIN 24
  1084. #define X_MIN_PIN 41
  1085. #define X_MAX_PIN 37
  1086. #define Y_STEP_PIN 60 // A6
  1087. #define Y_DIR_PIN 61 // A7
  1088. #define Y_ENABLE_PIN 22
  1089. #define Y_MIN_PIN 14
  1090. #define Y_MAX_PIN 15
  1091. #define Z_STEP_PIN 54 // A0
  1092. #define Z_DIR_PIN 55 // A1
  1093. #define Z_ENABLE_PIN 56 // A2
  1094. #define Z_MIN_PIN 18
  1095. #define Z_MAX_PIN 19
  1096. #define E0_STEP_PIN 31
  1097. #define E0_DIR_PIN 32
  1098. #define E0_ENABLE_PIN 38
  1099. #define E1_STEP_PIN 34
  1100. #define E1_DIR_PIN 36
  1101. #define E1_ENABLE_PIN 30
  1102. #define SDPOWER -1
  1103. #define SDSS 53
  1104. #define LED_PIN 13
  1105. #define FAN_PIN 7 // IO pin. Buffer needed
  1106. #define PS_ON_PIN 12
  1107. #define KILL_PIN -1
  1108. #define HEATER_0_PIN 9 // EXTRUDER 1
  1109. #define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
  1110. #define HEATER_2_PIN -1
  1111. #if TEMP_SENSOR_0 == -1
  1112. #define TEMP_0_PIN 8 // ANALOG NUMBERING
  1113. #else
  1114. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  1115. #endif
  1116. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  1117. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1118. #define HEATER_BED_PIN 10 // BED
  1119. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  1120. #define BEEPER 33 // Beeper on AUX-4
  1121. #ifdef ULTRA_LCD
  1122. #ifdef NEWPANEL
  1123. //arduino pin which triggers an piezzo beeper
  1124. #define LCD_PINS_RS 16
  1125. #define LCD_PINS_ENABLE 17
  1126. #define LCD_PINS_D4 23
  1127. #define LCD_PINS_D5 25
  1128. #define LCD_PINS_D6 27
  1129. #define LCD_PINS_D7 29
  1130. //buttons are directly attached using AUX-2
  1131. #define BTN_EN1 59
  1132. #define BTN_EN2 64
  1133. #define BTN_ENC 43 //the click
  1134. #define BLEN_C 2
  1135. #define BLEN_B 1
  1136. #define BLEN_A 0
  1137. #define SDCARDDETECT -1 // Ramps does not use this port
  1138. //encoder rotation values
  1139. #define encrot0 0
  1140. #define encrot1 2
  1141. #define encrot2 3
  1142. #define encrot3 1
  1143. #endif
  1144. #endif //ULTRA_LCD
  1145. #endif
  1146. #ifndef KNOWN_BOARD
  1147. #error Unknown MOTHERBOARD value in configuration.h
  1148. #endif
  1149. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  1150. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  1151. #if EXTRUDERS > 1
  1152. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  1153. #else
  1154. #define _E1_PINS
  1155. #endif
  1156. #if EXTRUDERS > 2
  1157. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  1158. #else
  1159. #define _E2_PINS
  1160. #endif
  1161. #ifdef X_STOP_PIN
  1162. #if X_HOME_DIR < 0
  1163. #define X_MIN_PIN X_STOP_PIN
  1164. #define X_MAX_PIN -1
  1165. #else
  1166. #define X_MIN_PIN -1
  1167. #define X_MAX_PIN X_STOP_PIN
  1168. #endif
  1169. #endif
  1170. #ifdef Y_STOP_PIN
  1171. #if Y_HOME_DIR < 0
  1172. #define Y_MIN_PIN Y_STOP_PIN
  1173. #define Y_MAX_PIN -1
  1174. #else
  1175. #define Y_MIN_PIN -1
  1176. #define Y_MAX_PIN Y_STOP_PIN
  1177. #endif
  1178. #endif
  1179. #ifdef Z_STOP_PIN
  1180. #if Z_HOME_DIR < 0
  1181. #define Z_MIN_PIN Z_STOP_PIN
  1182. #define Z_MAX_PIN -1
  1183. #else
  1184. #define Z_MIN_PIN -1
  1185. #define Z_MAX_PIN Z_STOP_PIN
  1186. #endif
  1187. #endif
  1188. #ifdef DISABLE_MAX_ENDSTOPS
  1189. #define X_MAX_PIN -1
  1190. #define Y_MAX_PIN -1
  1191. #define Z_MAX_PIN -1
  1192. #endif
  1193. #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, PS_ON_PIN, \
  1194. HEATER_BED_PIN, FAN_PIN, \
  1195. _E0_PINS _E1_PINS _E2_PINS \
  1196. analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
  1197. #endif