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

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