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

pins.h 75KB

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