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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263
  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. * Sethi 3D_1 pin assignment - www.sethi3d.com.br
  48. *
  49. ****************************************************************************************/
  50. #if MOTHERBOARD == 20
  51. #define KNOWN_BOARD
  52. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  53. #error Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu.
  54. #endif
  55. #ifndef GEN7_VERSION
  56. #define GEN7_VERSION 12 // v1.x
  57. #endif
  58. //x axis pins
  59. #define X_STEP_PIN 19
  60. #define X_DIR_PIN 18
  61. #define X_ENABLE_PIN 24
  62. #define X_STOP_PIN 2
  63. //y axis pins
  64. #define Y_STEP_PIN 23
  65. #define Y_DIR_PIN 22
  66. #define Y_ENABLE_PIN 24
  67. #define Y_STOP_PIN 0
  68. //z axis pins
  69. #define Z_STEP_PIN 26
  70. #define Z_DIR_PIN 25
  71. #define Z_ENABLE_PIN 24
  72. #define Z_MIN_PIN 1
  73. #define Z_MAX_PIN 0
  74. //extruder pins
  75. #define E0_STEP_PIN 28
  76. #define E0_DIR_PIN 27
  77. #define E0_ENABLE_PIN 24
  78. #define TEMP_0_PIN 1
  79. #define TEMP_1_PIN -1
  80. #define TEMP_2_PIN -1
  81. #define TEMP_BED_PIN 2
  82. #define HEATER_0_PIN 4
  83. #define HEATER_1_PIN -1
  84. #define HEATER_2_PIN -1
  85. #define HEATER_BED_PIN 3
  86. #define KILL_PIN -1
  87. #define SDPOWER -1
  88. #define SDSS -1 // SCL pin of I2C header
  89. #define LED_PIN -1
  90. #if (GEN7_VERSION >= 13)
  91. // Gen7 v1.3 removed the fan pin
  92. #define FAN_PIN -1
  93. #else
  94. #define FAN_PIN 31
  95. #endif
  96. #define PS_ON_PIN 15
  97. //All these generations of Gen7 supply thermistor power
  98. //via PS_ON, so ignore bad thermistor readings
  99. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  100. //our pin for debugging.
  101. #define DEBUG_PIN 0
  102. //our RS485 pins
  103. #define TX_ENABLE_PIN 12
  104. #define RX_ENABLE_PIN 13
  105. #endif
  106. /****************************************************************************************
  107. * Gen7 v1.1, v1.2, v1.3 pin assignment
  108. *
  109. ****************************************************************************************/
  110. #if MOTHERBOARD == 12
  111. #define MOTHERBOARD 11
  112. #define GEN7_VERSION 13 // v1.3
  113. #endif
  114. #if MOTHERBOARD == 11
  115. #define KNOWN_BOARD
  116. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  117. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  118. #endif
  119. #ifndef GEN7_VERSION
  120. #define GEN7_VERSION 12 // v1.x
  121. #endif
  122. //x axis pins
  123. #define X_STEP_PIN 19
  124. #define X_DIR_PIN 18
  125. #define X_ENABLE_PIN 24
  126. #define X_STOP_PIN 7
  127. //y axis pins
  128. #define Y_STEP_PIN 23
  129. #define Y_DIR_PIN 22
  130. #define Y_ENABLE_PIN 24
  131. #define Y_STOP_PIN 5
  132. //z axis pins
  133. #define Z_STEP_PIN 26
  134. #define Z_DIR_PIN 25
  135. #define Z_ENABLE_PIN 24
  136. #define Z_MIN_PIN 1
  137. #define Z_MAX_PIN 0
  138. //extruder pins
  139. #define E0_STEP_PIN 28
  140. #define E0_DIR_PIN 27
  141. #define E0_ENABLE_PIN 24
  142. #define TEMP_0_PIN 1
  143. #define TEMP_1_PIN -1
  144. #define TEMP_2_PIN -1
  145. #define TEMP_BED_PIN 2
  146. #define HEATER_0_PIN 4
  147. #define HEATER_1_PIN -1
  148. #define HEATER_2_PIN -1
  149. #define HEATER_BED_PIN 3
  150. #define KILL_PIN -1
  151. #define SDPOWER -1
  152. #define SDSS -1 // SCL pin of I2C header
  153. #define LED_PIN -1
  154. #if (GEN7_VERSION >= 13)
  155. // Gen7 v1.3 removed the fan pin
  156. #define FAN_PIN -1
  157. #else
  158. #define FAN_PIN 31
  159. #endif
  160. #define PS_ON_PIN 15
  161. //All these generations of Gen7 supply thermistor power
  162. //via PS_ON, so ignore bad thermistor readings
  163. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  164. //our pin for debugging.
  165. #define DEBUG_PIN 0
  166. //our RS485 pins
  167. #define TX_ENABLE_PIN 12
  168. #define RX_ENABLE_PIN 13
  169. #endif
  170. /****************************************************************************************
  171. * Gen7 v1.4 pin assignment
  172. *
  173. ****************************************************************************************/
  174. #if MOTHERBOARD == 13
  175. #define GEN7_VERSION 14 // v1.4
  176. #endif
  177. #if MOTHERBOARD == 13
  178. #define KNOWN_BOARD
  179. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  180. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  181. #endif
  182. #ifndef GEN7_VERSION
  183. #define GEN7_VERSION 14 // v1.x
  184. #endif
  185. //x axis pins
  186. #define X_STEP_PIN 29
  187. #define X_DIR_PIN 28
  188. #define X_ENABLE_PIN 25
  189. #define X_STOP_PIN 0
  190. //y axis pins
  191. #define Y_STEP_PIN 27
  192. #define Y_DIR_PIN 26
  193. #define Y_ENABLE_PIN 25
  194. #define Y_STOP_PIN 1
  195. //z axis pins
  196. #define Z_STEP_PIN 23
  197. #define Z_DIR_PIN 22
  198. #define Z_ENABLE_PIN 25
  199. #define Z_STOP_PIN 2
  200. //extruder pins
  201. #define E0_STEP_PIN 19
  202. #define E0_DIR_PIN 18
  203. #define E0_ENABLE_PIN 25
  204. #define TEMP_0_PIN 1
  205. #define TEMP_1_PIN -1
  206. #define TEMP_2_PIN -1
  207. #define TEMP_BED_PIN 0
  208. #define HEATER_0_PIN 4
  209. #define HEATER_1_PIN -1
  210. #define HEATER_2_PIN -1
  211. #define HEATER_BED_PIN 3
  212. #define KILL_PIN -1
  213. #define SDPOWER -1
  214. #define SDSS -1 // SCL pin of I2C header
  215. #define LED_PIN -1
  216. #define FAN_PIN -1
  217. #define PS_ON_PIN 15
  218. //our pin for debugging.
  219. #define DEBUG_PIN 0
  220. //our RS485 pins
  221. #define TX_ENABLE_PIN 12
  222. #define RX_ENABLE_PIN 13
  223. #endif
  224. /*******************************************************************************
  225. *********
  226. * Gen7 Alfons3 pin assignment
  227. *
  228. ********************************************************************************
  229. ********/
  230. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  231. #if MOTHERBOARD == 10
  232. #define KNOWN_BOARD
  233. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  234. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  235. #endif
  236. //x axis pins
  237. #define X_STEP_PIN 21 // different from standard GEN7
  238. #define X_DIR_PIN 20 // different from standard GEN7
  239. #define X_ENABLE_PIN 24
  240. #define X_STOP_PIN 0
  241. //y axis pins
  242. #define Y_STEP_PIN 23
  243. #define Y_DIR_PIN 22
  244. #define Y_ENABLE_PIN 24
  245. #define Y_STOP_PIN 1
  246. //z axis pins
  247. #define Z_STEP_PIN 26
  248. #define Z_DIR_PIN 25
  249. #define Z_ENABLE_PIN 24
  250. #define Z_STOP_PIN 2
  251. //extruder pins
  252. #define E0_STEP_PIN 28
  253. #define E0_DIR_PIN 27
  254. #define E0_ENABLE_PIN 24
  255. #define TEMP_0_PIN 2
  256. #define TEMP_1_PIN -1
  257. #define TEMP_2_PIN -1
  258. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  259. #define HEATER_0_PIN 4
  260. #define HEATER_1_PIN -1
  261. #define HEATER_2_PIN -1
  262. #define HEATER_BED_PIN 3 // (bed)
  263. #define SDPOWER -1
  264. #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
  265. #define LED_PIN -1
  266. #define FAN_PIN -1
  267. #define PS_ON_PIN 19
  268. //our pin for debugging.
  269. #define DEBUG_PIN -1
  270. //our RS485 pins
  271. //#define TX_ENABLE_PIN 12
  272. //#define RX_ENABLE_PIN 13
  273. #define BEEPER -1
  274. #define SDCARDDETECT -1
  275. #define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
  276. #define KILL_PIN -1
  277. //Pins for 4bit LCD Support
  278. #define LCD_PINS_RS 18
  279. #define LCD_PINS_ENABLE 17
  280. #define LCD_PINS_D4 16
  281. #define LCD_PINS_D5 15
  282. #define LCD_PINS_D6 13
  283. #define LCD_PINS_D7 14
  284. //buttons are directly attached
  285. #define BTN_EN1 11
  286. #define BTN_EN2 10
  287. #define BTN_ENC 12 //the click
  288. #endif
  289. /****************************************************************************************
  290. * Arduino Mega pin assignment
  291. *
  292. ****************************************************************************************/
  293. #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67
  294. #define KNOWN_BOARD 1
  295. //////////////////FIX THIS//////////////
  296. #ifndef __AVR_ATmega1280__
  297. #ifndef __AVR_ATmega2560__
  298. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  299. #endif
  300. #endif
  301. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  302. // #define RAMPS_V_1_3
  303. // #define RAMPS_V_1_0
  304. #if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67
  305. #define LARGE_FLASH true
  306. #if MOTHERBOARD == 77
  307. #define X_STEP_PIN 54
  308. #define X_DIR_PIN 55
  309. #define X_ENABLE_PIN 38
  310. #define X_MIN_PIN 3
  311. #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  312. #define Y_STEP_PIN 60
  313. #define Y_DIR_PIN 61
  314. #define Y_ENABLE_PIN 56
  315. #define Y_MIN_PIN 14
  316. #define Y_MAX_PIN -1 //15
  317. #define Z_STEP_PIN 46
  318. #define Z_DIR_PIN 48
  319. #define Z_ENABLE_PIN 63
  320. #define Z_MIN_PIN 18
  321. #define Z_MAX_PIN -1
  322. #define Z2_STEP_PIN 36
  323. #define Z2_DIR_PIN 34
  324. #define Z2_ENABLE_PIN 30
  325. #define E0_STEP_PIN 26
  326. #define E0_DIR_PIN 28
  327. #define E0_ENABLE_PIN 24
  328. #define E1_STEP_PIN 36
  329. #define E1_DIR_PIN 34
  330. #define E1_ENABLE_PIN 30
  331. #define SDPOWER -1
  332. #define SDSS 25//53
  333. #define LED_PIN 13
  334. #define BEEPER 33
  335. #else
  336. #define X_STEP_PIN 54
  337. #define X_DIR_PIN 55
  338. #define X_ENABLE_PIN 38
  339. #define X_MIN_PIN 3
  340. #define X_MAX_PIN 2
  341. #define Y_STEP_PIN 60
  342. #define Y_DIR_PIN 61
  343. #define Y_ENABLE_PIN 56
  344. #define Y_MIN_PIN 14
  345. #define Y_MAX_PIN 15
  346. #define Z_STEP_PIN 46
  347. #define Z_DIR_PIN 48
  348. #define Z_ENABLE_PIN 62
  349. #define Z_MIN_PIN 18
  350. #define Z_MAX_PIN 19
  351. #define Z2_STEP_PIN 36
  352. #define Z2_DIR_PIN 34
  353. #define Z2_ENABLE_PIN 30
  354. #define E0_STEP_PIN 26
  355. #define E0_DIR_PIN 28
  356. #define E0_ENABLE_PIN 24
  357. #define E1_STEP_PIN 36
  358. #define E1_DIR_PIN 34
  359. #define E1_ENABLE_PIN 30
  360. #define SDPOWER -1
  361. #define SDSS 53
  362. #define LED_PIN 13
  363. #endif
  364. #if MOTHERBOARD == 33 || MOTHERBOARD == 35 || MOTHERBOARD == 67
  365. #define FAN_PIN 9 // (Sprinter config)
  366. #else
  367. #define FAN_PIN 4 // IO pin. Buffer needed
  368. #endif
  369. #if MOTHERBOARD == 77
  370. #define FAN_PIN 8
  371. #endif
  372. #if MOTHERBOARD == 35
  373. #define CONTROLLERFAN_PIN 10 //Pin used for the fan to cool controller
  374. #endif
  375. #define PS_ON_PIN 12
  376. #if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
  377. #define KILL_PIN 41
  378. #else
  379. #define KILL_PIN -1
  380. #endif
  381. #if MOTHERBOARD == 35
  382. #define HEATER_0_PIN 8
  383. #else
  384. #define HEATER_0_PIN 10 // EXTRUDER 1
  385. #endif
  386. #if MOTHERBOARD == 33 || MOTHERBOARD == 67
  387. #define HEATER_1_PIN -1
  388. #else
  389. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  390. #endif
  391. #define HEATER_2_PIN -1
  392. #if MOTHERBOARD == 77
  393. #define HEATER_0_PIN 10
  394. #define HEATER_1_PIN 12
  395. #define HEATER_2_PIN 6
  396. #endif
  397. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  398. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  399. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  400. #if MOTHERBOARD == 35
  401. #define HEATER_BED_PIN -1 // NO BED
  402. #else
  403. #if MOTHERBOARD == 77
  404. #define HEATER_BED_PIN 9 // BED
  405. #else
  406. #define HEATER_BED_PIN 8 // BED
  407. #endif
  408. #endif
  409. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  410. #ifdef NUM_SERVOS
  411. #define SERVO0_PIN 11
  412. #if NUM_SERVOS > 1
  413. #define SERVO1_PIN 6
  414. #endif
  415. #if NUM_SERVOS > 2
  416. #define SERVO2_PIN 5
  417. #endif
  418. #if NUM_SERVOS > 3
  419. #define SERVO3_PIN 4
  420. #endif
  421. #endif
  422. #ifdef TEMP_STAT_LEDS
  423. #if MOTHERBOARD == 67
  424. #define STAT_LED_RED 6
  425. #define STAT_LED_BLUE 11
  426. #endif
  427. #endif
  428. #ifdef ULTRA_LCD
  429. #ifdef NEWPANEL
  430. #define LCD_PINS_RS 16
  431. #define LCD_PINS_ENABLE 17
  432. #define LCD_PINS_D4 23
  433. #define LCD_PINS_D5 25
  434. #define LCD_PINS_D6 27
  435. #define LCD_PINS_D7 29
  436. #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
  437. #define BEEPER 37
  438. #define BTN_EN1 31
  439. #define BTN_EN2 33
  440. #define BTN_ENC 35
  441. #define SDCARDDETECT 49
  442. #elif defined(LCD_I2C_PANELOLU2)
  443. #define BTN_EN1 47 //reverse if the encoder turns the wrong way.
  444. #define BTN_EN2 43
  445. #define BTN_ENC 32
  446. #define SDSS 53
  447. #define SDCARDDETECT -1
  448. #define KILL_PIN 41
  449. #elif defined(LCD_I2C_VIKI)
  450. #define BTN_EN1 22 //reverse if the encoder turns the wrong way.
  451. #define BTN_EN2 7
  452. #define BTN_ENC -1
  453. #define SDSS 53
  454. #define SDCARDDETECT 49
  455. #else
  456. //arduino pin which triggers an piezzo beeper
  457. #define BEEPER 33 // Beeper on AUX-4
  458. //buttons are directly attached using AUX-2
  459. #ifdef REPRAPWORLD_KEYPAD
  460. #define BTN_EN1 64 // encoder
  461. #define BTN_EN2 59 // encoder
  462. #define BTN_ENC 63 // enter button
  463. #define SHIFT_OUT 40 // shift register
  464. #define SHIFT_CLK 44 // shift register
  465. #define SHIFT_LD 42 // shift register
  466. #else
  467. #define BTN_EN1 37
  468. #define BTN_EN2 35
  469. #define BTN_ENC 31 //the click
  470. #endif
  471. #ifdef G3D_PANEL
  472. #define SDCARDDETECT 49
  473. #else
  474. #define SDCARDDETECT -1 // Ramps does not use this port
  475. #endif
  476. #endif
  477. #if MOTHERBOARD == 77
  478. #define BEEPER -1
  479. #define LCD_PINS_RS 27
  480. #define LCD_PINS_ENABLE 29
  481. #define LCD_PINS_D4 37
  482. #define LCD_PINS_D5 35
  483. #define LCD_PINS_D6 33
  484. #define LCD_PINS_D7 31
  485. //buttons
  486. #define BTN_EN1 16
  487. #define BTN_EN2 17
  488. #define BTN_ENC 23 //the click
  489. #endif
  490. #else //old style panel with shift register
  491. //arduino pin witch triggers an piezzo beeper
  492. #define BEEPER 33 //No Beeper added
  493. //buttons are attached to a shift register
  494. // Not wired this yet
  495. //#define SHIFT_CLK 38
  496. //#define SHIFT_LD 42
  497. //#define SHIFT_OUT 40
  498. //#define SHIFT_EN 17
  499. #define LCD_PINS_RS 16
  500. #define LCD_PINS_ENABLE 17
  501. #define LCD_PINS_D4 23
  502. #define LCD_PINS_D5 25
  503. #define LCD_PINS_D6 27
  504. #define LCD_PINS_D7 29
  505. #endif
  506. #endif //ULTRA_LCD
  507. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3)
  508. #define X_STEP_PIN 26
  509. #define X_DIR_PIN 28
  510. #define X_ENABLE_PIN 24
  511. #define X_MIN_PIN 3
  512. #define X_MAX_PIN -1 //2
  513. #define Y_STEP_PIN 38
  514. #define Y_DIR_PIN 40
  515. #define Y_ENABLE_PIN 36
  516. #define Y_MIN_PIN 16
  517. #define Y_MAX_PIN -1 //17
  518. #define Z_STEP_PIN 44
  519. #define Z_DIR_PIN 46
  520. #define Z_ENABLE_PIN 42
  521. #define Z_MIN_PIN 18
  522. #define Z_MAX_PIN -1 //19
  523. #define E0_STEP_PIN 32
  524. #define E0_DIR_PIN 34
  525. #define E0_ENABLE_PIN 30
  526. #define SDPOWER 48
  527. #define SDSS 53
  528. #define LED_PIN 13
  529. #define PS_ON_PIN -1
  530. #define KILL_PIN -1
  531. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  532. #define HEATER_0_PIN 12 // RAMPS 1.0
  533. #define HEATER_BED_PIN -1 // RAMPS 1.0
  534. #define FAN_PIN 11 // RAMPS 1.0
  535. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  536. #define HEATER_0_PIN 10 // RAMPS 1.1
  537. #define HEATER_BED_PIN 8 // RAMPS 1.1
  538. #define FAN_PIN 9 // RAMPS 1.1
  539. #endif
  540. #define HEATER_1_PIN -1
  541. #define HEATER_2_PIN -1
  542. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  543. #define TEMP_1_PIN -1
  544. #define TEMP_2_PIN -1
  545. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  546. #endif // MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
  547. // SPI for Max6675 Thermocouple
  548. #ifndef SDSUPPORT
  549. // these pins are defined in the SD library if building with SD support
  550. #define MAX_SCK_PIN 52
  551. #define MAX_MISO_PIN 50
  552. #define MAX_MOSI_PIN 51
  553. #define MAX6675_SS 53
  554. #else
  555. #define MAX6675_SS 49
  556. #endif
  557. #endif //MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
  558. /****************************************************************************************
  559. * Duemilanove w/ ATMega328P pin assignment
  560. *
  561. ****************************************************************************************/
  562. #if MOTHERBOARD == 4
  563. #define KNOWN_BOARD 1
  564. #ifndef __AVR_ATmega328P__
  565. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  566. #endif
  567. #define X_STEP_PIN 19
  568. #define X_DIR_PIN 18
  569. #define X_ENABLE_PIN -1
  570. #define X_STOP_PIN 17
  571. #define Y_STEP_PIN 10
  572. #define Y_DIR_PIN 7
  573. #define Y_ENABLE_PIN -1
  574. #define Y_STOP_PIN 8
  575. #define Z_STEP_PIN 13
  576. #define Z_DIR_PIN 3
  577. #define Z_ENABLE_PIN 2
  578. #define Z_STOP_PIN 4
  579. #define E0_STEP_PIN 11
  580. #define E0_DIR_PIN 12
  581. #define E0_ENABLE_PIN -1
  582. #define SDPOWER -1
  583. #define SDSS -1
  584. #define LED_PIN -1
  585. #define FAN_PIN 5
  586. #define PS_ON_PIN -1
  587. #define KILL_PIN -1
  588. #define HEATER_0_PIN 6
  589. #define HEATER_1_PIN -1
  590. #define HEATER_2_PIN -1
  591. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  592. #define TEMP_1_PIN -1
  593. #define TEMP_2_PIN -1
  594. #define HEATER_BED_PIN -1
  595. #define TEMP_BED_PIN -1
  596. #endif
  597. /****************************************************************************************
  598. * Elefu RA Board Pin Assignments
  599. *
  600. ****************************************************************************************/
  601. #if MOTHERBOARD == 21
  602. #define KNOWN_BOARD 1
  603. #ifndef __AVR_ATmega2560__
  604. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  605. #endif
  606. #define X_STEP_PIN 49
  607. #define X_DIR_PIN 13
  608. #define X_ENABLE_PIN 48
  609. #define X_MIN_PIN 35
  610. #define X_MAX_PIN -1 //34
  611. #define Y_STEP_PIN 11
  612. #define Y_DIR_PIN 9
  613. #define Y_ENABLE_PIN 12
  614. #define Y_MIN_PIN 33
  615. #define Y_MAX_PIN -1 //32
  616. #define Z_STEP_PIN 7
  617. #define Z_DIR_PIN 6
  618. #define Z_ENABLE_PIN 8
  619. #define Z_MIN_PIN 31
  620. #define Z_MAX_PIN -1 //30
  621. #define E2_STEP_PIN 43
  622. #define E2_DIR_PIN 47
  623. #define E2_ENABLE_PIN 42
  624. #define E1_STEP_PIN 18
  625. #define E1_DIR_PIN 19
  626. #define E1_ENABLE_PIN 38
  627. #define E0_STEP_PIN 40
  628. #define E0_DIR_PIN 41
  629. #define E0_ENABLE_PIN 37
  630. #define SDPOWER -1
  631. #define LED_PIN -1 //Use +12V Aux port for LED Ring
  632. #define FAN_PIN 16 //5V PWM
  633. #define PS_ON_PIN 10 //Set to -1 if using a manual switch on the PWRSW Connector
  634. #define SLEEP_WAKE_PIN 26 //This feature still needs work
  635. #define HEATER_0_PIN 45 //12V PWM1
  636. #define HEATER_1_PIN 46 //12V PWM2
  637. #define HEATER_2_PIN 17 //12V PWM3
  638. #define HEATER_BED_PIN 44 //DOUBLE 12V PWM
  639. #define TEMP_0_PIN 3 //ANALOG NUMBERING
  640. #define TEMP_1_PIN 2 //ANALOG NUMBERING
  641. #define TEMP_2_PIN 1 //ANALOG NUMBERING
  642. #define TEMP_BED_PIN 0 //ANALOG NUMBERING
  643. #define BEEPER 36
  644. #define KILL_PIN -1
  645. // M240 Triggers a camera by emulating a Canon RC-1 Remote
  646. // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
  647. #define PHOTOGRAPH_PIN 29
  648. #ifdef RA_CONTROL_PANEL
  649. #define SDSS 53
  650. #define SDCARDDETECT 28
  651. #define BTN_EN1 14
  652. #define BTN_EN2 39
  653. #define BTN_ENC 15 //the click
  654. #define BLEN_C 2
  655. #define BLEN_B 1
  656. #define BLEN_A 0
  657. //encoder rotation values
  658. #define encrot0 0
  659. #define encrot1 2
  660. #define encrot2 3
  661. #define encrot3 1
  662. #endif //RA_CONTROL_PANEL
  663. #ifdef RA_DISCO
  664. //variables for which pins the TLC5947 is using
  665. #define TLC_CLOCK_PIN 25
  666. #define TLC_BLANK_PIN 23
  667. #define TLC_XLAT_PIN 22
  668. #define TLC_DATA_PIN 24
  669. //We also need to define pin to port number mapping for the 2560 to match the pins listed above. If you change the TLC pins, update this as well per the 2560 datasheet!
  670. //This currently only works with the RA Board.
  671. #define TLC_CLOCK_BIT 3 //bit 3 on port A
  672. #define TLC_CLOCK_PORT &PORTA //bit 3 on port A
  673. #define TLC_BLANK_BIT 1 //bit 1 on port A
  674. #define TLC_BLANK_PORT &PORTA //bit 1 on port A
  675. #define TLC_DATA_BIT 2 //bit 2 on port A
  676. #define TLC_DATA_PORT &PORTA //bit 2 on port A
  677. #define TLC_XLAT_BIT 0 //bit 0 on port A
  678. #define TLC_XLAT_PORT &PORTA //bit 0 on port A
  679. //change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful
  680. //Leave it at at least 1 if you have enabled RA_LIGHTING
  681. //The number of TLC5947 boards chained together for use with the animation, additional ones will repeat the animation on them, but are not individually addressable and mimic those before them. You can leave the default at 2 even if you only have 1 TLC5947 module.
  682. #define NUM_TLCS 2
  683. //These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions.
  684. //Modify them according to your specific situation.
  685. //NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs.
  686. #define TRANS_ARRAY {0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8} //forwards
  687. //#define TRANS_ARRAY {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15} //backwards
  688. #endif //RA_LIGHTING
  689. #endif /* Ra Board */
  690. /****************************************************************************************
  691. * Gen6 pin assignment
  692. *
  693. ****************************************************************************************/
  694. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  695. #define KNOWN_BOARD 1
  696. #ifndef __AVR_ATmega644P__
  697. #ifndef __AVR_ATmega1284P__
  698. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  699. #endif
  700. #endif
  701. //x axis pins
  702. #define X_STEP_PIN 15
  703. #define X_DIR_PIN 18
  704. #define X_ENABLE_PIN 19
  705. #define X_STOP_PIN 20
  706. //y axis pins
  707. #define Y_STEP_PIN 23
  708. #define Y_DIR_PIN 22
  709. #define Y_ENABLE_PIN 24
  710. #define Y_STOP_PIN 25
  711. //z axis pins
  712. #define Z_STEP_PIN 27
  713. #define Z_DIR_PIN 28
  714. #define Z_ENABLE_PIN 29
  715. #define Z_STOP_PIN 30
  716. //extruder pins
  717. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  718. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  719. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  720. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  721. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  722. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  723. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  724. #define HEATER_1_PIN -1
  725. #define HEATER_2_PIN -1
  726. #if MOTHERBOARD == 5
  727. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  728. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  729. #else
  730. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  731. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  732. #endif
  733. #define SDPOWER -1
  734. #define SDSS 17
  735. #define LED_PIN -1 //changed @ rkoeppl 20110410
  736. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  737. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  738. #define KILL_PIN -1 //changed @ drakelive 20120830
  739. //our pin for debugging.
  740. #define DEBUG_PIN 0
  741. //our RS485 pins
  742. #define TX_ENABLE_PIN 12
  743. #define RX_ENABLE_PIN 13
  744. #endif
  745. /****************************************************************************************
  746. * Sanguinololu pin assignment
  747. *
  748. ****************************************************************************************/
  749. #if MOTHERBOARD == 64
  750. #define STB
  751. #endif
  752. #if MOTHERBOARD == 63 || MOTHERBOARD == 66
  753. #define MELZI
  754. #endif
  755. #if MOTHERBOARD == 65
  756. #define AZTEEG_X1
  757. #endif
  758. #if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64 || MOTHERBOARD == 65 || MOTHERBOARD == 66
  759. #undef MOTHERBOARD
  760. #define MOTHERBOARD 6
  761. #define SANGUINOLOLU_V_1_2
  762. #endif
  763. #if MOTHERBOARD == 6
  764. #define KNOWN_BOARD 1
  765. #ifndef __AVR_ATmega644P__
  766. #ifndef __AVR_ATmega1284P__
  767. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  768. #endif
  769. #endif
  770. #define X_STEP_PIN 15
  771. #define X_DIR_PIN 21
  772. #define X_STOP_PIN 18
  773. #define Y_STEP_PIN 22
  774. #define Y_DIR_PIN 23
  775. #define Y_STOP_PIN 19
  776. #define Z_STEP_PIN 3
  777. #define Z_DIR_PIN 2
  778. #define Z_STOP_PIN 20
  779. #define E0_STEP_PIN 1
  780. #define E0_DIR_PIN 0
  781. #define LED_PIN -1
  782. #define FAN_PIN -1
  783. #if FAN_PIN == 12 || FAN_PIN ==13
  784. #define FAN_SOFT_PWM
  785. #endif
  786. #ifdef MELZI
  787. #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. */
  788. #define FAN_PIN 4 // Works for Panelolu2 too
  789. #endif
  790. #ifdef STB
  791. #define FAN_PIN 4
  792. // Uncomment this if you have the first generation (V1.10) of STBs board
  793. #define LCD_PIN_BL 17 // LCD backlight LED
  794. #endif
  795. #ifdef AZTEEG_X1
  796. #define FAN_PIN 4
  797. #endif
  798. #define PS_ON_PIN -1
  799. #define KILL_PIN -1
  800. #define HEATER_0_PIN 13 // (extruder)
  801. #define HEATER_1_PIN -1
  802. #define HEATER_2_PIN -1
  803. #ifdef SANGUINOLOLU_V_1_2
  804. #define HEATER_BED_PIN 12 // (bed)
  805. #define X_ENABLE_PIN 14
  806. #define Y_ENABLE_PIN 14
  807. #define Z_ENABLE_PIN 26
  808. #define E0_ENABLE_PIN 14
  809. #ifdef LCD_I2C_PANELOLU2
  810. #define FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan
  811. #endif
  812. #else
  813. #define HEATER_BED_PIN 14 // (bed)
  814. #define X_ENABLE_PIN -1
  815. #define Y_ENABLE_PIN -1
  816. #define Z_ENABLE_PIN -1
  817. #define E0_ENABLE_PIN -1
  818. #endif
  819. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  820. #define TEMP_1_PIN -1
  821. #define TEMP_2_PIN -1
  822. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  823. #define SDPOWER -1
  824. #define SDSS 31
  825. /* 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. */
  826. //#define SDSS 24
  827. #ifdef ULTRA_LCD
  828. #ifdef NEWPANEL
  829. //we have no buzzer installed
  830. #define BEEPER -1
  831. //LCD Pins
  832. #ifdef DOGLCD
  833. // Pins for DOGM SPI LCD Support
  834. #define DOGLCD_A0 30
  835. #define DOGLCD_CS 29
  836. // GLCD features
  837. #define LCD_CONTRAST 1
  838. // Uncomment screen orientation
  839. // #define LCD_SCREEN_ROT_0
  840. // #define LCD_SCREEN_ROT_90
  841. #define LCD_SCREEN_ROT_180
  842. // #define LCD_SCREEN_ROT_270
  843. #else // standard Hitachi LCD controller
  844. #define LCD_PINS_RS 4
  845. #define LCD_PINS_ENABLE 17
  846. #define LCD_PINS_D4 30
  847. #define LCD_PINS_D5 29
  848. #define LCD_PINS_D6 28
  849. #define LCD_PINS_D7 27
  850. #endif
  851. //The encoder and click button
  852. #define BTN_EN1 11
  853. #define BTN_EN2 10
  854. #ifdef LCD_I2C_PANELOLU2
  855. #ifdef MELZI
  856. #define BTN_ENC 29 //the click switch
  857. #define SDSS 30 //to use the SD card reader on the Panelolu2 rather than the melzi board
  858. #else
  859. #define BTN_ENC 30 //the click switch
  860. #endif
  861. #else
  862. #define BTN_ENC 16 //the click switch
  863. #endif //Panelolu2
  864. //not connected to a pin
  865. #define SDCARDDETECT -1
  866. #endif //Newpanel
  867. #endif //Ultipanel
  868. #ifdef MAKRPANEL
  869. #define BEEPER 29
  870. // Pins for DOGM SPI LCD Support
  871. #define DOGLCD_A0 30
  872. #define DOGLCD_CS 17
  873. #define LCD_PIN_BL 28 // backlight LED on PA3
  874. // GLCD features
  875. #define LCD_CONTRAST 1
  876. // Uncomment screen orientation
  877. #define LCD_SCREEN_ROT_0
  878. // #define LCD_SCREEN_ROT_90
  879. // #define LCD_SCREEN_ROT_180
  880. // #define LCD_SCREEN_ROT_270
  881. //The encoder and click button
  882. #define BTN_EN1 11
  883. #define BTN_EN2 10
  884. #define BTN_ENC 16 //the click switch
  885. //not connected to a pin
  886. #define SDCARDDETECT -1
  887. #endif //Makrpanel
  888. #endif
  889. #if MOTHERBOARD == 7
  890. #define KNOWN_BOARD
  891. /*****************************************************************
  892. * Ultimaker pin assignment
  893. ******************************************************************/
  894. #ifndef __AVR_ATmega1280__
  895. #ifndef __AVR_ATmega2560__
  896. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  897. #endif
  898. #endif
  899. #define LARGE_FLASH true
  900. #define X_STEP_PIN 25
  901. #define X_DIR_PIN 23
  902. #define X_MIN_PIN 22
  903. #define X_MAX_PIN 24
  904. #define X_ENABLE_PIN 27
  905. #define Y_STEP_PIN 31
  906. #define Y_DIR_PIN 33
  907. #define Y_MIN_PIN 26
  908. #define Y_MAX_PIN 28
  909. #define Y_ENABLE_PIN 29
  910. #define Z_STEP_PIN 37
  911. #define Z_DIR_PIN 39
  912. #define Z_MIN_PIN 30
  913. #define Z_MAX_PIN 32
  914. #define Z_ENABLE_PIN 35
  915. #define HEATER_BED_PIN 4
  916. #define TEMP_BED_PIN 10
  917. #define HEATER_0_PIN 2
  918. #define TEMP_0_PIN 8
  919. #define HEATER_1_PIN 3
  920. #define TEMP_1_PIN 9
  921. #define HEATER_2_PIN -1
  922. #define TEMP_2_PIN -1
  923. #define E0_STEP_PIN 43
  924. #define E0_DIR_PIN 45
  925. #define E0_ENABLE_PIN 41
  926. #define E1_STEP_PIN 49
  927. #define E1_DIR_PIN 47
  928. #define E1_ENABLE_PIN 48
  929. #define SDPOWER -1
  930. #define SDSS 53
  931. #define LED_PIN 13
  932. #define FAN_PIN 7
  933. #define PS_ON_PIN 12
  934. #define KILL_PIN -1
  935. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  936. #ifdef ULTRA_LCD
  937. #ifdef NEWPANEL
  938. //arduino pin witch triggers an piezzo beeper
  939. #define BEEPER 18
  940. #define LCD_PINS_RS 20
  941. #define LCD_PINS_ENABLE 17
  942. #define LCD_PINS_D4 16
  943. #define LCD_PINS_D5 21
  944. #define LCD_PINS_D6 5
  945. #define LCD_PINS_D7 6
  946. //buttons are directly attached
  947. #define BTN_EN1 40
  948. #define BTN_EN2 42
  949. #define BTN_ENC 19 //the click
  950. #define SDCARDDETECT 38
  951. #else //old style panel with shift register
  952. //arduino pin witch triggers an piezzo beeper
  953. #define BEEPER 18
  954. //buttons are attached to a shift register
  955. #define SHIFT_CLK 38
  956. #define SHIFT_LD 42
  957. #define SHIFT_OUT 40
  958. #define SHIFT_EN 17
  959. #define LCD_PINS_RS 16
  960. #define LCD_PINS_ENABLE 5
  961. #define LCD_PINS_D4 6
  962. #define LCD_PINS_D5 21
  963. #define LCD_PINS_D6 20
  964. #define LCD_PINS_D7 19
  965. #define SDCARDDETECT -1
  966. #endif
  967. #endif //ULTRA_LCD
  968. #endif
  969. #if MOTHERBOARD == 71
  970. #define KNOWN_BOARD
  971. /*****************************************************************
  972. * Ultimaker pin assignment (Old electronics)
  973. ******************************************************************/
  974. #ifndef __AVR_ATmega1280__
  975. #ifndef __AVR_ATmega2560__
  976. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  977. #endif
  978. #endif
  979. #define LARGE_FLASH true
  980. #define X_STEP_PIN 25
  981. #define X_DIR_PIN 23
  982. #define X_MIN_PIN 15
  983. #define X_MAX_PIN 14
  984. #define X_ENABLE_PIN 27
  985. #define Y_STEP_PIN 31
  986. #define Y_DIR_PIN 33
  987. #define Y_MIN_PIN 17
  988. #define Y_MAX_PIN 16
  989. #define Y_ENABLE_PIN 29
  990. #define Z_STEP_PIN 37
  991. #define Z_DIR_PIN 39
  992. #define Z_MIN_PIN 19
  993. #define Z_MAX_PIN 18
  994. #define Z_ENABLE_PIN 35
  995. #define HEATER_BED_PIN -1
  996. #define TEMP_BED_PIN -1
  997. #define HEATER_0_PIN 2
  998. #define TEMP_0_PIN 8
  999. #define HEATER_1_PIN 1
  1000. #define TEMP_1_PIN 1
  1001. #define HEATER_2_PIN -1
  1002. #define TEMP_2_PIN -1
  1003. #define E0_STEP_PIN 43
  1004. #define E0_DIR_PIN 45
  1005. #define E0_ENABLE_PIN 41
  1006. #define E1_STEP_PIN -1
  1007. #define E1_DIR_PIN -1
  1008. #define E1_ENABLE_PIN -1
  1009. #define SDPOWER -1
  1010. #define SDSS -1
  1011. #define LED_PIN -1
  1012. #define FAN_PIN -1
  1013. #define PS_ON_PIN -1
  1014. #define KILL_PIN -1
  1015. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1016. #define LCD_PINS_RS 24
  1017. #define LCD_PINS_ENABLE 22
  1018. #define LCD_PINS_D4 36
  1019. #define LCD_PINS_D5 34
  1020. #define LCD_PINS_D6 32
  1021. #define LCD_PINS_D7 30
  1022. #endif
  1023. /****************************************************************************************
  1024. * RUMBA pin assignment
  1025. *
  1026. ****************************************************************************************/
  1027. #if MOTHERBOARD == 80
  1028. #define KNOWN_BOARD 1
  1029. #ifndef __AVR_ATmega2560__
  1030. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1031. #endif
  1032. #define X_STEP_PIN 17
  1033. #define X_DIR_PIN 16
  1034. #define X_ENABLE_PIN 48
  1035. #define X_MIN_PIN 37
  1036. #define X_MAX_PIN 36
  1037. #define Y_STEP_PIN 54
  1038. #define Y_DIR_PIN 47
  1039. #define Y_ENABLE_PIN 55
  1040. #define Y_MIN_PIN 35
  1041. #define Y_MAX_PIN 34
  1042. #define Z_STEP_PIN 57
  1043. #define Z_DIR_PIN 56
  1044. #define Z_ENABLE_PIN 62
  1045. #define Z_MIN_PIN 33
  1046. #define Z_MAX_PIN 32
  1047. #define E0_STEP_PIN 23
  1048. #define E0_DIR_PIN 22
  1049. #define E0_ENABLE_PIN 24
  1050. #define E1_STEP_PIN 26
  1051. #define E1_DIR_PIN 25
  1052. #define E1_ENABLE_PIN 27
  1053. #define E2_STEP_PIN 29
  1054. #define E2_DIR_PIN 28
  1055. #define E2_ENABLE_PIN 39
  1056. #define LED_PIN 13
  1057. #define FAN_PIN 7
  1058. //additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
  1059. #define PS_ON_PIN 45
  1060. #define KILL_PIN 46
  1061. #if (TEMP_SENSOR_0==0)
  1062. #define TEMP_0_PIN -1
  1063. #define HEATER_0_PIN -1
  1064. #else
  1065. #define HEATER_0_PIN 2 // EXTRUDER 1
  1066. #if (TEMP_SENSOR_0==-1)
  1067. #define TEMP_0_PIN 6 // ANALOG NUMBERING - connector *K1* on RUMBA thermocouple ADD ON is used
  1068. #else
  1069. #define TEMP_0_PIN 15 // ANALOG NUMBERING - default connector for thermistor *T0* on rumba board is used
  1070. #endif
  1071. #endif
  1072. #if (TEMP_SENSOR_1==0)
  1073. #define TEMP_1_PIN -1
  1074. #define HEATER_1_PIN -1
  1075. #else
  1076. #define HEATER_1_PIN 3 // EXTRUDER 2
  1077. #if (TEMP_SENSOR_1==-1)
  1078. #define TEMP_1_PIN 5 // ANALOG NUMBERING - connector *K2* on RUMBA thermocouple ADD ON is used
  1079. #else
  1080. #define TEMP_1_PIN 14 // ANALOG NUMBERING - default connector for thermistor *T1* on rumba board is used
  1081. #endif
  1082. #endif
  1083. #if (TEMP_SENSOR_2==0)
  1084. #define TEMP_2_PIN -1
  1085. #define HEATER_2_PIN -1
  1086. #else
  1087. #define HEATER_2_PIN 6 // EXTRUDER 3
  1088. #if (TEMP_SENSOR_2==-1)
  1089. #define TEMP_2_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_BED is defined as thermocouple
  1090. #else
  1091. #define TEMP_2_PIN 13 // ANALOG NUMBERING - default connector for thermistor *T2* on rumba board is used
  1092. #endif
  1093. #endif
  1094. //optional for extruder 4 or chamber: #define TEMP_X_PIN 12 // ANALOG NUMBERING - default connector for thermistor *T3* on rumba board is used
  1095. //optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4
  1096. #if (TEMP_SENSOR_BED==0)
  1097. #define TEMP_BED_PIN -1
  1098. #define HEATER_BED_PIN -1
  1099. #else
  1100. #define HEATER_BED_PIN 9 // BED
  1101. #if (TEMP_SENSOR_BED==-1)
  1102. #define TEMP_BED_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_2 is defined as thermocouple
  1103. #else
  1104. #define TEMP_BED_PIN 11 // ANALOG NUMBERING - default connector for thermistor *THB* on rumba board is used
  1105. #endif
  1106. #endif
  1107. #define SDPOWER -1
  1108. #define SDSS 53
  1109. #define SDCARDDETECT 49
  1110. #define BEEPER 44
  1111. #define LCD_PINS_RS 19
  1112. #define LCD_PINS_ENABLE 42
  1113. #define LCD_PINS_D4 18
  1114. #define LCD_PINS_D5 38
  1115. #define LCD_PINS_D6 41
  1116. #define LCD_PINS_D7 40
  1117. #define BTN_EN1 11
  1118. #define BTN_EN2 12
  1119. #define BTN_ENC 43
  1120. #endif //MOTHERBOARD==80
  1121. /****************************************************************************************
  1122. * Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
  1123. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  1124. http://www.pjrc.com/teensy/teensyduino.html
  1125. * See http://reprap.org/wiki/Printrboard for more info
  1126. ****************************************************************************************/
  1127. #if MOTHERBOARD == 8 || MOTHERBOARD == 81
  1128. #define KNOWN_BOARD 1
  1129. #define AT90USB 1286 // Disable MarlinSerial etc.
  1130. #ifndef __AVR_AT90USB1286__
  1131. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  1132. #endif
  1133. #define LARGE_FLASH true
  1134. #define X_STEP_PIN 0
  1135. #define X_DIR_PIN 1
  1136. #define X_ENABLE_PIN 39
  1137. #define Y_STEP_PIN 2
  1138. #define Y_DIR_PIN 3
  1139. #define Y_ENABLE_PIN 38
  1140. #define Z_STEP_PIN 4
  1141. #define Z_DIR_PIN 5
  1142. #define Z_ENABLE_PIN 23
  1143. #define E0_STEP_PIN 6
  1144. #define E0_DIR_PIN 7
  1145. #define E0_ENABLE_PIN 19
  1146. #define HEATER_0_PIN 21 // Extruder
  1147. #define HEATER_1_PIN -1
  1148. #define HEATER_2_PIN -1
  1149. #define HEATER_BED_PIN 20 // Bed
  1150. #define FAN_PIN 22 // Fan
  1151. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  1152. // for the fan and Teensyduino uses a different pin mapping.
  1153. #if MOTHERBOARD == 8 // Teensylu
  1154. #define X_STOP_PIN 13
  1155. #define Y_STOP_PIN 14
  1156. #define Z_STOP_PIN 15
  1157. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1158. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1159. #else // Printrboard
  1160. #define X_STOP_PIN 35
  1161. #define Y_STOP_PIN 8
  1162. #define Z_STOP_PIN 36
  1163. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  1164. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  1165. #endif
  1166. #define TEMP_1_PIN -1
  1167. #define TEMP_2_PIN -1
  1168. #define SDPOWER -1
  1169. #define SDSS 8
  1170. #define LED_PIN -1
  1171. #define PS_ON_PIN -1
  1172. #define KILL_PIN -1
  1173. #define ALARM_PIN -1
  1174. #ifndef SDSUPPORT
  1175. // these pins are defined in the SD library if building with SD support
  1176. #define SCK_PIN 9
  1177. #define MISO_PIN 11
  1178. #define MOSI_PIN 10
  1179. #endif
  1180. #endif // MOTHERBOARD == 8 (Teensylu) or 81 (Printrboard)
  1181. /****************************************************************************************
  1182. * Brainwave 1.0 pin assignments (AT90USB646)
  1183. * Requires hardware bundle for Arduino:
  1184. https://github.com/unrepentantgeek/brainwave-arduino
  1185. ****************************************************************************************/
  1186. #if MOTHERBOARD == 82
  1187. #define KNOWN_BOARD 1
  1188. #define AT90USB 646 // Disable MarlinSerial etc.
  1189. #ifndef __AVR_AT90USB646__
  1190. #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
  1191. #endif
  1192. #define X_STEP_PIN 27
  1193. #define X_DIR_PIN 29
  1194. #define X_ENABLE_PIN 28
  1195. #define X_STOP_PIN 7
  1196. #define X_ATT_PIN 26
  1197. #define Y_STEP_PIN 31
  1198. #define Y_DIR_PIN 33
  1199. #define Y_ENABLE_PIN 32
  1200. #define Y_STOP_PIN 6
  1201. #define Y_ATT_PIN 30
  1202. #define Z_STEP_PIN 17
  1203. #define Z_DIR_PIN 19
  1204. #define Z_ENABLE_PIN 18
  1205. #define Z_STOP_PIN 5
  1206. #define Z_ATT_PIN 16
  1207. #define E0_STEP_PIN 21
  1208. #define E0_DIR_PIN 23
  1209. #define E0_ENABLE_PIN 22
  1210. #define E0_ATT_PIN 20
  1211. #define HEATER_0_PIN 4 // Extruder
  1212. #define HEATER_1_PIN -1
  1213. #define HEATER_2_PIN -1
  1214. #define HEATER_BED_PIN 38 // Bed
  1215. #define FAN_PIN 3 // Fan
  1216. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1217. #define TEMP_1_PIN -1
  1218. #define TEMP_2_PIN -1
  1219. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1220. #define SDPOWER -1
  1221. #define SDSS -1
  1222. #define LED_PIN 39
  1223. #define PS_ON_PIN -1
  1224. #define KILL_PIN -1
  1225. #define ALARM_PIN -1
  1226. #ifndef SDSUPPORT
  1227. // these pins are defined in the SD library if building with SD support
  1228. #define SCK_PIN 9
  1229. #define MISO_PIN 11
  1230. #define MOSI_PIN 10
  1231. #endif
  1232. #endif // MOTHERBOARD == 82 (Brainwave)
  1233. /****************************************************************************************
  1234. * Gen3+ pin assignment
  1235. *
  1236. ****************************************************************************************/
  1237. #if MOTHERBOARD == 9
  1238. #define MOTHERBOARD 6 /*TODO: Figure out, Why is this done?*/
  1239. #define KNOWN_BOARD 1
  1240. #ifndef __AVR_ATmega644P__
  1241. #ifndef __AVR_ATmega1284P__
  1242. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  1243. #endif
  1244. #endif
  1245. #define X_STEP_PIN 15
  1246. #define X_DIR_PIN 18
  1247. #define X_STOP_PIN 20
  1248. #define Y_STEP_PIN 23
  1249. #define Y_DIR_PIN 22
  1250. #define Y_STOP_PIN 25
  1251. #define Z_STEP_PIN 27
  1252. #define Z_DIR_PIN 28
  1253. #define Z_STOP_PIN 30
  1254. #define E_STEP_PIN 17
  1255. #define E_DIR_PIN 21
  1256. #define LED_PIN -1
  1257. #define FAN_PIN -1
  1258. #define PS_ON_PIN 14
  1259. #define KILL_PIN -1
  1260. #define HEATER_0_PIN 12 // (extruder)
  1261. #define HEATER_1_PIN 16 // (bed)
  1262. #define X_ENABLE_PIN 19
  1263. #define Y_ENABLE_PIN 24
  1264. #define Z_ENABLE_PIN 29
  1265. #define E_ENABLE_PIN 13
  1266. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  1267. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  1268. #define TEMP_2_PIN -1
  1269. #define SDPOWER -1
  1270. #define SDSS 4
  1271. #define HEATER_2_PIN -1
  1272. #endif
  1273. /****************************************************************************************
  1274. * Open Motion controller with enable based extruders
  1275. *
  1276. * ATMega644
  1277. *
  1278. * +---\/---+
  1279. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  1280. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  1281. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  1282. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  1283. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  1284. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  1285. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  1286. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  1287. * RST 9| |32 AREF
  1288. * VCC 10| |31 GND
  1289. * GND 11| |30 AVCC
  1290. * XTAL2 12| |29 PC7 (D 23)
  1291. * XTAL1 13| |28 PC6 (D 22)
  1292. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  1293. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  1294. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  1295. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  1296. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  1297. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  1298. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  1299. * +--------+
  1300. *
  1301. ****************************************************************************************/
  1302. #if MOTHERBOARD == 90 //Alpha OMCA board
  1303. #define KNOWN_BOARD 1
  1304. #ifndef __AVR_ATmega644__
  1305. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  1306. #endif
  1307. #define X_STEP_PIN 21
  1308. #define X_DIR_PIN 20
  1309. #define X_ENABLE_PIN 24
  1310. #define X_STOP_PIN 0
  1311. #define Y_STEP_PIN 23
  1312. #define Y_DIR_PIN 22
  1313. #define Y_ENABLE_PIN 24
  1314. #define Y_STOP_PIN 1
  1315. #define Z_STEP_PIN 26
  1316. #define Z_DIR_PIN 25
  1317. #define Z_ENABLE_PIN 24
  1318. #define Z_STOP_PIN 2
  1319. #define E0_STEP_PIN 28
  1320. #define E0_DIR_PIN 27
  1321. #define E0_ENABLE_PIN 24
  1322. #define E1_STEP_PIN -1 // 19
  1323. #define E1_DIR_PIN -1 // 18
  1324. #define E1_ENABLE_PIN 24
  1325. #define E2_STEP_PIN -1 // 17
  1326. #define E2_DIR_PIN -1 // 16
  1327. #define E2_ENABLE_PIN 24
  1328. #define SDPOWER -1
  1329. #define SDSS 11
  1330. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1331. #define LED_PIN -1
  1332. #define FAN_PIN 3
  1333. #define PS_ON_PIN -1
  1334. #define KILL_PIN -1
  1335. #define HEATER_0_PIN 4
  1336. #define HEATER_1_PIN -1 // 12
  1337. #define HEATER_2_PIN -1 // 13
  1338. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  1339. #define TEMP_1_PIN -1 // 1
  1340. #define TEMP_2_PIN -1 // 2
  1341. #define HEATER_BED_PIN -1 // 14/15
  1342. #define TEMP_BED_PIN -1 // 1,2 or I2C
  1343. /* 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) */
  1344. #endif
  1345. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  1346. #define KNOWN_BOARD 1
  1347. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  1348. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  1349. #endif
  1350. #define X_STEP_PIN 26
  1351. #define X_DIR_PIN 25
  1352. #define X_ENABLE_PIN 10
  1353. #define X_STOP_PIN 0
  1354. #define Y_STEP_PIN 28
  1355. #define Y_DIR_PIN 27
  1356. #define Y_ENABLE_PIN 10
  1357. #define Y_STOP_PIN 1
  1358. #define Z_STEP_PIN 23
  1359. #define Z_DIR_PIN 22
  1360. #define Z_ENABLE_PIN 10
  1361. #define Z_STOP_PIN 2
  1362. #define E0_STEP_PIN 24
  1363. #define E0_DIR_PIN 21
  1364. #define E0_ENABLE_PIN 10
  1365. /* future proofing */
  1366. #define __FS 20
  1367. #define __FD 19
  1368. #define __GS 18
  1369. #define __GD 13
  1370. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  1371. #define E1_STEP_PIN -1 // 21
  1372. #define E1_DIR_PIN -1 // 20
  1373. #define E1_ENABLE_PIN -1 // 19
  1374. #define E2_STEP_PIN -1 // 21
  1375. #define E2_DIR_PIN -1 // 20
  1376. #define E2_ENABLE_PIN -1 // 18
  1377. #define SDPOWER -1
  1378. #define SDSS 11
  1379. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1380. #define LED_PIN -1
  1381. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  1382. #define PS_ON_PIN -1
  1383. #define KILL_PIN -1
  1384. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  1385. #define HEATER_1_PIN -1
  1386. #define HEATER_2_PIN -1
  1387. #define HEATER_1_PIN -1
  1388. #define HEATER_2_PIN -1
  1389. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  1390. #define TEMP_1_PIN 1 // ANALOG
  1391. #define TEMP_2_PIN -1 // 2
  1392. #define HEATER_BED_PIN 4
  1393. #define TEMP_BED_PIN 2 // 1,2 or I2C
  1394. #define I2C_SCL 16
  1395. #define I2C_SDA 17
  1396. #endif
  1397. #if MOTHERBOARD == 301
  1398. #define KNOWN_BOARD
  1399. /*****************************************************************
  1400. * Rambo Pin Assignments
  1401. ******************************************************************/
  1402. #ifndef __AVR_ATmega2560__
  1403. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1404. #endif
  1405. #define LARGE_FLASH true
  1406. #define X_STEP_PIN 37
  1407. #define X_DIR_PIN 48
  1408. #define X_MIN_PIN 12
  1409. #define X_MAX_PIN 24
  1410. #define X_ENABLE_PIN 29
  1411. #define X_MS1_PIN 40
  1412. #define X_MS2_PIN 41
  1413. #define Y_STEP_PIN 36
  1414. #define Y_DIR_PIN 49
  1415. #define Y_MIN_PIN 11
  1416. #define Y_MAX_PIN 23
  1417. #define Y_ENABLE_PIN 28
  1418. #define Y_MS1_PIN 69
  1419. #define Y_MS2_PIN 39
  1420. #define Z_STEP_PIN 35
  1421. #define Z_DIR_PIN 47
  1422. #define Z_MIN_PIN 10
  1423. #define Z_MAX_PIN 30
  1424. #define Z_ENABLE_PIN 27
  1425. #define Z_MS1_PIN 68
  1426. #define Z_MS2_PIN 67
  1427. #define HEATER_BED_PIN 3
  1428. #define TEMP_BED_PIN 2
  1429. #define HEATER_0_PIN 9
  1430. #define TEMP_0_PIN 0
  1431. #define HEATER_1_PIN 7
  1432. #define TEMP_1_PIN 1
  1433. #ifdef BARICUDA
  1434. #define HEATER_2_PIN 6
  1435. #else
  1436. #define HEATER_2_PIN -1
  1437. #endif
  1438. #define TEMP_2_PIN -1
  1439. #define E0_STEP_PIN 34
  1440. #define E0_DIR_PIN 43
  1441. #define E0_ENABLE_PIN 26
  1442. #define E0_MS1_PIN 65
  1443. #define E0_MS2_PIN 66
  1444. #define E1_STEP_PIN 33
  1445. #define E1_DIR_PIN 42
  1446. #define E1_ENABLE_PIN 25
  1447. #define E1_MS1_PIN 63
  1448. #define E1_MS2_PIN 64
  1449. #define DIGIPOTSS_PIN 38
  1450. #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
  1451. #define SDPOWER -1
  1452. #define SDSS 53
  1453. #define LED_PIN 13
  1454. #define FAN_PIN 8
  1455. #define PS_ON_PIN 4
  1456. #define KILL_PIN -1 //80 with Smart Controller LCD
  1457. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1458. #ifdef ULTRA_LCD
  1459. #define KILL_PIN 80
  1460. #ifdef NEWPANEL
  1461. //arduino pin which triggers an piezzo beeper
  1462. #define BEEPER 79 // Beeper on AUX-4
  1463. #define LCD_PINS_RS 70
  1464. #define LCD_PINS_ENABLE 71
  1465. #define LCD_PINS_D4 72
  1466. #define LCD_PINS_D5 73
  1467. #define LCD_PINS_D6 74
  1468. #define LCD_PINS_D7 75
  1469. //buttons are directly attached using AUX-2
  1470. #define BTN_EN1 76
  1471. #define BTN_EN2 77
  1472. #define BTN_ENC 78 //the click
  1473. #define BLEN_C 2
  1474. #define BLEN_B 1
  1475. #define BLEN_A 0
  1476. #define SDCARDDETECT 81 // Ramps does not use this port
  1477. //encoder rotation values
  1478. #define encrot0 0
  1479. #define encrot1 2
  1480. #define encrot2 3
  1481. #define encrot3 1
  1482. #else //old style panel with shift register
  1483. //arduino pin witch triggers an piezzo beeper
  1484. #define BEEPER 33 No Beeper added
  1485. //buttons are attached to a shift register
  1486. // Not wired this yet
  1487. // #define SHIFT_CLK 38
  1488. // #define SHIFT_LD 42
  1489. // #define SHIFT_OUT 40
  1490. // #define SHIFT_EN 17
  1491. #define LCD_PINS_RS 75
  1492. #define LCD_PINS_ENABLE 17
  1493. #define LCD_PINS_D4 23
  1494. #define LCD_PINS_D5 25
  1495. #define LCD_PINS_D6 27
  1496. #define LCD_PINS_D7 29
  1497. //encoder rotation values
  1498. #define encrot0 0
  1499. #define encrot1 2
  1500. #define encrot2 3
  1501. #define encrot3 1
  1502. //bits in the shift register that carry the buttons for:
  1503. // left up center down right red
  1504. #define BL_LE 7
  1505. #define BL_UP 6
  1506. #define BL_MI 5
  1507. #define BL_DW 4
  1508. #define BL_RI 3
  1509. #define BL_ST 2
  1510. #define BLEN_B 1
  1511. #define BLEN_A 0
  1512. #endif
  1513. #endif //ULTRA_LCD
  1514. #endif
  1515. /****************************************************************************************
  1516. * MegaTronics
  1517. *
  1518. ****************************************************************************************/
  1519. #if MOTHERBOARD == 70
  1520. #define KNOWN_BOARD 1
  1521. #ifndef __AVR_ATmega2560__
  1522. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1523. #endif
  1524. #define LARGE_FLASH true
  1525. #define X_STEP_PIN 26
  1526. #define X_DIR_PIN 28
  1527. #define X_ENABLE_PIN 24
  1528. #define X_MIN_PIN 41
  1529. #define X_MAX_PIN 37
  1530. #define Y_STEP_PIN 60 // A6
  1531. #define Y_DIR_PIN 61 // A7
  1532. #define Y_ENABLE_PIN 22
  1533. #define Y_MIN_PIN 14
  1534. #define Y_MAX_PIN 15
  1535. #define Z_STEP_PIN 54 // A0
  1536. #define Z_DIR_PIN 55 // A1
  1537. #define Z_ENABLE_PIN 56 // A2
  1538. #define Z_MIN_PIN 18
  1539. #define Z_MAX_PIN 19
  1540. #define E0_STEP_PIN 31
  1541. #define E0_DIR_PIN 32
  1542. #define E0_ENABLE_PIN 38
  1543. #define E1_STEP_PIN 34
  1544. #define E1_DIR_PIN 36
  1545. #define E1_ENABLE_PIN 30
  1546. #define SDPOWER -1
  1547. #define SDSS 53
  1548. #define LED_PIN 13
  1549. #define FAN_PIN 7 // IO pin. Buffer needed
  1550. #define PS_ON_PIN 12
  1551. #define KILL_PIN -1
  1552. #define HEATER_0_PIN 9 // EXTRUDER 1
  1553. #define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
  1554. #define HEATER_2_PIN -1
  1555. #if TEMP_SENSOR_0 == -1
  1556. #define TEMP_0_PIN 8 // ANALOG NUMBERING
  1557. #else
  1558. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  1559. #endif
  1560. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  1561. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1562. #define HEATER_BED_PIN 10 // BED
  1563. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  1564. #define BEEPER 33 // Beeper on AUX-4
  1565. #ifdef ULTRA_LCD
  1566. #ifdef NEWPANEL
  1567. //arduino pin which triggers an piezzo beeper
  1568. #define LCD_PINS_RS 16
  1569. #define LCD_PINS_ENABLE 17
  1570. #define LCD_PINS_D4 23
  1571. #define LCD_PINS_D5 25
  1572. #define LCD_PINS_D6 27
  1573. #define LCD_PINS_D7 29
  1574. //buttons are directly attached using AUX-2
  1575. #define BTN_EN1 59
  1576. #define BTN_EN2 64
  1577. #define BTN_ENC 43 //the click
  1578. #define BLEN_C 2
  1579. #define BLEN_B 1
  1580. #define BLEN_A 0
  1581. #define SDCARDDETECT -1 // Ramps does not use this port
  1582. //encoder rotation values
  1583. #define encrot0 0
  1584. #define encrot1 2
  1585. #define encrot2 3
  1586. #define encrot3 1
  1587. #endif
  1588. #endif //ULTRA_LCD
  1589. #endif
  1590. /****************************************************************************************
  1591. * MegaTronics v2.0
  1592. *
  1593. ****************************************************************************************/
  1594. #if MOTHERBOARD == 701
  1595. #define KNOWN_BOARD 1
  1596. #ifndef __AVR_ATmega2560__
  1597. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1598. #endif
  1599. #define LARGE_FLASH true
  1600. #define X_STEP_PIN 26
  1601. #define X_DIR_PIN 27
  1602. #define X_ENABLE_PIN 25
  1603. #define X_MIN_PIN 37
  1604. #define X_MAX_PIN 40 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  1605. #define Y_STEP_PIN 4 // A6
  1606. #define Y_DIR_PIN 54 // A0
  1607. #define Y_ENABLE_PIN 5
  1608. #define Y_MIN_PIN 41
  1609. #define Y_MAX_PIN 38 //15
  1610. #define Z_STEP_PIN 56 // A2
  1611. #define Z_DIR_PIN 60 // A6
  1612. #define Z_ENABLE_PIN 55 // A1
  1613. #define Z_MIN_PIN 18
  1614. #define Z_MAX_PIN 19
  1615. #define E0_STEP_PIN 35
  1616. #define E0_DIR_PIN 36
  1617. #define E0_ENABLE_PIN 34
  1618. #define E1_STEP_PIN 29
  1619. #define E1_DIR_PIN 39
  1620. #define E1_ENABLE_PIN 28
  1621. #define E2_STEP_PIN 23
  1622. #define E2_DIR_PIN 24
  1623. #define E2_ENABLE_PIN 22
  1624. #define SDPOWER -1
  1625. #define SDSS 53
  1626. #define LED_PIN 13
  1627. #define FAN_PIN 7
  1628. #define FAN2_PIN 6
  1629. #define PS_ON_PIN 12
  1630. #define KILL_PIN -1
  1631. #define HEATER_0_PIN 9 // EXTRUDER 1
  1632. #define HEATER_1_PIN 8 // EXTRUDER 2
  1633. #define HEATER_2_PIN -1
  1634. #if TEMP_SENSOR_0 == -1
  1635. #define TEMP_0_PIN 4 // ANALOG NUMBERING
  1636. #else
  1637. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  1638. #endif
  1639. #if TEMP_SENSOR_1 == -1
  1640. #define TEMP_1_PIN 8 // ANALOG NUMBERING
  1641. #else
  1642. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  1643. #endif
  1644. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1645. #define HEATER_BED_PIN 10 // BED
  1646. #if TEMP_SENSOR_BED == -1
  1647. #define TEMP_BED_PIN 8 // ANALOG NUMBERING
  1648. #else
  1649. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  1650. #endif
  1651. #define BEEPER 64
  1652. #define LCD_PINS_RS 14
  1653. #define LCD_PINS_ENABLE 15
  1654. #define LCD_PINS_D4 30
  1655. #define LCD_PINS_D5 31
  1656. #define LCD_PINS_D6 32
  1657. #define LCD_PINS_D7 33
  1658. //buttons are directly attached using keypad
  1659. #define BTN_EN1 61
  1660. #define BTN_EN2 59
  1661. #define BTN_ENC 43 //the click
  1662. #define BLEN_C 2
  1663. #define BLEN_B 1
  1664. #define BLEN_A 0
  1665. #define SDCARDDETECT -1 // Megatronics does not use this port
  1666. //encoder rotation values
  1667. #define encrot0 0
  1668. #define encrot1 2
  1669. #define encrot2 3
  1670. #define encrot3 1
  1671. #endif
  1672. /****************************************************************************************
  1673. * Minitronics v1.0
  1674. *
  1675. ****************************************************************************************/
  1676. #if MOTHERBOARD == 702
  1677. #define KNOWN_BOARD 1
  1678. #ifndef __AVR_ATmega1281__
  1679. #error Oops! Make sure you have 'Minitronics ' selected from the 'Tools -> Boards' menu.
  1680. #endif
  1681. #define LARGE_FLASH true
  1682. #define X_STEP_PIN 48
  1683. #define X_DIR_PIN 47
  1684. #define X_ENABLE_PIN 49
  1685. #define X_MIN_PIN 5
  1686. #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  1687. #define Y_STEP_PIN 39 // A6
  1688. #define Y_DIR_PIN 40 // A0
  1689. #define Y_ENABLE_PIN 38
  1690. #define Y_MIN_PIN 2
  1691. #define Y_MAX_PIN -1 //15
  1692. #define Z_STEP_PIN 42 // A2
  1693. #define Z_DIR_PIN 43 // A6
  1694. #define Z_ENABLE_PIN 41 // A1
  1695. #define Z_MIN_PIN 6
  1696. #define Z_MAX_PIN -1
  1697. #define E0_STEP_PIN 45
  1698. #define E0_DIR_PIN 44
  1699. #define E0_ENABLE_PIN 27
  1700. #define E1_STEP_PIN 36
  1701. #define E1_DIR_PIN 35
  1702. #define E1_ENABLE_PIN 37
  1703. #define E2_STEP_PIN -1
  1704. #define E2_DIR_PIN -1
  1705. #define E2_ENABLE_PIN -1
  1706. #define SDPOWER -1
  1707. #define SDSS 16
  1708. #define LED_PIN 46
  1709. #define FAN_PIN 9
  1710. #define FAN2_PIN -1
  1711. #define PS_ON_PIN -1
  1712. #define KILL_PIN -1
  1713. #define HEATER_0_PIN 7 // EXTRUDER 1
  1714. #define HEATER_1_PIN 8 // EXTRUDER 2
  1715. #define HEATER_2_PIN -1
  1716. #define TEMP_0_PIN 7 // ANALOG NUMBERING
  1717. #define TEMP_1_PIN 6 // ANALOG NUMBERING
  1718. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1719. #define HEATER_BED_PIN 3 // BED
  1720. #define TEMP_BED_PIN 6 // ANALOG NUMBERING
  1721. #define BEEPER -1
  1722. #define LCD_PINS_RS -1
  1723. #define LCD_PINS_ENABLE -1
  1724. #define LCD_PINS_D4 -1
  1725. #define LCD_PINS_D5 -1
  1726. #define LCD_PINS_D6 -1
  1727. #define LCD_PINS_D7 -1
  1728. //buttons are directly attached using keypad
  1729. #define BTN_EN1 -1
  1730. #define BTN_EN2 -1
  1731. #define BTN_ENC -1 //the click
  1732. #define BLEN_C 2
  1733. #define BLEN_B 1
  1734. #define BLEN_A 0
  1735. #define SDCARDDETECT -1 // Megatronics does not use this port
  1736. //encoder rotation values
  1737. #define encrot0 0
  1738. #define encrot1 2
  1739. #define encrot2 3
  1740. #define encrot3 1
  1741. #endif
  1742. #ifndef KNOWN_BOARD
  1743. #error Unknown MOTHERBOARD value in configuration.h
  1744. #endif
  1745. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  1746. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  1747. #if EXTRUDERS > 1
  1748. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  1749. #else
  1750. #define _E1_PINS
  1751. #endif
  1752. #if EXTRUDERS > 2
  1753. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  1754. #else
  1755. #define _E2_PINS
  1756. #endif
  1757. #ifdef X_STOP_PIN
  1758. #if X_HOME_DIR < 0
  1759. #define X_MIN_PIN X_STOP_PIN
  1760. #define X_MAX_PIN -1
  1761. #else
  1762. #define X_MIN_PIN -1
  1763. #define X_MAX_PIN X_STOP_PIN
  1764. #endif
  1765. #endif
  1766. #ifdef Y_STOP_PIN
  1767. #if Y_HOME_DIR < 0
  1768. #define Y_MIN_PIN Y_STOP_PIN
  1769. #define Y_MAX_PIN -1
  1770. #else
  1771. #define Y_MIN_PIN -1
  1772. #define Y_MAX_PIN Y_STOP_PIN
  1773. #endif
  1774. #endif
  1775. #ifdef Z_STOP_PIN
  1776. #if Z_HOME_DIR < 0
  1777. #define Z_MIN_PIN Z_STOP_PIN
  1778. #define Z_MAX_PIN -1
  1779. #else
  1780. #define Z_MIN_PIN -1
  1781. #define Z_MAX_PIN Z_STOP_PIN
  1782. #endif
  1783. #endif
  1784. #ifdef DISABLE_MAX_ENDSTOPS
  1785. #define X_MAX_PIN -1
  1786. #define Y_MAX_PIN -1
  1787. #define Z_MAX_PIN -1
  1788. #endif
  1789. #ifdef DISABLE_MIN_ENDSTOPS
  1790. #define X_MIN_PIN -1
  1791. #define Y_MIN_PIN -1
  1792. #define Z_MIN_PIN -1
  1793. #endif
  1794. #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, \
  1795. HEATER_BED_PIN, FAN_PIN, \
  1796. _E0_PINS _E1_PINS _E2_PINS \
  1797. analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
  1798. #endif