My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pins.h 77KB

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