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

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