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.

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