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

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