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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877
  1. #ifndef PINS_H
  2. #define PINS_H
  3. #if MOTHERBOARD != 88
  4. #define X_MS1_PIN -1
  5. #define X_MS2_PIN -1
  6. #define Y_MS1_PIN -1
  7. #define Y_MS2_PIN -1
  8. #define Z_MS1_PIN -1
  9. #define Z_MS2_PIN -1
  10. #define E0_MS1_PIN -1
  11. #define E0_MS2_PIN -1
  12. #define E1_MS1_PIN -1
  13. #define E1_MS2_PIN -1
  14. #define DIGIPOTSS_PIN -1
  15. #endif
  16. /****************************************************************************************
  17. * 5DPrint D8 Driver board
  18. * https://bitbucket.org/makible/5dprint-d8-controller-board
  19. ****************************************************************************************/
  20. #if MOTHERBOARD == 88
  21. #define KNOWN_BOARD 1
  22. #define AT90USB 1286 // Disable MarlinSerial etc.
  23. #ifndef __AVR_AT90USB1286__
  24. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  25. #endif
  26. #define LARGE_FLASH true
  27. #define X_STEP_PIN 0
  28. #define X_DIR_PIN 1
  29. #define X_ENABLE_PIN 23
  30. #define X_STOP_PIN 37
  31. #define Y_STEP_PIN 2
  32. #define Y_DIR_PIN 3
  33. #define Y_ENABLE_PIN 19
  34. #define Y_STOP_PIN 36
  35. #define Z_STEP_PIN 4
  36. #define Z_DIR_PIN 5
  37. #define Z_ENABLE_PIN 18
  38. #define Z_STOP_PIN 39
  39. #define E0_STEP_PIN 6
  40. #define E0_DIR_PIN 7
  41. #define E0_ENABLE_PIN 17
  42. #define HEATER_0_PIN 21 // Extruder
  43. #define HEATER_1_PIN -1
  44. #define HEATER_2_PIN -1
  45. #define HEATER_BED_PIN 20 // Bed
  46. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  47. // for the fan and Teensyduino uses a different pin mapping.
  48. #define FAN_PIN 16 // Fan
  49. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  50. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  51. #define TEMP_1_PIN -1
  52. #define TEMP_2_PIN -1
  53. #define SDPOWER -1
  54. #define LED_PIN -1
  55. #define PS_ON_PIN -1
  56. #define KILL_PIN -1
  57. #define ALARM_PIN -1
  58. // The SDSS pin uses a different pin mapping from file Sd2PinMap.h
  59. #define SDSS 20
  60. #ifndef SDSUPPORT
  61. // these pins are defined in the SD library if building with SD support
  62. #define SCK_PIN 9
  63. #define MISO_PIN 11
  64. #define MOSI_PIN 10
  65. #endif
  66. // Microstepping pins
  67. // Note that the pin mapping is not from fastio.h
  68. // See Sd2PinMap.h for the pin configurations
  69. #define X_MS1_PIN 25
  70. #define X_MS2_PIN 26
  71. #define Y_MS1_PIN 9
  72. #define Y_MS2_PIN 8
  73. #define Z_MS1_PIN 7
  74. #define Z_MS2_PIN 6
  75. #define E0_MS1_PIN 5
  76. #define E0_MS2_PIN 4
  77. #endif /* 88 */
  78. /****************************************************************************************
  79. * Leapfrog Driver board
  80. *
  81. ****************************************************************************************/
  82. #if MOTHERBOARD == 999 // Leapfrog board
  83. #define KNOWN_BOARD 1
  84. #ifndef __AVR_ATmega1280__
  85. #ifndef __AVR_ATmega2560__
  86. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  87. #endif
  88. #endif
  89. #define X_STEP_PIN 28
  90. #define X_DIR_PIN 63
  91. #define X_ENABLE_PIN 29
  92. #define X_MIN_PIN 47
  93. #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  94. #define Y_STEP_PIN 14 // A6
  95. #define Y_DIR_PIN 15 // A0
  96. #define Y_ENABLE_PIN 39
  97. #define Y_MIN_PIN 48
  98. #define Y_MAX_PIN -1 //15
  99. #define Z_STEP_PIN 31 // A2
  100. #define Z_DIR_PIN 32 // A6
  101. #define Z_ENABLE_PIN 30 // A1
  102. #define Z_MIN_PIN 49
  103. #define Z_MAX_PIN -1
  104. #define E0_STEP_PIN 34 //34
  105. #define E0_DIR_PIN 35 //35
  106. #define E0_ENABLE_PIN 33 //33
  107. #define E1_STEP_PIN 37 //37
  108. #define E1_DIR_PIN 40 //40
  109. #define E1_ENABLE_PIN 36 //36
  110. #define Y2_STEP_PIN 37
  111. #define Y2_DIR_PIN 40
  112. #define Y2_ENABLE_PIN 36
  113. #define Z2_STEP_PIN 37
  114. #define Z2_DIR_PIN 40
  115. #define Z2_ENABLE_PIN 36
  116. #define SDPOWER -1
  117. #define SDSS 11
  118. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  119. #define LED_PIN 13
  120. #define FAN_PIN 7
  121. #define PS_ON_PIN -1
  122. #define KILL_PIN -1
  123. #define SOL1_PIN 16
  124. #define SOL2_PIN 17
  125. #define HEATER_0_PIN 9
  126. #define HEATER_1_PIN 8 // 12
  127. #define HEATER_2_PIN 11 //-1 // 13
  128. #define TEMP_0_PIN 13 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  129. #define TEMP_1_PIN 15 // 1
  130. #define TEMP_2_PIN -1 // 2
  131. #define HEATER_BED_PIN 10 // 14/15
  132. #define TEMP_BED_PIN 14 // 1,2 or I2C
  133. /* 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) */
  134. #endif
  135. /****************************************************************************************
  136. *
  137. *
  138. ****************************************************************************************/
  139. #if MOTHERBOARD == 99
  140. #define KNOWN_BOARD 1
  141. #define X_STEP_PIN 2
  142. #define X_DIR_PIN 3
  143. #define X_ENABLE_PIN -1
  144. #define X_STOP_PIN 16
  145. #define Y_STEP_PIN 5
  146. #define Y_DIR_PIN 6
  147. #define Y_ENABLE_PIN -1
  148. #define Y_STOP_PIN 67
  149. #define Z_STEP_PIN 62
  150. #define Z_DIR_PIN 63
  151. #define Z_ENABLE_PIN -1
  152. #define Z_STOP_PIN 59
  153. #define E0_STEP_PIN 65
  154. #define E0_DIR_PIN 66
  155. #define E0_ENABLE_PIN -1
  156. #define SDPOWER -1
  157. #define SDSS 53
  158. #define LED_PIN -1
  159. #define FAN_PIN -1
  160. #define PS_ON_PIN 9
  161. #define KILL_PIN -1
  162. #define HEATER_0_PIN 13
  163. #define HEATER_1_PIN -1
  164. #define HEATER_2_PIN -1
  165. #define TEMP_0_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  166. #define TEMP_1_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  167. #define TEMP_2_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  168. #define HEATER_BED_PIN 4
  169. #define TEMP_BED_PIN 10
  170. #endif /* 99 */
  171. /****************************************************************************************
  172. * Sethi 3D_1 pin assignment - www.sethi3d.com.br
  173. *
  174. ****************************************************************************************/
  175. #if MOTHERBOARD == 20
  176. #define KNOWN_BOARD
  177. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  178. #error Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu.
  179. #endif
  180. #ifndef GEN7_VERSION
  181. #define GEN7_VERSION 12 // v1.x
  182. #endif
  183. //x axis pins
  184. #define X_STEP_PIN 19
  185. #define X_DIR_PIN 18
  186. #define X_ENABLE_PIN 24
  187. #define X_STOP_PIN 2
  188. //y axis pins
  189. #define Y_STEP_PIN 23
  190. #define Y_DIR_PIN 22
  191. #define Y_ENABLE_PIN 24
  192. #define Y_STOP_PIN 0
  193. //z axis pins
  194. #define Z_STEP_PIN 26
  195. #define Z_DIR_PIN 25
  196. #define Z_ENABLE_PIN 24
  197. #define Z_MIN_PIN 1
  198. #define Z_MAX_PIN 0
  199. //extruder pins
  200. #define E0_STEP_PIN 28
  201. #define E0_DIR_PIN 27
  202. #define E0_ENABLE_PIN 24
  203. #define TEMP_0_PIN 1
  204. #define TEMP_1_PIN -1
  205. #define TEMP_2_PIN -1
  206. #define TEMP_BED_PIN 2
  207. #define HEATER_0_PIN 4
  208. #define HEATER_1_PIN -1
  209. #define HEATER_2_PIN -1
  210. #define HEATER_BED_PIN 3
  211. #define KILL_PIN -1
  212. #define SDPOWER -1
  213. #define SDSS -1 // SCL pin of I2C header
  214. #define LED_PIN -1
  215. #if (GEN7_VERSION >= 13)
  216. // Gen7 v1.3 removed the fan pin
  217. #define FAN_PIN -1
  218. #else
  219. #define FAN_PIN 31
  220. #endif
  221. #define PS_ON_PIN 15
  222. //All these generations of Gen7 supply thermistor power
  223. //via PS_ON, so ignore bad thermistor readings
  224. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  225. //our pin for debugging.
  226. #define DEBUG_PIN 0
  227. //our RS485 pins
  228. #define TX_ENABLE_PIN 12
  229. #define RX_ENABLE_PIN 13
  230. #endif
  231. /****************************************************************************************
  232. * Gen7 v1.1, v1.2, v1.3 pin assignment
  233. *
  234. ****************************************************************************************/
  235. #if MOTHERBOARD == 12
  236. #define MOTHERBOARD 11
  237. #define GEN7_VERSION 13 // v1.3
  238. #endif
  239. #if MOTHERBOARD == 11
  240. #define KNOWN_BOARD
  241. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  242. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  243. #endif
  244. #ifndef GEN7_VERSION
  245. #define GEN7_VERSION 12 // v1.x
  246. #endif
  247. //x axis pins
  248. #define X_STEP_PIN 19
  249. #define X_DIR_PIN 18
  250. #define X_ENABLE_PIN 24
  251. #define X_STOP_PIN 7
  252. //y axis pins
  253. #define Y_STEP_PIN 23
  254. #define Y_DIR_PIN 22
  255. #define Y_ENABLE_PIN 24
  256. #define Y_STOP_PIN 5
  257. //z axis pins
  258. #define Z_STEP_PIN 26
  259. #define Z_DIR_PIN 25
  260. #define Z_ENABLE_PIN 24
  261. #define Z_MIN_PIN 1
  262. #define Z_MAX_PIN 0
  263. //extruder pins
  264. #define E0_STEP_PIN 28
  265. #define E0_DIR_PIN 27
  266. #define E0_ENABLE_PIN 24
  267. #define TEMP_0_PIN 1
  268. #define TEMP_1_PIN -1
  269. #define TEMP_2_PIN -1
  270. #define TEMP_BED_PIN 2
  271. #define HEATER_0_PIN 4
  272. #define HEATER_1_PIN -1
  273. #define HEATER_2_PIN -1
  274. #define HEATER_BED_PIN 3
  275. #define KILL_PIN -1
  276. #define SDPOWER -1
  277. #define SDSS -1 // SCL pin of I2C header
  278. #define LED_PIN -1
  279. #if (GEN7_VERSION >= 13)
  280. // Gen7 v1.3 removed the fan pin
  281. #define FAN_PIN -1
  282. #else
  283. #define FAN_PIN 31
  284. #endif
  285. #define PS_ON_PIN 15
  286. //All these generations of Gen7 supply thermistor power
  287. //via PS_ON, so ignore bad thermistor readings
  288. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  289. //our pin for debugging.
  290. #define DEBUG_PIN 0
  291. //our RS485 pins
  292. #define TX_ENABLE_PIN 12
  293. #define RX_ENABLE_PIN 13
  294. #endif
  295. /****************************************************************************************
  296. * Gen7 v1.4 pin assignment
  297. *
  298. ****************************************************************************************/
  299. #if MOTHERBOARD == 13
  300. #define GEN7_VERSION 14 // v1.4
  301. #endif
  302. #if MOTHERBOARD == 13
  303. #define KNOWN_BOARD
  304. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  305. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  306. #endif
  307. #ifndef GEN7_VERSION
  308. #define GEN7_VERSION 14 // v1.x
  309. #endif
  310. //x axis pins
  311. #define X_STEP_PIN 29
  312. #define X_DIR_PIN 28
  313. #define X_ENABLE_PIN 25
  314. #define X_STOP_PIN 0
  315. //y axis pins
  316. #define Y_STEP_PIN 27
  317. #define Y_DIR_PIN 26
  318. #define Y_ENABLE_PIN 25
  319. #define Y_STOP_PIN 1
  320. //z axis pins
  321. #define Z_STEP_PIN 23
  322. #define Z_DIR_PIN 22
  323. #define Z_ENABLE_PIN 25
  324. #define Z_STOP_PIN 2
  325. //extruder pins
  326. #define E0_STEP_PIN 19
  327. #define E0_DIR_PIN 18
  328. #define E0_ENABLE_PIN 25
  329. #define TEMP_0_PIN 1
  330. #define TEMP_1_PIN -1
  331. #define TEMP_2_PIN -1
  332. #define TEMP_BED_PIN 0
  333. #define HEATER_0_PIN 4
  334. #define HEATER_1_PIN -1
  335. #define HEATER_2_PIN -1
  336. #define HEATER_BED_PIN 3
  337. #define KILL_PIN -1
  338. #define SDPOWER -1
  339. #define SDSS -1 // SCL pin of I2C header
  340. #define LED_PIN -1
  341. #define FAN_PIN -1
  342. #define PS_ON_PIN 15
  343. //our pin for debugging.
  344. #define DEBUG_PIN 0
  345. //our RS485 pins
  346. #define TX_ENABLE_PIN 12
  347. #define RX_ENABLE_PIN 13
  348. #endif
  349. /*******************************************************************************
  350. *********
  351. * Gen7 Alfons3 pin assignment
  352. *
  353. ********************************************************************************
  354. ********/
  355. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  356. #if MOTHERBOARD == 10
  357. #define KNOWN_BOARD
  358. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  359. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  360. #endif
  361. //x axis pins
  362. #define X_STEP_PIN 21 // different from standard GEN7
  363. #define X_DIR_PIN 20 // different from standard GEN7
  364. #define X_ENABLE_PIN 24
  365. #define X_STOP_PIN 0
  366. //y axis pins
  367. #define Y_STEP_PIN 23
  368. #define Y_DIR_PIN 22
  369. #define Y_ENABLE_PIN 24
  370. #define Y_STOP_PIN 1
  371. //z axis pins
  372. #define Z_STEP_PIN 26
  373. #define Z_DIR_PIN 25
  374. #define Z_ENABLE_PIN 24
  375. #define Z_STOP_PIN 2
  376. //extruder pins
  377. #define E0_STEP_PIN 28
  378. #define E0_DIR_PIN 27
  379. #define E0_ENABLE_PIN 24
  380. #define TEMP_0_PIN 2
  381. #define TEMP_1_PIN -1
  382. #define TEMP_2_PIN -1
  383. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  384. #define HEATER_0_PIN 4
  385. #define HEATER_1_PIN -1
  386. #define HEATER_2_PIN -1
  387. #define HEATER_BED_PIN 3 // (bed)
  388. #define SDPOWER -1
  389. #define SDSS 31 // SCL pin of I2C header || CS Pin for SD Card support
  390. #define LED_PIN -1
  391. #define FAN_PIN -1
  392. #define PS_ON_PIN 19
  393. //our pin for debugging.
  394. #define DEBUG_PIN -1
  395. //our RS485 pins
  396. //#define TX_ENABLE_PIN 12
  397. //#define RX_ENABLE_PIN 13
  398. #define BEEPER -1
  399. #define SDCARDDETECT -1
  400. #define SUICIDE_PIN -1 //has to be defined; otherwise Power_off doesn't work
  401. #define KILL_PIN -1
  402. //Pins for 4bit LCD Support
  403. #define LCD_PINS_RS 18
  404. #define LCD_PINS_ENABLE 17
  405. #define LCD_PINS_D4 16
  406. #define LCD_PINS_D5 15
  407. #define LCD_PINS_D6 13
  408. #define LCD_PINS_D7 14
  409. //buttons are directly attached
  410. #define BTN_EN1 11
  411. #define BTN_EN2 10
  412. #define BTN_ENC 12 //the click
  413. #endif
  414. /****************************************************************************************
  415. * Arduino Mega pin assignment
  416. *
  417. ****************************************************************************************/
  418. #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
  419. #define KNOWN_BOARD 1
  420. //////////////////FIX THIS//////////////
  421. #ifndef __AVR_ATmega1280__
  422. #ifndef __AVR_ATmega2560__
  423. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  424. #endif
  425. #endif
  426. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  427. // #define RAMPS_V_1_3
  428. // #define RAMPS_V_1_0
  429. #if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77 || MOTHERBOARD == 67 || MOTHERBOARD == 68
  430. #define LARGE_FLASH true
  431. #if MOTHERBOARD == 77
  432. #define X_STEP_PIN 54
  433. #define X_DIR_PIN 55
  434. #define X_ENABLE_PIN 38
  435. #define X_MIN_PIN 3
  436. #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  437. #define Y_STEP_PIN 60
  438. #define Y_DIR_PIN 61
  439. #define Y_ENABLE_PIN 56
  440. #define Y_MIN_PIN 14
  441. #define Y_MAX_PIN -1 //15
  442. #define Z_STEP_PIN 46
  443. #define Z_DIR_PIN 48
  444. #define Z_ENABLE_PIN 63
  445. #define Z_MIN_PIN 18
  446. #define Z_MAX_PIN -1
  447. #define Y2_STEP_PIN 36
  448. #define Y2_DIR_PIN 34
  449. #define Y2_ENABLE_PIN 30
  450. #define Z2_STEP_PIN 36
  451. #define Z2_DIR_PIN 34
  452. #define Z2_ENABLE_PIN 30
  453. #define E0_STEP_PIN 26
  454. #define E0_DIR_PIN 28
  455. #define E0_ENABLE_PIN 24
  456. #define E1_STEP_PIN 36
  457. #define E1_DIR_PIN 34
  458. #define E1_ENABLE_PIN 30
  459. #define SDPOWER -1
  460. #define SDSS 25//53
  461. #define LED_PIN 13
  462. #define BEEPER 33
  463. #else
  464. #define X_STEP_PIN 54
  465. #define X_DIR_PIN 55
  466. #define X_ENABLE_PIN 38
  467. #define X_MIN_PIN 3
  468. #define X_MAX_PIN 2
  469. #define Y_STEP_PIN 60
  470. #define Y_DIR_PIN 61
  471. #define Y_ENABLE_PIN 56
  472. #define Y_MIN_PIN 14
  473. #define Y_MAX_PIN 15
  474. #define Z_STEP_PIN 46
  475. #define Z_DIR_PIN 48
  476. #define Z_ENABLE_PIN 62
  477. #define Z_MIN_PIN 18
  478. #define Z_MAX_PIN 19
  479. #define Y2_STEP_PIN 36
  480. #define Y2_DIR_PIN 34
  481. #define Y2_ENABLE_PIN 30
  482. #define Z2_STEP_PIN 36
  483. #define Z2_DIR_PIN 34
  484. #define Z2_ENABLE_PIN 30
  485. #define E0_STEP_PIN 26
  486. #define E0_DIR_PIN 28
  487. #define E0_ENABLE_PIN 24
  488. #define E1_STEP_PIN 36
  489. #define E1_DIR_PIN 34
  490. #define E1_ENABLE_PIN 30
  491. #if MOTHERBOARD == 68
  492. #define E2_STEP_PIN 23
  493. #define E2_DIR_PIN 25
  494. #define E2_ENABLE_PIN 40
  495. #define E3_STEP_PIN 27
  496. #define E3_DIR_PIN 29
  497. #define E3_ENABLE_PIN 41
  498. #define E4_STEP_PIN 43
  499. #define E4_DIR_PIN 37
  500. #define E4_ENABLE_PIN 42
  501. #endif
  502. #define SDPOWER -1
  503. #define SDSS 53
  504. #define LED_PIN 13
  505. #endif
  506. #if MOTHERBOARD == 33 || MOTHERBOARD == 35 || MOTHERBOARD == 67 || MOTHERBOARD == 68
  507. #define FAN_PIN 9 // (Sprinter config)
  508. #else
  509. #define FAN_PIN 4 // IO pin. Buffer needed
  510. #endif
  511. #if MOTHERBOARD == 77
  512. #define FAN_PIN 8
  513. #endif
  514. #if MOTHERBOARD == 35
  515. #define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller
  516. #endif
  517. #define PS_ON_PIN 12
  518. #if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
  519. #define KILL_PIN 41
  520. #else
  521. #define KILL_PIN -1
  522. #endif
  523. #if MOTHERBOARD == 35
  524. #define HEATER_0_PIN 8
  525. #else
  526. #define HEATER_0_PIN 10 // EXTRUDER 1
  527. #endif
  528. #if MOTHERBOARD == 33 || MOTHERBOARD == 67
  529. #define HEATER_1_PIN -1
  530. #else
  531. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  532. #endif
  533. #if MOTHERBOARD == 77
  534. #define HEATER_0_PIN 10
  535. #define HEATER_1_PIN 12
  536. #define HEATER_2_PIN 6
  537. #elif MOTHERBOARD == 68
  538. #define HEATER_2_PIN 16
  539. #define HEATER_3_PIN 17
  540. #define HEATER_4_PIN 4
  541. #define HEATER_5_PIN 5
  542. #define HEATER_6_PIN 6
  543. #define HEATER_7_PIN 11
  544. #else
  545. #define HEATER_2_PIN -1
  546. #endif
  547. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  548. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  549. #if MOTHERBOARD == 68
  550. #define TEMP_2_PIN 12 // ANALOG NUMBERING
  551. #define TEMP_3_PIN 11 // ANALOG NUMBERING
  552. #define TEMP_4_PIN 10 // ANALOG NUMBERING
  553. #define TC1 4 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
  554. #define TC2 5 // ANALOG NUMBERING Thermo couple on Azteeg X3Pro
  555. #else
  556. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  557. #endif
  558. #if MOTHERBOARD == 35
  559. #define HEATER_BED_PIN -1 // NO BED
  560. #else
  561. #if MOTHERBOARD == 77
  562. #define HEATER_BED_PIN 9 // BED
  563. #else
  564. #define HEATER_BED_PIN 8 // BED
  565. #endif
  566. #endif
  567. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  568. #ifdef NUM_SERVOS
  569. #define SERVO0_PIN 11
  570. #if NUM_SERVOS > 1
  571. #define SERVO1_PIN 6
  572. #endif
  573. #if NUM_SERVOS > 2
  574. #define SERVO2_PIN 5
  575. #endif
  576. #if NUM_SERVOS > 3
  577. #define SERVO3_PIN 4
  578. #endif
  579. #endif
  580. #if MOTHERBOARD == 68
  581. #define BEEPER 33
  582. #endif
  583. #ifdef TEMP_STAT_LEDS
  584. #if MOTHERBOARD == 67
  585. #define STAT_LED_RED 6
  586. #define STAT_LED_BLUE 11
  587. #endif
  588. #endif
  589. #ifdef ULTRA_LCD
  590. #ifdef NEWPANEL
  591. #define LCD_PINS_RS 16
  592. #define LCD_PINS_ENABLE 17
  593. #define LCD_PINS_D4 23
  594. #define LCD_PINS_D5 25
  595. #define LCD_PINS_D6 27
  596. #define LCD_PINS_D7 29
  597. #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
  598. #define BEEPER 37
  599. #define BTN_EN1 31
  600. #define BTN_EN2 33
  601. #define BTN_ENC 35
  602. #define SDCARDDETECT 49
  603. #elif defined(LCD_I2C_PANELOLU2)
  604. #define BTN_EN1 47 //reverse if the encoder turns the wrong way.
  605. #define BTN_EN2 43
  606. #define BTN_ENC 32
  607. #define LCD_SDSS 53
  608. #define SDCARDDETECT -1
  609. #define KILL_PIN 41
  610. #elif defined(LCD_I2C_VIKI)
  611. #define BTN_EN1 22 //reverse if the encoder turns the wrong way.
  612. #define BTN_EN2 7
  613. #define BTN_ENC -1
  614. #define LCD_SDSS 53
  615. #define SDCARDDETECT 49
  616. #else
  617. //arduino pin which triggers an piezzo beeper
  618. #define BEEPER 33 // Beeper on AUX-4
  619. //buttons are directly attached using AUX-2
  620. #ifdef REPRAPWORLD_KEYPAD
  621. #define BTN_EN1 64 // encoder
  622. #define BTN_EN2 59 // encoder
  623. #define BTN_ENC 63 // enter button
  624. #define SHIFT_OUT 40 // shift register
  625. #define SHIFT_CLK 44 // shift register
  626. #define SHIFT_LD 42 // shift register
  627. #else
  628. #define BTN_EN1 37
  629. #define BTN_EN2 35
  630. #define BTN_ENC 31 //the click
  631. #endif
  632. #ifdef G3D_PANEL
  633. #define SDCARDDETECT 49
  634. #else
  635. #define SDCARDDETECT -1 // Ramps does not use this port
  636. #endif
  637. #endif
  638. #if MOTHERBOARD == 77
  639. #define BEEPER -1
  640. #define LCD_PINS_RS 27
  641. #define LCD_PINS_ENABLE 29
  642. #define LCD_PINS_D4 37
  643. #define LCD_PINS_D5 35
  644. #define LCD_PINS_D6 33
  645. #define LCD_PINS_D7 31
  646. //buttons
  647. #define BTN_EN1 16
  648. #define BTN_EN2 17
  649. #define BTN_ENC 23 //the click
  650. #endif
  651. #else //old style panel with shift register
  652. //arduino pin witch triggers an piezzo beeper
  653. #define BEEPER 33 //No Beeper added
  654. //buttons are attached to a shift register
  655. // Not wired this yet
  656. //#define SHIFT_CLK 38
  657. //#define SHIFT_LD 42
  658. //#define SHIFT_OUT 40
  659. //#define SHIFT_EN 17
  660. #define LCD_PINS_RS 16
  661. #define LCD_PINS_ENABLE 17
  662. #define LCD_PINS_D4 23
  663. #define LCD_PINS_D5 25
  664. #define LCD_PINS_D6 27
  665. #define LCD_PINS_D7 29
  666. #endif
  667. #endif //ULTRA_LCD
  668. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3)
  669. #define X_STEP_PIN 26
  670. #define X_DIR_PIN 28
  671. #define X_ENABLE_PIN 24
  672. #define X_MIN_PIN 3
  673. #define X_MAX_PIN -1 //2
  674. #define Y_STEP_PIN 38
  675. #define Y_DIR_PIN 40
  676. #define Y_ENABLE_PIN 36
  677. #define Y_MIN_PIN 16
  678. #define Y_MAX_PIN -1 //17
  679. #define Z_STEP_PIN 44
  680. #define Z_DIR_PIN 46
  681. #define Z_ENABLE_PIN 42
  682. #define Z_MIN_PIN 18
  683. #define Z_MAX_PIN -1 //19
  684. #define E0_STEP_PIN 32
  685. #define E0_DIR_PIN 34
  686. #define E0_ENABLE_PIN 30
  687. #define SDPOWER 48
  688. #define SDSS 53
  689. #define LED_PIN 13
  690. #define PS_ON_PIN -1
  691. #define KILL_PIN -1
  692. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  693. #define HEATER_0_PIN 12 // RAMPS 1.0
  694. #define HEATER_BED_PIN -1 // RAMPS 1.0
  695. #define FAN_PIN 11 // RAMPS 1.0
  696. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  697. #define HEATER_0_PIN 10 // RAMPS 1.1
  698. #define HEATER_BED_PIN 8 // RAMPS 1.1
  699. #define FAN_PIN 9 // RAMPS 1.1
  700. #endif
  701. #define HEATER_1_PIN -1
  702. #define HEATER_2_PIN -1
  703. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  704. #define TEMP_1_PIN -1
  705. #define TEMP_2_PIN -1
  706. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  707. #endif // MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
  708. // SPI for Max6675 Thermocouple
  709. #ifndef SDSUPPORT
  710. // these pins are defined in the SD library if building with SD support
  711. #define SCK_PIN 52
  712. #define MISO_PIN 50
  713. #define MOSI_PIN 51
  714. #define MAX6675_SS 53
  715. #else
  716. #define MAX6675_SS 49
  717. #endif
  718. #endif //MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
  719. /****************************************************************************************
  720. * Duemilanove w/ ATMega328P pin assignment
  721. *
  722. ****************************************************************************************/
  723. #if MOTHERBOARD == 4
  724. #define KNOWN_BOARD 1
  725. #ifndef __AVR_ATmega328P__
  726. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  727. #endif
  728. #define X_STEP_PIN 19
  729. #define X_DIR_PIN 18
  730. #define X_ENABLE_PIN -1
  731. #define X_STOP_PIN 17
  732. #define Y_STEP_PIN 10
  733. #define Y_DIR_PIN 7
  734. #define Y_ENABLE_PIN -1
  735. #define Y_STOP_PIN 8
  736. #define Z_STEP_PIN 13
  737. #define Z_DIR_PIN 3
  738. #define Z_ENABLE_PIN 2
  739. #define Z_STOP_PIN 4
  740. #define E0_STEP_PIN 11
  741. #define E0_DIR_PIN 12
  742. #define E0_ENABLE_PIN -1
  743. #define SDPOWER -1
  744. #define SDSS -1
  745. #define LED_PIN -1
  746. #define FAN_PIN 5
  747. #define PS_ON_PIN -1
  748. #define KILL_PIN -1
  749. #define HEATER_0_PIN 6
  750. #define HEATER_1_PIN -1
  751. #define HEATER_2_PIN -1
  752. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  753. #define TEMP_1_PIN -1
  754. #define TEMP_2_PIN -1
  755. #define HEATER_BED_PIN -1
  756. #define TEMP_BED_PIN -1
  757. #endif
  758. /****************************************************************************************
  759. * Elefu RA Board Pin Assignments
  760. *
  761. ****************************************************************************************/
  762. #if MOTHERBOARD == 21
  763. #define KNOWN_BOARD 1
  764. #ifndef __AVR_ATmega2560__
  765. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  766. #endif
  767. #define X_STEP_PIN 49
  768. #define X_DIR_PIN 13
  769. #define X_ENABLE_PIN 48
  770. #define X_MIN_PIN 35
  771. #define X_MAX_PIN -1 //34
  772. #define Y_STEP_PIN 11
  773. #define Y_DIR_PIN 9
  774. #define Y_ENABLE_PIN 12
  775. #define Y_MIN_PIN 33
  776. #define Y_MAX_PIN -1 //32
  777. #define Z_STEP_PIN 7
  778. #define Z_DIR_PIN 6
  779. #define Z_ENABLE_PIN 8
  780. #define Z_MIN_PIN 31
  781. #define Z_MAX_PIN -1 //30
  782. #define E2_STEP_PIN 43
  783. #define E2_DIR_PIN 47
  784. #define E2_ENABLE_PIN 42
  785. #define E1_STEP_PIN 18
  786. #define E1_DIR_PIN 19
  787. #define E1_ENABLE_PIN 38
  788. #define E0_STEP_PIN 40
  789. #define E0_DIR_PIN 41
  790. #define E0_ENABLE_PIN 37
  791. #define SDPOWER -1
  792. #define LED_PIN -1 //Use +12V Aux port for LED Ring
  793. #define FAN_PIN 16 //5V PWM
  794. #define PS_ON_PIN 10 //Set to -1 if using a manual switch on the PWRSW Connector
  795. #define SLEEP_WAKE_PIN 26 //This feature still needs work
  796. #define HEATER_0_PIN 45 //12V PWM1
  797. #define HEATER_1_PIN 46 //12V PWM2
  798. #define HEATER_2_PIN 17 //12V PWM3
  799. #define HEATER_BED_PIN 44 //DOUBLE 12V PWM
  800. #define TEMP_0_PIN 3 //ANALOG NUMBERING
  801. #define TEMP_1_PIN 2 //ANALOG NUMBERING
  802. #define TEMP_2_PIN 1 //ANALOG NUMBERING
  803. #define TEMP_BED_PIN 0 //ANALOG NUMBERING
  804. #define BEEPER 36
  805. #define KILL_PIN -1
  806. // M240 Triggers a camera by emulating a Canon RC-1 Remote
  807. // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
  808. #define PHOTOGRAPH_PIN 29
  809. #ifdef RA_CONTROL_PANEL
  810. #define SDSS 53
  811. #define SDCARDDETECT 28
  812. #define BTN_EN1 14
  813. #define BTN_EN2 39
  814. #define BTN_ENC 15 //the click
  815. #define BLEN_C 2
  816. #define BLEN_B 1
  817. #define BLEN_A 0
  818. //encoder rotation values
  819. #define encrot0 0
  820. #define encrot1 2
  821. #define encrot2 3
  822. #define encrot3 1
  823. #endif //RA_CONTROL_PANEL
  824. #ifdef RA_DISCO
  825. //variables for which pins the TLC5947 is using
  826. #define TLC_CLOCK_PIN 25
  827. #define TLC_BLANK_PIN 23
  828. #define TLC_XLAT_PIN 22
  829. #define TLC_DATA_PIN 24
  830. //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!
  831. //This currently only works with the RA Board.
  832. #define TLC_CLOCK_BIT 3 //bit 3 on port A
  833. #define TLC_CLOCK_PORT &PORTA //bit 3 on port A
  834. #define TLC_BLANK_BIT 1 //bit 1 on port A
  835. #define TLC_BLANK_PORT &PORTA //bit 1 on port A
  836. #define TLC_DATA_BIT 2 //bit 2 on port A
  837. #define TLC_DATA_PORT &PORTA //bit 2 on port A
  838. #define TLC_XLAT_BIT 0 //bit 0 on port A
  839. #define TLC_XLAT_PORT &PORTA //bit 0 on port A
  840. //change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful
  841. //Leave it at at least 1 if you have enabled RA_LIGHTING
  842. //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.
  843. #define NUM_TLCS 2
  844. //These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions.
  845. //Modify them according to your specific situation.
  846. //NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs.
  847. #define TRANS_ARRAY {0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8} //forwards
  848. //#define TRANS_ARRAY {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15} //backwards
  849. #endif //RA_LIGHTING
  850. #endif /* Ra Board */
  851. /****************************************************************************************
  852. * Gen6 pin assignment
  853. *
  854. ****************************************************************************************/
  855. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  856. #define KNOWN_BOARD 1
  857. #ifndef __AVR_ATmega644P__
  858. #ifndef __AVR_ATmega1284P__
  859. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  860. #endif
  861. #endif
  862. //x axis pins
  863. #define X_STEP_PIN 15
  864. #define X_DIR_PIN 18
  865. #define X_ENABLE_PIN 19
  866. #define X_STOP_PIN 20
  867. //y axis pins
  868. #define Y_STEP_PIN 23
  869. #define Y_DIR_PIN 22
  870. #define Y_ENABLE_PIN 24
  871. #define Y_STOP_PIN 25
  872. //z axis pins
  873. #define Z_STEP_PIN 27
  874. #define Z_DIR_PIN 28
  875. #define Z_ENABLE_PIN 29
  876. #define Z_STOP_PIN 30
  877. //extruder pins
  878. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  879. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  880. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  881. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  882. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  883. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  884. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  885. #define HEATER_1_PIN -1
  886. #define HEATER_2_PIN -1
  887. #if MOTHERBOARD == 5
  888. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  889. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  890. #else
  891. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  892. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  893. #endif
  894. #define SDPOWER -1
  895. #define SDSS 17
  896. #define LED_PIN -1 //changed @ rkoeppl 20110410
  897. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  898. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  899. #define KILL_PIN -1 //changed @ drakelive 20120830
  900. //our pin for debugging.
  901. #define DEBUG_PIN 0
  902. //our RS485 pins
  903. #define TX_ENABLE_PIN 12
  904. #define RX_ENABLE_PIN 13
  905. #endif
  906. /****************************************************************************************
  907. * Sanguinololu pin assignment
  908. *
  909. ****************************************************************************************/
  910. #if MOTHERBOARD == 64
  911. #define STB
  912. #endif
  913. #if MOTHERBOARD == 63 || MOTHERBOARD == 66
  914. #define MELZI
  915. #endif
  916. #if MOTHERBOARD == 65
  917. #define AZTEEG_X1
  918. #endif
  919. #if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64 || MOTHERBOARD == 65 || MOTHERBOARD == 66
  920. #undef MOTHERBOARD
  921. #define MOTHERBOARD 6
  922. #define SANGUINOLOLU_V_1_2
  923. #if defined(__AVR_ATmega1284P__)
  924. #define LARGE_FLASH true
  925. #endif
  926. #endif
  927. #if MOTHERBOARD == 6
  928. #define KNOWN_BOARD 1
  929. #ifndef __AVR_ATmega644P__
  930. #ifndef __AVR_ATmega1284P__
  931. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  932. #endif
  933. #endif
  934. #define X_STEP_PIN 15
  935. #define X_DIR_PIN 21
  936. #define X_STOP_PIN 18
  937. #define Y_STEP_PIN 22
  938. #define Y_DIR_PIN 23
  939. #define Y_STOP_PIN 19
  940. #define Z_STEP_PIN 3
  941. #define Z_DIR_PIN 2
  942. #define Z_STOP_PIN 20
  943. #define E0_STEP_PIN 1
  944. #define E0_DIR_PIN 0
  945. #define LED_PIN -1
  946. #define FAN_PIN -1
  947. #if FAN_PIN == 12 || FAN_PIN ==13
  948. #define FAN_SOFT_PWM
  949. #endif
  950. #ifdef MELZI
  951. #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. */
  952. #define FAN_PIN 4 // Works for Panelolu2 too
  953. #endif
  954. #ifdef STB
  955. #define FAN_PIN 4
  956. // Uncomment this if you have the first generation (V1.10) of STBs board
  957. #define LCD_PIN_BL 17 // LCD backlight LED
  958. #endif
  959. #ifdef AZTEEG_X1
  960. #define FAN_PIN 4
  961. #endif
  962. #ifdef NUM_SERVOS
  963. #define SERVO0_PIN -1
  964. #if NUM_SERVOS > 1
  965. #define SERVO1_PIN -1
  966. #endif
  967. #if NUM_SERVOS > 2
  968. #define SERVO2_PIN -1
  969. #endif
  970. #if NUM_SERVOS > 3
  971. #define SERVO3_PIN -1
  972. #endif
  973. #endif
  974. #define PS_ON_PIN -1
  975. #define KILL_PIN -1
  976. #define HEATER_0_PIN 13 // (extruder)
  977. #define HEATER_1_PIN -1
  978. #define HEATER_2_PIN -1
  979. #ifdef SANGUINOLOLU_V_1_2
  980. #define HEATER_BED_PIN 12 // (bed)
  981. #define X_ENABLE_PIN 14
  982. #define Y_ENABLE_PIN 14
  983. #define Z_ENABLE_PIN 26
  984. #define E0_ENABLE_PIN 14
  985. #ifdef LCD_I2C_PANELOLU2
  986. #define FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan
  987. #endif
  988. #else
  989. #define HEATER_BED_PIN 14 // (bed)
  990. #define X_ENABLE_PIN -1
  991. #define Y_ENABLE_PIN -1
  992. #define Z_ENABLE_PIN -1
  993. #define E0_ENABLE_PIN -1
  994. #endif
  995. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  996. #define TEMP_1_PIN -1
  997. #define TEMP_2_PIN -1
  998. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  999. #define SDPOWER -1
  1000. #define SDSS 31
  1001. /* 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. */
  1002. //#define SDSS 24
  1003. #ifdef ULTRA_LCD
  1004. #ifdef NEWPANEL
  1005. //we have no buzzer installed
  1006. #define BEEPER -1
  1007. //LCD Pins
  1008. #ifdef DOGLCD
  1009. // Pins for DOGM SPI LCD Support
  1010. #define DOGLCD_A0 30
  1011. #define DOGLCD_CS 29
  1012. // GLCD features
  1013. #define LCD_CONTRAST 1
  1014. // Uncomment screen orientation
  1015. // #define LCD_SCREEN_ROT_0
  1016. // #define LCD_SCREEN_ROT_90
  1017. #define LCD_SCREEN_ROT_180
  1018. // #define LCD_SCREEN_ROT_270
  1019. #else // standard Hitachi LCD controller
  1020. #define LCD_PINS_RS 4
  1021. #define LCD_PINS_ENABLE 17
  1022. #define LCD_PINS_D4 30
  1023. #define LCD_PINS_D5 29
  1024. #define LCD_PINS_D6 28
  1025. #define LCD_PINS_D7 27
  1026. #endif
  1027. //The encoder and click button
  1028. #define BTN_EN1 11
  1029. #define BTN_EN2 10
  1030. #ifdef LCD_I2C_PANELOLU2
  1031. #ifdef MELZI
  1032. #define BTN_ENC 29 //the click switch
  1033. #define LCD_SDSS 30 //to use the SD card reader on the Panelolu2 rather than the melzi board
  1034. #else
  1035. #define BTN_ENC 30 //the click switch
  1036. #endif
  1037. #else
  1038. #define BTN_ENC 16 //the click switch
  1039. #endif //Panelolu2
  1040. //not connected to a pin
  1041. #define SDCARDDETECT -1
  1042. #endif //Newpanel
  1043. #endif //Ultipanel
  1044. #ifdef MAKRPANEL
  1045. #define BEEPER 29
  1046. // Pins for DOGM SPI LCD Support
  1047. #define DOGLCD_A0 30
  1048. #define DOGLCD_CS 17
  1049. #define LCD_PIN_BL 28 // backlight LED on PA3
  1050. // GLCD features
  1051. #define LCD_CONTRAST 1
  1052. // Uncomment screen orientation
  1053. #define LCD_SCREEN_ROT_0
  1054. // #define LCD_SCREEN_ROT_90
  1055. // #define LCD_SCREEN_ROT_180
  1056. // #define LCD_SCREEN_ROT_270
  1057. //The encoder and click button
  1058. #define BTN_EN1 11
  1059. #define BTN_EN2 10
  1060. #define BTN_ENC 16 //the click switch
  1061. //not connected to a pin
  1062. #define SDCARDDETECT -1
  1063. #endif //Makrpanel
  1064. #endif
  1065. #if MOTHERBOARD == 7
  1066. #define KNOWN_BOARD
  1067. /*****************************************************************
  1068. * Ultimaker pin assignment
  1069. ******************************************************************/
  1070. #ifndef __AVR_ATmega1280__
  1071. #ifndef __AVR_ATmega2560__
  1072. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1073. #endif
  1074. #endif
  1075. #define LARGE_FLASH true
  1076. #define X_STEP_PIN 25
  1077. #define X_DIR_PIN 23
  1078. #define X_MIN_PIN 22
  1079. #define X_MAX_PIN 24
  1080. #define X_ENABLE_PIN 27
  1081. #define Y_STEP_PIN 31
  1082. #define Y_DIR_PIN 33
  1083. #define Y_MIN_PIN 26
  1084. #define Y_MAX_PIN 28
  1085. #define Y_ENABLE_PIN 29
  1086. #define Z_STEP_PIN 37
  1087. #define Z_DIR_PIN 39
  1088. #define Z_MIN_PIN 30
  1089. #define Z_MAX_PIN 32
  1090. #define Z_ENABLE_PIN 35
  1091. #define HEATER_BED_PIN 4
  1092. #define TEMP_BED_PIN 10
  1093. #define HEATER_0_PIN 2
  1094. #define TEMP_0_PIN 8
  1095. #define HEATER_1_PIN 3
  1096. #define TEMP_1_PIN 9
  1097. #define HEATER_2_PIN -1
  1098. #define TEMP_2_PIN -1
  1099. #define E0_STEP_PIN 43
  1100. #define E0_DIR_PIN 45
  1101. #define E0_ENABLE_PIN 41
  1102. #define E1_STEP_PIN 49
  1103. #define E1_DIR_PIN 47
  1104. #define E1_ENABLE_PIN 48
  1105. #define SDPOWER -1
  1106. #define SDSS 53
  1107. #define LED_PIN 13
  1108. #define FAN_PIN 7
  1109. #define PS_ON_PIN 12
  1110. #define KILL_PIN -1
  1111. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  1112. #ifdef ULTRA_LCD
  1113. #ifdef NEWPANEL
  1114. //arduino pin witch triggers an piezzo beeper
  1115. #define BEEPER 18
  1116. #define LCD_PINS_RS 20
  1117. #define LCD_PINS_ENABLE 17
  1118. #define LCD_PINS_D4 16
  1119. #define LCD_PINS_D5 21
  1120. #define LCD_PINS_D6 5
  1121. #define LCD_PINS_D7 6
  1122. //buttons are directly attached
  1123. #define BTN_EN1 40
  1124. #define BTN_EN2 42
  1125. #define BTN_ENC 19 //the click
  1126. #define SDCARDDETECT 38
  1127. #else //old style panel with shift register
  1128. //arduino pin witch triggers an piezzo beeper
  1129. #define BEEPER 18
  1130. //buttons are attached to a shift register
  1131. #define SHIFT_CLK 38
  1132. #define SHIFT_LD 42
  1133. #define SHIFT_OUT 40
  1134. #define SHIFT_EN 17
  1135. #define LCD_PINS_RS 16
  1136. #define LCD_PINS_ENABLE 5
  1137. #define LCD_PINS_D4 6
  1138. #define LCD_PINS_D5 21
  1139. #define LCD_PINS_D6 20
  1140. #define LCD_PINS_D7 19
  1141. #define SDCARDDETECT -1
  1142. #endif
  1143. #endif //ULTRA_LCD
  1144. #endif
  1145. #if MOTHERBOARD == 71
  1146. #define KNOWN_BOARD
  1147. /*****************************************************************
  1148. * Ultimaker pin assignment (Old electronics)
  1149. ******************************************************************/
  1150. #ifndef __AVR_ATmega1280__
  1151. #ifndef __AVR_ATmega2560__
  1152. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1153. #endif
  1154. #endif
  1155. #define LARGE_FLASH true
  1156. #define X_STEP_PIN 25
  1157. #define X_DIR_PIN 23
  1158. #define X_MIN_PIN 15
  1159. #define X_MAX_PIN 14
  1160. #define X_ENABLE_PIN 27
  1161. #define Y_STEP_PIN 31
  1162. #define Y_DIR_PIN 33
  1163. #define Y_MIN_PIN 17
  1164. #define Y_MAX_PIN 16
  1165. #define Y_ENABLE_PIN 29
  1166. #define Z_STEP_PIN 37
  1167. #define Z_DIR_PIN 39
  1168. #define Z_MIN_PIN 19
  1169. #define Z_MAX_PIN 18
  1170. #define Z_ENABLE_PIN 35
  1171. #define HEATER_BED_PIN -1
  1172. #define TEMP_BED_PIN -1
  1173. #define HEATER_0_PIN 2
  1174. #define TEMP_0_PIN 8
  1175. #define HEATER_1_PIN 1
  1176. #define TEMP_1_PIN 1
  1177. #define HEATER_2_PIN -1
  1178. #define TEMP_2_PIN -1
  1179. #define E0_STEP_PIN 43
  1180. #define E0_DIR_PIN 45
  1181. #define E0_ENABLE_PIN 41
  1182. #define E1_STEP_PIN -1
  1183. #define E1_DIR_PIN -1
  1184. #define E1_ENABLE_PIN -1
  1185. #define SDPOWER -1
  1186. #define SDSS -1
  1187. #define LED_PIN -1
  1188. #define FAN_PIN -1
  1189. #define PS_ON_PIN -1
  1190. #define KILL_PIN -1
  1191. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1192. #define LCD_PINS_RS 24
  1193. #define LCD_PINS_ENABLE 22
  1194. #define LCD_PINS_D4 36
  1195. #define LCD_PINS_D5 34
  1196. #define LCD_PINS_D6 32
  1197. #define LCD_PINS_D7 30
  1198. #endif
  1199. #if MOTHERBOARD == 72
  1200. #define KNOWN_BOARD
  1201. /*****************************************************************
  1202. * Ultiboard v2.0 pin assignment
  1203. ******************************************************************/
  1204. #ifndef __AVR_ATmega2560__
  1205. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1206. #endif
  1207. #define X_STEP_PIN 25
  1208. #define X_DIR_PIN 23
  1209. #define X_STOP_PIN 22
  1210. #define X_ENABLE_PIN 27
  1211. #define Y_STEP_PIN 32
  1212. #define Y_DIR_PIN 33
  1213. #define Y_STOP_PIN 26
  1214. #define Y_ENABLE_PIN 31
  1215. #define Z_STEP_PIN 35
  1216. #define Z_DIR_PIN 36
  1217. #define Z_STOP_PIN 29
  1218. #define Z_ENABLE_PIN 34
  1219. #define HEATER_BED_PIN 4
  1220. #define TEMP_BED_PIN 10
  1221. #define HEATER_0_PIN 2
  1222. #define TEMP_0_PIN 8
  1223. #define HEATER_1_PIN 3
  1224. #define TEMP_1_PIN 9
  1225. #define HEATER_2_PIN -1
  1226. #define TEMP_2_PIN -1
  1227. #define E0_STEP_PIN 42
  1228. #define E0_DIR_PIN 43
  1229. #define E0_ENABLE_PIN 37
  1230. #define E1_STEP_PIN 49
  1231. #define E1_DIR_PIN 47
  1232. #define E1_ENABLE_PIN 48
  1233. #define SDPOWER -1
  1234. #define SDSS 53
  1235. #define LED_PIN 8
  1236. #define FAN_PIN 7
  1237. #define PS_ON_PIN -1
  1238. #define KILL_PIN -1
  1239. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1240. #define SAFETY_TRIGGERED_PIN 28 //PIN to detect the safety circuit has triggered
  1241. #define MAIN_VOLTAGE_MEASURE_PIN 14 //Analogue PIN to measure the main voltage, with a 100k - 4k7 resitor divider.
  1242. #define MOTOR_CURRENT_PWM_XY_PIN 44
  1243. #define MOTOR_CURRENT_PWM_Z_PIN 45
  1244. #define MOTOR_CURRENT_PWM_E_PIN 46
  1245. //Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range
  1246. #define MOTOR_CURRENT_PWM_RANGE 2000
  1247. #define DEFAULT_PWM_MOTOR_CURRENT {1300, 1300, 1250}
  1248. //arduino pin witch triggers an piezzo beeper
  1249. #define BEEPER 18
  1250. #define LCD_PINS_RS 20
  1251. #define LCD_PINS_ENABLE 15
  1252. #define LCD_PINS_D4 14
  1253. #define LCD_PINS_D5 21
  1254. #define LCD_PINS_D6 5
  1255. #define LCD_PINS_D7 6
  1256. //buttons are directly attached
  1257. #define BTN_EN1 40
  1258. #define BTN_EN2 41
  1259. #define BTN_ENC 19 //the click
  1260. #define BLEN_C 2
  1261. #define BLEN_B 1
  1262. #define BLEN_A 0
  1263. #define SDCARDDETECT 39
  1264. #endif//MOTHERBOARD == 72
  1265. /****************************************************************************************
  1266. * RUMBA pin assignment
  1267. *
  1268. ****************************************************************************************/
  1269. #if MOTHERBOARD == 80
  1270. #define KNOWN_BOARD 1
  1271. #ifndef __AVR_ATmega2560__
  1272. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1273. #endif
  1274. #define X_STEP_PIN 17
  1275. #define X_DIR_PIN 16
  1276. #define X_ENABLE_PIN 48
  1277. #define X_MIN_PIN 37
  1278. #define X_MAX_PIN 36
  1279. #define Y_STEP_PIN 54
  1280. #define Y_DIR_PIN 47
  1281. #define Y_ENABLE_PIN 55
  1282. #define Y_MIN_PIN 35
  1283. #define Y_MAX_PIN 34
  1284. #define Z_STEP_PIN 57
  1285. #define Z_DIR_PIN 56
  1286. #define Z_ENABLE_PIN 62
  1287. #define Z_MIN_PIN 33
  1288. #define Z_MAX_PIN 32
  1289. #define E0_STEP_PIN 23
  1290. #define E0_DIR_PIN 22
  1291. #define E0_ENABLE_PIN 24
  1292. #define E1_STEP_PIN 26
  1293. #define E1_DIR_PIN 25
  1294. #define E1_ENABLE_PIN 27
  1295. #define E2_STEP_PIN 29
  1296. #define E2_DIR_PIN 28
  1297. #define E2_ENABLE_PIN 39
  1298. #define LED_PIN 13
  1299. #define FAN_PIN 7
  1300. //additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
  1301. #define PS_ON_PIN 45
  1302. #define KILL_PIN 46
  1303. #if (TEMP_SENSOR_0==0)
  1304. #define TEMP_0_PIN -1
  1305. #define HEATER_0_PIN -1
  1306. #else
  1307. #define HEATER_0_PIN 2 // EXTRUDER 1
  1308. #if (TEMP_SENSOR_0==-1)
  1309. #define TEMP_0_PIN 6 // ANALOG NUMBERING - connector *K1* on RUMBA thermocouple ADD ON is used
  1310. #else
  1311. #define TEMP_0_PIN 15 // ANALOG NUMBERING - default connector for thermistor *T0* on rumba board is used
  1312. #endif
  1313. #endif
  1314. #if (TEMP_SENSOR_1==0)
  1315. #define TEMP_1_PIN -1
  1316. #define HEATER_1_PIN -1
  1317. #else
  1318. #define HEATER_1_PIN 3 // EXTRUDER 2
  1319. #if (TEMP_SENSOR_1==-1)
  1320. #define TEMP_1_PIN 5 // ANALOG NUMBERING - connector *K2* on RUMBA thermocouple ADD ON is used
  1321. #else
  1322. #define TEMP_1_PIN 14 // ANALOG NUMBERING - default connector for thermistor *T1* on rumba board is used
  1323. #endif
  1324. #endif
  1325. #if (TEMP_SENSOR_2==0)
  1326. #define TEMP_2_PIN -1
  1327. #define HEATER_2_PIN -1
  1328. #else
  1329. #define HEATER_2_PIN 6 // EXTRUDER 3
  1330. #if (TEMP_SENSOR_2==-1)
  1331. #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
  1332. #else
  1333. #define TEMP_2_PIN 13 // ANALOG NUMBERING - default connector for thermistor *T2* on rumba board is used
  1334. #endif
  1335. #endif
  1336. //optional for extruder 4 or chamber: #define TEMP_X_PIN 12 // ANALOG NUMBERING - default connector for thermistor *T3* on rumba board is used
  1337. //optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4
  1338. #if (TEMP_SENSOR_BED==0)
  1339. #define TEMP_BED_PIN -1
  1340. #define HEATER_BED_PIN -1
  1341. #else
  1342. #define HEATER_BED_PIN 9 // BED
  1343. #if (TEMP_SENSOR_BED==-1)
  1344. #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
  1345. #else
  1346. #define TEMP_BED_PIN 11 // ANALOG NUMBERING - default connector for thermistor *THB* on rumba board is used
  1347. #endif
  1348. #endif
  1349. #define SDPOWER -1
  1350. #define SDSS 53
  1351. #define SDCARDDETECT 49
  1352. #define BEEPER 44
  1353. #define LCD_PINS_RS 19
  1354. #define LCD_PINS_ENABLE 42
  1355. #define LCD_PINS_D4 18
  1356. #define LCD_PINS_D5 38
  1357. #define LCD_PINS_D6 41
  1358. #define LCD_PINS_D7 40
  1359. #define BTN_EN1 11
  1360. #define BTN_EN2 12
  1361. #define BTN_ENC 43
  1362. #endif //MOTHERBOARD==80
  1363. /****************************************************************************************
  1364. * Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
  1365. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  1366. http://www.pjrc.com/teensy/teensyduino.html
  1367. * See http://reprap.org/wiki/Printrboard for more info
  1368. ****************************************************************************************/
  1369. #if MOTHERBOARD == 8 || MOTHERBOARD == 81
  1370. #define KNOWN_BOARD 1
  1371. #define AT90USB 1286 // Disable MarlinSerial etc.
  1372. #ifndef __AVR_AT90USB1286__
  1373. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  1374. #endif
  1375. #ifdef AT90USBxx_TEENSYPP_ASSIGNMENTS // use Teensyduino Teensy++2.0 pin assignments instead of Marlin traditional.
  1376. #error These Teensylu/Printrboard assignments depend on traditional Marlin assignments, not AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h
  1377. #endif
  1378. #define LARGE_FLASH true
  1379. #define X_STEP_PIN 0
  1380. #define X_DIR_PIN 1
  1381. #define X_ENABLE_PIN 39
  1382. #define Y_STEP_PIN 2
  1383. #define Y_DIR_PIN 3
  1384. #define Y_ENABLE_PIN 38
  1385. #define Z_STEP_PIN 4
  1386. #define Z_DIR_PIN 5
  1387. #define Z_ENABLE_PIN 23
  1388. #define E0_STEP_PIN 6
  1389. #define E0_DIR_PIN 7
  1390. #define E0_ENABLE_PIN 19
  1391. #define HEATER_0_PIN 21 // Extruder
  1392. #define HEATER_1_PIN -1
  1393. #define HEATER_2_PIN -1
  1394. #define HEATER_BED_PIN 20 // Bed
  1395. #define FAN_PIN 22 // Fan
  1396. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  1397. // for the fan and Teensyduino uses a different pin mapping.
  1398. #if MOTHERBOARD == 8 // Teensylu
  1399. #define X_STOP_PIN 13
  1400. #define Y_STOP_PIN 14
  1401. #define Z_STOP_PIN 15
  1402. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1403. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1404. #else // Printrboard
  1405. #define X_STOP_PIN 35
  1406. #define Y_STOP_PIN 8
  1407. #define Z_STOP_PIN 36
  1408. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  1409. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  1410. #endif
  1411. #define TEMP_1_PIN -1
  1412. #define TEMP_2_PIN -1
  1413. #define SDPOWER -1
  1414. #define SDSS 8
  1415. #define LED_PIN -1
  1416. #define PS_ON_PIN -1
  1417. #define KILL_PIN -1
  1418. #define ALARM_PIN -1
  1419. #ifndef SDSUPPORT
  1420. // these pins are defined in the SD library if building with SD support
  1421. #define SCK_PIN 9
  1422. #define MISO_PIN 11
  1423. #define MOSI_PIN 10
  1424. #endif
  1425. #endif // MOTHERBOARD == 8 (Teensylu) or 81 (Printrboard)
  1426. /****************************************************************************************
  1427. * Brainwave 1.0 pin assignments (AT90USB646)
  1428. * Requires hardware bundle for Arduino:
  1429. https://github.com/unrepentantgeek/brainwave-arduino
  1430. ****************************************************************************************/
  1431. #if MOTHERBOARD == 82
  1432. #define KNOWN_BOARD 1
  1433. #define AT90USB 646 // Disable MarlinSerial etc.
  1434. #ifndef __AVR_AT90USB646__
  1435. #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
  1436. #endif
  1437. #define X_STEP_PIN 27
  1438. #define X_DIR_PIN 29
  1439. #define X_ENABLE_PIN 28
  1440. #define X_STOP_PIN 7
  1441. #define X_ATT_PIN 26
  1442. #define Y_STEP_PIN 31
  1443. #define Y_DIR_PIN 33
  1444. #define Y_ENABLE_PIN 32
  1445. #define Y_STOP_PIN 6
  1446. #define Y_ATT_PIN 30
  1447. #define Z_STEP_PIN 17
  1448. #define Z_DIR_PIN 19
  1449. #define Z_ENABLE_PIN 18
  1450. #define Z_STOP_PIN 5
  1451. #define Z_ATT_PIN 16
  1452. #define E0_STEP_PIN 21
  1453. #define E0_DIR_PIN 23
  1454. #define E0_ENABLE_PIN 22
  1455. #define E0_ATT_PIN 20
  1456. #define HEATER_0_PIN 4 // Extruder
  1457. #define HEATER_1_PIN -1
  1458. #define HEATER_2_PIN -1
  1459. #define HEATER_BED_PIN 38 // Bed
  1460. #define FAN_PIN 3 // Fan
  1461. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1462. #define TEMP_1_PIN -1
  1463. #define TEMP_2_PIN -1
  1464. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1465. #define SDPOWER -1
  1466. #define SDSS -1
  1467. #define LED_PIN 39
  1468. #define PS_ON_PIN -1
  1469. #define KILL_PIN -1
  1470. #define ALARM_PIN -1
  1471. #ifndef SDSUPPORT
  1472. // these pins are defined in the SD library if building with SD support
  1473. #define SCK_PIN 9
  1474. #define MISO_PIN 11
  1475. #define MOSI_PIN 10
  1476. #endif
  1477. #endif // MOTHERBOARD == 82 (Brainwave)
  1478. //
  1479. // SAV Mk-I
  1480. // -----------------------------------------------------------------------------------
  1481. /****************************************************************************************
  1482. * SAV MkI pin assignments (AT90USB1286)
  1483. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  1484. http://www.pjrc.com/teensy/teensyduino.html
  1485. RepRap Clone Wars project board.
  1486. ****************************************************************************************/
  1487. #if MOTHERBOARD == 83 // SAV Mk-I
  1488. #define KNOWN_BOARD 1
  1489. #define AT90USB 1286 // Disable MarlinSerial etc.
  1490. #ifndef __AVR_AT90USB1286__
  1491. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  1492. #endif
  1493. #define LARGE_FLASH true
  1494. #define X_STEP_PIN 0
  1495. #define X_DIR_PIN 1
  1496. #define X_ENABLE_PIN 39
  1497. #define Y_STEP_PIN 2
  1498. #define Y_DIR_PIN 3
  1499. #define Y_ENABLE_PIN 38
  1500. #define Z_STEP_PIN 4
  1501. #define Z_DIR_PIN 5
  1502. #define Z_ENABLE_PIN 23
  1503. #define E0_STEP_PIN 6
  1504. #define E0_DIR_PIN 7
  1505. #define E0_ENABLE_PIN 19
  1506. #define HEATER_0_PIN 21 // Extruder
  1507. #define HEATER_1_PIN -1
  1508. #define HEATER_2_PIN -1
  1509. #define HEATER_BED_PIN 20 // Bed
  1510. #define FAN_PIN 16 // Fan -- from Teensyduino environment.
  1511. // For the fan and Teensyduino uses a different pin mapping.
  1512. #define X_STOP_PIN 13
  1513. #define Y_STOP_PIN 14
  1514. #define Z_STOP_PIN 15
  1515. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1516. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1517. #define TEMP_1_PIN -1
  1518. #define TEMP_2_PIN -1
  1519. #define SDPOWER -1
  1520. #define SDSS 20 // PB0 - 8 in marlin env.
  1521. #define LED_PIN -1
  1522. #define PS_ON_PIN -1
  1523. #define KILL_PIN -1
  1524. #define ALARM_PIN -1
  1525. #define SDCARDDETECT -1
  1526. #ifndef SDSUPPORT
  1527. // these pins are defined in the SD library if building with SD support
  1528. #define SCK_PIN 9
  1529. #define MISO_PIN 11
  1530. #define MOSI_PIN 10
  1531. #endif
  1532. #define BEEPER -1
  1533. #define LCD_PINS_RS -1
  1534. #define LCD_PINS_ENABLE -1
  1535. #define LCD_PINS_D4 -1
  1536. #define LCD_PINS_D5 -1
  1537. #define LCD_PINS_D6 -1
  1538. #define LCD_PINS_D7 -1
  1539. #define BTN_EN1 -1
  1540. #define BTN_EN2 -1
  1541. #define BTN_ENC -1
  1542. // For LCD SHIFT register LCD
  1543. #define SR_DATA_PIN 0
  1544. #define SR_CLK_PIN 1
  1545. #endif // MOTHERBOARD == 83
  1546. /****************************************************************************************
  1547. * Teensy++ 2.0 Breadboard pin assignments (AT90USB1286)
  1548. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  1549. http://www.pjrc.com/teensy/teensyduino.html
  1550. * See http://reprap.org/wiki/Printrboard for more info
  1551. * CLI build: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make
  1552. *
  1553. ****************************************************************************************/
  1554. #if MOTHERBOARD == 84
  1555. #define KNOWN_BOARD 1
  1556. #define AT90USB 1286 // Disable MarlinSerial etc.
  1557. #ifndef __AVR_AT90USB1286__
  1558. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  1559. #endif
  1560. #define LARGE_FLASH true
  1561. /*
  1562. DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a TeensyBreadboard:
  1563. USB
  1564. GND GND |-----#####-----| +5V ATX +5SB
  1565. ATX PS_ON PWM 27 |b7 ##### b6| 26 PWM* Stepper Enable
  1566. PWM 0 |d0 b5| 25 PWM*
  1567. PWM 1 |d1 b4| 24 PWM
  1568. X_MIN 2 |d2 b3| 23 MISO_PIN
  1569. Y_MIN 3 |d3 b2| 22 MOSI_PIN
  1570. Z_MIN 4 |d4 * * b1| 21 SCK_PIN
  1571. 5 |d5 e e b0| 20 SDSS
  1572. LED 6 |d6 5 4 e7| 19
  1573. 7 |d7 e6| 18
  1574. LCD RS 8 |e0 | GND
  1575. LCD EN 9 |e1 a4 a0 R| AREF
  1576. LCD D4 10 |c0 a5 a1 f0| 38 A0 ENC_1
  1577. LCD D5 11 |c1 a6 a2 f1| 39 A1 ENC_2
  1578. LCD D6 12 |c2 a7 a3 f2| 40 A2 ENC_CLK
  1579. LCD D6 13 |c3 f3| 41 A3
  1580. Bed Heat PWM 14 |c4 V G R f4| 42 A4
  1581. Extruder Heat PWM 15 |c5 c n S f5| 43 A5
  1582. Fan PWM 16 |c6 c d T f6| 44 A6 Bed TC
  1583. 17 |c7 * * * f7| 45 A7 Extruder TC * 4.7k * +5
  1584. -----------------
  1585. Interior E4: 36, INT4
  1586. Interior E5: 37, INT5
  1587. Interior PA0-7: 28-35 -- Printrboard and Teensylu use these pins for step & direction:
  1588. T++ PA Signal Marlin
  1589. Z STEP 32 a4 a0 28 X STEP
  1590. Z DIR 33 a5 a1 29 X DIR
  1591. E STEP 34 a6 a2 30 Y STEP
  1592. E DIR 35 a7 a3 31 Y DIR
  1593. */
  1594. #ifndef AT90USBxx_TEENSYPP_ASSIGNMENTS // use Teensyduino Teensy++2.0 pin assignments instead of Marlin alphabetical.
  1595. #error Uncomment #define AT90USBxx_TEENSYPP_ASSIGNMENTS in fastio.h for this config
  1596. // or build from command line with: DEFINES=AT90USBxx_TEENSYPP_ASSIGNMENTS HARDWARE_MOTHERBOARD=84 make
  1597. #endif
  1598. #define X_STEP_PIN 28 // 0 Marlin
  1599. #define X_DIR_PIN 29 // 1 Marlin
  1600. #define X_ENABLE_PIN 26
  1601. #define Y_STEP_PIN 30 // 2 Marlin
  1602. #define Y_DIR_PIN 31 // 3
  1603. #define Y_ENABLE_PIN 26 // Shared w/x
  1604. #define Z_STEP_PIN 32 // 4
  1605. #define Z_DIR_PIN 33 // 5
  1606. #define Z_ENABLE_PIN 26 // Shared w/x
  1607. #define E0_STEP_PIN 34 // 6
  1608. #define E0_DIR_PIN 35 // 7
  1609. #define E0_ENABLE_PIN 26 // Shared w/x
  1610. #define HEATER_0_PIN 15 // 21 // Extruder
  1611. #define HEATER_1_PIN -1
  1612. #define HEATER_2_PIN -1
  1613. #define HEATER_BED_PIN 14 // 20 // Bed
  1614. #define FAN_PIN 16 // 22 // Fan
  1615. #define X_STOP_PIN 2
  1616. #define Y_STOP_PIN 3
  1617. #define Z_STOP_PIN 4
  1618. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1619. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1620. #define TEMP_1_PIN -1
  1621. #define TEMP_2_PIN -1
  1622. #define SDPOWER -1
  1623. #define SDCARDDETECT -1
  1624. #define SDSS 20 // 8
  1625. #define LED_PIN 6
  1626. #define PS_ON_PIN 27
  1627. #define KILL_PIN -1
  1628. #define ALARM_PIN -1
  1629. #ifndef SDSUPPORT
  1630. // these pins are defined in the SD library if building with SD support
  1631. #define SCK_PIN 21 // 9
  1632. #define MISO_PIN 23 // 11
  1633. #define MOSI_PIN 22 // 10
  1634. #endif
  1635. #ifdef ULTIPANEL
  1636. #define LCD_PINS_RS 8
  1637. #define LCD_PINS_ENABLE 9
  1638. #define LCD_PINS_D4 10
  1639. #define LCD_PINS_D5 11
  1640. #define LCD_PINS_D6 12
  1641. #define LCD_PINS_D7 13
  1642. #define BTN_EN1 38
  1643. #define BTN_EN2 39
  1644. #define BTN_ENC 40
  1645. #endif
  1646. #endif // MOTHERBOARD == 84 (Teensy++2.0 Breadboard)
  1647. /****************************************************************************************
  1648. * Gen3+ pin assignment
  1649. *
  1650. ****************************************************************************************/
  1651. #if MOTHERBOARD == 9
  1652. #define MOTHERBOARD 6 /*TODO: Figure out, Why is this done?*/
  1653. #define KNOWN_BOARD 1
  1654. #ifndef __AVR_ATmega644P__
  1655. #ifndef __AVR_ATmega1284P__
  1656. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  1657. #endif
  1658. #endif
  1659. #define X_STEP_PIN 15
  1660. #define X_DIR_PIN 18
  1661. #define X_STOP_PIN 20
  1662. #define Y_STEP_PIN 23
  1663. #define Y_DIR_PIN 22
  1664. #define Y_STOP_PIN 25
  1665. #define Z_STEP_PIN 27
  1666. #define Z_DIR_PIN 28
  1667. #define Z_STOP_PIN 30
  1668. #define E0_STEP_PIN 17
  1669. #define E0_DIR_PIN 21
  1670. #define LED_PIN -1
  1671. #define FAN_PIN -1
  1672. #define PS_ON_PIN 14
  1673. #define KILL_PIN -1
  1674. #define HEATER_0_PIN 12 // (extruder)
  1675. #define HEATER_BED_PIN 16 // (bed)
  1676. #define X_ENABLE_PIN 19
  1677. #define Y_ENABLE_PIN 24
  1678. #define Z_ENABLE_PIN 29
  1679. #define E0_ENABLE_PIN 13
  1680. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  1681. #define TEMP_1_PIN -1
  1682. #define TEMP_2_PIN -1
  1683. #define TEMP_BED_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  1684. #define SDPOWER -1
  1685. #define SDSS 4
  1686. #define HEATER_2_PIN -1
  1687. #endif
  1688. /****************************************************************************************
  1689. * Open Motion controller with enable based extruders
  1690. *
  1691. * ATMega644
  1692. *
  1693. * +---\/---+
  1694. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  1695. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  1696. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  1697. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  1698. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  1699. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  1700. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  1701. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  1702. * RST 9| |32 AREF
  1703. * VCC 10| |31 GND
  1704. * GND 11| |30 AVCC
  1705. * XTAL2 12| |29 PC7 (D 23)
  1706. * XTAL1 13| |28 PC6 (D 22)
  1707. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  1708. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  1709. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  1710. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  1711. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  1712. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  1713. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  1714. * +--------+
  1715. *
  1716. ****************************************************************************************/
  1717. #if MOTHERBOARD == 90 //Alpha OMCA board
  1718. #define KNOWN_BOARD 1
  1719. #ifndef __AVR_ATmega644__
  1720. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  1721. #endif
  1722. #define X_STEP_PIN 21
  1723. #define X_DIR_PIN 20
  1724. #define X_ENABLE_PIN 24
  1725. #define X_STOP_PIN 0
  1726. #define Y_STEP_PIN 23
  1727. #define Y_DIR_PIN 22
  1728. #define Y_ENABLE_PIN 24
  1729. #define Y_STOP_PIN 1
  1730. #define Z_STEP_PIN 26
  1731. #define Z_DIR_PIN 25
  1732. #define Z_ENABLE_PIN 24
  1733. #define Z_STOP_PIN 2
  1734. #define E0_STEP_PIN 28
  1735. #define E0_DIR_PIN 27
  1736. #define E0_ENABLE_PIN 24
  1737. #define E1_STEP_PIN -1 // 19
  1738. #define E1_DIR_PIN -1 // 18
  1739. #define E1_ENABLE_PIN 24
  1740. #define E2_STEP_PIN -1 // 17
  1741. #define E2_DIR_PIN -1 // 16
  1742. #define E2_ENABLE_PIN 24
  1743. #define SDPOWER -1
  1744. #define SDSS 11
  1745. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1746. #define LED_PIN -1
  1747. #define FAN_PIN 3
  1748. #define PS_ON_PIN -1
  1749. #define KILL_PIN -1
  1750. #define HEATER_0_PIN 4
  1751. #define HEATER_1_PIN -1 // 12
  1752. #define HEATER_2_PIN -1 // 13
  1753. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  1754. #define TEMP_1_PIN -1 // 1
  1755. #define TEMP_2_PIN -1 // 2
  1756. #define HEATER_BED_PIN -1 // 14/15
  1757. #define TEMP_BED_PIN -1 // 1,2 or I2C
  1758. /* 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) */
  1759. #endif
  1760. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  1761. #define KNOWN_BOARD 1
  1762. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  1763. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  1764. #endif
  1765. #define X_STEP_PIN 26
  1766. #define X_DIR_PIN 25
  1767. #define X_ENABLE_PIN 10
  1768. #define X_STOP_PIN 0
  1769. #define Y_STEP_PIN 28
  1770. #define Y_DIR_PIN 27
  1771. #define Y_ENABLE_PIN 10
  1772. #define Y_STOP_PIN 1
  1773. #define Z_STEP_PIN 23
  1774. #define Z_DIR_PIN 22
  1775. #define Z_ENABLE_PIN 10
  1776. #define Z_STOP_PIN 2
  1777. #define E0_STEP_PIN 24
  1778. #define E0_DIR_PIN 21
  1779. #define E0_ENABLE_PIN 10
  1780. /* future proofing */
  1781. #define __FS 20
  1782. #define __FD 19
  1783. #define __GS 18
  1784. #define __GD 13
  1785. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  1786. #define E1_STEP_PIN -1 // 21
  1787. #define E1_DIR_PIN -1 // 20
  1788. #define E1_ENABLE_PIN -1 // 19
  1789. #define E2_STEP_PIN -1 // 21
  1790. #define E2_DIR_PIN -1 // 20
  1791. #define E2_ENABLE_PIN -1 // 18
  1792. #define SDPOWER -1
  1793. #define SDSS 11
  1794. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1795. #define LED_PIN -1
  1796. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  1797. #define PS_ON_PIN -1
  1798. #define KILL_PIN -1
  1799. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  1800. #define HEATER_1_PIN -1
  1801. #define HEATER_2_PIN -1
  1802. #define HEATER_1_PIN -1
  1803. #define HEATER_2_PIN -1
  1804. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  1805. #define TEMP_1_PIN 1 // ANALOG
  1806. #define TEMP_2_PIN -1 // 2
  1807. #define HEATER_BED_PIN 4
  1808. #define TEMP_BED_PIN 2 // 1,2 or I2C
  1809. #define I2C_SCL 16
  1810. #define I2C_SDA 17
  1811. #endif
  1812. #if MOTHERBOARD == 301
  1813. #define KNOWN_BOARD
  1814. /*****************************************************************
  1815. * Rambo Pin Assignments
  1816. ******************************************************************/
  1817. #ifndef __AVR_ATmega2560__
  1818. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1819. #endif
  1820. #define LARGE_FLASH true
  1821. #define X_STEP_PIN 37
  1822. #define X_DIR_PIN 48
  1823. #define X_MIN_PIN 12
  1824. #define X_MAX_PIN 24
  1825. #define X_ENABLE_PIN 29
  1826. #define X_MS1_PIN 40
  1827. #define X_MS2_PIN 41
  1828. #define Y_STEP_PIN 36
  1829. #define Y_DIR_PIN 49
  1830. #define Y_MIN_PIN 11
  1831. #define Y_MAX_PIN 23
  1832. #define Y_ENABLE_PIN 28
  1833. #define Y_MS1_PIN 69
  1834. #define Y_MS2_PIN 39
  1835. #define Z_STEP_PIN 35
  1836. #define Z_DIR_PIN 47
  1837. #define Z_MIN_PIN 10
  1838. #define Z_MAX_PIN 30
  1839. #define Z_ENABLE_PIN 27
  1840. #define Z_MS1_PIN 68
  1841. #define Z_MS2_PIN 67
  1842. #define HEATER_BED_PIN 3
  1843. #define TEMP_BED_PIN 2
  1844. #define HEATER_0_PIN 9
  1845. #define TEMP_0_PIN 0
  1846. #define HEATER_1_PIN 7
  1847. #define TEMP_1_PIN 1
  1848. #ifdef BARICUDA
  1849. #define HEATER_2_PIN 6
  1850. #else
  1851. #define HEATER_2_PIN -1
  1852. #endif
  1853. #define TEMP_2_PIN -1
  1854. #define E0_STEP_PIN 34
  1855. #define E0_DIR_PIN 43
  1856. #define E0_ENABLE_PIN 26
  1857. #define E0_MS1_PIN 65
  1858. #define E0_MS2_PIN 66
  1859. #define E1_STEP_PIN 33
  1860. #define E1_DIR_PIN 42
  1861. #define E1_ENABLE_PIN 25
  1862. #define E1_MS1_PIN 63
  1863. #define E1_MS2_PIN 64
  1864. #define DIGIPOTSS_PIN 38
  1865. #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
  1866. #define SDPOWER -1
  1867. #define SDSS 53
  1868. #define LED_PIN 13
  1869. #define FAN_PIN 8
  1870. #define PS_ON_PIN 4
  1871. #define KILL_PIN -1 //80 with Smart Controller LCD
  1872. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1873. #ifdef ULTRA_LCD
  1874. #define KILL_PIN 80
  1875. #ifdef NEWPANEL
  1876. //arduino pin which triggers an piezzo beeper
  1877. #define BEEPER 79 // Beeper on AUX-4
  1878. #define LCD_PINS_RS 70
  1879. #define LCD_PINS_ENABLE 71
  1880. #define LCD_PINS_D4 72
  1881. #define LCD_PINS_D5 73
  1882. #define LCD_PINS_D6 74
  1883. #define LCD_PINS_D7 75
  1884. //buttons are directly attached using AUX-2
  1885. #define BTN_EN1 76
  1886. #define BTN_EN2 77
  1887. #define BTN_ENC 78 //the click
  1888. #define BLEN_C 2
  1889. #define BLEN_B 1
  1890. #define BLEN_A 0
  1891. #define SDCARDDETECT 81 // Ramps does not use this port
  1892. //encoder rotation values
  1893. #define encrot0 0
  1894. #define encrot1 2
  1895. #define encrot2 3
  1896. #define encrot3 1
  1897. #else //old style panel with shift register
  1898. //arduino pin witch triggers an piezzo beeper
  1899. #define BEEPER 33 No Beeper added
  1900. //buttons are attached to a shift register
  1901. // Not wired this yet
  1902. // #define SHIFT_CLK 38
  1903. // #define SHIFT_LD 42
  1904. // #define SHIFT_OUT 40
  1905. // #define SHIFT_EN 17
  1906. #define LCD_PINS_RS 75
  1907. #define LCD_PINS_ENABLE 17
  1908. #define LCD_PINS_D4 23
  1909. #define LCD_PINS_D5 25
  1910. #define LCD_PINS_D6 27
  1911. #define LCD_PINS_D7 29
  1912. //encoder rotation values
  1913. #define encrot0 0
  1914. #define encrot1 2
  1915. #define encrot2 3
  1916. #define encrot3 1
  1917. //bits in the shift register that carry the buttons for:
  1918. // left up center down right red
  1919. #define BL_LE 7
  1920. #define BL_UP 6
  1921. #define BL_MI 5
  1922. #define BL_DW 4
  1923. #define BL_RI 3
  1924. #define BL_ST 2
  1925. #define BLEN_B 1
  1926. #define BLEN_A 0
  1927. #endif
  1928. #endif //ULTRA_LCD
  1929. #endif
  1930. /****************************************************************************************
  1931. * MegaTronics
  1932. *
  1933. ****************************************************************************************/
  1934. #if MOTHERBOARD == 70
  1935. #define KNOWN_BOARD 1
  1936. #ifndef __AVR_ATmega2560__
  1937. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1938. #endif
  1939. #define LARGE_FLASH true
  1940. #define X_STEP_PIN 26
  1941. #define X_DIR_PIN 28
  1942. #define X_ENABLE_PIN 24
  1943. #define X_MIN_PIN 41
  1944. #define X_MAX_PIN 37
  1945. #define Y_STEP_PIN 60 // A6
  1946. #define Y_DIR_PIN 61 // A7
  1947. #define Y_ENABLE_PIN 22
  1948. #define Y_MIN_PIN 14
  1949. #define Y_MAX_PIN 15
  1950. #define Z_STEP_PIN 54 // A0
  1951. #define Z_DIR_PIN 55 // A1
  1952. #define Z_ENABLE_PIN 56 // A2
  1953. #define Z_MIN_PIN 18
  1954. #define Z_MAX_PIN 19
  1955. #define E0_STEP_PIN 31
  1956. #define E0_DIR_PIN 32
  1957. #define E0_ENABLE_PIN 38
  1958. #define E1_STEP_PIN 34
  1959. #define E1_DIR_PIN 36
  1960. #define E1_ENABLE_PIN 30
  1961. #define SDPOWER -1
  1962. #define SDSS 53
  1963. #define LED_PIN 13
  1964. #define FAN_PIN 7 // IO pin. Buffer needed
  1965. #define PS_ON_PIN 12
  1966. #define KILL_PIN -1
  1967. #define HEATER_0_PIN 9 // EXTRUDER 1
  1968. #define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
  1969. #define HEATER_2_PIN -1
  1970. #if TEMP_SENSOR_0 == -1
  1971. #define TEMP_0_PIN 8 // ANALOG NUMBERING
  1972. #else
  1973. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  1974. #endif
  1975. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  1976. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1977. #define HEATER_BED_PIN 10 // BED
  1978. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  1979. #define BEEPER 33 // Beeper on AUX-4
  1980. #ifdef ULTRA_LCD
  1981. #ifdef NEWPANEL
  1982. //arduino pin which triggers an piezzo beeper
  1983. #define LCD_PINS_RS 16
  1984. #define LCD_PINS_ENABLE 17
  1985. #define LCD_PINS_D4 23
  1986. #define LCD_PINS_D5 25
  1987. #define LCD_PINS_D6 27
  1988. #define LCD_PINS_D7 29
  1989. //buttons are directly attached using AUX-2
  1990. #define BTN_EN1 59
  1991. #define BTN_EN2 64
  1992. #define BTN_ENC 43 //the click
  1993. #define BLEN_C 2
  1994. #define BLEN_B 1
  1995. #define BLEN_A 0
  1996. #define SDCARDDETECT -1 // Ramps does not use this port
  1997. //encoder rotation values
  1998. #define encrot0 0
  1999. #define encrot1 2
  2000. #define encrot2 3
  2001. #define encrot3 1
  2002. #endif
  2003. #endif //ULTRA_LCD
  2004. #endif
  2005. /****************************************************************************************
  2006. * MegaTronics v2.0
  2007. *
  2008. ****************************************************************************************/
  2009. #if MOTHERBOARD == 701
  2010. #define KNOWN_BOARD 1
  2011. #ifndef __AVR_ATmega2560__
  2012. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  2013. #endif
  2014. #define LARGE_FLASH true
  2015. #define X_STEP_PIN 26
  2016. #define X_DIR_PIN 27
  2017. #define X_ENABLE_PIN 25
  2018. #define X_MIN_PIN 37
  2019. #define X_MAX_PIN 40 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  2020. #define Y_STEP_PIN 4 // A6
  2021. #define Y_DIR_PIN 54 // A0
  2022. #define Y_ENABLE_PIN 5
  2023. #define Y_MIN_PIN 41
  2024. #define Y_MAX_PIN 38 //15
  2025. #define Z_STEP_PIN 56 // A2
  2026. #define Z_DIR_PIN 60 // A6
  2027. #define Z_ENABLE_PIN 55 // A1
  2028. #define Z_MIN_PIN 18
  2029. #define Z_MAX_PIN 19
  2030. #define E0_STEP_PIN 35
  2031. #define E0_DIR_PIN 36
  2032. #define E0_ENABLE_PIN 34
  2033. #define E1_STEP_PIN 29
  2034. #define E1_DIR_PIN 39
  2035. #define E1_ENABLE_PIN 28
  2036. #define E2_STEP_PIN 23
  2037. #define E2_DIR_PIN 24
  2038. #define E2_ENABLE_PIN 22
  2039. #define SDPOWER -1
  2040. #define SDSS 53
  2041. #define LED_PIN 13
  2042. #define FAN_PIN 7
  2043. #define FAN2_PIN 6
  2044. #define PS_ON_PIN 12
  2045. #define KILL_PIN -1
  2046. #define HEATER_0_PIN 9 // EXTRUDER 1
  2047. #define HEATER_1_PIN 8 // EXTRUDER 2
  2048. #define HEATER_2_PIN -1
  2049. #if TEMP_SENSOR_0 == -1
  2050. #define TEMP_0_PIN 4 // ANALOG NUMBERING
  2051. #else
  2052. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  2053. #endif
  2054. #if TEMP_SENSOR_1 == -1
  2055. #define TEMP_1_PIN 8 // ANALOG NUMBERING
  2056. #else
  2057. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  2058. #endif
  2059. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  2060. #define HEATER_BED_PIN 10 // BED
  2061. #if TEMP_SENSOR_BED == -1
  2062. #define TEMP_BED_PIN 8 // ANALOG NUMBERING
  2063. #else
  2064. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  2065. #endif
  2066. #define BEEPER 64
  2067. #define LCD_PINS_RS 14
  2068. #define LCD_PINS_ENABLE 15
  2069. #define LCD_PINS_D4 30
  2070. #define LCD_PINS_D5 31
  2071. #define LCD_PINS_D6 32
  2072. #define LCD_PINS_D7 33
  2073. //buttons are directly attached using keypad
  2074. #define BTN_EN1 61
  2075. #define BTN_EN2 59
  2076. #define BTN_ENC 43 //the click
  2077. #define BLEN_C 2
  2078. #define BLEN_B 1
  2079. #define BLEN_A 0
  2080. #define SDCARDDETECT -1 // Megatronics does not use this port
  2081. //encoder rotation values
  2082. #define encrot0 0
  2083. #define encrot1 2
  2084. #define encrot2 3
  2085. #define encrot3 1
  2086. #endif
  2087. /****************************************************************************************
  2088. * Minitronics v1.0
  2089. *
  2090. ****************************************************************************************/
  2091. #if MOTHERBOARD == 702
  2092. #define KNOWN_BOARD 1
  2093. #ifndef __AVR_ATmega1281__
  2094. #error Oops! Make sure you have 'Minitronics ' selected from the 'Tools -> Boards' menu.
  2095. #endif
  2096. #define LARGE_FLASH true
  2097. #define X_STEP_PIN 48
  2098. #define X_DIR_PIN 47
  2099. #define X_ENABLE_PIN 49
  2100. #define X_MIN_PIN 5
  2101. #define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable.
  2102. #define Y_STEP_PIN 39 // A6
  2103. #define Y_DIR_PIN 40 // A0
  2104. #define Y_ENABLE_PIN 38
  2105. #define Y_MIN_PIN 2
  2106. #define Y_MAX_PIN -1 //15
  2107. #define Z_STEP_PIN 42 // A2
  2108. #define Z_DIR_PIN 43 // A6
  2109. #define Z_ENABLE_PIN 41 // A1
  2110. #define Z_MIN_PIN 6
  2111. #define Z_MAX_PIN -1
  2112. #define E0_STEP_PIN 45
  2113. #define E0_DIR_PIN 44
  2114. #define E0_ENABLE_PIN 27
  2115. #define E1_STEP_PIN 36
  2116. #define E1_DIR_PIN 35
  2117. #define E1_ENABLE_PIN 37
  2118. #define E2_STEP_PIN -1
  2119. #define E2_DIR_PIN -1
  2120. #define E2_ENABLE_PIN -1
  2121. #define SDPOWER -1
  2122. #define SDSS 16
  2123. #define LED_PIN 46
  2124. #define FAN_PIN 9
  2125. #define FAN2_PIN -1
  2126. #define PS_ON_PIN -1
  2127. #define KILL_PIN -1
  2128. #define HEATER_0_PIN 7 // EXTRUDER 1
  2129. #define HEATER_1_PIN 8 // EXTRUDER 2
  2130. #define HEATER_2_PIN -1
  2131. #define TEMP_0_PIN 7 // ANALOG NUMBERING
  2132. #define TEMP_1_PIN 6 // ANALOG NUMBERING
  2133. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  2134. #define HEATER_BED_PIN 3 // BED
  2135. #define TEMP_BED_PIN 6 // ANALOG NUMBERING
  2136. #define BEEPER -1
  2137. #define LCD_PINS_RS -1
  2138. #define LCD_PINS_ENABLE -1
  2139. #define LCD_PINS_D4 -1
  2140. #define LCD_PINS_D5 -1
  2141. #define LCD_PINS_D6 -1
  2142. #define LCD_PINS_D7 -1
  2143. //buttons are directly attached using keypad
  2144. #define BTN_EN1 -1
  2145. #define BTN_EN2 -1
  2146. #define BTN_ENC -1 //the click
  2147. #define BLEN_C 2
  2148. #define BLEN_B 1
  2149. #define BLEN_A 0
  2150. #define SDCARDDETECT -1 // Megatronics does not use this port
  2151. //encoder rotation values
  2152. #define encrot0 0
  2153. #define encrot1 2
  2154. #define encrot2 3
  2155. #define encrot3 1
  2156. #endif
  2157. /****************************************************************************************
  2158. * Cheaptronic v1.0
  2159. *
  2160. ****************************************************************************************/
  2161. #if MOTHERBOARD == 2
  2162. #define KNOWN_BOARD 1
  2163. #ifndef __AVR_ATmega2560__
  2164. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  2165. #endif
  2166. #define LARGE_FLASH true
  2167. //X motor stepper
  2168. #define X_STEP_PIN 14
  2169. #define X_DIR_PIN 15
  2170. #define X_ENABLE_PIN 24
  2171. //X endstop
  2172. #define X_MIN_PIN 3
  2173. #define X_MAX_PIN -1
  2174. //Y motor stepper
  2175. #define Y_STEP_PIN 35
  2176. #define Y_DIR_PIN 36
  2177. #define Y_ENABLE_PIN 31
  2178. //Y endstop
  2179. #define Y_MIN_PIN 2
  2180. #define Y_MAX_PIN -1
  2181. //Z motor stepper
  2182. #define Z_STEP_PIN 40
  2183. #define Z_DIR_PIN 41
  2184. #define Z_ENABLE_PIN 37
  2185. //Z endstop
  2186. #define Z_MIN_PIN 5
  2187. #define Z_MAX_PIN -1
  2188. //Extruder 0 stepper
  2189. #define E0_STEP_PIN 26
  2190. #define E0_DIR_PIN 28
  2191. #define E0_ENABLE_PIN 25
  2192. //Extruder 1 stepper
  2193. #define E1_STEP_PIN 33
  2194. #define E1_DIR_PIN 34
  2195. #define E1_ENABLE_PIN 30
  2196. #define SDPOWER -1
  2197. #define SDSS -1
  2198. #define LED_PIN -1
  2199. //FAN
  2200. #define FAN_PIN -1
  2201. #define PS_ON_PIN -1
  2202. #define KILL_PIN -1
  2203. #define HEATER_0_PIN 19 // EXTRUDER 1
  2204. #define HEATER_1_PIN 23 // EXTRUDER 2
  2205. //HeatedBad
  2206. #define HEATER_BED_PIN 22
  2207. //Cheaptronic v1.0 hasent EXTRUDER 3
  2208. #define HEATER_2_PIN -1
  2209. //Temperature sensors
  2210. #define TEMP_0_PIN 15
  2211. #define TEMP_1_PIN 14
  2212. #define TEMP_2_PIN -1
  2213. #define TEMP_BED_PIN 13
  2214. //Cheaptronic v1.0 dont support LCD
  2215. #define LCD_PINS_RS -1
  2216. #define LCD_PINS_ENABLE -1
  2217. #define LCD_PINS_D4 -1
  2218. #define LCD_PINS_D5 -1
  2219. #define LCD_PINS_D6 -1
  2220. #define LCD_PINS_D7 -1
  2221. //Cheaptronic v1.0 dont support keypad
  2222. #define BTN_EN1 -1
  2223. #define BTN_EN2 -1
  2224. #define BTN_ENC -1
  2225. #define BLEN_C 2
  2226. #define BLEN_B 1
  2227. #define BLEN_A 0
  2228. //Cheaptronic v1.0 does not use this port
  2229. #define SDCARDDETECT -1
  2230. //encoder rotation values
  2231. #define encrot0 0
  2232. #define encrot1 2
  2233. #define encrot2 3
  2234. #define encrot3 1
  2235. #endif
  2236. #ifndef KNOWN_BOARD
  2237. #error Unknown MOTHERBOARD value in configuration.h
  2238. #endif
  2239. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  2240. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  2241. #if EXTRUDERS > 1
  2242. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  2243. #else
  2244. #define _E1_PINS
  2245. #endif
  2246. #if EXTRUDERS > 2
  2247. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  2248. #else
  2249. #define _E2_PINS
  2250. #endif
  2251. #ifdef X_STOP_PIN
  2252. #if X_HOME_DIR < 0
  2253. #define X_MIN_PIN X_STOP_PIN
  2254. #define X_MAX_PIN -1
  2255. #else
  2256. #define X_MIN_PIN -1
  2257. #define X_MAX_PIN X_STOP_PIN
  2258. #endif
  2259. #endif
  2260. #ifdef Y_STOP_PIN
  2261. #if Y_HOME_DIR < 0
  2262. #define Y_MIN_PIN Y_STOP_PIN
  2263. #define Y_MAX_PIN -1
  2264. #else
  2265. #define Y_MIN_PIN -1
  2266. #define Y_MAX_PIN Y_STOP_PIN
  2267. #endif
  2268. #endif
  2269. #ifdef Z_STOP_PIN
  2270. #if Z_HOME_DIR < 0
  2271. #define Z_MIN_PIN Z_STOP_PIN
  2272. #define Z_MAX_PIN -1
  2273. #else
  2274. #define Z_MIN_PIN -1
  2275. #define Z_MAX_PIN Z_STOP_PIN
  2276. #endif
  2277. #endif
  2278. #ifdef DISABLE_MAX_ENDSTOPS
  2279. #define X_MAX_PIN -1
  2280. #define Y_MAX_PIN -1
  2281. #define Z_MAX_PIN -1
  2282. #endif
  2283. #ifdef DISABLE_MIN_ENDSTOPS
  2284. #define X_MIN_PIN -1
  2285. #define Y_MIN_PIN -1
  2286. #define Z_MIN_PIN -1
  2287. #endif
  2288. #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, \
  2289. HEATER_BED_PIN, FAN_PIN, \
  2290. _E0_PINS _E1_PINS _E2_PINS \
  2291. analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
  2292. #endif