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

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