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

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