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

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