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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637
  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 0
  145. #define TEMP_1_PIN -1
  146. #define TEMP_2_PIN -1
  147. #define TEMP_BED_PIN 1
  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 stanard GEN7
  178. #define X_DIR_PIN 20 //different from stanard 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. #define BLEN_C 2
  229. #define BLEN_B 1
  230. #define BLEN_A 0
  231. #define encrot0 0
  232. #define encrot1 2
  233. #define encrot2 3
  234. #define encrot3 1
  235. #endif
  236. /****************************************************************************************
  237. * Arduino Mega pin assignment
  238. *
  239. ****************************************************************************************/
  240. #if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  241. #define KNOWN_BOARD 1
  242. //////////////////FIX THIS//////////////
  243. #ifndef __AVR_ATmega1280__
  244. #ifndef __AVR_ATmega2560__
  245. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  246. #endif
  247. #endif
  248. // uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1
  249. // #define RAMPS_V_1_3
  250. // #define RAMPS_V_1_0
  251. #if MOTHERBOARD == 33 || MOTHERBOARD == 34
  252. #define X_STEP_PIN 54
  253. #define X_DIR_PIN 55
  254. #define X_ENABLE_PIN 38
  255. #define X_MIN_PIN 3
  256. #define X_MAX_PIN 2
  257. #define Y_STEP_PIN 60
  258. #define Y_DIR_PIN 61
  259. #define Y_ENABLE_PIN 56
  260. #define Y_MIN_PIN 14
  261. #define Y_MAX_PIN 15
  262. #define Z_STEP_PIN 46
  263. #define Z_DIR_PIN 48
  264. #define Z_ENABLE_PIN 62
  265. #define Z_MIN_PIN 18
  266. #define Z_MAX_PIN 19
  267. #define Z2_STEP_PIN 36
  268. #define Z2_DIR_PIN 34
  269. #define Z2_ENABLE_PIN 30
  270. #define E0_STEP_PIN 26
  271. #define E0_DIR_PIN 28
  272. #define E0_ENABLE_PIN 24
  273. #define E1_STEP_PIN 36
  274. #define E1_DIR_PIN 34
  275. #define E1_ENABLE_PIN 30
  276. #define SDPOWER -1
  277. #define SDSS 53
  278. #define LED_PIN 13
  279. #if MOTHERBOARD == 33
  280. #define FAN_PIN 9 // (Sprinter config)
  281. #else
  282. #define FAN_PIN 4 // IO pin. Buffer needed
  283. #endif
  284. #define PS_ON_PIN 12
  285. #if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
  286. #define KILL_PIN 41
  287. #else
  288. #define KILL_PIN -1
  289. #endif
  290. #define HEATER_0_PIN 10 // EXTRUDER 1
  291. #if MOTHERBOARD == 33
  292. #define HEATER_1_PIN -1
  293. #else
  294. #define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
  295. #endif
  296. #define HEATER_2_PIN -1
  297. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  298. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  299. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  300. #define HEATER_BED_PIN 8 // BED
  301. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  302. #ifdef ULTRA_LCD
  303. #ifdef NEWPANEL
  304. //encoder rotation values
  305. #define encrot0 0
  306. #define encrot1 2
  307. #define encrot2 3
  308. #define encrot3 1
  309. #define BLEN_A 0
  310. #define BLEN_B 1
  311. #define BLEN_C 2
  312. #define LCD_PINS_RS 16
  313. #define LCD_PINS_ENABLE 17
  314. #define LCD_PINS_D4 23
  315. #define LCD_PINS_D5 25
  316. #define LCD_PINS_D6 27
  317. #define LCD_PINS_D7 29
  318. #ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
  319. #define BEEPER 37
  320. #define BTN_EN1 31
  321. #define BTN_EN2 33
  322. #define BTN_ENC 35
  323. #define SDCARDDETECT 49
  324. #else
  325. //arduino pin which triggers an piezzo beeper
  326. #define BEEPER 33 // Beeper on AUX-4
  327. //buttons are directly attached using AUX-2
  328. #define BTN_EN1 37
  329. #define BTN_EN2 35
  330. #define BTN_ENC 31 //the click
  331. #ifdef G3D_PANEL
  332. #define SDCARDDETECT 49
  333. #else
  334. #define SDCARDDETECT -1 // Ramps does not use this port
  335. #endif
  336. #endif
  337. #else //old style panel with shift register
  338. //arduino pin witch triggers an piezzo beeper
  339. #define BEEPER 33 No Beeper added
  340. //buttons are attached to a shift register
  341. // Not wired this yet
  342. //#define SHIFT_CLK 38
  343. //#define SHIFT_LD 42
  344. //#define SHIFT_OUT 40
  345. //#define SHIFT_EN 17
  346. #define LCD_PINS_RS 16
  347. #define LCD_PINS_ENABLE 17
  348. #define LCD_PINS_D4 23
  349. #define LCD_PINS_D5 25
  350. #define LCD_PINS_D6 27
  351. #define LCD_PINS_D7 29
  352. //encoder rotation values
  353. #define encrot0 0
  354. #define encrot1 2
  355. #define encrot2 3
  356. #define encrot3 1
  357. //bits in the shift register that carry the buttons for:
  358. // left up center down right red
  359. #define BL_LE 7
  360. #define BL_UP 6
  361. #define BL_MI 5
  362. #define BL_DW 4
  363. #define BL_RI 3
  364. #define BL_ST 2
  365. #define BLEN_B 1
  366. #define BLEN_A 0
  367. #endif
  368. #endif //ULTRA_LCD
  369. #else // RAMPS_V_1_1 or RAMPS_V_1_2 as default (MOTHERBOARD == 3)
  370. #define X_STEP_PIN 26
  371. #define X_DIR_PIN 28
  372. #define X_ENABLE_PIN 24
  373. #define X_MIN_PIN 3
  374. #define X_MAX_PIN -1 //2
  375. #define Y_STEP_PIN 38
  376. #define Y_DIR_PIN 40
  377. #define Y_ENABLE_PIN 36
  378. #define Y_MIN_PIN 16
  379. #define Y_MAX_PIN -1 //17
  380. #define Z_STEP_PIN 44
  381. #define Z_DIR_PIN 46
  382. #define Z_ENABLE_PIN 42
  383. #define Z_MIN_PIN 18
  384. #define Z_MAX_PIN -1 //19
  385. #define E0_STEP_PIN 32
  386. #define E0_DIR_PIN 34
  387. #define E0_ENABLE_PIN 30
  388. #define SDPOWER 48
  389. #define SDSS 53
  390. #define LED_PIN 13
  391. #define PS_ON_PIN -1
  392. #define KILL_PIN -1
  393. #ifdef RAMPS_V_1_0 // RAMPS_V_1_0
  394. #define HEATER_0_PIN 12 // RAMPS 1.0
  395. #define HEATER_BED_PIN -1 // RAMPS 1.0
  396. #define FAN_PIN 11 // RAMPS 1.0
  397. #else // RAMPS_V_1_1 or RAMPS_V_1_2
  398. #define HEATER_0_PIN 10 // RAMPS 1.1
  399. #define HEATER_BED_PIN 8 // RAMPS 1.1
  400. #define FAN_PIN 9 // RAMPS 1.1
  401. #endif
  402. #define HEATER_1_PIN -1
  403. #define HEATER_2_PIN -1
  404. #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  405. #define TEMP_1_PIN -1
  406. #define TEMP_2_PIN -1
  407. #define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  408. #endif// MOTHERBOARD == 33 || MOTHERBOARD == 34
  409. // SPI for Max6675 Thermocouple
  410. #ifndef SDSUPPORT
  411. // these pins are defined in the SD library if building with SD support
  412. #define MAX_SCK_PIN 52
  413. #define MAX_MISO_PIN 50
  414. #define MAX_MOSI_PIN 51
  415. #define MAX6675_SS 53
  416. #else
  417. #define MAX6675_SS 49
  418. #endif
  419. #endif//MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34
  420. /****************************************************************************************
  421. * Duemilanove w/ ATMega328P pin assignment
  422. *
  423. ****************************************************************************************/
  424. #if MOTHERBOARD == 4
  425. #define KNOWN_BOARD 1
  426. #ifndef __AVR_ATmega328P__
  427. #error Oops! Make sure you have 'Arduino Duemilanove w/ ATMega328' selected from the 'Tools -> Boards' menu.
  428. #endif
  429. #define X_STEP_PIN 19
  430. #define X_DIR_PIN 18
  431. #define X_ENABLE_PIN -1
  432. #define X_STOP_PIN 17
  433. #define Y_STEP_PIN 10
  434. #define Y_DIR_PIN 7
  435. #define Y_ENABLE_PIN -1
  436. #define Y_STOP_PIN 8
  437. #define Z_STEP_PIN 13
  438. #define Z_DIR_PIN 3
  439. #define Z_ENABLE_PIN 2
  440. #define Z_STOP_PIN 4
  441. #define E0_STEP_PIN 11
  442. #define E0_DIR_PIN 12
  443. #define E0_ENABLE_PIN -1
  444. #define SDPOWER -1
  445. #define SDSS -1
  446. #define LED_PIN -1
  447. #define FAN_PIN 5
  448. #define PS_ON_PIN -1
  449. #define KILL_PIN -1
  450. #define HEATER_0_PIN 6
  451. #define HEATER_1_PIN -1
  452. #define HEATER_2_PIN -1
  453. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  454. #define TEMP_1_PIN -1
  455. #define TEMP_2_PIN -1
  456. #define HEATER_BED_PIN -1
  457. #define TEMP_BED_PIN -1
  458. #endif
  459. /****************************************************************************************
  460. * Gen6 pin assignment
  461. *
  462. ****************************************************************************************/
  463. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  464. #define KNOWN_BOARD 1
  465. #ifndef __AVR_ATmega644P__
  466. #ifndef __AVR_ATmega1284P__
  467. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  468. #endif
  469. #endif
  470. //x axis pins
  471. #define X_STEP_PIN 15
  472. #define X_DIR_PIN 18
  473. #define X_ENABLE_PIN 19
  474. #define X_STOP_PIN 20
  475. //y axis pins
  476. #define Y_STEP_PIN 23
  477. #define Y_DIR_PIN 22
  478. #define Y_ENABLE_PIN 24
  479. #define Y_STOP_PIN 25
  480. //z axis pins
  481. #define Z_STEP_PIN 27
  482. #define Z_DIR_PIN 28
  483. #define Z_ENABLE_PIN 29
  484. #define Z_STOP_PIN 30
  485. //extruder pins
  486. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  487. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  488. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  489. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  490. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  491. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  492. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  493. #define HEATER_1_PIN -1
  494. #define HEATER_2_PIN -1
  495. #if MOTHERBOARD == 5
  496. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  497. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  498. #else
  499. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  500. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  501. #endif
  502. #define SDPOWER -1
  503. #define SDSS 17
  504. #define LED_PIN -1 //changed @ rkoeppl 20110410
  505. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  506. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  507. #define KILL_PIN -1 //changed @ drakelive 20120830
  508. //our pin for debugging.
  509. #define DEBUG_PIN 0
  510. //our RS485 pins
  511. #define TX_ENABLE_PIN 12
  512. #define RX_ENABLE_PIN 13
  513. #endif
  514. /****************************************************************************************
  515. * Sanguinololu pin assignment
  516. *
  517. ****************************************************************************************/
  518. #if MOTHERBOARD == 64
  519. #define STB
  520. #endif
  521. #if MOTHERBOARD == 63
  522. #define MELZI
  523. #endif
  524. #if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64
  525. #undef MOTHERBOARD
  526. #define MOTHERBOARD 6
  527. #define SANGUINOLOLU_V_1_2
  528. #endif
  529. #if MOTHERBOARD == 6
  530. #define KNOWN_BOARD 1
  531. #ifndef __AVR_ATmega644P__
  532. #ifndef __AVR_ATmega1284P__
  533. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  534. #endif
  535. #endif
  536. #define X_STEP_PIN 15
  537. #define X_DIR_PIN 21
  538. #define X_STOP_PIN 18
  539. #define Y_STEP_PIN 22
  540. #define Y_DIR_PIN 23
  541. #define Y_STOP_PIN 19
  542. #define Z_STEP_PIN 3
  543. #define Z_DIR_PIN 2
  544. #define Z_STOP_PIN 20
  545. #define E0_STEP_PIN 1
  546. #define E0_DIR_PIN 0
  547. #define LED_PIN -1
  548. #define FAN_PIN -1
  549. #if FAN_PIN == 12 || FAN_PIN ==13
  550. #define FAN_SOFT_PWM
  551. #endif
  552. #ifdef MELZI
  553. #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. */
  554. #define FAN_PIN 4
  555. #endif
  556. #ifdef STB
  557. #define FAN_PIN 4
  558. #endif
  559. #define PS_ON_PIN -1
  560. #define KILL_PIN -1
  561. #define HEATER_0_PIN 13 // (extruder)
  562. #define HEATER_1_PIN -1
  563. #define HEATER_2_PIN -1
  564. #ifdef SANGUINOLOLU_V_1_2
  565. #define HEATER_BED_PIN 12 // (bed)
  566. #define X_ENABLE_PIN 14
  567. #define Y_ENABLE_PIN 14
  568. #define Z_ENABLE_PIN 26
  569. #define E0_ENABLE_PIN 14
  570. #else
  571. #define HEATER_BED_PIN 14 // (bed)
  572. #define X_ENABLE_PIN -1
  573. #define Y_ENABLE_PIN -1
  574. #define Z_ENABLE_PIN -1
  575. #define E0_ENABLE_PIN -1
  576. #endif
  577. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  578. #define TEMP_1_PIN -1
  579. #define TEMP_2_PIN -1
  580. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  581. #define SDPOWER -1
  582. #define SDSS 31
  583. /* 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. */
  584. //#define SDSS 24
  585. #ifdef ULTRA_LCD
  586. #ifdef NEWPANEL
  587. //we have no buzzer installed
  588. #define BEEPER -1
  589. //LCD Pins
  590. #ifdef DOGLCD
  591. // Pins for DOGM SPI LCD Support
  592. #define DOGLCD_A0 30
  593. #define DOGLCD_CS 29
  594. // GLCD features
  595. #define LCD_CONTRAST 1
  596. // Uncomment screen orientation
  597. // #define LCD_SCREEN_ROT_0
  598. // #define LCD_SCREEN_ROT_90
  599. #define LCD_SCREEN_ROT_180
  600. // #define LCD_SCREEN_ROT_270
  601. #else // standard Hitachi LCD controller
  602. #define LCD_PINS_RS 4
  603. #define LCD_PINS_ENABLE 17
  604. #define LCD_PINS_D4 30
  605. #define LCD_PINS_D5 29
  606. #define LCD_PINS_D6 28
  607. #define LCD_PINS_D7 27
  608. #endif
  609. //The encoder and click button
  610. #define BTN_EN1 11 //must be a hardware interrupt pin
  611. #define BTN_EN2 10 //must be hardware interrupt pin
  612. #define BTN_ENC 16 //the switch
  613. //not connected to a pin
  614. #define SDCARDDETECT -1
  615. //from the same bit in the RAMPS Newpanel define
  616. //encoder rotation values
  617. #define encrot0 0
  618. #define encrot1 2
  619. #define encrot2 3
  620. #define encrot3 1
  621. #define BLEN_C 2
  622. #define BLEN_B 1
  623. #define BLEN_A 0
  624. #endif //Newpanel
  625. #endif //Ultipanel
  626. #endif
  627. #if MOTHERBOARD == 7
  628. #define KNOWN_BOARD
  629. /*****************************************************************
  630. * Ultimaker pin assignment
  631. ******************************************************************/
  632. #ifndef __AVR_ATmega1280__
  633. #ifndef __AVR_ATmega2560__
  634. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  635. #endif
  636. #endif
  637. #define X_STEP_PIN 25
  638. #define X_DIR_PIN 23
  639. #define X_MIN_PIN 22
  640. #define X_MAX_PIN 24
  641. #define X_ENABLE_PIN 27
  642. #define Y_STEP_PIN 31
  643. #define Y_DIR_PIN 33
  644. #define Y_MIN_PIN 26
  645. #define Y_MAX_PIN 28
  646. #define Y_ENABLE_PIN 29
  647. #define Z_STEP_PIN 37
  648. #define Z_DIR_PIN 39
  649. #define Z_MIN_PIN 30
  650. #define Z_MAX_PIN 32
  651. #define Z_ENABLE_PIN 35
  652. #define HEATER_BED_PIN 4
  653. #define TEMP_BED_PIN 10
  654. #define HEATER_0_PIN 2
  655. #define TEMP_0_PIN 8
  656. #define HEATER_1_PIN 3
  657. #define TEMP_1_PIN 9
  658. #define HEATER_2_PIN -1
  659. #define TEMP_2_PIN -1
  660. #define E0_STEP_PIN 43
  661. #define E0_DIR_PIN 45
  662. #define E0_ENABLE_PIN 41
  663. #define E1_STEP_PIN 49
  664. #define E1_DIR_PIN 47
  665. #define E1_ENABLE_PIN 48
  666. #define SDPOWER -1
  667. #define SDSS 53
  668. #define LED_PIN 13
  669. #define FAN_PIN 7
  670. #define PS_ON_PIN 12
  671. #define KILL_PIN -1
  672. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  673. #ifdef ULTRA_LCD
  674. #ifdef NEWPANEL
  675. //arduino pin witch triggers an piezzo beeper
  676. #define BEEPER 18
  677. #define LCD_PINS_RS 20
  678. #define LCD_PINS_ENABLE 17
  679. #define LCD_PINS_D4 16
  680. #define LCD_PINS_D5 21
  681. #define LCD_PINS_D6 5
  682. #define LCD_PINS_D7 6
  683. //buttons are directly attached
  684. #define BTN_EN1 40
  685. #define BTN_EN2 42
  686. #define BTN_ENC 19 //the click
  687. #define BLEN_C 2
  688. #define BLEN_B 1
  689. #define BLEN_A 0
  690. #define SDCARDDETECT 38
  691. //encoder rotation values
  692. #define encrot0 0
  693. #define encrot1 2
  694. #define encrot2 3
  695. #define encrot3 1
  696. #else //old style panel with shift register
  697. //arduino pin witch triggers an piezzo beeper
  698. #define BEEPER 18
  699. //buttons are attached to a shift register
  700. #define SHIFT_CLK 38
  701. #define SHIFT_LD 42
  702. #define SHIFT_OUT 40
  703. #define SHIFT_EN 17
  704. #define LCD_PINS_RS 16
  705. #define LCD_PINS_ENABLE 5
  706. #define LCD_PINS_D4 6
  707. #define LCD_PINS_D5 21
  708. #define LCD_PINS_D6 20
  709. #define LCD_PINS_D7 19
  710. //encoder rotation values
  711. #ifndef ULTIMAKERCONTROLLER
  712. #define encrot0 0
  713. #define encrot1 2
  714. #define encrot2 3
  715. #define encrot3 1
  716. #else
  717. #define encrot0 0
  718. #define encrot1 1
  719. #define encrot2 3
  720. #define encrot3 2
  721. #endif
  722. #define SDCARDDETECT -1
  723. //bits in the shift register that carry the buttons for:
  724. // left up center down right red
  725. #define BL_LE 7
  726. #define BL_UP 6
  727. #define BL_MI 5
  728. #define BL_DW 4
  729. #define BL_RI 3
  730. #define BL_ST 2
  731. #define BLEN_B 1
  732. #define BLEN_A 0
  733. #endif
  734. #endif //ULTRA_LCD
  735. #endif
  736. #if MOTHERBOARD == 71
  737. #define KNOWN_BOARD
  738. /*****************************************************************
  739. * Ultimaker pin assignment (Old electronics)
  740. ******************************************************************/
  741. #ifndef __AVR_ATmega1280__
  742. #ifndef __AVR_ATmega2560__
  743. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  744. #endif
  745. #endif
  746. #define X_STEP_PIN 25
  747. #define X_DIR_PIN 23
  748. #define X_MIN_PIN 15
  749. #define X_MAX_PIN 14
  750. #define X_ENABLE_PIN 27
  751. #define Y_STEP_PIN 31
  752. #define Y_DIR_PIN 33
  753. #define Y_MIN_PIN 17
  754. #define Y_MAX_PIN 16
  755. #define Y_ENABLE_PIN 29
  756. #define Z_STEP_PIN 37
  757. #define Z_DIR_PIN 39
  758. #define Z_MIN_PIN 19
  759. #define Z_MAX_PIN 18
  760. #define Z_ENABLE_PIN 35
  761. #define HEATER_BED_PIN -1
  762. #define TEMP_BED_PIN -1
  763. #define HEATER_0_PIN 2
  764. #define TEMP_0_PIN 8
  765. #define HEATER_1_PIN 1
  766. #define TEMP_1_PIN 1
  767. #define HEATER_2_PIN -1
  768. #define TEMP_2_PIN -1
  769. #define E0_STEP_PIN 43
  770. #define E0_DIR_PIN 45
  771. #define E0_ENABLE_PIN 41
  772. #define E1_STEP_PIN -1
  773. #define E1_DIR_PIN -1
  774. #define E1_ENABLE_PIN -1
  775. #define SDPOWER -1
  776. #define SDSS -1
  777. #define LED_PIN -1
  778. #define FAN_PIN -1
  779. #define PS_ON_PIN -1
  780. #define KILL_PIN -1
  781. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  782. #define LCD_PINS_RS 24
  783. #define LCD_PINS_ENABLE 22
  784. #define LCD_PINS_D4 36
  785. #define LCD_PINS_D5 34
  786. #define LCD_PINS_D6 32
  787. #define LCD_PINS_D7 30
  788. #endif
  789. /****************************************************************************************
  790. * RUMBA pin assignment
  791. *
  792. ****************************************************************************************/
  793. #if MOTHERBOARD == 80
  794. #define KNOWN_BOARD 1
  795. #ifndef __AVR_ATmega2560__
  796. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  797. #endif
  798. #define X_STEP_PIN 17
  799. #define X_DIR_PIN 16
  800. #define X_ENABLE_PIN 48
  801. #define X_MIN_PIN 37
  802. #define X_MAX_PIN 36
  803. #define Y_STEP_PIN 54
  804. #define Y_DIR_PIN 47
  805. #define Y_ENABLE_PIN 55
  806. #define Y_MIN_PIN 35
  807. #define Y_MAX_PIN 34
  808. #define Z_STEP_PIN 57
  809. #define Z_DIR_PIN 56
  810. #define Z_ENABLE_PIN 62
  811. #define Z_MIN_PIN 33
  812. #define Z_MAX_PIN 32
  813. #define E0_STEP_PIN 23
  814. #define E0_DIR_PIN 22
  815. #define E0_ENABLE_PIN 24
  816. #define E1_STEP_PIN 26
  817. #define E1_DIR_PIN 25
  818. #define E1_ENABLE_PIN 27
  819. #define E2_STEP_PIN 29
  820. #define E2_DIR_PIN 28
  821. #define E2_ENABLE_PIN 39
  822. #define LED_PIN 13
  823. #define FAN_PIN 7
  824. //additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
  825. #define PS_ON_PIN 45
  826. #define KILL_PIN 46
  827. #define HEATER_0_PIN 2 // EXTRUDER 1
  828. #define HEATER_1_PIN 3 // EXTRUDER 2
  829. #define HEATER_2_PIN 6 // EXTRUDER 3
  830. //optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4
  831. #define HEATER_BED_PIN 9 // BED
  832. #define TEMP_0_PIN 15 // ANALOG NUMBERING
  833. #define TEMP_1_PIN 14 // ANALOG NUMBERING
  834. #define TEMP_2_PIN 13 // ANALOG NUMBERING
  835. //optional for extruder 4 or chamber: #define TEMP_2_PIN 12 // ANALOG NUMBERING
  836. #define TEMP_BED_PIN 11 // ANALOG NUMBERING
  837. #define SDPOWER -1
  838. #define SDSS 53
  839. #define SDCARDDETECT 49
  840. #define BEEPER 44
  841. #define LCD_PINS_RS 19
  842. #define LCD_PINS_ENABLE 42
  843. #define LCD_PINS_D4 18
  844. #define LCD_PINS_D5 38
  845. #define LCD_PINS_D6 41
  846. #define LCD_PINS_D7 40
  847. #define BTN_EN1 11
  848. #define BTN_EN2 12
  849. #define BTN_ENC 43
  850. //encoder rotation values
  851. #define BLEN_C 2
  852. #define BLEN_B 1
  853. #define BLEN_A 0
  854. #define encrot0 0
  855. #define encrot1 2
  856. #define encrot2 3
  857. #define encrot3 1
  858. #endif //MOTHERBOARD==80
  859. /****************************************************************************************
  860. * Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
  861. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  862. http://www.pjrc.com/teensy/teensyduino.html
  863. * See http://reprap.org/wiki/Printrboard for more info
  864. ****************************************************************************************/
  865. #if MOTHERBOARD == 8 || MOTHERBOARD == 81
  866. #define KNOWN_BOARD 1
  867. #define AT90USB 1286 // Disable MarlinSerial etc.
  868. #ifndef __AVR_AT90USB1286__
  869. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  870. #endif
  871. #define X_STEP_PIN 0
  872. #define X_DIR_PIN 1
  873. #define X_ENABLE_PIN 39
  874. #define Y_STEP_PIN 2
  875. #define Y_DIR_PIN 3
  876. #define Y_ENABLE_PIN 38
  877. #define Z_STEP_PIN 4
  878. #define Z_DIR_PIN 5
  879. #define Z_ENABLE_PIN 23
  880. #define E0_STEP_PIN 6
  881. #define E0_DIR_PIN 7
  882. #define E0_ENABLE_PIN 19
  883. #define HEATER_0_PIN 21 // Extruder
  884. #define HEATER_1_PIN -1
  885. #define HEATER_2_PIN -1
  886. #define HEATER_BED_PIN 20 // Bed
  887. #define FAN_PIN 22 // Fan
  888. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  889. // for the fan and Teensyduino uses a different pin mapping.
  890. #if MOTHERBOARD == 8 // Teensylu
  891. #define X_STOP_PIN 13
  892. #define Y_STOP_PIN 14
  893. #define Z_STOP_PIN 15
  894. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  895. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  896. #else // Printrboard
  897. #define X_STOP_PIN 35
  898. #define Y_STOP_PIN 8
  899. #define Z_STOP_PIN 36
  900. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  901. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  902. #endif
  903. #define TEMP_1_PIN -1
  904. #define TEMP_2_PIN -1
  905. #define SDPOWER -1
  906. #define SDSS 8
  907. #define LED_PIN -1
  908. #define PS_ON_PIN -1
  909. #define KILL_PIN -1
  910. #define ALARM_PIN -1
  911. #ifndef SDSUPPORT
  912. // these pins are defined in the SD library if building with SD support
  913. #define SCK_PIN 9
  914. #define MISO_PIN 11
  915. #define MOSI_PIN 10
  916. #endif
  917. #endif // MOTHERBOARD == 8 (Teensylu) or 81 (Printrboard)
  918. /****************************************************************************************
  919. * Brainwave 1.0 pin assignments (AT90USB646)
  920. * Requires hardware bundle for Arduino:
  921. https://github.com/unrepentantgeek/brainwave-arduino
  922. ****************************************************************************************/
  923. #if MOTHERBOARD == 82
  924. #define KNOWN_BOARD 1
  925. #define AT90USB 646 // Disable MarlinSerial etc.
  926. #ifndef __AVR_AT90USB646__
  927. #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
  928. #endif
  929. #define X_STEP_PIN 27
  930. #define X_DIR_PIN 29
  931. #define X_ENABLE_PIN 28
  932. #define X_STOP_PIN 7
  933. #define X_ATT_PIN 26
  934. #define Y_STEP_PIN 31
  935. #define Y_DIR_PIN 33
  936. #define Y_ENABLE_PIN 32
  937. #define Y_STOP_PIN 6
  938. #define Y_ATT_PIN 30
  939. #define Z_STEP_PIN 17
  940. #define Z_DIR_PIN 19
  941. #define Z_ENABLE_PIN 18
  942. #define Z_STOP_PIN 5
  943. #define Z_ATT_PIN 16
  944. #define E0_STEP_PIN 21
  945. #define E0_DIR_PIN 23
  946. #define E0_ENABLE_PIN 22
  947. #define E0_ATT_PIN 20
  948. #define HEATER_0_PIN 4 // Extruder
  949. #define HEATER_1_PIN -1
  950. #define HEATER_2_PIN -1
  951. #define HEATER_BED_PIN 38 // Bed
  952. #define FAN_PIN 3 // Fan
  953. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  954. #define TEMP_1_PIN -1
  955. #define TEMP_2_PIN -1
  956. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  957. #define SDPOWER -1
  958. #define SDSS -1
  959. #define LED_PIN 39
  960. #define PS_ON_PIN -1
  961. #define KILL_PIN -1
  962. #define ALARM_PIN -1
  963. #ifndef SDSUPPORT
  964. // these pins are defined in the SD library if building with SD support
  965. #define SCK_PIN 9
  966. #define MISO_PIN 11
  967. #define MOSI_PIN 10
  968. #endif
  969. #endif // MOTHERBOARD == 82 (Brainwave)
  970. /****************************************************************************************
  971. * Gen3+ pin assignment
  972. *
  973. ****************************************************************************************/
  974. #if MOTHERBOARD == 9
  975. #define MOTHERBOARD 6 /*TODO: Figure out, Why is this done?*/
  976. #define KNOWN_BOARD 1
  977. #ifndef __AVR_ATmega644P__
  978. #ifndef __AVR_ATmega1284P__
  979. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  980. #endif
  981. #endif
  982. #define X_STEP_PIN 15
  983. #define X_DIR_PIN 18
  984. #define X_STOP_PIN 20
  985. #define Y_STEP_PIN 23
  986. #define Y_DIR_PIN 22
  987. #define Y_STOP_PIN 25
  988. #define Z_STEP_PIN 27
  989. #define Z_DIR_PIN 28
  990. #define Z_STOP_PIN 30
  991. #define E_STEP_PIN 17
  992. #define E_DIR_PIN 21
  993. #define LED_PIN -1
  994. #define FAN_PIN -1
  995. #define PS_ON_PIN 14
  996. #define KILL_PIN -1
  997. #define HEATER_0_PIN 12 // (extruder)
  998. #define HEATER_1_PIN 16 // (bed)
  999. #define X_ENABLE_PIN 19
  1000. #define Y_ENABLE_PIN 24
  1001. #define Z_ENABLE_PIN 29
  1002. #define E_ENABLE_PIN 13
  1003. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  1004. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  1005. #define TEMP_2_PIN -1
  1006. #define SDPOWER -1
  1007. #define SDSS 4
  1008. #define HEATER_2_PIN -1
  1009. #endif
  1010. /****************************************************************************************
  1011. * Open Motion controller with enable based extruders
  1012. *
  1013. * ATMega644
  1014. *
  1015. * +---\/---+
  1016. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  1017. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  1018. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  1019. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  1020. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  1021. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  1022. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  1023. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  1024. * RST 9| |32 AREF
  1025. * VCC 10| |31 GND
  1026. * GND 11| |30 AVCC
  1027. * XTAL2 12| |29 PC7 (D 23)
  1028. * XTAL1 13| |28 PC6 (D 22)
  1029. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  1030. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  1031. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  1032. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  1033. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  1034. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  1035. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  1036. * +--------+
  1037. *
  1038. ****************************************************************************************/
  1039. #if MOTHERBOARD == 90 //Alpha OMCA board
  1040. #define KNOWN_BOARD 1
  1041. #ifndef __AVR_ATmega644__
  1042. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  1043. #endif
  1044. #define X_STEP_PIN 21
  1045. #define X_DIR_PIN 20
  1046. #define X_ENABLE_PIN 24
  1047. #define X_STOP_PIN 0
  1048. #define Y_STEP_PIN 23
  1049. #define Y_DIR_PIN 22
  1050. #define Y_ENABLE_PIN 24
  1051. #define Y_STOP_PIN 1
  1052. #define Z_STEP_PIN 26
  1053. #define Z_DIR_PIN 25
  1054. #define Z_ENABLE_PIN 24
  1055. #define Z_STOP_PIN 2
  1056. #define E0_STEP_PIN 28
  1057. #define E0_DIR_PIN 27
  1058. #define E0_ENABLE_PIN 24
  1059. #define E1_STEP_PIN -1 // 19
  1060. #define E1_DIR_PIN -1 // 18
  1061. #define E1_ENABLE_PIN 24
  1062. #define E2_STEP_PIN -1 // 17
  1063. #define E2_DIR_PIN -1 // 16
  1064. #define E2_ENABLE_PIN 24
  1065. #define SDPOWER -1
  1066. #define SDSS 11
  1067. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1068. #define LED_PIN -1
  1069. #define FAN_PIN 3
  1070. #define PS_ON_PIN -1
  1071. #define KILL_PIN -1
  1072. #define HEATER_0_PIN 4
  1073. #define HEATER_1_PIN -1 // 12
  1074. #define HEATER_2_PIN -1 // 13
  1075. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  1076. #define TEMP_1_PIN -1 // 1
  1077. #define TEMP_2_PIN -1 // 2
  1078. #define HEATER_BED_PIN -1 // 14/15
  1079. #define TEMP_BED_PIN -1 // 1,2 or I2C
  1080. /* 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) */
  1081. #endif
  1082. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  1083. #define KNOWN_BOARD 1
  1084. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  1085. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  1086. #endif
  1087. #define X_STEP_PIN 26
  1088. #define X_DIR_PIN 25
  1089. #define X_ENABLE_PIN 10
  1090. #define X_STOP_PIN 0
  1091. #define Y_STEP_PIN 28
  1092. #define Y_DIR_PIN 27
  1093. #define Y_ENABLE_PIN 10
  1094. #define Y_STOP_PIN 1
  1095. #define Z_STEP_PIN 23
  1096. #define Z_DIR_PIN 22
  1097. #define Z_ENABLE_PIN 10
  1098. #define Z_STOP_PIN 2
  1099. #define E0_STEP_PIN 24
  1100. #define E0_DIR_PIN 21
  1101. #define E0_ENABLE_PIN 10
  1102. /* future proofing */
  1103. #define __FS 20
  1104. #define __FD 19
  1105. #define __GS 18
  1106. #define __GD 13
  1107. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  1108. #define E1_STEP_PIN -1 // 21
  1109. #define E1_DIR_PIN -1 // 20
  1110. #define E1_ENABLE_PIN -1 // 19
  1111. #define E2_STEP_PIN -1 // 21
  1112. #define E2_DIR_PIN -1 // 20
  1113. #define E2_ENABLE_PIN -1 // 18
  1114. #define SDPOWER -1
  1115. #define SDSS 11
  1116. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1117. #define LED_PIN -1
  1118. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  1119. #define PS_ON_PIN -1
  1120. #define KILL_PIN -1
  1121. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  1122. #define HEATER_1_PIN -1
  1123. #define HEATER_2_PIN -1
  1124. #define HEATER_1_PIN -1
  1125. #define HEATER_2_PIN -1
  1126. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  1127. #define TEMP_1_PIN 1 // ANALOG
  1128. #define TEMP_2_PIN -1 // 2
  1129. #define HEATER_BED_PIN 4
  1130. #define TEMP_BED_PIN 2 // 1,2 or I2C
  1131. #define I2C_SCL 16
  1132. #define I2C_SDA 17
  1133. #endif
  1134. #if MOTHERBOARD == 301
  1135. #define KNOWN_BOARD
  1136. /*****************************************************************
  1137. * Rambo Pin Assignments
  1138. ******************************************************************/
  1139. #ifndef __AVR_ATmega2560__
  1140. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1141. #endif
  1142. #define X_STEP_PIN 37
  1143. #define X_DIR_PIN 48
  1144. #define X_MIN_PIN 12
  1145. #define X_MAX_PIN 24
  1146. #define X_ENABLE_PIN 29
  1147. #define X_MS1_PIN 40
  1148. #define X_MS2_PIN 41
  1149. #define Y_STEP_PIN 36
  1150. #define Y_DIR_PIN 49
  1151. #define Y_MIN_PIN 11
  1152. #define Y_MAX_PIN 23
  1153. #define Y_ENABLE_PIN 28
  1154. #define Y_MS1_PIN 69
  1155. #define Y_MS2_PIN 39
  1156. #define Z_STEP_PIN 35
  1157. #define Z_DIR_PIN 47
  1158. #define Z_MIN_PIN 10
  1159. #define Z_MAX_PIN 30
  1160. #define Z_ENABLE_PIN 27
  1161. #define Z_MS1_PIN 68
  1162. #define Z_MS2_PIN 67
  1163. #define HEATER_BED_PIN 3
  1164. #define TEMP_BED_PIN 2
  1165. #define HEATER_0_PIN 9
  1166. #define TEMP_0_PIN 0
  1167. #define HEATER_1_PIN 7
  1168. #define TEMP_1_PIN 1
  1169. #define HEATER_2_PIN -1
  1170. #define TEMP_2_PIN -1
  1171. #define E0_STEP_PIN 34
  1172. #define E0_DIR_PIN 43
  1173. #define E0_ENABLE_PIN 26
  1174. #define E0_MS1_PIN 65
  1175. #define E0_MS2_PIN 66
  1176. #define E1_STEP_PIN 33
  1177. #define E1_DIR_PIN 42
  1178. #define E1_ENABLE_PIN 25
  1179. #define E1_MS1_PIN 63
  1180. #define E1_MS2_PIN 64
  1181. #define DIGIPOTSS_PIN 38
  1182. #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
  1183. #define SDPOWER -1
  1184. #define SDSS 53
  1185. #define LED_PIN 13
  1186. #define FAN_PIN 8
  1187. #define PS_ON_PIN 4
  1188. #define KILL_PIN -1
  1189. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1190. #endif
  1191. /****************************************************************************************
  1192. * MegaTronics
  1193. *
  1194. ****************************************************************************************/
  1195. #if MOTHERBOARD == 70
  1196. #define KNOWN_BOARD 1
  1197. //////////////////FIX THIS//////////////
  1198. #ifndef __AVR_ATmega2560__
  1199. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1200. #endif
  1201. #define X_STEP_PIN 26
  1202. #define X_DIR_PIN 28
  1203. #define X_ENABLE_PIN 24
  1204. #define X_MIN_PIN 41
  1205. #define X_MAX_PIN 37
  1206. #define Y_STEP_PIN 60 // A6
  1207. #define Y_DIR_PIN 61 // A7
  1208. #define Y_ENABLE_PIN 22
  1209. #define Y_MIN_PIN 14
  1210. #define Y_MAX_PIN 15
  1211. #define Z_STEP_PIN 54 // A0
  1212. #define Z_DIR_PIN 55 // A1
  1213. #define Z_ENABLE_PIN 56 // A2
  1214. #define Z_MIN_PIN 18
  1215. #define Z_MAX_PIN 19
  1216. #define E0_STEP_PIN 31
  1217. #define E0_DIR_PIN 32
  1218. #define E0_ENABLE_PIN 38
  1219. #define E1_STEP_PIN 34
  1220. #define E1_DIR_PIN 36
  1221. #define E1_ENABLE_PIN 30
  1222. #define SDPOWER -1
  1223. #define SDSS 53
  1224. #define LED_PIN 13
  1225. #define FAN_PIN 7 // IO pin. Buffer needed
  1226. #define PS_ON_PIN 12
  1227. #define KILL_PIN -1
  1228. #define HEATER_0_PIN 9 // EXTRUDER 1
  1229. #define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
  1230. #define HEATER_2_PIN -1
  1231. #if TEMP_SENSOR_0 == -1
  1232. #define TEMP_0_PIN 8 // ANALOG NUMBERING
  1233. #else
  1234. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  1235. #endif
  1236. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  1237. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1238. #define HEATER_BED_PIN 10 // BED
  1239. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  1240. #define BEEPER 33 // Beeper on AUX-4
  1241. #ifdef ULTRA_LCD
  1242. #ifdef NEWPANEL
  1243. //arduino pin which triggers an piezzo beeper
  1244. #define LCD_PINS_RS 16
  1245. #define LCD_PINS_ENABLE 17
  1246. #define LCD_PINS_D4 23
  1247. #define LCD_PINS_D5 25
  1248. #define LCD_PINS_D6 27
  1249. #define LCD_PINS_D7 29
  1250. //buttons are directly attached using AUX-2
  1251. #define BTN_EN1 59
  1252. #define BTN_EN2 64
  1253. #define BTN_ENC 43 //the click
  1254. #define BLEN_C 2
  1255. #define BLEN_B 1
  1256. #define BLEN_A 0
  1257. #define SDCARDDETECT -1 // Ramps does not use this port
  1258. //encoder rotation values
  1259. #define encrot0 0
  1260. #define encrot1 2
  1261. #define encrot2 3
  1262. #define encrot3 1
  1263. #endif
  1264. #endif //ULTRA_LCD
  1265. #endif
  1266. #ifndef KNOWN_BOARD
  1267. #error Unknown MOTHERBOARD value in configuration.h
  1268. #endif
  1269. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  1270. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  1271. #if EXTRUDERS > 1
  1272. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  1273. #else
  1274. #define _E1_PINS
  1275. #endif
  1276. #if EXTRUDERS > 2
  1277. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  1278. #else
  1279. #define _E2_PINS
  1280. #endif
  1281. #ifdef X_STOP_PIN
  1282. #if X_HOME_DIR < 0
  1283. #define X_MIN_PIN X_STOP_PIN
  1284. #define X_MAX_PIN -1
  1285. #else
  1286. #define X_MIN_PIN -1
  1287. #define X_MAX_PIN X_STOP_PIN
  1288. #endif
  1289. #endif
  1290. #ifdef Y_STOP_PIN
  1291. #if Y_HOME_DIR < 0
  1292. #define Y_MIN_PIN Y_STOP_PIN
  1293. #define Y_MAX_PIN -1
  1294. #else
  1295. #define Y_MIN_PIN -1
  1296. #define Y_MAX_PIN Y_STOP_PIN
  1297. #endif
  1298. #endif
  1299. #ifdef Z_STOP_PIN
  1300. #if Z_HOME_DIR < 0
  1301. #define Z_MIN_PIN Z_STOP_PIN
  1302. #define Z_MAX_PIN -1
  1303. #else
  1304. #define Z_MIN_PIN -1
  1305. #define Z_MAX_PIN Z_STOP_PIN
  1306. #endif
  1307. #endif
  1308. #ifdef DISABLE_MAX_ENDSTOPS
  1309. #define X_MAX_PIN -1
  1310. #define Y_MAX_PIN -1
  1311. #define Z_MAX_PIN -1
  1312. #endif
  1313. #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, \
  1314. HEATER_BED_PIN, FAN_PIN, \
  1315. _E0_PINS _E1_PINS _E2_PINS \
  1316. analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
  1317. #endif