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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776
  1. #ifndef PINS_H
  2. #define PINS_H
  3. #define X_MS1_PIN -1
  4. #define X_MS2_PIN -1
  5. #define Y_MS1_PIN -1
  6. #define Y_MS2_PIN -1
  7. #define Z_MS1_PIN -1
  8. #define Z_MS2_PIN -1
  9. #define E0_MS1_PIN -1
  10. #define E0_MS2_PIN -1
  11. #define E1_MS1_PIN -1
  12. #define E1_MS2_PIN -1
  13. #define DIGIPOTSS_PIN -1
  14. #if MOTHERBOARD == 99
  15. #define KNOWN_BOARD 1
  16. #define X_STEP_PIN 2
  17. #define X_DIR_PIN 3
  18. #define X_ENABLE_PIN -1
  19. #define X_STOP_PIN 16
  20. #define Y_STEP_PIN 5
  21. #define Y_DIR_PIN 6
  22. #define Y_ENABLE_PIN -1
  23. #define Y_STOP_PIN 67
  24. #define Z_STEP_PIN 62
  25. #define Z_DIR_PIN 63
  26. #define Z_ENABLE_PIN -1
  27. #define Z_STOP_PIN 59
  28. #define E0_STEP_PIN 65
  29. #define E0_DIR_PIN 66
  30. #define E0_ENABLE_PIN -1
  31. #define SDPOWER -1
  32. #define SDSS 53
  33. #define LED_PIN -1
  34. #define FAN_PIN -1
  35. #define PS_ON_PIN 9
  36. #define KILL_PIN -1
  37. #define HEATER_0_PIN 13
  38. #define HEATER_1_PIN -1
  39. #define HEATER_2_PIN -1
  40. #define TEMP_0_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  41. #define TEMP_1_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  42. #define TEMP_2_PIN -1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  43. #define HEATER_BED_PIN 4
  44. #define TEMP_BED_PIN 10
  45. #endif /* 99 */
  46. /****************************************************************************************
  47. * Gen7 v1.1, v1.2, v1.3 pin assignment
  48. *
  49. ****************************************************************************************/
  50. #if MOTHERBOARD == 12
  51. #define MOTHERBOARD 11
  52. #define GEN7_VERSION 13 // v1.3
  53. #endif
  54. #if MOTHERBOARD == 11
  55. #define KNOWN_BOARD
  56. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  57. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  58. #endif
  59. #ifndef GEN7_VERSION
  60. #define GEN7_VERSION 12 // v1.x
  61. #endif
  62. //x axis pins
  63. #define X_STEP_PIN 19
  64. #define X_DIR_PIN 18
  65. #define X_ENABLE_PIN 24
  66. #define X_STOP_PIN 7
  67. //y axis pins
  68. #define Y_STEP_PIN 23
  69. #define Y_DIR_PIN 22
  70. #define Y_ENABLE_PIN 24
  71. #define Y_STOP_PIN 5
  72. //z axis pins
  73. #define Z_STEP_PIN 26
  74. #define Z_DIR_PIN 25
  75. #define Z_ENABLE_PIN 24
  76. #define Z_MIN_PIN 1
  77. #define Z_MAX_PIN 0
  78. //extruder pins
  79. #define E0_STEP_PIN 28
  80. #define E0_DIR_PIN 27
  81. #define E0_ENABLE_PIN 24
  82. #define TEMP_0_PIN 1
  83. #define TEMP_1_PIN -1
  84. #define TEMP_2_PIN -1
  85. #define TEMP_BED_PIN 2
  86. #define HEATER_0_PIN 4
  87. #define HEATER_1_PIN -1
  88. #define HEATER_2_PIN -1
  89. #define HEATER_BED_PIN 3
  90. #define KILL_PIN -1
  91. #define SDPOWER -1
  92. #define SDSS -1 // SCL pin of I2C header
  93. #define LED_PIN -1
  94. #if (GEN7_VERSION >= 13)
  95. // Gen7 v1.3 removed the fan pin
  96. #define FAN_PIN -1
  97. #else
  98. #define FAN_PIN 31
  99. #endif
  100. #define PS_ON_PIN 15
  101. //All these generations of Gen7 supply thermistor power
  102. //via PS_ON, so ignore bad thermistor readings
  103. #define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE
  104. //our pin for debugging.
  105. #define DEBUG_PIN 0
  106. //our RS485 pins
  107. #define TX_ENABLE_PIN 12
  108. #define RX_ENABLE_PIN 13
  109. #endif
  110. /****************************************************************************************
  111. * Gen7 v1.4 pin assignment
  112. *
  113. ****************************************************************************************/
  114. #if MOTHERBOARD == 13
  115. #define GEN7_VERSION 14 // v1.4
  116. #endif
  117. #if MOTHERBOARD == 13
  118. #define KNOWN_BOARD
  119. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  120. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  121. #endif
  122. #ifndef GEN7_VERSION
  123. #define GEN7_VERSION 14 // v1.x
  124. #endif
  125. //x axis pins
  126. #define X_STEP_PIN 29
  127. #define X_DIR_PIN 28
  128. #define X_ENABLE_PIN 25
  129. #define X_STOP_PIN 0
  130. //y axis pins
  131. #define Y_STEP_PIN 27
  132. #define Y_DIR_PIN 26
  133. #define Y_ENABLE_PIN 25
  134. #define Y_STOP_PIN 1
  135. //z axis pins
  136. #define Z_STEP_PIN 23
  137. #define Z_DIR_PIN 22
  138. #define Z_ENABLE_PIN 25
  139. #define Z_STOP_PIN 2
  140. //extruder pins
  141. #define E0_STEP_PIN 19
  142. #define E0_DIR_PIN 18
  143. #define E0_ENABLE_PIN 25
  144. #define TEMP_0_PIN 1
  145. #define TEMP_1_PIN -1
  146. #define TEMP_2_PIN -1
  147. #define TEMP_BED_PIN 0
  148. #define HEATER_0_PIN 4
  149. #define HEATER_1_PIN -1
  150. #define HEATER_2_PIN -1
  151. #define HEATER_BED_PIN 3
  152. #define KILL_PIN -1
  153. #define SDPOWER -1
  154. #define SDSS -1 // SCL pin of I2C header
  155. #define LED_PIN -1
  156. #define FAN_PIN -1
  157. #define PS_ON_PIN 15
  158. //our pin for debugging.
  159. #define DEBUG_PIN 0
  160. //our RS485 pins
  161. #define TX_ENABLE_PIN 12
  162. #define RX_ENABLE_PIN 13
  163. #endif
  164. /*******************************************************************************
  165. *********
  166. * Gen7 Alfons3 pin assignment
  167. *
  168. ********************************************************************************
  169. ********/
  170. /* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/
  171. #if MOTHERBOARD == 10
  172. #define KNOWN_BOARD
  173. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__) && !defined(__AVR_ATmega1284P__)
  174. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
  175. #endif
  176. //x axis pins
  177. #define X_STEP_PIN 21 //different from 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. * Elefu RA Board Pin Assignments
  462. *
  463. ****************************************************************************************/
  464. #if MOTHERBOARD == 21
  465. #define KNOWN_BOARD 1
  466. #ifndef __AVR_ATmega2560__
  467. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  468. #endif
  469. #define X_STEP_PIN 49
  470. #define X_DIR_PIN 13
  471. #define X_ENABLE_PIN 48
  472. #define X_MIN_PIN 35
  473. #define X_MAX_PIN -1 //34
  474. #define Y_STEP_PIN 11
  475. #define Y_DIR_PIN 9
  476. #define Y_ENABLE_PIN 12
  477. #define Y_MIN_PIN 33
  478. #define Y_MAX_PIN -1 //32
  479. #define Z_STEP_PIN 7
  480. #define Z_DIR_PIN 6
  481. #define Z_ENABLE_PIN 8
  482. #define Z_MIN_PIN 31
  483. #define Z_MAX_PIN -1 //30
  484. #define E2_STEP_PIN 43
  485. #define E2_DIR_PIN 47
  486. #define E2_ENABLE_PIN 42
  487. #define E1_STEP_PIN 18
  488. #define E1_DIR_PIN 19
  489. #define E1_ENABLE_PIN 38
  490. #define E0_STEP_PIN 40
  491. #define E0_DIR_PIN 41
  492. #define E0_ENABLE_PIN 37
  493. #define SDPOWER -1
  494. #define LED_PIN -1 //Use +12V Aux port for LED Ring
  495. #define FAN_PIN 16 //5V PWM
  496. #define PS_ON_PIN 10 //Set to -1 if using a manual switch on the PWRSW Connector
  497. #define SLEEP_WAKE_PIN 26 //This feature still needs work
  498. #define HEATER_0_PIN 45 //12V PWM1
  499. #define HEATER_1_PIN 46 //12V PWM2
  500. #define HEATER_2_PIN 17 //12V PWM3
  501. #define HEATER_BED_PIN 44 //DOUBLE 12V PWM
  502. #define TEMP_0_PIN 3 //ANALOG NUMBERING
  503. #define TEMP_1_PIN 2 //ANALOG NUMBERING
  504. #define TEMP_2_PIN 1 //ANALOG NUMBERING
  505. #define TEMP_BED_PIN 0 //ANALOG NUMBERING
  506. #define BEEPER 36
  507. #define KILL_PIN -1
  508. // M240 Triggers a camera by emulating a Canon RC-1 Remote
  509. // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
  510. #define PHOTOGRAPH_PIN 29
  511. #ifdef RA_CONTROL_PANEL
  512. #define SDSS 53
  513. #define SDCARDDETECT 28
  514. #define BTN_EN1 14
  515. #define BTN_EN2 39
  516. #define BTN_ENC 15 //the click
  517. #define BLEN_C 2
  518. #define BLEN_B 1
  519. #define BLEN_A 0
  520. //encoder rotation values
  521. #define encrot0 0
  522. #define encrot1 2
  523. #define encrot2 3
  524. #define encrot3 1
  525. #endif //RA_CONTROL_PANEL
  526. #ifdef RA_DISCO
  527. //variables for which pins the TLC5947 is using
  528. #define TLC_CLOCK_PIN 25
  529. #define TLC_BLANK_PIN 23
  530. #define TLC_XLAT_PIN 22
  531. #define TLC_DATA_PIN 24
  532. //We also need to define pin to port number mapping for the 2560 to match the pins listed above. If you change the TLC pins, update this as well per the 2560 datasheet!
  533. //This currently only works with the RA Board.
  534. #define TLC_CLOCK_BIT 3 //bit 3 on port A
  535. #define TLC_CLOCK_PORT &PORTA //bit 3 on port A
  536. #define TLC_BLANK_BIT 1 //bit 1 on port A
  537. #define TLC_BLANK_PORT &PORTA //bit 1 on port A
  538. #define TLC_DATA_BIT 2 //bit 2 on port A
  539. #define TLC_DATA_PORT &PORTA //bit 2 on port A
  540. #define TLC_XLAT_BIT 0 //bit 0 on port A
  541. #define TLC_XLAT_PORT &PORTA //bit 0 on port A
  542. //change this to match your situation. Lots of TLCs takes up the arduino SRAM very quickly, so be careful
  543. //Leave it at at least 1 if you have enabled RA_LIGHTING
  544. //The number of TLC5947 boards chained together for use with the animation, additional ones will repeat the animation on them, but are not individually addressable and mimic those before them. You can leave the default at 2 even if you only have 1 TLC5947 module.
  545. #define NUM_TLCS 2
  546. //These TRANS_ARRAY values let you change the order the LEDs on the lighting modules will animate for chase functions.
  547. //Modify them according to your specific situation.
  548. //NOTE: the array should be 8 long for every TLC you have. These defaults assume (2) TLCs.
  549. #define TRANS_ARRAY {0, 1, 2, 3, 4, 5, 6, 7, 15, 14, 13, 12, 11, 10, 9, 8} //forwards
  550. //#define TRANS_ARRAY {7, 6, 5, 4, 3, 2, 1, 0, 8, 9, 10, 11, 12, 13, 14, 15} //backwards
  551. #endif //RA_LIGHTING
  552. #endif /* Ra Board */
  553. /****************************************************************************************
  554. * Gen6 pin assignment
  555. *
  556. ****************************************************************************************/
  557. #if MOTHERBOARD == 5 || MOTHERBOARD == 51
  558. #define KNOWN_BOARD 1
  559. #ifndef __AVR_ATmega644P__
  560. #ifndef __AVR_ATmega1284P__
  561. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  562. #endif
  563. #endif
  564. //x axis pins
  565. #define X_STEP_PIN 15
  566. #define X_DIR_PIN 18
  567. #define X_ENABLE_PIN 19
  568. #define X_STOP_PIN 20
  569. //y axis pins
  570. #define Y_STEP_PIN 23
  571. #define Y_DIR_PIN 22
  572. #define Y_ENABLE_PIN 24
  573. #define Y_STOP_PIN 25
  574. //z axis pins
  575. #define Z_STEP_PIN 27
  576. #define Z_DIR_PIN 28
  577. #define Z_ENABLE_PIN 29
  578. #define Z_STOP_PIN 30
  579. //extruder pins
  580. #define E0_STEP_PIN 4 //Edited @ EJE Electronics 20100715
  581. #define E0_DIR_PIN 2 //Edited @ EJE Electronics 20100715
  582. #define E0_ENABLE_PIN 3 //Added @ EJE Electronics 20100715
  583. #define TEMP_0_PIN 5 //changed @ rkoeppl 20110410
  584. #define TEMP_1_PIN -1 //changed @ rkoeppl 20110410
  585. #define TEMP_2_PIN -1 //changed @ rkoeppl 20110410
  586. #define HEATER_0_PIN 14 //changed @ rkoeppl 20110410
  587. #define HEATER_1_PIN -1
  588. #define HEATER_2_PIN -1
  589. #if MOTHERBOARD == 5
  590. #define HEATER_BED_PIN -1 //changed @ rkoeppl 20110410
  591. #define TEMP_BED_PIN -1 //changed @ rkoeppl 20110410
  592. #else
  593. #define HEATER_BED_PIN 1 //changed @ rkoeppl 20110410
  594. #define TEMP_BED_PIN 0 //changed @ rkoeppl 20110410
  595. #endif
  596. #define SDPOWER -1
  597. #define SDSS 17
  598. #define LED_PIN -1 //changed @ rkoeppl 20110410
  599. #define FAN_PIN -1 //changed @ rkoeppl 20110410
  600. #define PS_ON_PIN -1 //changed @ rkoeppl 20110410
  601. #define KILL_PIN -1 //changed @ drakelive 20120830
  602. //our pin for debugging.
  603. #define DEBUG_PIN 0
  604. //our RS485 pins
  605. #define TX_ENABLE_PIN 12
  606. #define RX_ENABLE_PIN 13
  607. #endif
  608. /****************************************************************************************
  609. * Sanguinololu pin assignment
  610. *
  611. ****************************************************************************************/
  612. #if MOTHERBOARD == 64
  613. #define STB
  614. #endif
  615. #if MOTHERBOARD == 63
  616. #define MELZI
  617. #endif
  618. #if MOTHERBOARD == 62 || MOTHERBOARD == 63 || MOTHERBOARD == 64
  619. #undef MOTHERBOARD
  620. #define MOTHERBOARD 6
  621. #define SANGUINOLOLU_V_1_2
  622. #endif
  623. #if MOTHERBOARD == 6
  624. #define KNOWN_BOARD 1
  625. #ifndef __AVR_ATmega644P__
  626. #ifndef __AVR_ATmega1284P__
  627. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  628. #endif
  629. #endif
  630. #define X_STEP_PIN 15
  631. #define X_DIR_PIN 21
  632. #define X_STOP_PIN 18
  633. #define Y_STEP_PIN 22
  634. #define Y_DIR_PIN 23
  635. #define Y_STOP_PIN 19
  636. #define Z_STEP_PIN 3
  637. #define Z_DIR_PIN 2
  638. #define Z_STOP_PIN 20
  639. #define E0_STEP_PIN 1
  640. #define E0_DIR_PIN 0
  641. #define LED_PIN -1
  642. #define FAN_PIN -1
  643. #if FAN_PIN == 12 || FAN_PIN ==13
  644. #define FAN_SOFT_PWM
  645. #endif
  646. #ifdef MELZI
  647. #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. */
  648. #define FAN_PIN 4
  649. #endif
  650. #ifdef STB
  651. #define FAN_PIN 4
  652. #endif
  653. #define PS_ON_PIN -1
  654. #define KILL_PIN -1
  655. #define HEATER_0_PIN 13 // (extruder)
  656. #define HEATER_1_PIN -1
  657. #define HEATER_2_PIN -1
  658. #ifdef SANGUINOLOLU_V_1_2
  659. #define HEATER_BED_PIN 12 // (bed)
  660. #define X_ENABLE_PIN 14
  661. #define Y_ENABLE_PIN 14
  662. #define Z_ENABLE_PIN 26
  663. #define E0_ENABLE_PIN 14
  664. #else
  665. #define HEATER_BED_PIN 14 // (bed)
  666. #define X_ENABLE_PIN -1
  667. #define Y_ENABLE_PIN -1
  668. #define Z_ENABLE_PIN -1
  669. #define E0_ENABLE_PIN -1
  670. #endif
  671. #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  672. #define TEMP_1_PIN -1
  673. #define TEMP_2_PIN -1
  674. #define TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  675. #define SDPOWER -1
  676. #define SDSS 31
  677. /* 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. */
  678. //#define SDSS 24
  679. #ifdef ULTRA_LCD
  680. #ifdef NEWPANEL
  681. //we have no buzzer installed
  682. #define BEEPER -1
  683. //LCD Pins
  684. #ifdef DOGLCD
  685. // Pins for DOGM SPI LCD Support
  686. #define DOGLCD_A0 30
  687. #define DOGLCD_CS 29
  688. // GLCD features
  689. #define LCD_CONTRAST 1
  690. // Uncomment screen orientation
  691. // #define LCD_SCREEN_ROT_0
  692. // #define LCD_SCREEN_ROT_90
  693. #define LCD_SCREEN_ROT_180
  694. // #define LCD_SCREEN_ROT_270
  695. #else // standard Hitachi LCD controller
  696. #define LCD_PINS_RS 4
  697. #define LCD_PINS_ENABLE 17
  698. #define LCD_PINS_D4 30
  699. #define LCD_PINS_D5 29
  700. #define LCD_PINS_D6 28
  701. #define LCD_PINS_D7 27
  702. #endif
  703. //The encoder and click button
  704. #define BTN_EN1 11 //must be a hardware interrupt pin
  705. #define BTN_EN2 10 //must be hardware interrupt pin
  706. #define BTN_ENC 16 //the switch
  707. //not connected to a pin
  708. #define SDCARDDETECT -1
  709. //from the same bit in the RAMPS Newpanel define
  710. //encoder rotation values
  711. #define encrot0 0
  712. #define encrot1 2
  713. #define encrot2 3
  714. #define encrot3 1
  715. #define BLEN_C 2
  716. #define BLEN_B 1
  717. #define BLEN_A 0
  718. #endif //Newpanel
  719. #endif //Ultipanel
  720. #endif
  721. #if MOTHERBOARD == 7
  722. #define KNOWN_BOARD
  723. /*****************************************************************
  724. * Ultimaker pin assignment
  725. ******************************************************************/
  726. #ifndef __AVR_ATmega1280__
  727. #ifndef __AVR_ATmega2560__
  728. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  729. #endif
  730. #endif
  731. #define LARGE_FLASH true
  732. #define X_STEP_PIN 25
  733. #define X_DIR_PIN 23
  734. #define X_MIN_PIN 22
  735. #define X_MAX_PIN 24
  736. #define X_ENABLE_PIN 27
  737. #define Y_STEP_PIN 31
  738. #define Y_DIR_PIN 33
  739. #define Y_MIN_PIN 26
  740. #define Y_MAX_PIN 28
  741. #define Y_ENABLE_PIN 29
  742. #define Z_STEP_PIN 37
  743. #define Z_DIR_PIN 39
  744. #define Z_MIN_PIN 30
  745. #define Z_MAX_PIN 32
  746. #define Z_ENABLE_PIN 35
  747. #define HEATER_BED_PIN 4
  748. #define TEMP_BED_PIN 10
  749. #define HEATER_0_PIN 2
  750. #define TEMP_0_PIN 8
  751. #define HEATER_1_PIN 3
  752. #define TEMP_1_PIN 9
  753. #define HEATER_2_PIN -1
  754. #define TEMP_2_PIN -1
  755. #define E0_STEP_PIN 43
  756. #define E0_DIR_PIN 45
  757. #define E0_ENABLE_PIN 41
  758. #define E1_STEP_PIN 49
  759. #define E1_DIR_PIN 47
  760. #define E1_ENABLE_PIN 48
  761. #define SDPOWER -1
  762. #define SDSS 53
  763. #define LED_PIN 13
  764. #define FAN_PIN 7
  765. #define PS_ON_PIN 12
  766. #define KILL_PIN -1
  767. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
  768. #ifdef ULTRA_LCD
  769. #ifdef NEWPANEL
  770. //arduino pin witch triggers an piezzo beeper
  771. #define BEEPER 18
  772. #define LCD_PINS_RS 20
  773. #define LCD_PINS_ENABLE 17
  774. #define LCD_PINS_D4 16
  775. #define LCD_PINS_D5 21
  776. #define LCD_PINS_D6 5
  777. #define LCD_PINS_D7 6
  778. //buttons are directly attached
  779. #define BTN_EN1 40
  780. #define BTN_EN2 42
  781. #define BTN_ENC 19 //the click
  782. #define BLEN_C 2
  783. #define BLEN_B 1
  784. #define BLEN_A 0
  785. #define SDCARDDETECT 38
  786. //encoder rotation values
  787. #define encrot0 0
  788. #define encrot1 2
  789. #define encrot2 3
  790. #define encrot3 1
  791. #else //old style panel with shift register
  792. //arduino pin witch triggers an piezzo beeper
  793. #define BEEPER 18
  794. //buttons are attached to a shift register
  795. #define SHIFT_CLK 38
  796. #define SHIFT_LD 42
  797. #define SHIFT_OUT 40
  798. #define SHIFT_EN 17
  799. #define LCD_PINS_RS 16
  800. #define LCD_PINS_ENABLE 5
  801. #define LCD_PINS_D4 6
  802. #define LCD_PINS_D5 21
  803. #define LCD_PINS_D6 20
  804. #define LCD_PINS_D7 19
  805. //encoder rotation values
  806. #ifndef ULTIMAKERCONTROLLER
  807. #define encrot0 0
  808. #define encrot1 2
  809. #define encrot2 3
  810. #define encrot3 1
  811. #else
  812. #define encrot0 0
  813. #define encrot1 1
  814. #define encrot2 3
  815. #define encrot3 2
  816. #endif
  817. #define SDCARDDETECT -1
  818. //bits in the shift register that carry the buttons for:
  819. // left up center down right red
  820. #define BL_LE 7
  821. #define BL_UP 6
  822. #define BL_MI 5
  823. #define BL_DW 4
  824. #define BL_RI 3
  825. #define BL_ST 2
  826. #define BLEN_B 1
  827. #define BLEN_A 0
  828. #endif
  829. #endif //ULTRA_LCD
  830. #endif
  831. #if MOTHERBOARD == 71
  832. #define KNOWN_BOARD
  833. /*****************************************************************
  834. * Ultimaker pin assignment (Old electronics)
  835. ******************************************************************/
  836. #ifndef __AVR_ATmega1280__
  837. #ifndef __AVR_ATmega2560__
  838. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  839. #endif
  840. #endif
  841. #define LARGE_FLASH true
  842. #define X_STEP_PIN 25
  843. #define X_DIR_PIN 23
  844. #define X_MIN_PIN 15
  845. #define X_MAX_PIN 14
  846. #define X_ENABLE_PIN 27
  847. #define Y_STEP_PIN 31
  848. #define Y_DIR_PIN 33
  849. #define Y_MIN_PIN 17
  850. #define Y_MAX_PIN 16
  851. #define Y_ENABLE_PIN 29
  852. #define Z_STEP_PIN 37
  853. #define Z_DIR_PIN 39
  854. #define Z_MIN_PIN 19
  855. #define Z_MAX_PIN 18
  856. #define Z_ENABLE_PIN 35
  857. #define HEATER_BED_PIN -1
  858. #define TEMP_BED_PIN -1
  859. #define HEATER_0_PIN 2
  860. #define TEMP_0_PIN 8
  861. #define HEATER_1_PIN 1
  862. #define TEMP_1_PIN 1
  863. #define HEATER_2_PIN -1
  864. #define TEMP_2_PIN -1
  865. #define E0_STEP_PIN 43
  866. #define E0_DIR_PIN 45
  867. #define E0_ENABLE_PIN 41
  868. #define E1_STEP_PIN -1
  869. #define E1_DIR_PIN -1
  870. #define E1_ENABLE_PIN -1
  871. #define SDPOWER -1
  872. #define SDSS -1
  873. #define LED_PIN -1
  874. #define FAN_PIN -1
  875. #define PS_ON_PIN -1
  876. #define KILL_PIN -1
  877. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  878. #define LCD_PINS_RS 24
  879. #define LCD_PINS_ENABLE 22
  880. #define LCD_PINS_D4 36
  881. #define LCD_PINS_D5 34
  882. #define LCD_PINS_D6 32
  883. #define LCD_PINS_D7 30
  884. #endif
  885. /****************************************************************************************
  886. * RUMBA pin assignment
  887. *
  888. ****************************************************************************************/
  889. #if MOTHERBOARD == 80
  890. #define KNOWN_BOARD 1
  891. #ifndef __AVR_ATmega2560__
  892. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  893. #endif
  894. #define X_STEP_PIN 17
  895. #define X_DIR_PIN 16
  896. #define X_ENABLE_PIN 48
  897. #define X_MIN_PIN 37
  898. #define X_MAX_PIN 36
  899. #define Y_STEP_PIN 54
  900. #define Y_DIR_PIN 47
  901. #define Y_ENABLE_PIN 55
  902. #define Y_MIN_PIN 35
  903. #define Y_MAX_PIN 34
  904. #define Z_STEP_PIN 57
  905. #define Z_DIR_PIN 56
  906. #define Z_ENABLE_PIN 62
  907. #define Z_MIN_PIN 33
  908. #define Z_MAX_PIN 32
  909. #define E0_STEP_PIN 23
  910. #define E0_DIR_PIN 22
  911. #define E0_ENABLE_PIN 24
  912. #define E1_STEP_PIN 26
  913. #define E1_DIR_PIN 25
  914. #define E1_ENABLE_PIN 27
  915. #define E2_STEP_PIN 29
  916. #define E2_DIR_PIN 28
  917. #define E2_ENABLE_PIN 39
  918. #define LED_PIN 13
  919. #define FAN_PIN 7
  920. //additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
  921. #define PS_ON_PIN 45
  922. #define KILL_PIN 46
  923. #define HEATER_0_PIN 2 // EXTRUDER 1
  924. #define HEATER_1_PIN 3 // EXTRUDER 2
  925. #define HEATER_2_PIN 6 // EXTRUDER 3
  926. //optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4
  927. #define HEATER_BED_PIN 9 // BED
  928. #define TEMP_0_PIN 15 // ANALOG NUMBERING
  929. #define TEMP_1_PIN 14 // ANALOG NUMBERING
  930. #define TEMP_2_PIN 13 // ANALOG NUMBERING
  931. //optional for extruder 4 or chamber: #define TEMP_2_PIN 12 // ANALOG NUMBERING
  932. #define TEMP_BED_PIN 11 // ANALOG NUMBERING
  933. #define SDPOWER -1
  934. #define SDSS 53
  935. #define SDCARDDETECT 49
  936. #define BEEPER 44
  937. #define LCD_PINS_RS 19
  938. #define LCD_PINS_ENABLE 42
  939. #define LCD_PINS_D4 18
  940. #define LCD_PINS_D5 38
  941. #define LCD_PINS_D6 41
  942. #define LCD_PINS_D7 40
  943. #define BTN_EN1 11
  944. #define BTN_EN2 12
  945. #define BTN_ENC 43
  946. //encoder rotation values
  947. #define BLEN_C 2
  948. #define BLEN_B 1
  949. #define BLEN_A 0
  950. #define encrot0 0
  951. #define encrot1 2
  952. #define encrot2 3
  953. #define encrot3 1
  954. #endif //MOTHERBOARD==80
  955. /****************************************************************************************
  956. * Teensylu 0.7 / Printrboard pin assignments (AT90USB1286)
  957. * Requires the Teensyduino software with Teensy++ 2.0 selected in Arduino IDE!
  958. http://www.pjrc.com/teensy/teensyduino.html
  959. * See http://reprap.org/wiki/Printrboard for more info
  960. ****************************************************************************************/
  961. #if MOTHERBOARD == 8 || MOTHERBOARD == 81
  962. #define KNOWN_BOARD 1
  963. #define AT90USB 1286 // Disable MarlinSerial etc.
  964. #ifndef __AVR_AT90USB1286__
  965. #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu.
  966. #endif
  967. #define LARGE_FLASH true
  968. #define X_STEP_PIN 0
  969. #define X_DIR_PIN 1
  970. #define X_ENABLE_PIN 39
  971. #define Y_STEP_PIN 2
  972. #define Y_DIR_PIN 3
  973. #define Y_ENABLE_PIN 38
  974. #define Z_STEP_PIN 4
  975. #define Z_DIR_PIN 5
  976. #define Z_ENABLE_PIN 23
  977. #define E0_STEP_PIN 6
  978. #define E0_DIR_PIN 7
  979. #define E0_ENABLE_PIN 19
  980. #define HEATER_0_PIN 21 // Extruder
  981. #define HEATER_1_PIN -1
  982. #define HEATER_2_PIN -1
  983. #define HEATER_BED_PIN 20 // Bed
  984. #define FAN_PIN 22 // Fan
  985. // You may need to change FAN_PIN to 16 because Marlin isn't using fastio.h
  986. // for the fan and Teensyduino uses a different pin mapping.
  987. #if MOTHERBOARD == 8 // Teensylu
  988. #define X_STOP_PIN 13
  989. #define Y_STOP_PIN 14
  990. #define Z_STOP_PIN 15
  991. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  992. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  993. #else // Printrboard
  994. #define X_STOP_PIN 35
  995. #define Y_STOP_PIN 8
  996. #define Z_STOP_PIN 36
  997. #define TEMP_0_PIN 1 // Extruder / Analog pin numbering
  998. #define TEMP_BED_PIN 0 // Bed / Analog pin numbering
  999. #endif
  1000. #define TEMP_1_PIN -1
  1001. #define TEMP_2_PIN -1
  1002. #define SDPOWER -1
  1003. #define SDSS 8
  1004. #define LED_PIN -1
  1005. #define PS_ON_PIN -1
  1006. #define KILL_PIN -1
  1007. #define ALARM_PIN -1
  1008. #ifndef SDSUPPORT
  1009. // these pins are defined in the SD library if building with SD support
  1010. #define SCK_PIN 9
  1011. #define MISO_PIN 11
  1012. #define MOSI_PIN 10
  1013. #endif
  1014. #endif // MOTHERBOARD == 8 (Teensylu) or 81 (Printrboard)
  1015. /****************************************************************************************
  1016. * Brainwave 1.0 pin assignments (AT90USB646)
  1017. * Requires hardware bundle for Arduino:
  1018. https://github.com/unrepentantgeek/brainwave-arduino
  1019. ****************************************************************************************/
  1020. #if MOTHERBOARD == 82
  1021. #define KNOWN_BOARD 1
  1022. #define AT90USB 646 // Disable MarlinSerial etc.
  1023. #ifndef __AVR_AT90USB646__
  1024. #error Oops! Make sure you have 'Brainwave' selected from the 'Tools -> Boards' menu.
  1025. #endif
  1026. #define X_STEP_PIN 27
  1027. #define X_DIR_PIN 29
  1028. #define X_ENABLE_PIN 28
  1029. #define X_STOP_PIN 7
  1030. #define X_ATT_PIN 26
  1031. #define Y_STEP_PIN 31
  1032. #define Y_DIR_PIN 33
  1033. #define Y_ENABLE_PIN 32
  1034. #define Y_STOP_PIN 6
  1035. #define Y_ATT_PIN 30
  1036. #define Z_STEP_PIN 17
  1037. #define Z_DIR_PIN 19
  1038. #define Z_ENABLE_PIN 18
  1039. #define Z_STOP_PIN 5
  1040. #define Z_ATT_PIN 16
  1041. #define E0_STEP_PIN 21
  1042. #define E0_DIR_PIN 23
  1043. #define E0_ENABLE_PIN 22
  1044. #define E0_ATT_PIN 20
  1045. #define HEATER_0_PIN 4 // Extruder
  1046. #define HEATER_1_PIN -1
  1047. #define HEATER_2_PIN -1
  1048. #define HEATER_BED_PIN 38 // Bed
  1049. #define FAN_PIN 3 // Fan
  1050. #define TEMP_0_PIN 7 // Extruder / Analog pin numbering
  1051. #define TEMP_1_PIN -1
  1052. #define TEMP_2_PIN -1
  1053. #define TEMP_BED_PIN 6 // Bed / Analog pin numbering
  1054. #define SDPOWER -1
  1055. #define SDSS -1
  1056. #define LED_PIN 39
  1057. #define PS_ON_PIN -1
  1058. #define KILL_PIN -1
  1059. #define ALARM_PIN -1
  1060. #ifndef SDSUPPORT
  1061. // these pins are defined in the SD library if building with SD support
  1062. #define SCK_PIN 9
  1063. #define MISO_PIN 11
  1064. #define MOSI_PIN 10
  1065. #endif
  1066. #endif // MOTHERBOARD == 82 (Brainwave)
  1067. /****************************************************************************************
  1068. * Gen3+ pin assignment
  1069. *
  1070. ****************************************************************************************/
  1071. #if MOTHERBOARD == 9
  1072. #define MOTHERBOARD 6 /*TODO: Figure out, Why is this done?*/
  1073. #define KNOWN_BOARD 1
  1074. #ifndef __AVR_ATmega644P__
  1075. #ifndef __AVR_ATmega1284P__
  1076. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
  1077. #endif
  1078. #endif
  1079. #define X_STEP_PIN 15
  1080. #define X_DIR_PIN 18
  1081. #define X_STOP_PIN 20
  1082. #define Y_STEP_PIN 23
  1083. #define Y_DIR_PIN 22
  1084. #define Y_STOP_PIN 25
  1085. #define Z_STEP_PIN 27
  1086. #define Z_DIR_PIN 28
  1087. #define Z_STOP_PIN 30
  1088. #define E_STEP_PIN 17
  1089. #define E_DIR_PIN 21
  1090. #define LED_PIN -1
  1091. #define FAN_PIN -1
  1092. #define PS_ON_PIN 14
  1093. #define KILL_PIN -1
  1094. #define HEATER_0_PIN 12 // (extruder)
  1095. #define HEATER_1_PIN 16 // (bed)
  1096. #define X_ENABLE_PIN 19
  1097. #define Y_ENABLE_PIN 24
  1098. #define Z_ENABLE_PIN 29
  1099. #define E_ENABLE_PIN 13
  1100. #define TEMP_0_PIN 0 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
  1101. #define TEMP_1_PIN 5 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
  1102. #define TEMP_2_PIN -1
  1103. #define SDPOWER -1
  1104. #define SDSS 4
  1105. #define HEATER_2_PIN -1
  1106. #endif
  1107. /****************************************************************************************
  1108. * Open Motion controller with enable based extruders
  1109. *
  1110. * ATMega644
  1111. *
  1112. * +---\/---+
  1113. * (D 0) PB0 1| |40 PA0 (AI 0 / D31)
  1114. * (D 1) PB1 2| |39 PA1 (AI 1 / D30)
  1115. * INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29)
  1116. * PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28)
  1117. * PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27)
  1118. * MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26)
  1119. * MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25)
  1120. * SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24)
  1121. * RST 9| |32 AREF
  1122. * VCC 10| |31 GND
  1123. * GND 11| |30 AVCC
  1124. * XTAL2 12| |29 PC7 (D 23)
  1125. * XTAL1 13| |28 PC6 (D 22)
  1126. * RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
  1127. * TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO
  1128. * INT0 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS
  1129. * INT1 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK
  1130. * PWM (D 12) PD4 18| |23 PC1 (D 17) SDA
  1131. * PWM (D 13) PD5 19| |22 PC0 (D 16) SCL
  1132. * PWM (D 14) PD6 20| |21 PD7 (D 15) PWM
  1133. * +--------+
  1134. *
  1135. ****************************************************************************************/
  1136. #if MOTHERBOARD == 90 //Alpha OMCA board
  1137. #define KNOWN_BOARD 1
  1138. #ifndef __AVR_ATmega644__
  1139. #error Oops! Make sure you have 'SanguinoA' selected from the 'Tools -> Boards' menu.
  1140. #endif
  1141. #define X_STEP_PIN 21
  1142. #define X_DIR_PIN 20
  1143. #define X_ENABLE_PIN 24
  1144. #define X_STOP_PIN 0
  1145. #define Y_STEP_PIN 23
  1146. #define Y_DIR_PIN 22
  1147. #define Y_ENABLE_PIN 24
  1148. #define Y_STOP_PIN 1
  1149. #define Z_STEP_PIN 26
  1150. #define Z_DIR_PIN 25
  1151. #define Z_ENABLE_PIN 24
  1152. #define Z_STOP_PIN 2
  1153. #define E0_STEP_PIN 28
  1154. #define E0_DIR_PIN 27
  1155. #define E0_ENABLE_PIN 24
  1156. #define E1_STEP_PIN -1 // 19
  1157. #define E1_DIR_PIN -1 // 18
  1158. #define E1_ENABLE_PIN 24
  1159. #define E2_STEP_PIN -1 // 17
  1160. #define E2_DIR_PIN -1 // 16
  1161. #define E2_ENABLE_PIN 24
  1162. #define SDPOWER -1
  1163. #define SDSS 11
  1164. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1165. #define LED_PIN -1
  1166. #define FAN_PIN 3
  1167. #define PS_ON_PIN -1
  1168. #define KILL_PIN -1
  1169. #define HEATER_0_PIN 4
  1170. #define HEATER_1_PIN -1 // 12
  1171. #define HEATER_2_PIN -1 // 13
  1172. #define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
  1173. #define TEMP_1_PIN -1 // 1
  1174. #define TEMP_2_PIN -1 // 2
  1175. #define HEATER_BED_PIN -1 // 14/15
  1176. #define TEMP_BED_PIN -1 // 1,2 or I2C
  1177. /* 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) */
  1178. #endif
  1179. #if MOTHERBOARD == 91 // Final OMCA board -- REF http://sanguino.cc/hardware
  1180. #define KNOWN_BOARD 1
  1181. #if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega644__)
  1182. #error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu. (Final OMCA board)
  1183. #endif
  1184. #define X_STEP_PIN 26
  1185. #define X_DIR_PIN 25
  1186. #define X_ENABLE_PIN 10
  1187. #define X_STOP_PIN 0
  1188. #define Y_STEP_PIN 28
  1189. #define Y_DIR_PIN 27
  1190. #define Y_ENABLE_PIN 10
  1191. #define Y_STOP_PIN 1
  1192. #define Z_STEP_PIN 23
  1193. #define Z_DIR_PIN 22
  1194. #define Z_ENABLE_PIN 10
  1195. #define Z_STOP_PIN 2
  1196. #define E0_STEP_PIN 24
  1197. #define E0_DIR_PIN 21
  1198. #define E0_ENABLE_PIN 10
  1199. /* future proofing */
  1200. #define __FS 20
  1201. #define __FD 19
  1202. #define __GS 18
  1203. #define __GD 13
  1204. #define UNUSED_PWM 14 /* PWM on LEFT connector */
  1205. #define E1_STEP_PIN -1 // 21
  1206. #define E1_DIR_PIN -1 // 20
  1207. #define E1_ENABLE_PIN -1 // 19
  1208. #define E2_STEP_PIN -1 // 21
  1209. #define E2_DIR_PIN -1 // 20
  1210. #define E2_ENABLE_PIN -1 // 18
  1211. #define SDPOWER -1
  1212. #define SDSS 11
  1213. #define SDCARDDETECT -1 // 10 optional also used as mode pin
  1214. #define LED_PIN -1
  1215. #define FAN_PIN 14 /* PWM on MIDDLE connector */
  1216. #define PS_ON_PIN -1
  1217. #define KILL_PIN -1
  1218. #define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
  1219. #define HEATER_1_PIN -1
  1220. #define HEATER_2_PIN -1
  1221. #define HEATER_1_PIN -1
  1222. #define HEATER_2_PIN -1
  1223. #define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
  1224. #define TEMP_1_PIN 1 // ANALOG
  1225. #define TEMP_2_PIN -1 // 2
  1226. #define HEATER_BED_PIN 4
  1227. #define TEMP_BED_PIN 2 // 1,2 or I2C
  1228. #define I2C_SCL 16
  1229. #define I2C_SDA 17
  1230. #endif
  1231. #if MOTHERBOARD == 301
  1232. #define KNOWN_BOARD
  1233. /*****************************************************************
  1234. * Rambo Pin Assignments
  1235. ******************************************************************/
  1236. #ifndef __AVR_ATmega2560__
  1237. #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
  1238. #endif
  1239. #define LARGE_FLASH true
  1240. #define X_STEP_PIN 37
  1241. #define X_DIR_PIN 48
  1242. #define X_MIN_PIN 12
  1243. #define X_MAX_PIN 24
  1244. #define X_ENABLE_PIN 29
  1245. #define X_MS1_PIN 40
  1246. #define X_MS2_PIN 41
  1247. #define Y_STEP_PIN 36
  1248. #define Y_DIR_PIN 49
  1249. #define Y_MIN_PIN 11
  1250. #define Y_MAX_PIN 23
  1251. #define Y_ENABLE_PIN 28
  1252. #define Y_MS1_PIN 69
  1253. #define Y_MS2_PIN 39
  1254. #define Z_STEP_PIN 35
  1255. #define Z_DIR_PIN 47
  1256. #define Z_MIN_PIN 10
  1257. #define Z_MAX_PIN 30
  1258. #define Z_ENABLE_PIN 27
  1259. #define Z_MS1_PIN 68
  1260. #define Z_MS2_PIN 67
  1261. #define HEATER_BED_PIN 3
  1262. #define TEMP_BED_PIN 2
  1263. #define HEATER_0_PIN 9
  1264. #define TEMP_0_PIN 0
  1265. #define HEATER_1_PIN 7
  1266. #define TEMP_1_PIN 1
  1267. #define HEATER_2_PIN -1
  1268. #define TEMP_2_PIN -1
  1269. #define E0_STEP_PIN 34
  1270. #define E0_DIR_PIN 43
  1271. #define E0_ENABLE_PIN 26
  1272. #define E0_MS1_PIN 65
  1273. #define E0_MS2_PIN 66
  1274. #define E1_STEP_PIN 33
  1275. #define E1_DIR_PIN 42
  1276. #define E1_ENABLE_PIN 25
  1277. #define E1_MS1_PIN 63
  1278. #define E1_MS2_PIN 64
  1279. #define DIGIPOTSS_PIN 38
  1280. #define DIGIPOT_CHANNELS {4,5,3,0,1} // X Y Z E0 E1 digipot channels to stepper driver mapping
  1281. #define SDPOWER -1
  1282. #define SDSS 53
  1283. #define LED_PIN 13
  1284. #define FAN_PIN 8
  1285. #define PS_ON_PIN 4
  1286. #define KILL_PIN -1
  1287. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
  1288. #endif
  1289. /****************************************************************************************
  1290. * MegaTronics
  1291. *
  1292. ****************************************************************************************/
  1293. #if MOTHERBOARD == 70
  1294. #define KNOWN_BOARD 1
  1295. //////////////////FIX THIS//////////////
  1296. #ifndef __AVR_ATmega2560__
  1297. #error Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu.
  1298. #endif
  1299. #define LARGE_FLASH true
  1300. #define X_STEP_PIN 26
  1301. #define X_DIR_PIN 28
  1302. #define X_ENABLE_PIN 24
  1303. #define X_MIN_PIN 41
  1304. #define X_MAX_PIN 37
  1305. #define Y_STEP_PIN 60 // A6
  1306. #define Y_DIR_PIN 61 // A7
  1307. #define Y_ENABLE_PIN 22
  1308. #define Y_MIN_PIN 14
  1309. #define Y_MAX_PIN 15
  1310. #define Z_STEP_PIN 54 // A0
  1311. #define Z_DIR_PIN 55 // A1
  1312. #define Z_ENABLE_PIN 56 // A2
  1313. #define Z_MIN_PIN 18
  1314. #define Z_MAX_PIN 19
  1315. #define E0_STEP_PIN 31
  1316. #define E0_DIR_PIN 32
  1317. #define E0_ENABLE_PIN 38
  1318. #define E1_STEP_PIN 34
  1319. #define E1_DIR_PIN 36
  1320. #define E1_ENABLE_PIN 30
  1321. #define SDPOWER -1
  1322. #define SDSS 53
  1323. #define LED_PIN 13
  1324. #define FAN_PIN 7 // IO pin. Buffer needed
  1325. #define PS_ON_PIN 12
  1326. #define KILL_PIN -1
  1327. #define HEATER_0_PIN 9 // EXTRUDER 1
  1328. #define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
  1329. #define HEATER_2_PIN -1
  1330. #if TEMP_SENSOR_0 == -1
  1331. #define TEMP_0_PIN 8 // ANALOG NUMBERING
  1332. #else
  1333. #define TEMP_0_PIN 13 // ANALOG NUMBERING
  1334. #endif
  1335. #define TEMP_1_PIN 15 // ANALOG NUMBERING
  1336. #define TEMP_2_PIN -1 // ANALOG NUMBERING
  1337. #define HEATER_BED_PIN 10 // BED
  1338. #define TEMP_BED_PIN 14 // ANALOG NUMBERING
  1339. #define BEEPER 33 // Beeper on AUX-4
  1340. #ifdef ULTRA_LCD
  1341. #ifdef NEWPANEL
  1342. //arduino pin which triggers an piezzo beeper
  1343. #define LCD_PINS_RS 16
  1344. #define LCD_PINS_ENABLE 17
  1345. #define LCD_PINS_D4 23
  1346. #define LCD_PINS_D5 25
  1347. #define LCD_PINS_D6 27
  1348. #define LCD_PINS_D7 29
  1349. //buttons are directly attached using AUX-2
  1350. #define BTN_EN1 59
  1351. #define BTN_EN2 64
  1352. #define BTN_ENC 43 //the click
  1353. #define BLEN_C 2
  1354. #define BLEN_B 1
  1355. #define BLEN_A 0
  1356. #define SDCARDDETECT -1 // Ramps does not use this port
  1357. //encoder rotation values
  1358. #define encrot0 0
  1359. #define encrot1 2
  1360. #define encrot2 3
  1361. #define encrot3 1
  1362. #endif
  1363. #endif //ULTRA_LCD
  1364. #endif
  1365. #ifndef KNOWN_BOARD
  1366. #error Unknown MOTHERBOARD value in configuration.h
  1367. #endif
  1368. //List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
  1369. #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, HEATER_0_PIN,
  1370. #if EXTRUDERS > 1
  1371. #define _E1_PINS E1_STEP_PIN, E1_DIR_PIN, E1_ENABLE_PIN, HEATER_1_PIN,
  1372. #else
  1373. #define _E1_PINS
  1374. #endif
  1375. #if EXTRUDERS > 2
  1376. #define _E2_PINS E2_STEP_PIN, E2_DIR_PIN, E2_ENABLE_PIN, HEATER_2_PIN,
  1377. #else
  1378. #define _E2_PINS
  1379. #endif
  1380. #ifdef X_STOP_PIN
  1381. #if X_HOME_DIR < 0
  1382. #define X_MIN_PIN X_STOP_PIN
  1383. #define X_MAX_PIN -1
  1384. #else
  1385. #define X_MIN_PIN -1
  1386. #define X_MAX_PIN X_STOP_PIN
  1387. #endif
  1388. #endif
  1389. #ifdef Y_STOP_PIN
  1390. #if Y_HOME_DIR < 0
  1391. #define Y_MIN_PIN Y_STOP_PIN
  1392. #define Y_MAX_PIN -1
  1393. #else
  1394. #define Y_MIN_PIN -1
  1395. #define Y_MAX_PIN Y_STOP_PIN
  1396. #endif
  1397. #endif
  1398. #ifdef Z_STOP_PIN
  1399. #if Z_HOME_DIR < 0
  1400. #define Z_MIN_PIN Z_STOP_PIN
  1401. #define Z_MAX_PIN -1
  1402. #else
  1403. #define Z_MIN_PIN -1
  1404. #define Z_MAX_PIN Z_STOP_PIN
  1405. #endif
  1406. #endif
  1407. #ifdef DISABLE_MAX_ENDSTOPS
  1408. #define X_MAX_PIN -1
  1409. #define Y_MAX_PIN -1
  1410. #define Z_MAX_PIN -1
  1411. #endif
  1412. #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, \
  1413. HEATER_BED_PIN, FAN_PIN, \
  1414. _E0_PINS _E1_PINS _E2_PINS \
  1415. analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
  1416. #endif