pins.h 72 KB

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