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

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