My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

pins.h 38KB

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