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

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