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.

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