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

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