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

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